Reputation: 1101
The indent rule seems impossible to disable; how (in config settings) do I disable this rule? thanks.
Upvotes: 68
Views: 45208
Reputation: 1885
In my webstorm project I had to put the following in my .eslintrc.js
(I think this would work the same for .eslintrc
or .eslintrc.json
):
rules: {
// other rule,
// other rule,
'@typescript-eslint/indent': 'off', <---- add this rule
// other rule
}
Upvotes: 1
Reputation: 261
If you disable indent checking, remember to restart local server to get rid off the errors.
Upvotes: 0
Reputation: 4254
For typescript, we can utilize the following on the individual file at the top of the page which will disable eslint check for indent
/* eslint-disable @typescript-eslint/indent */
Upvotes: 0
Reputation: 3751
For indentation, I usually let it activated in config and disable it only in some files where I need a fancy indentation, hence I use the comment
/* eslint-disable indent */
It is worth to note that this works also with standardJS as well as on any other linter powered by eslint.
Upvotes: 27
Reputation: 7143
I had to add more rules. To turn off linting for react
and jsx-indent
"rules": {
"indent": "off",
"react/jsx-indent": "off",
"react/jsx-indent-props": "off"
}
Upvotes: 18
Reputation: 2397
Set the rule to "off"
in your config like this:
"rules": {
"indent": "off"
}
You can read more in the docs here.
Upvotes: 90