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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(eslint-plugin): add rule prefer-ts-expect-error #1705

Merged
merged 3 commits into from Apr 13, 2020
Merged

feat(eslint-plugin): add rule prefer-ts-expect-error #1705

merged 3 commits into from Apr 13, 2020

Conversation

G-Rath
Copy link
Contributor

@G-Rath G-Rath commented Mar 8, 2020

I think this should be included in the recommended, as I can't think of a case where // @ts-expect-error can't replace // @ts-ignore, but that might get tricky since TS3.9 & ESLint 7 are a few months apart 馃槵

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @G-Rath!

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.

@bradzacher bradzacher added enhancement: plugin rule option New rule option for an existing eslint-plugin rule enhancement: new plugin rule New rule request for eslint-plugin and removed enhancement: plugin rule option New rule option for an existing eslint-plugin rule labels Mar 9, 2020
bradzacher
bradzacher previously approved these changes Apr 12, 2020
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks!

@codecov
Copy link

codecov bot commented Apr 12, 2020

Codecov Report

Merging #1705 into master will decrease coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1705      +/-   ##
==========================================
- Coverage   94.48%   94.39%   -0.10%     
==========================================
  Files         162      164       +2     
  Lines        7494     7583      +89     
  Branches     2151     2179      +28     
==========================================
+ Hits         7081     7158      +77     
- Misses        178      182       +4     
- Partials      235      243       +8     
Flag Coverage 螖
#unittest 94.39% <100.00%> (-0.10%) 猬囷笍
Impacted Files Coverage 螖
.../eslint-plugin/src/rules/prefer-ts-expect-error.ts 100.00% <100.00%> (酶)
...plugin/src/rules/explicit-module-boundary-types.ts 82.60% <0.00%> (-3.60%) 猬囷笍
packages/eslint-plugin/src/rules/no-unsafe-call.ts 100.00% <0.00%> (酶)
...ackages/eslint-plugin/src/rules/no-for-in-array.ts 100.00% <0.00%> (酶)
...ckages/eslint-plugin/src/rules/no-unsafe-return.ts 95.00% <0.00%> (酶)
.../eslint-plugin/src/rules/restrict-plus-operands.ts 100.00% <0.00%> (酶)
...int-plugin/src/rules/require-array-sort-compare.ts 100.00% <0.00%> (酶)
...-plugin/src/rules/explicit-function-return-type.ts 100.00% <0.00%> (酶)
...-plugin/src/rules/restrict-template-expressions.ts 100.00% <0.00%> (酶)
... and 2 more

@bradzacher bradzacher changed the title feat(eslint-plugin): create prefer-ts-expect-error rule feat(eslint-plugin): create rule prefer-ts-expect-error Apr 12, 2020
@bradzacher bradzacher added 1 approval PR that a maintainer has LGTM'd - any maintainer can merge this when ready awaiting response Issues waiting for a reply from the OP or another party labels Apr 12, 2020
@bradzacher
Copy link
Member

There's been a few linting changes since this was last merged - once those are resolved, this is good to merge

@bradzacher bradzacher removed the 1 approval PR that a maintainer has LGTM'd - any maintainer can merge this when ready label Apr 12, 2020
@G-Rath
Copy link
Contributor Author

G-Rath commented Apr 12, 2020

There's been a few linting changes

I noticed a few new internal rules - I'm a big fan of the ones around applying prettier to all tests, and the aligning of multiline tests. Might have to pinch those from you 馃槈

@bradzacher
Copy link
Member

I should probably put that rule somewhere more accessible - I'm sure there's a few people that wouldn't mind it. It took me a few hours to write it!

@G-Rath G-Rath requested a review from bradzacher April 13, 2020 00:57
@bradzacher bradzacher removed the awaiting response Issues waiting for a reply from the OP or another party label Apr 13, 2020
@bradzacher bradzacher changed the title feat(eslint-plugin): create rule prefer-ts-expect-error feat(eslint-plugin): add rule prefer-ts-expect-error Apr 13, 2020
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.

None yet

2 participants