10

I have a .eslintrc file in my root directory:

{
    "extends": "airbnb",
    "env": {
        "browser": true,
        "node": true,
        "jquery": true
},

    "rules": {
    "no-unused-vars": [0,{"argsIgnorePartern": "res|next|~err"}],
    "arrow-body-style": ["error", "as-needed"],
    "no-param-reassign": 0,
    "eqeqeq": [
        "error",
        "smart"
    ],
    "no-shadow": "off",
    "allowIndentationTabs": true,
    "import/newline-after-import": ["error", { "count": 0 }],
    "no-console": 0,
    "import": 0,
    "func-names": 0,
    "space-before-function-paren": 0,
    "comma-dangle": 0,
    "max-len": 0,
    "no-underscore-dangle": 0,
    "react/prefer-es6-class": 0,
    "radix": 0,
    "indent": [1, "tab"],
    "react/jsx-indent": ["error", 4],
    "arrow-parens": [2, "as-needed"],
    "function-paren-newline": ["error", "consistent"],
    "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
    "react/prefer-stateless-function": "off",
    "no-use-before-define": ["error",{ "functions": false, "variables": false }],
    "no-plusplus": ["error", { "allowForLoopAfterthoughts": true }]}
}

I'm getting the following error:

Unexpected tab character eslint(no-tabs)

So I added that rule: "allowIndentationTabs": true

However, I'm still getting that error. I also made sure that my VSCode is configured for tabs instead of spaces. This is kinda driving me crazy. I figured, that rule would overwrite whatever airbnbs rule was but I guess not. What the hell?!

user7496931
  • 1,347
  • 3
  • 15
  • 32
  • Possible duplicate of [Use ESLint with Airbnb style and tab (React.js)](https://stackoverflow.com/questions/40835041/use-eslint-with-airbnb-style-and-tab-react-js) – Herohtar Jan 05 '19 at 03:42

1 Answers1

9

Looks like airbnb had another rule, so I just overwrote it:

"no-tabs": 0

user7496931
  • 1,347
  • 3
  • 15
  • 32