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

Definition for rule '@typescript-eslint/consistent-type-assertions' was not found #210

Closed
elado opened this issue Sep 19, 2019 · 8 comments
Labels
scope: dependencies Pull requests that update a dependency file scope: upstream Issue in upstream dependency

Comments

@elado
Copy link
Contributor

elado commented Sep 19, 2019

Current 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
@jaredpalmer
Copy link
Owner

Can you send a PR?

@sadsa
Copy link
Contributor

sadsa commented Sep 30, 2019

I've been tracking this same bug. It may be related to the same issue here

@skvale
Copy link
Contributor

skvale commented Oct 1, 2019

I looked in the created reactfoo/yarn.lock file. It looks like

tsdx@^0.9.3:
  ...
  dependencies:
    ...
    "@typescript-eslint/eslint-plugin" "^1.13.0"
    "@typescript-eslint/parser" "^1.13.0"

Which doesn't match the version needed to resolve @typescript-eslint/consistent-type-assertions.
I think tsdx just needs to publish a new version to fix this, since the right version is in dependencies now: https://github.com/jaredpalmer/tsdx/blob/master/package.json#L41

@Shelob9
Copy link

Shelob9 commented Oct 2, 2019

I found yarn add eslint-config-react-app@5.0.1 to resolve it for me in my tsdx-generated project.

I can put in a PR, not sure what makes most sense given what @elado said:

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.

Put in a PR to set 5.0.1 so it works now and then once 6.0.2 is out, a new PR for that?

@skvale
Copy link
Contributor

skvale commented Oct 2, 2019

As a different workaround for now, you could do yarn add -D @typescript-eslint/eslint-plugin@latest

@medelman17
Copy link
Contributor

@skvale, @Shelob9 -- I believe this was closed by #220 and or #208.

@sadsa
Copy link
Contributor

sadsa commented Oct 13, 2019

@skvale, @Shelob9 -- I believe this was closed by #220 and or #208.

Yes, I believe this will be fixed by #216 - It's been merged into master. Now we're just waiting on release to v9.0.4

audiolion added a commit to audiolion/react-auth-provider that referenced this issue Oct 14, 2019
audiolion added a commit to audiolion/react-auth-provider that referenced this issue Oct 14, 2019
audiolion added a commit to audiolion/react-auth-provider that referenced this issue Oct 14, 2019
audiolion added a commit to audiolion/react-auth-provider that referenced this issue Oct 14, 2019
@agilgur5 agilgur5 added the scope: upstream Issue in upstream dependency label Mar 16, 2020
@agilgur5
Copy link
Collaborator

This was related to or fixed by #216 , #218, #220

@agilgur5 agilgur5 added the scope: dependencies Pull requests that update a dependency file label Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: dependencies Pull requests that update a dependency file scope: upstream Issue in upstream dependency
Projects
None yet
Development

No branches or pull requests

7 participants