Definition for rule '@typescript-eslint/consistent-type-assertions' was not found
See original GitHub issueCurrent Behavior
Created a new react
package, ran lint src
and got an error:
$ npx tsdx create reactfoo
# choose "react"
$ cd reactfoo
$ yarn lint src
/tmp/reactfoo/src/index.tsx
1:1 error Definition for rule '@typescript-eslint/consistent-type-assertions' was not found @typescript-eslint/consistent-type-assertions
✖ 1 problem (1 error, 0 warnings)
error Command failed with exit code 1.
Expected behavior
no errors
Suggested solution(s)
looks like this package doesn’t exist anymore https://www.npmjs.com/package/@typescript-eslint/consistent-type-assertions
when installing tsdx, it comes with eslint-config-react-app@5.0.2
which has the reference to the missing package.
locking it at 5.0.1
resolves the issue.
looks like 6.0.2
is on eslint-config-react-app
github but not yet released.
Additional context
Your environment
Software | Version(s) |
---|---|
TSDX | 0.9.2 |
TypeScript | 3.6.3 |
Browser | |
npm/Yarn | yarn |
Operating System |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:8 (6 by maintainers)
Top Results From Across the Web
"Definition for rule '@typescript-eslint/consistent-type ...
My React app is not failing to compile due to the error: Definition for rule '@typescript-eslint/consistent-type-assertions' was not found.
Read more >Definition for rule '@typescript-eslint/consistent-type ... - GitHub
Hi,. There is a bug in the Create-react-app CLI. Currently if you use and old package.json that has the : react-scripts: ^3.1.1 version....
Read more >“Definition for rule '@typescript-eslint/consistent-type ...
My React app is not failing to compile due to the error: Definition for rule '@typescript-eslint/consistent-type-assertions' was not found.
Read more >definition for rule '@typescript-eslint/consistent-type-assertions ...
definition for rule '@typescript-eslint/consistent-type-assertions' was not found. Add Answer | View In TPC Matrix. Technical Problem Cluster First Answered ...
Read more >How to fix Definition for rule typescript-eslint no-use-before ...
It complains about the definition not being found for the specified rule. I would like to keep the rule in place as it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As a different workaround for now, you could do
yarn add -D @typescript-eslint/eslint-plugin@latest
This was related to or fixed by #216 , #218, #220