-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OSCI][Enhancement] precommit(husky) and tsconfig changes #931
base: main
Are you sure you want to change the base?
[OSCI][Enhancement] precommit(husky) and tsconfig changes #931
Conversation
Signed-off-by: kohinoor98 <[email protected]>
Signed-off-by: kohinoor98 <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #931 +/- ##
========================================
Coverage 63.37% 63.37%
========================================
Files 341 341
Lines 11554 11554
Branches 2243 2112 -131
========================================
Hits 7322 7322
Misses 3658 3658
Partials 574 574 ☔ View full report in Codecov by Sentry. |
"@osd/eslint/no-restricted-paths": [ | ||
"error", | ||
{ | ||
basePath: __dirname, | ||
zones: [ | ||
{ | ||
target: ["(public|server)/**/*"], | ||
from: ["../../packages/**/*", "packages/**/*"], | ||
}, | ||
], | ||
}, | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the idea behind this rule, can you add a message that can explain, like here https://github.com/opensearch-project/OpenSearch-Dashboards/blame/791210de027467f95b13f7e0c9582fa149e08eb5/.eslintrc.js#L277
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bowenlan-amzn
The "@osd/eslint/no-restricted-paths"
rule in the ESLint configuration was added to enforce module import restrictions within the codebase.
"@typescript-eslint/naming-convention"
rule: it was added to enforce consistent naming conventions across the codebase. This rule specifies that all identifiers (like variables, classes, interfaces, etc.) should follow one of the defined formats: camelCase, UPPER_CASE, PascalCase, or snake_case. It also allows for leading and trailing underscores.
Please let me know if you want me to remove any/both of these rules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, for @osd/eslint/no-restricted-paths
part, I suppose it's restricting import from packages in public or server. I am just not sure what's the ideo behind this. @kohinoor98
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@osd/eslint/no-restricted-paths
: It prevents certain parts of your codebase (like public-facing or server-side code) from importing modules from restricted directories, which might be private and not intended for such use.
@bowenlan-amzn
Overall LGTM. |
Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Kohinoor Chatterjee <[email protected]>
Signed-off-by: kohinoor98 <[email protected]>
Description
Made changes to
.eslintrc.js
for defining lint rules,.lintstagedrc
for pre-commit check and,eslint:*
scripts added topackage.json
Important
This PR must be merged after #930 is merged into the codebase. Developers cannot commit code due to multiple lint issues already addressed in #930.
Issues Resolved
#86
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.