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
Improve linting #5460
Improve linting #5460
Conversation
it's failing, workflow yamls shouldn't be modified |
I think the issue is the use of "[[" in the npm scripts. Fix incoming. |
package.json
Outdated
"debug:test": "mocha --inspect-brk --exit -t 0 test/all-tests-suite.js", | ||
"debug:tape": "node --inspect-brk test/tape/index.js", | ||
"coveralls": "nyc report --reporter=lcov", | ||
"lint": "eslint \"lib/**/*.js\" \"test/**/*.js\" \"bin/**/*.js\"", | ||
"lint": "eslint --cache --fix '**/*.js'", |
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.
lint by definition is about checking, it would be better to have explicit lint:fix
command for fixing.
And CI shouldn't be running 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.
Sure. But you'll end up with two different patterns for similar things. For ESLint you'll need ":fix" to make changes but not for Prettier. And for Prettier you'll need ":check" for check-only but not for ESLint.
Given the formatter and linter will always both run (in check-mode for CI and fix-mode locally) does it not make more sense to a) follow the same script naming pattern; and b) be joined the same command ?
Improves linting configs. Runs linting on the repo.
Details:
Note: The ESLint config currently has a blind spot on
.mjs
and.ts
files. Fixing that blindspot is out of scope of this PR.