-
Notifications
You must be signed in to change notification settings - Fork 157
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
Added enforced linting #436
Conversation
Codecov Report
@@ Coverage Diff @@
## master #436 +/- ##
==========================================
- Coverage 82.71% 82.70% -0.01%
==========================================
Files 36 36
Lines 1741 1740 -1
==========================================
- Hits 1440 1439 -1
Misses 301 301
Continue to review full report at Codecov.
|
Looks like there's some weirdness with the |
@@ -55,7 +55,7 @@ var RuleCache = { | |||
if(v !== 0) return v; | |||
if(a.getName() > b.getName()) | |||
return 1; |
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.
I'd expect our lint to enforce braces around blocks
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.
Good call, will add the curly
rule
Co-authored-by: Anuraag Agrawal <[email protected]>
Issue #, if available:
#329
Description of changes:
Added a top-level
.eslintrc.json
which contains all config, and just extended from it in all subpackages. We use the@typescript-eslint/recommended
andimport/recommended
base configurations, which don't end up being too opinionated, but is in line with what the AWS SDK uses. I considered adding Prettier, and am still not opposed, but neither the AWS SDK nor OpenTelemetry JS uses it (see open-telemetry/opentelemetry-js#2204 for more on the recent removal).It turns out I can't really add a linting rule to prevent an import like the one that caused #427 because it's a perfectly valid import, but such issues should be caught by the smoke tests now anyway and the repo was long overdue for linting.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.