-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
tools: some eslint rules proposals #14253
Comments
Ref: #10129 |
FWIW, |
@Trott Yes, I've used some defaults to be more explicit. Some rules can be shortened. |
+1 to {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_} This way, one can just underscore-prefix unused variabled in function arguments or during destructuring: doSomething((_unused, used) => {});
const [_unused, used] = doSomething(); |
@silverwind With const [, , file] = process.argv; But I am OK with this decision if there are some +1. |
Any chance of adopting StandardJS? Avoids lots of stylistic bikeshedding. Many projects use it nowadays. As one example, migration was relatively painless for NPM (npm/npm#9954). The auto-formatter has improved since then, though it may not be perfect. |
@sebdeckers I doubt we will have consensus about "no semicolons" or "space after function name" :) The churn will be tremendous :) |
It seems this has not got enough approvement and can be closed for now. Feel free to reopen if something changes. |
@vsemozhetbyt I think |
Recently some big PRs with churn was mostly rejected or gave sporadic -1, so these are some preliminarily proposals to check the opinions before investing time.
Rule: http://eslint.org/docs/rules/no-unused-vars
Proposal:
Hits:
Refs: tools: delete an unused argument #14251
Rule: http://eslint.org/docs/rules/prefer-arrow-callback
Proposal:
Hits:
Rule: http://eslint.org/docs/rules/prefer-destructuring
Proposal:
Hits:
If there is some consensus for any proposal, it can be used as a starting point for code-and-learn or similar events.
If some or all approved proposals are not appropriate for code-and-learn, I can do any or all if there are volunteers to review.
The text was updated successfully, but these errors were encountered: