-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Change Request: Consider exporting config with all rules enabled #400
Comments
I definitely like the idea of having a configuration that enables all rules, and I understand the desire to stay on top of best practices by opting out of specific rules rather than opting in. However, eslint-plugin-n has a slight nuance to consider: some rules are specifically designed for ESM (ECMAScript Modules), while others are more suitable for CommonJS environments, and vice-versa. This means that an "all rules" approach might not be universally applicable. To accommodate this, I'm wondering if we should perhaps consider exporting two all-encompassing configurations: What do you think about that approach? I'm happy to discuss this further, and I'm excited to see a PR come through if you're still on board with this. Let me know your thoughts! |
This sounds perfectly reasonable/compatible given the pre-existing setup. Do you think extending the respective |
the
I like to add a new metadata to all the rules, so the config can be auto-fenterated too. maybe |
open questions: 1. need to add an equivalent eslintrc config? 2. need to add language options? fixes #400
open questions: 1. need to add an equivalent eslintrc config? 2. need to add language options? fixes #400
open questions: 1. need to add an equivalent eslintrc config? 2. need to add language options? fixes #400
open questions: 1. need to add an equivalent eslintrc config? 2. need to add language options? fixes #400
I see that you already started on this so I assume I can hold off on this, ty! |
open questions: 1. need to add an equivalent eslintrc config? fixes #400
open questions: 1. need to add an equivalent eslintrc config? fixes #400
open questions: 1. need to add an equivalent eslintrc config? fixes #400
open questions: 1. need to add an equivalent eslintrc config? fixes #400
I'm 👎 on this because it would have the addition of new rules become a breaking change for its users – and if one avoids the breaking change by not adding new rules to it in minor releases, then it's an |
https://github.com/eslint/eslint/tree/main/packages/js#eslint-javascript-plugin (eg. The point of Does it violate semver? Maybe? Kind of but not really? If the docs clearly state This is about practicality vs. correctness, some developers want to be on the bleeding edge w/out manually having to track each new eslint rule that is added |
Yes, eslint's versioning policy is that new rules added to recommended are MAJOR updates, but https://github.com/eslint/eslint?tab=readme-ov-file#semantic-versioning-policy maybe we should document it somewhere: it's likely to break your build in non-majors; so use at your own risks. |
@aladdin-add I see no mention of I would like the name to indicate that this may happen in a non-major release:
Eg And ESLint should document a policy for |
eslint-plugin-n version
latest
What problem do you want to solve?
It tends to be hard to follow new best practices as they are implemented and not all end up in
recommended
.Changes to
recommended
after often consideredbreaking
, some people (including myself), prefer to opt into all eslint rules available and opt-out of the ones that are undesirable.What do you think is the correct solution?
Export a config with all rules enabled and let the consumer opt-out.
Prior art:
typescript-eslint
andeslint-plugin-unicorn
export anall
variant.Participation
Additional comments
I assume filing a PR for this would be relatively straight forward, there may be some differing opinions on individual rule configs though.
The text was updated successfully, but these errors were encountered: