-
Notifications
You must be signed in to change notification settings - Fork 739
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
Add a lint workflow to fail on eslint warnings #7850
Conversation
fed0ff6
to
76ada81
Compare
76ada81
to
a8d6631
Compare
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.
Looks reasonable to me (we have a similar setup for core: clang plugin warnings are enforced at CI time but you are not required to respect them during local development). But I prefer if @eszkadev have the final word on this, I don't do enough work on the JS side to decide.
I'm wondering if we could maybe put more strict eslint check into So: |
This makes sense, I wonder if we should run it in both CI and a GitHub action ... that way if we're waiting in a queue for CI we'll still get input eslint failures quickly |
a8d6631
to
ac30cfc
Compare
We can always do eslint before c++ unit-tests in make check and it will be quick enough? |
As discussed [on Matrix](https://col.la/suppresseslintindevelopment) the set of things we want to pick up in CI and development are different. Specifically, there are some things that only get in the way during development but should not be allowed in merged code. Examples are 'debugger' statemens, dead code (e.g. resulting from 'if (false)') and unused variables. After #7822 there are no more eslint warnings, so we can use it as a separate state for these issues that should only block in CI. This commit make make check run eslint and fail if it receives any warnings, and changes those 3 errors so that they only emit warnings. It's expected that there are more annoying warnings which I've missed, if you have any please make a followup change! This commit explicitly does not deal with formatting-related issues (e.g. requiring single quotes for strings in eslint) as though they can be annoying there's no reason why they should change between development and master... another followup to improve linting experience could be to use an autoformatter so the computer fixes the formatting for you, however that's out-of-scope for this commit Change-Id: I036afac5ef5056a9cc2effc21e31165aa1436ad2 Signed-off-by: Skyler Grey <[email protected]>
ac30cfc
to
8ef504c
Compare
As discussed on Matrix the set of things we want to pick up in CI and development are different. Specifically, there are some things that only get in the way during development but should not be allowed in merged code. Examples are 'debugger' statemens, dead code (e.g. resulting from 'if (false)') and unused variables.
After #7822 there are no more eslint warnings, so we can use it as a separate state for these issues that should only block in CI.
This commit adds a new workflow which will run eslint and fail if it receives any warnings, and changes those 3 errors so that they only emit warnings.
It's expected that there are more annoying warnings which I've missed, if you have any please make a followup change!
This commit explicitly does not deal with formatting-related issues (e.g. requiring single quotes for strings in eslint) as though they can be annoying there's no reason why they should change between development and master... another followup to improve linting experience could be to use an autoformatter so the computer fixes the formatting for you, however that's out-of-scope for this commit
Change-Id: I036afac5ef5056a9cc2effc21e31165aa1436ad2
Summary
TODO
Checklist
make check
make run
and manually verified that everything looks okay