简体   繁体   中英

.eslintrc file not overriding

I have this rule turned on: "@typescript-eslint/no-unused-vars": "error", but am attempting to override it

    "overrides": [
        {
         "files": ["**/*.ts", "**/*.tsx"],
          "excludedFiles": "**/*.js",
          "rules": {
            "@typescript-eslint/no-unused-vars": "error"
          }
        }
      ],

essentially I want it to ignore all .js files but only to check .ts files. but when I run yarn lint it's showing errors just in .js files. any ideas?

You need to add the following line inside rules:

  "no-unused-vars": "off",

Please check this for more info on usage.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM