Invalid configuration for rule "@typescript-eslint/indent"
See original GitHub issueGetting an error with this plugin which breaks my vim eslint plugin integration:
[Error - 1:08:39 PM] .eslintrc.yml » eslint-config-airbnb-typescript »
/home/dori/Projects/Work/project-v3/client/node_modules/eslint-config-airbnb-typescript/lib/shared.js:
Configuration for rule "@typescript-eslint/indent" is invalid:
Value {"SwitchCase":1,"VariableDeclarator":1,"outerIIFEBody":1,"FunctionDeclaration":{"parameters":1,"body":1},"FunctionExpression":{"parameters":1,"body":1},"CallExpression":{"arguments":1},"ArrayExpression":1,"ObjectExpression":1,"ImportDeclaration":1,"flatTernaryExpressions":false,"ignoredNodes":["JSXElement","JSXElement > *","JSXAttribute","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXSpreadAttribute","JSXExpressionContainer","JSXOpeningElement","JSXClosingElement","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXText","JSXEmptyExpression","JSXSpreadChild"],"ignoreComments":false,"offsetTernaryExpressions":false}
should NOT have additional properties.
Using eslint-config-airbnb-typescript 7.2.1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:16
- Comments:16 (2 by maintainers)
Top Results From Across the Web
eslint indent and @typescript-eslint/indent conflict
I want to set tab width to 4, but it seems the base eslint and the typescript eslint are in conflict. Any idea...
Read more >indent | typescript-eslint
This rule extends the base eslint/indent rule. It adds support for TypeScript nodes. How to Use .eslintrc.cjs. module.
Read more >indent - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Importing 'indent' rule from ESLint configuration should ...
Importing 'indent' rule from ESLint configuration should disable conflicting settings. · Function declaration parameters -> Align when Multiline (enabled by ...
Read more >How to fix Definition for rule typescript-eslint no-use-before ...
I am new to eslint and I cannot figure out how to solve this issue. The beginning of my imports ... idea how...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also experiencing this, and I looks like the root cause is multiple versions of
@typescript-eslint/eslint-plugin
in the hierarchy ofnode_modules
, and eslint resolving to root node_modules packages that may be in different versions than the expectation.Like airbnb, I encapsulate configs in a package (say
@company/config-eslint
), the package has a dep on@typescript-eslint/eslint-plugin@3.7.1
, but when this package is installed elsewhere with another dep that has an older version, yarn installs both, and the newer is nested undernode_modules/@company/config-eslint/node_modules
:when eslint resolves the plugins by name, it uses the one at the root of node_modules, which is 2.34.0, and the error shows.
In a different repo without the additional older version as a sub dep of one of the deps, v9.0.0 works without the indent config error.
This can possibly be resolved by using full paths (
require.resolve
) in the eslint config, instead of plugin names. A support for this is coming to eslint. See: https://github.com/eslint/rfcs/pull/14 / https://github.com/eslint/rfcs/pull/9I was able to solve it, quite hackishly, using yarn resolutions, in the root package.json of the repo.
and this will also work if I add it as a local dependency.
EDIT: I hit this again in a different project, and the solution was to install
eslint
at the root.Still getting this error when using v9.0.0 of this library