Skip to content

Add a “recommended-next” preset for rules that will be recommended in next major #8676

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

Open
2 tasks done
voxpelli opened this issue Mar 14, 2024 · 5 comments
Open
2 tasks done
Labels
accepting prs Go ahead, send a pull request that resolves this issue package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin preset config change Proposal for an addition, removal, or general change to a preset config

Comments

@voxpelli
Copy link

Before You File a Proposal Please Confirm You Have Done The Following...

Description

Maybe add an “recommended-next” / “recommended-unstable” / “recommended-beta” where new rules like #8067 can be added without having to wait for the next major – then when the new major hits those are simply moved from there to the stable recommendation

That way the future of new rules becomes more documented.

A staging area for preset changes pretty much.

Impacted Configurations

No response

Additional Info

I originally posted in the Discord and @JoshuaKGoldberg asked me to post it here

@voxpelli voxpelli added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin preset config change Proposal for an addition, removal, or general change to a preset config triage Waiting for team members to take a look labels Mar 14, 2024
@rubiesonthesky
Copy link
Contributor

I think in some linters this is called "nursery". Though nursery can also refer that they are unstable to enable. So it's little bit different than having rule that should be stable, but it's not enabled by default in recommended set.

  • Biome https://biomejs.dev/linter/rules/#nursery "New rules that are still under development."
    • Nursery rules require explicit opt-in via configuration on stable versions because they may still have bugs or performance problems. They are enabled by default on nightly builds, but as they are unstable their diagnostic severity may be set to either error or warning, depending on whether we intend for the rule to be recommended or not when it eventually gets stabilized. Nursery rules get promoted to other groups once they become stable or may be removed.

  • Clippy https://doc.rust-lang.org/clippy/ "new lints that are still under development"

@bradzacher
Copy link
Member

The big issue I see here is that we don't usually decide upon what the recommended set should be in the next major until we're pepping for the next major.

We might have some ideas about new rules and whether or not they make a good recommended candidate - but we don't usually provide much more thought than that.

@voxpelli
Copy link
Author

Here's the Discord thread: https://discord.com/channels/1026804805894672454/1217588154710622271/1217896050745147423

There was some confusion as to why no-array-delete wasn't recommended and it wasn't easy to see that it was a new rule that likely would be considered for inclusion in the next major, leading to questions being asked, so that's the problem I suggested this to solve 😌

@bradzacher
Copy link
Member

Yeah for sure - I get the idea!
I'm just explaining that it would be a big change in our workflow for us to build this.

Right now our workflow is that we don't fully consider changes to the recommended set until we are preparing for the next major - at which point we generate an issue with the list of rules and we go through each rule to decide (a) if it's in the list - should it stay in the list and (b) if it's not in the list - should it be added.

Essentially we write everything out and we open it for community discussion and then we make some decisions and commit them for the major.

So you can see how trying to maintain a list before the major is a shift in things - we need to build out this issue and remember to keep it updated as we merge new rules in so that we don't lose track of anything.

@JoshuaKGoldberg
Copy link
Member

There's also the issue of #8695, that we leak internal meta.docs types. I'd think we'd want to wait until that's resolved before adding yet another option to these types (previous addition: #8364).

But, following that, I'd be up for values likes "recommended-prospective" and "strict-prospective" (or something with fewer characters?). As long as the docs are very clear on what they convey.

@JoshuaKGoldberg JoshuaKGoldberg added blocked by another issue Issues which are not ready because another issue needs to be resolved first and removed triage Waiting for team members to take a look labels Mar 25, 2024
@JoshuaKGoldberg JoshuaKGoldberg added triage Waiting for team members to take a look and removed blocked by another issue Issues which are not ready because another issue needs to be resolved first labels Jul 1, 2024
@JoshuaKGoldberg JoshuaKGoldberg added accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting prs Go ahead, send a pull request that resolves this issue package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin preset config change Proposal for an addition, removal, or general change to a preset config
Projects
None yet
Development

No branches or pull requests

4 participants