Use typescript-eslint's recommended configs as a starting base #114
JoshuaKGoldberg
started this conversation in
Ideas
Replies: 1 comment
-
For reused configs like this, a common rollout strategy I default to is:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
👋 Hi! I'm one of the typescript-eslint maintainers, and I see the custom list of rules in
/packages/config/src/eslint/typescript.js
. It's great to be so intentional about the lint settings.But - there are also shared configs that come with the typescript-eslint plugin: https://typescript-eslint.io/users/configs. Those configs -especially
recommended
andrecommended-type-checked
- enable the commonly useful rules that most projects generally find useful and not too opinionated.Our recommendation is that projects start with those presets and add customizations on top of them as needed. This has a few benefits:
typescript.js
, 12 have the same options asrecommendedTypeChecked
.Specifically, those repeated rules are...
method-signature-style
no-duplicate-enum-values
no-extra-non-null-assertion
no-for-in-array
no-misused-new
no-namespace
no-non-null-asserted-optional-chain
no-unnecessary-type-assertion
prefer-as-const
prefer-for-of
require-await
triple-slash-reference
Proposal: would you be open to switching
eslint-config
to be based ontseslint.configs.recommendedTypeChecked
andtseslint.configs.stylisticTypeChecked
?If it helps, I'd be happy to drive this work forward myself! It directly contributes to typescript-eslint/typescript-eslint#9141, which I'm working on now to prep for our v8 release.
Beta Was this translation helpful? Give feedback.
All reactions