-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bring in more rule configurations from @foxglove/studio
#24
Conversation
@@ -29,8 +29,11 @@ module.exports = { | |||
}, | |||
], | |||
|
|||
"filenames/match-exported": "error", |
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 tested this rule out in the website repo, there are a couple of places we will need to ignore it (e.g. next.js requires files named _app.tsx
and 404.tsx
which aren't valid function export names). But other than that seems fine.
I assume you checked the perf implications of it?
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.
Yeah, didn't see it in the timing output of any lint runs in studio
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.
promise-function-async
is the slowest in studio. I can still run yarn lint
in 50 sec.
Rule | Time (ms) | Relative
:---------------------------------------------|----------:|--------:
@typescript-eslint/promise-function-async | 6097.230 | 35.6%
import/order | 2961.612 | 17.3%
@typescript-eslint/no-floating-promises | 2115.628 | 12.3%
@typescript-eslint/no-unused-vars | 660.667 | 3.9%
@typescript-eslint/unbound-method | 563.162 | 3.3%
@typescript-eslint/strict-boolean-expressions | 491.951 | 2.9%
react/no-deprecated | 430.047 | 2.5%
react/no-unused-prop-types | 356.396 | 2.1%
react/no-direct-mutation-state | 345.526 | 2.0%
✔ Lint done...
yarn lint 50.11s user 3.10s system 145% cpu 36.662 total
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.
btw, ESLint still doesn't run rules in parallel although that is an active area of research: eslint/rfcs#42
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.
sweet
Graduate these changes to the shared config.