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

Type-check lintRule() implementation #290

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jablko
Copy link
Contributor

@jablko jablko commented Apr 4, 2022

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

What do you think about narrowing the coerce() return type from unknown to a type parameter, which is less permissive?

What I did was:

  • Change the return type from [Severity, ...Array<unknown>] to [Severity, Options|undefined]
  • Change the parameter type from unknown to Options|[boolean|Label|Severity, (Options|undefined)?]
  • Include the Options type parameter in the Rule type

@github-actions github-actions bot added the 👋 phase/new Post is being triaged automatically label Apr 4, 2022
@github-actions

This comment has been minimized.

@codecov-commenter
Copy link

codecov-commenter commented Apr 4, 2022

Codecov Report

Merging #290 (04911b7) into main (29bb3b7) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #290   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           73        73           
  Lines         8422      8428    +6     
=========================================
+ Hits          8422      8428    +6     
Impacted Files Coverage Δ
packages/unified-lint-rule/lib/index.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29bb3b7...04911b7. Read the comment docs.

@github-actions github-actions bot added 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Apr 4, 2022
@jablko jablko marked this pull request as ready for review April 4, 2022 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤞 phase/open Post is being triaged manually
Development

Successfully merging this pull request may close these issues.

2 participants