How do you disable indent checking on esLint?

Eslint

Eslint Problem Overview


The indent rule seems impossible to disable; how (in config settings) do I disable this rule? thanks.

Eslint Solutions


Solution 1 - Eslint

Set the rule to "off" in your config like this:

"rules": {
  "indent": "off"
}

You can read more in the docs here.

Solution 2 - Eslint

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 that I use a lot, as well as on any other linter powered by eslint. For example I created a lighter version of standardjs, that is called standa that is standardjs minus the React part (yes this is the auto promotion part but I hope sharing this can be useful to many others than me :) that uses the great standard engine which relies on eslint, so everything just work with no extra line of code from me.

Solution 3 - Eslint

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"
}

Solution 4 - Eslint

This is the one that worked for me

"indent": ["error", ""],

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDave EdelhartView Question on Stackoverflow
Solution 1 - EslintVincent OrbackView Answer on Stackoverflow
Solution 2 - EslintGianluca CasatiView Answer on Stackoverflow
Solution 3 - EslintSaahithyan VigneswaranView Answer on Stackoverflow
Solution 4 - EslintAlex DSView Answer on Stackoverflow