Skip to content
This repository was archived by the owner on Oct 24, 2019. It is now read-only.

ESLint Definition for rule '@typescript-eslint/consistent-type-assertions' #18

Closed
dotdevio opened this issue Sep 28, 2019 · 3 comments
Closed

Comments

@dotdevio
Copy link

Describe the bug

This bug related to eslint.

Did you try recovering your dependencies?

yes
npm: 6.11.3

Environment

Environment Info:

System:
OS: Linux 4.15 Linux Mint 19.1 (Tessa)
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Binaries:
Node: 12.10.0 - ~/.nvm/versions/node/v12.10.0/bin/node
Yarn: Not Found
npm: 6.11.3 - ~/.nvm/versions/node/v12.10.0/bin/npm
Browsers:
Chrome: 77.0.3865.90
Firefox: 69.0.1
npmPackages:
react: ^16.10.0 => 16.10.0
react-dom: ^16.10.0 => 16.10.0
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found

Steps to reproduce

1. npx create-react-ssr-app my-app --typescript
2. eslint src/**/*.ts src/**/*.tsx

Expected behavior

Eslint should work.

Actual behavior

i get this error:

 1:1  error  Definition for rule '@typescript-eslint/consistent-type-assertions' was not found  @typescript-eslint/consistent-type-assertions

Reproducible demo

Not needed.

Related issues on react-scripts

typescript-eslint/typescript-eslint#863
facebook/create-react-app#7709
facebook/react#16845

Seems like updating react-scripts to ^3.1.2 fixes issue, but i cannot find u are using this package at all :) mby its dependency version related.

@dotdevio
Copy link
Author

Running:

npm install --save-dev eslint-config-react-app @typescript-eslint/eslint-plugin@2.x @typescript-eslint/parser@2.x babel-eslint@10.x eslint@6.x eslint-plugin-flowtype@3.x eslint-plugin-import@2.x eslint-plugin-jsx-a11y@6.x eslint-plugin-react@7.x eslint-plugin-react-hooks@1.x

in project root fixes issue, seems like just dependency version issue.

@dotdevio
Copy link
Author

I have updated this package versions:

    "@typescript-eslint/eslint-plugin": "^2.3.1",
    "@typescript-eslint/parser": "^2.3.1",
    "babel-eslint": "10.0.3",
    "eslint": "^6.4.0",
    "eslint-config-react-app": "^5.0.2",
    "eslint-plugin-react-hooks": "^1.7.0",

@maxparelius
Copy link
Contributor

@dotdevru thanks for the heads up will update dependencies soon to address this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants