Skip to content

feat(eslint-plugin): update types to allow parameter type inferrence #272

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

Merged

Conversation

mohsen1
Copy link
Contributor

@mohsen1 mohsen1 commented Feb 13, 2019

By adding a all of the possible members with specific RuleFunction type
this is allowing rule authors to write rules without specifying
parameter types in their token methods

Also updates all of the existing rules to not specify type of node when
it is inferred

@codecov
Copy link

codecov bot commented Feb 13, 2019

Codecov Report

Merging #272 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master     #272   +/-   ##
=======================================
  Coverage   95.03%   95.03%           
=======================================
  Files          67       67           
  Lines        2801     2801           
  Branches      724      724           
=======================================
  Hits         2662     2662           
  Misses         53       53           
  Partials       86       86
Impacted Files Coverage Δ
...-plugin/src/rules/no-unnecessary-type-assertion.ts 97.67% <ø> (ø) ⬆️
packages/eslint-plugin/src/rules/array-type.ts 87.32% <ø> (ø) ⬆️
...lugin/src/rules/no-angle-bracket-type-assertion.ts 100% <ø> (ø) ⬆️
...ages/eslint-plugin/src/rules/no-empty-interface.ts 100% <ø> (ø) ⬆️
packages/eslint-plugin/src/rules/no-type-alias.ts 100% <ø> (ø) ⬆️
...slint-plugin/src/rules/prefer-namespace-keyword.ts 100% <ø> (ø) ⬆️
...s/eslint-plugin/src/rules/interface-name-prefix.ts 83.33% <ø> (ø) ⬆️
...ges/eslint-plugin/src/rules/no-extraneous-class.ts 100% <ø> (ø) ⬆️
...s/eslint-plugin/src/rules/no-non-null-assertion.ts 100% <ø> (ø) ⬆️
...eslint-plugin/src/rules/no-parameter-properties.ts 94.44% <ø> (ø) ⬆️
... and 10 more

@mohsen1 mohsen1 force-pushed the mohsen1--extend-RuleListener-type branch 3 times, most recently from 5fa959a to 9d42371 Compare February 13, 2019 20:11
Copy link
Collaborator

@armano2 armano2 left a comment

Choose a reason for hiding this comment

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

This is really good idea, and its going to simplify usage,

i left you few notes but LGTM

@bradzacher
Copy link
Member

Awesome work! LGTM, will approve once you've addressed the comments

By adding a all of the possible members with specific RuleFunction type
this is allowing rule authors to write rules without specifying
parameter types in their token methods

Also updates all of the existing rules to not specify type of node when
it is inferred
@mohsen1 mohsen1 force-pushed the mohsen1--extend-RuleListener-type branch from 9d42371 to d80eba6 Compare February 14, 2019 02:20
@bradzacher bradzacher added enhancement New feature or request package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin and removed package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin labels Feb 15, 2019
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.

undo the addition of the code path selectors and then we're good to go

@mohsen1 mohsen1 force-pushed the mohsen1--extend-RuleListener-type branch from 0999687 to a855f0c Compare February 15, 2019 18:15
@mohsen1
Copy link
Contributor Author

mohsen1 commented Feb 16, 2019

@bradzacher I think this is good to go then

@bradzacher bradzacher merged commit 80bd72c into typescript-eslint:master Feb 18, 2019
@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
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants