Edited December 8th, 2022: updated to include @aaronadamsCA's #6019 (comment) and @robertknight's #6014 (comment) to this proposal.
ContextRight now, no config in the following list of configs provided with typescript-eslint 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" ] }
That's very inconvenient -and sometimes even confusing- for end users.
Breaking Change: Including Lesser ConfigsProposal: how about we have each config in that list also include any previous config in the list? That way if you want, say, the strict
ruleset, you would only need to enable it, not recommended-*
ones:
{ "extends": [ "plugin:@typescript-eslint/strict" ] }Associated Enhancement: More Delineated Configs
We've received occasional user feedback (e.g. #6014 (comment)) that our recommended rulesets also include some stylistic rules. The ESLint community has generally moved away from the old 2010s-era eslint-config-airbnb practice of doing that. I agree that we should separate those out.
This proposal suggests we split our recommended configurations into:
recommended
: Recommended rules that you can drop in without additional configuration.recommended-type-checked
: Additional recommended rules that require type information.strict
: Additional strict rules that can also catch bugs but are more opinionated than recommended rules.strict-type-checked
: Additional strict rules require type information.stylistic
: Stylistic rules you can drop in without additional configuration.stylistic-type-checked
: Additional stylistic rules that require type information.You can see the equivalent code changes in #5251.
Description of Breaking ChangesIn other words, there are three changes being proposed here:
recommended
, recommended-requiring-type-checking
, and strict
configs: this is a breaking changestrict-type-checked
, sylistic
, and stylistic-type-checked
configurations: this is not a breaking changerecommended-requiring-type-checking
to recommended-type-checked
: this would be a breaking change, except recommended-requiring-type-checking
, will be left as an alias for its new config name, recommended-type-checked
.
Thanks @shawnmcknight for a great Twitter discussion on phrasing the breaking changes!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4