CWSites
CWSites

Reputation: 1801

Code Climate - Definition for rule '@stylistic/indent' was not found

I've researched this for quite awhile myself, looked through Code Climate and ES Lint GitHub issues and reached out to ES Lint community support on Discord with no luck.

I've followed the steps to properly configure @stylistic/eslint-plugin using a Legacy Config. My configuration has the same structure as theres. I'm using multiple @stylistic rules and I've verified they aren't deprecated.

For the purpose of this question I'll focus on @stylistic/indent although I have many rules with the same error in Code Climate.

I'm able to run yarn lint locally with no problems. However when I submit a pull request and Code Climate scans the changes I get a lot of NEW issues with the title

"Definition for rule '@stylistic/indent' was not found."

Any help would be greatly appreciated. Below is the majority of our .eslintrc.json file with many of the extra rules removed for clarity.

{
  "env": {
    "jest": true
  },
  "globals": {
    "JSX": true
  },
  "extends": [
    "airbnb",
    "next",
    "next/core-web-vitals",
    "plugin:jest/recommended",
    "plugin:jest/style",
    "plugin:jsx-a11y/recommended",
    "plugin:react/jsx-runtime",
    "plugin:react/recommended",
    "prettier"
  ],
  "parserOptions": {
    "ecmaVersion": 2020,
    "ecmaFeatures": {
      "jsx": true
    },
    "sourceType": "module"
  },
  "plugins": [
    "jest",
    "react",
    "@stylistic"
  ],
  "settings": {
    "jest": {
      "version": 29
    },
    "import/resolver": {
      "node": {
        "extensions": [
          ".js",
          ".jsx",
          ".ts",
          ".tsx"
        ]
      }
    }
  },
  "rules": {
    "@stylistic/eol-last": ["error", "always"],
    "@stylistic/indent": ["error", 2, { "SwitchCase": 1 }],
    "@stylistic/max-len": ["error", 180],
    "@stylistic/quotes": ["error", "single"],
    "@stylistic/semi": ["error", "always"],
    "@stylistic/space-before-function-paren": ["error", "always"]
  }
}


Upvotes: 0

Views: 24

Answers (0)

Related Questions