typescript-eslint: Definition for rule '@typescript-eslint/no-angle-bracket-type-assertion' was not found @typescript-eslint/no-angle-bracket-type-assertion

Hi, with the latest version I am getting following warning:

Line 1:1:  Definition for rule '@typescript-eslint/no-angle-bracket-type-assertion' was not found  @typescript-eslint/no-angle-bracket-type-assertion
{
  "parser": "@typescript-eslint/parser",
  "plugins": ["react-hooks"],
  "rules": {
    "@typescript-eslint/indent": ["error", 2],
    "@typescript-eslint/explicit-function-return-type": "off",
    "@typescript-eslint/prefer-interface": "off",
    "@typescript-eslint/explicit-member-accessibility": "off",
    "@typescript-eslint/no-var-requires": "off",
    "react-hooks/rules-of-hooks": "error",
    "react-hooks/exhaustive-deps": "error",
    "react/prop-types": "off",
    "no-undef": "off"
  },
  "extends": [
    "plugin:react/recommended",
    "plugin:@typescript-eslint/eslint-recommended",
    "plugin:@typescript-eslint/recommended",
    "prettier",
    "prettier/@typescript-eslint"
  ],
  "settings": {
    "react": {
      "version": "detect" // Tells eslint-plugin-react to automatically detect the version of React to use
    }
  }
}
// your repro code case

Expected Result

Actual Result

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin X.Y.Z
@typescript-eslint/parser X.Y.Z
TypeScript X.Y.Z
ESLint X.Y.Z
node X.Y.Z
npm X.Y.Z

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (2 by maintainers)

Most upvoted comments

@sywesk Yep, initially i did that; then i update to latest react-scripts (3.1.1) and that solved completely the issue; thanks anyway! 😃

Can confirm, "react-scripts": "^3.1.2" fixed it for me.

@Emiliano-Bucci strange, i’m on 3.1.1 and have the issue. Seems you’ve been lucky 😄 I did revert the version of typescript-eslint though.

@Emiliano-Bucci in your package.json, remove this part:

  "eslintConfig": {
    "extends": "react-app"
  },

It’s the React-Scripts that only supports v1 and enforces it’s own config.

I solved this issue this way:

  1. Delete the node_modules

  2. update the Package.Json line of React-scripts to this: "“react-scripts”: “3.1.2"”

  3. run npm i

This should work

@tomitrescak Thanks for the clarification. Do you know if is possible to configure react-scripts in order to not enforce it’s own config? Or to make eslint config prioritize? Thanks

The rule has been removed in 2.0.0 and replaced with another one.

Please read the 2.0.0 release notes: https://github.com/typescript-eslint/typescript-eslint/releases/tag/v2.0.0