-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
V4 Planned Changes #120
Comments
The problem you've got is "pretty much". Examples of rules that are opinionated: require-meta-type, report-message-format, test-case-property-ordering, test-case-shorthand-strings. Speaking from experience with @typescript-eslint - you want the recommended set to just be an unopinionated set of rules that catch problems. |
there is already a preset so you can extend like: extends: ["plugin:eslint-plugin/all"] |
@bradzacher if the goal is to leave "opinionated" or "stylistic" rules (i.e. about the ordering of properties) out of the Here are the rules I would specifically advocate for being added to the
Here are rules which could be considered too opinionated/stylistic to include in the
|
agreed with @bradzacher . eslint has set a very high bar to
|
Sounds good. Can I ask why you would exclude these ones:
I consider these two especially high impact in that they both improve external-facing rule usability by helping developers understand lint rules (by providing an IDE documentation link) and ensuring developers configure rules correctly. |
yes, it is a best practice, and should be enabled in most cases, but there are some exceptions, e.g. internal-rules: https://github.com/eslint/eslint/tree/master/tools/internal-rules |
Example: For the wider world - docs url assumes the author has written and maintained docs (not always true). And yeah whilst technically it's best if you define a schema even without options. It's certainly not a huge deal if you don't when you have no options. |
Having no rule options is totally fine. The require-meta-schema rule doc explains that |
Thanks to both of you for bringing up some use cases where a plugin might not want to specify rule URLs. Those are helpful. |
I have an update to share regarding the With this change, rules without options will no longer need to specify As a result of this change, we should be able to enable the |
As eslint v8.0.0 will be released in a few weeks, we can start merging these PRs, and made a prerelease version. thoughts? @bmish |
@aladdin-add I believe all PRs for the next release are ready, except for #179 which I can try to get to soon. A prerelease version is a good idea. |
Two more notes:
|
Open question: I have added a
|
re requireSchemaPropertyWhenOptionless: I'm fine either way. which one do you prefer? |
I personally think we should enforce the more strict behavior (keep |
I realized that a lot of our existing rules need to be updated to handle suggestions. I think it's pretty important that we correct this gap in coverage in this major release, as the suggestions feature has been available for nearly 2 years now. I've opened issues to track these gaps, and I will try to open PRs to address these in the coming days. The changes required should not be that large.
In the meantime, we should continue to work on getting all the other changes for the major release merged. |
👍 nice catch! |
@aladdin-add thanks for releasing the prerelease version. I'll spend a few days now testing it and checking for false positives/negatives before the final release. |
@bmish I've tested it in a few plugins - all working fine, an excellent job! 🎉 just pushed 4.0.0 - let's wait and see if need patch releases. 😄 |
Release completed! https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/releases/tag/v4.0.0 Will address any bugs separately. |
I wanted to put together a list of the changes I'm hoping to see in the next major version. What do you think?
eslint-utils
to v3 #148)Switch to pure ES modules?Probably not practical yet.Update consistent-output rule option default toalways
since it's always best practice to assert theoutput
(Breaking: Renameconsistent-output
rule torequire-test-output
#150)meta.hasSuggestions
property to meta-property-ordering rule (Breaking: Addmeta.hasSuggestions
property tometa-property-ordering
rule #119)fixer-return
should be updated to apply to suggestion fixer functions too #190report-message-format
should apply to suggestion messages #192prefer-replace-text
should be updated to apply to suggestion fixer functions too #193fixer-return
torules
preset (Breaking: Addfixer-return
torules
preset #199)recommended
rules (Breaking: Enable additionalrecommended
rules for v4 #152):I would actually add ALL existing rules. I've used all of this plugin's rules successfully in a number of my eslint plugins, and I find them pretty much all useful and agreeable. Only about 1/3 of existing rules are enabled as recommended right now, and I see this as a missed opportunity, since most people only bother to enable the recommended rules. Enabling more rules means more exposure/battle-hardening of the rules and more benefit to users.The text was updated successfully, but these errors were encountered: