Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[camelcase] definition for rule '@typescript-eslint/camelcase' was not found #2077

Closed
ghaiklor opened this issue May 23, 2020 · 7 comments
Closed
Labels
fix: user error issue was fixed by correcting the configuration / correcting the code package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin working as intended Issues that are closed as they are working as intended

Comments

@ghaiklor
Copy link

Repro

When using all preset it throws "Definition for rule '@typescript-eslint/camelcase' was not found" error.

  "extends": [
    "eslint:all",
    "plugin:@typescript-eslint/all",
    "plugin:import/typescript",
    "plugin:jest/all",
    "plugin:node/recommended",
    "plugin:promise/recommended",
    "standard-with-typescript"
  ],

Expected Result

It should not throw an error.

Actual Result

Getting errors:

error  Definition for rule '@typescript-eslint/camelcase' was not found  @typescript-eslint/camelcase

Versions

package version
@typescript-eslint/eslint-plugin 3.0.0
@typescript-eslint/parser 3.0.0
TypeScript 3.9.3
ESLint 7.1.0
node 14.2.0
npm 6.14.4
@ghaiklor ghaiklor added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels May 23, 2020
@bradzacher
Copy link
Member

bradzacher commented May 23, 2020

Please take a look at the release notes for v3.
https://github.com/typescript-eslint/typescript-eslint/releases/tag/v3.0.0

your problem is that standard-with-typescript doesn't support v3 of our tooling.

@bradzacher bradzacher added working as intended Issues that are closed as they are working as intended and removed triage Waiting for maintainers to take a look labels May 23, 2020
@AnthonyLzq
Copy link

AnthonyLzq commented May 23, 2020

Same error here, this is mi .eslintrc.json:

{
  "extends": [
    "eslint:recommended",
    "airbnb-typescript/base",
    "plugin:@typescript-eslint/recommended",
    "plugin:node/recommended",
    "plugin:prettier/recommended"
  ],
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "project": "./tsconfig.json"
  },
  "plugins": ["@typescript-eslint", "sort-keys-fix"],
  "rules": {
    "@typescript-eslint/semi": ["error", "never"],
    "@typescript-eslint/naming-convention": [
      "error",
      {
        "selector": "default",
        "format": ["camelCase"]
      },
      {
        "selector": "variable",
        "format": ["camelCase", "UPPER_CASE"]
      },
      {
        "selector": "parameter",
        "format": ["camelCase"],
        "leadingUnderscore": "allow"
      },
      {
        "selector": "memberLike",
        "modifiers": ["private"],
        "format": ["camelCase"],
        "leadingUnderscore": "require"
      },
      {
        "selector": "typeLike",
        "format": ["PascalCase"]
      }
    ],
    "no-console": "off",
    "no-param-reassign": "off",
    "no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
    "radix": ["error", "as-needed"],
    "semi": "off",
    "sort-keys": "error"
  }
}

Versions:

package version
@typescript-eslint/eslint-plugin 3.0.0
@typescript-eslint/parser 3.0.0
eslint 7.1.0
eslint-config-airbnb-typescript 7.2.1
eslint-config-prettier 6.11.0
eslint-plugin-import 2.20.2
eslint-plugin-prettier 3.1.3
prettier 3.1.3
typescript 3.9.3

@bradzacher
Copy link
Member

it's the same problem - airbnb-typescript has not been updated to support our v3 release.

@AnthonyLzq
Copy link

it's the same problem - airbnb-typescript has not been updated to support our v3 release.

Oh, I didn't know that. I guess the only thing I can do is to wait for news.

@DimychOcean
Copy link

I added rules for resolve this problem:

  • "@typescript-eslint/camelcase": "off"
  • "@typescript-eslint/naming-convention": [...]

@r3faat1
Copy link

r3faat1 commented May 27, 2020

Getting the same issue... annoying issue. Above code did not fix it for me.

@bradzacher
Copy link
Member

bradzacher commented May 27, 2020

eslint-config-standard-with-typescript has been updated to support our v3 release (as of their v18.0.0 - mightyiam/eslint-config-love#330)

eslint-config-airbnb-typescript has not yet - you can follow along at iamturns/eslint-config-airbnb-typescript#95

In the meantime, if you use the airbnb-typescript config, you can either:

  • manually disable the @typescript-eslint/camelcase rule yourself for all files in your codebase
  • hold off on upgrading to our v3 release.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 27, 2020
@bradzacher bradzacher added the fix: user error issue was fixed by correcting the configuration / correcting the code label Aug 17, 2020
tayfunyasar added a commit to tayfunyasar/nestjs-reactjs-docker that referenced this issue Apr 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fix: user error issue was fixed by correcting the configuration / correcting the code package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin working as intended Issues that are closed as they are working as intended
Projects
None yet
Development

No branches or pull requests

5 participants