Removed plugin:node/recommended from .eslintrc.js because it caused ESLint to raise a lot of node/no-unsupported-features/es-syntax errors in TypeScript files. I'm not sure why it was actually used, please let me know!
Explicitly set ESLint parser to @typescript-eslint/parser so that it actually processes TypeScript files.
Added @typescript-eslintdevDependencies for better compatibility between ESLint and TypeScript (it disables conflicted rules e.g. no-unused-args when actually defining a type, etc.)
Refined a bit some typing for the no-uninstalled-addons rule so that is is slightly more precise
Ran the autofix in the whole project and manually fixed remaining warnings/errors
Made sure to provide adequate fallbacks when using optional chaining after the above changes
Unused types inside lib/types/index.ts (RecommendedConfig, the generic TOptions is on StorybookRuleMetaDocs which itself doesn't seem to be used anywhere) got removed.
What did not change
There is a whole block with an attached TODO note which raises ESLint problems: I started to look into it. However, required changes look a bit less trivial, I guess it deserves a PR on its own so that it can be further discussed.
Same thing about TypeScript and ESLint errors on the generated example rule.
What Changed
plugin:node/recommended
from.eslintrc.js
because it caused ESLint to raise a lot ofnode/no-unsupported-features/es-syntax
errors in TypeScript files. I'm not sure why it was actually used, please let me know!@typescript-eslint/parser
so that it actually processes TypeScript files.@typescript-eslint
devDependencies
for better compatibility between ESLint and TypeScript (it disables conflicted rules e.g.no-unused-args
when actually defining a type, etc.)no-uninstalled-addons
rule so that is is slightly more preciselib/types/index.ts
(RecommendedConfig
, the genericTOptions
is onStorybookRuleMetaDocs
which itself doesn't seem to be used anywhere) got removed.What did not change
Checklist
Check the ones applicable to your change:
yarn update-all
Change Type
Indicate the type of change your pull request is:
maintenance
documentation
patch
minor
major