Community Feedback: Pain Points #6121
Replies: 4 comments 4 replies
-
The main annoyance for me is how typescript-eslint overrides lint rules that are part of the ESLint core rules itself. Our config has a bunch of definitions like this: module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
// If adding a typescript-eslint version of an existing ESLint rule,
// make sure to disable the ESLint rule here.
rules: {
// TypeScript's `noFallthroughCasesInSwitch` option is more robust (#6906)
"default-case": "off",
// 'tsc' already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/291)
"no-dupe-class-members": "off",
// 'tsc' already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/477)
"no-undef": "off",
// Add TypeScript specific rules (and turn off ESLint equivalents)
"@typescript-eslint/consistent-type-assertions": "warn",
"no-array-constructor": "off",
"@typescript-eslint/no-array-constructor": "warn",
// more of these…
}
} Note that this is based on an ejected But to me this shows there’s an inherent tension because of the fact that ESLint’s core doesn’t recognize TypeScript (hence the need for a custom parser) and its rules don’t either. This also leaks into the ecosystem, because when trying out some rule from NPM you often don’t know whether it’ll play nicely with TypeScript or not. If TypeScript support were first-class (see Deno or Rome), this would not be necessary. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
For the authors of @typescript-eslint/prefer-for-of: |
Beta Was this translation helpful? Give feedback.
-
This discussion is intended to be a general thread where we can collect some feedback from users. We've recently seen some unstructured complaints and critiques in other repo discussions and on twitter - which is hard for us to action because we can't easily engage or collect more information in those places (off-topic spam or 140 character limit).
Discussion threads here will let us organise a bit without forcing everyone to go through filing a new issue with a template.
So please provide your feedback. Let us know what you find difficult about using TypeScript with ESLint. Please provide more than a sentence to help us understand. If you can add some examples that would be great.
You don't need to think about or provide any solutions to the problem - leave that to us! (but feel free to provide them if you want!)
We may not be able to respond to everyone, but be sure that every comment will be read by maintainers and will help us to improve the ecosystem.
Beta Was this translation helpful? Give feedback.
All reactions