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
update eslint:recommended and eslint-config-eslint. #14673
Comments
It’s not clear to me what exactly you are suggesting should change. Are you saying that rules with “y” in the eslint:recommended table should be added? I’m just not sure how to read this table. Keep in mind that recommended rules must flag potential errors or suggest better ways of doing things. We can’t recommend any rules that are stylistic. |
yes! updated the issue to make it clearer. |
Thanks, that helps. I think a lot of these rules fall under the category of stylistic, so I’m not in favor of adding them to eslint:recommended. The ones I think make sense to add are:
I don’t care too much about eslint-config-eslint. Historically, we have tried to enable as many rules as possible so we are constantly testing them. As such, I’m fine with adding whatever people want. |
I vote for these four:
The first three flag errors in the code, and I can't think of any reason to not enable each. no-nonoctal-decimal-escape flags the use of a legacy syntax that can be easily avoided. no-unreachable-loop This can be problematic because by default it flags a pattern that checks if an object has enumerable properties: for (const key in obj) {
has = true;
break;
} And a pattern to check if there's anything in a sequence: for (const value of iterable) {
has = true;
break;
} no-promise-executor-return There are some patterns that would be reported by this rule:
Rest of the rules marked as "?" or "y":
|
Happy to go along with @mdjermanovic’s suggestions. |
sounds good! I can make 2 PRs: one for the |
Sounds good to me 👍🏻 |
I also agree with @mdjermanovic for Marking as accepted and adding to the v8.0.0 roadmap since we’re all in favor. |
* no-loss-of-precision * no-unsafe-optional-chaining * no-useless-backreference * no-nonoctal-decimal-escape
The version of ESLint you are using.
latest
The problem you want to solve.
update eslint:recommended and eslint-config-eslint.
Your take on the correct solution to problem.
\8
and\9
escape sequences in string literalsundefined
value is not allowedMath.pow
in favor of the**
operatorRegExp
constructor in favor of regular expression literalsis it too late to consider adding this to eslint v8.0.0? �:-(
The text was updated successfully, but these errors were encountered: