Skip to content

fix(eslint-plugin): fix crash in no-unnecessary-type-assertion #212

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

Closed
wants to merge 1 commit into from
Closed

fix(eslint-plugin): fix crash in no-unnecessary-type-assertion #212

wants to merge 1 commit into from

Conversation

armano2
Copy link
Collaborator

@armano2 armano2 commented Feb 5, 2019

Rule crashes when i try to use it in this project

@codecov
Copy link

codecov bot commented Feb 5, 2019

Codecov Report

Merging #212 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #212      +/-   ##
==========================================
+ Coverage   96.37%   96.37%   +<.01%     
==========================================
  Files          51       51              
  Lines        2455     2457       +2     
  Branches      370      370              
==========================================
+ Hits         2366     2368       +2     
  Misses         46       46              
  Partials       43       43
Impacted Files Coverage Δ
...-plugin/lib/rules/no-unnecessary-type-assertion.js 100% <100%> (ø) ⬆️

@uniqueiniquity
Copy link
Contributor

This seems representative of a parse/conversion error. I’m fine with this as a fix but I want to take a look at your test cases and figure out what’s going wrong.

@armano2
Copy link
Collaborator Author

armano2 commented Feb 5, 2019

@uniqueiniquity i tried to setup this rule inside this project and i got a lot of false-positives with any, than i tried to disable any by using option and its started crashing.

((Syntax as any).ArrayExpression = 'foo')

Syntax has no type in this case

@JamesHenry
Copy link
Member

@uniqueiniquity Shall I wait to approve this so that you can look into it? I imagine that will make it easier to track?

@uniqueiniquity
Copy link
Contributor

@JamesHenry looking now

@uniqueiniquity
Copy link
Contributor

@armano2 @JamesHenry I've addressed the issue in in #226; it was an issue in convert after all :)

@armano2 armano2 closed this Feb 7, 2019
@armano2 armano2 deleted the no-unnecessary-type-assertion branch February 7, 2019 19:00
kaicataldo pushed a commit to kaicataldo/typescript-eslint that referenced this pull request Aug 27, 2019
…pescript-eslint#227)

- correct url in no-misused-new
- add tslint addontation to no-namespace
- enable rules: eslint-plugin/no-deprecated-context-methods, eslint-plugin/prefer-output-null

fixes: typescript-eslint#213
fixes: typescript-eslint#212
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants