Thanks to visit codestin.com
Credit goes to github.com

Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Configs: Have recommended/strict configs include lesser configs #5204

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

Closed
2 tasks done
JoshuaKGoldberg opened this issue Jun 20, 2022 · 2 comments · Fixed by #5251
Closed
2 tasks done

Configs: Have recommended/strict configs include lesser configs #5204

JoshuaKGoldberg opened this issue Jun 20, 2022 · 2 comments · Fixed by #5251
Labels
accepting prs Go ahead, send a pull request that resolves this issue breaking change This change will require a new major version to be released 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
Milestone

Comments

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Jun 20, 2022

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

Description

Right now, no config in the following list includes any other config in that list:

  • plugin:@typescript-eslint/recommended
  • plugin:@typescript-eslint/recommended-requiring-type-checking
  • plugin:@typescript-eslint/strict

That means if you want, say, the strictest, you must enable all three (https://typescript-eslint.io/docs/linting/configs):

{
  "extends": [
    "plugin:@typescript-eslint/recommended",
    "plugin:@typescript-eslint/recommended-requiring-type-checking",
    "plugin:@typescript-eslint/strict"
  ]
}

Proposal: how about we have each config in that list also include any previous config in the list? That way if you want, say, the strictest, you would only need to enable one:

{
  "extends": [
    "plugin:@typescript-eslint/strict"
  ]
}

Impacted Configurations

  • plugin:@typescript-eslint/recommended
  • plugin:@typescript-eslint/recommended-requiring-type-checking
  • plugin:@typescript-eslint/strict

Additional Info

This would be a breaking change.

@JoshuaKGoldberg JoshuaKGoldberg added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look breaking change This change will require a new major version to be released preset config change Proposal for an addition, removal, or general change to a preset config labels Jun 20, 2022
@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 Jun 25, 2022
@JoshuaKGoldberg JoshuaKGoldberg added this to the 6.0.0 milestone Jun 25, 2022
@aaronadamsCA
Copy link

Could I suggest a change?

Is it possible we could get a strict-requiring-type-checking that includes recommended-requiring-type-checking, and then strict would only include recommended?

I'd love to extend the strict recommendation, but right now for performance purposes we try not to connect rules that require type information to the IDE. If I could just extend strict for the IDE and then add strict-requiring-type-checking for the check scripts, it would cut down on our maintenance a ton.

I know it's a separate request, but I wanted to mention it here first since it's in direct opposition to half of this change.

@bradzacher
Copy link
Member

I definitely agree that splitting out strict-requring-type-checking might be a good idea.
One of the reasons we separated recommended and recommended-requiring-type-checking is so that people could chose to lint with type information in specific situations for perf reasons.

So i think it might make sense to continue this theme for strict as well?

@typescript-eslint typescript-eslint locked and limited conversation to collaborators Nov 17, 2022
@JoshuaKGoldberg JoshuaKGoldberg converted this issue into discussion #6019 Nov 17, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
accepting prs Go ahead, send a pull request that resolves this issue breaking change This change will require a new major version to be released 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
3 participants