Search code examples
eslinttslinttypescript-eslint

How to turn off eslint rule?


How do you turn off an eslint rule, for example no-inferrable-types which comes from the extension "eslint:recommended"?

For example if my .eslintrc.json contains:

"extends": [
    "eslint:recommended",
.....
"@typescript-eslint/no-inferrable-types": [
          "error",
          {
            "ignoreParameters": false,
            "ignoreProperties": false
          }
        ],

Solution

  • Set the value to "off" , as described here: https://eslint.org/docs/latest/user-guide/configuring/rules

    For example:

    "@typescript-eslint/no-inferrable-types": "off",