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

feat(eslint-plugin): add rule no-unsafe-assignment #1694

Merged
merged 8 commits into from Apr 9, 2020

Conversation

bradzacher
Copy link
Member

@bradzacher bradzacher commented Mar 7, 2020

See: #791, and the other rules I've added #1643, #1644, #1647

@bradzacher bradzacher added the enhancement: new plugin rule New rule request for eslint-plugin label Mar 7, 2020
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@codecov
Copy link

codecov bot commented Apr 2, 2020

Codecov Report

Merging #1694 into master will decrease coverage by 0.22%.
The diff coverage is 80.31%.

@@            Coverage Diff             @@
##           master    #1694      +/-   ##
==========================================
- Coverage   94.64%   94.42%   -0.23%     
==========================================
  Files         160      161       +1     
  Lines        7263     7386     +123     
  Branches     2081     2117      +36     
==========================================
+ Hits         6874     6974     +100     
- Misses        167      180      +13     
- Partials      222      232      +10     
Flag Coverage Δ
#unittest 94.42% <80.31%> (-0.23%) ⬇️
Impacted Files Coverage Δ
...es/eslint-plugin/src/rules/no-unsafe-assignment.ts 80.00% <80.00%> (ø)
packages/eslint-plugin/src/util/types.ts 81.01% <83.33%> (+0.74%) ⬆️
...ckages/eslint-plugin/src/rules/no-throw-literal.ts 95.74% <0.00%> (ø)
...pt-estree/src/create-program/createWatchProgram.ts 87.16% <0.00%> (+0.13%) ⬆️

@bradzacher bradzacher marked this pull request as ready for review April 7, 2020 05:53
@felixfbecker
Copy link

Is there anything blocking this? Been trying out the other no-unsafe-* rules (they caught real bugs!) and been missing this case

@bradzacher
Copy link
Member Author

There's nothing blocking it any more. I was going to add an option to prevent "evolving" types, but I decided against that for now (I think it deserves to live as its own rule).

With the CI passing, I'll merge this now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: new plugin rule New rule request for eslint-plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New set of rules: no-unsafe-*
2 participants