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

Combine severity types #288

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

Combine severity types #288

wants to merge 1 commit into from

Conversation

jablko
Copy link
Contributor

@jablko jablko commented Apr 1, 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

Another unimportant change: What do you think about adding the severity string literals to the Severity type? The purely-numeric type ({0|1|2}) is an internal detail, I think?

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

This comment has been minimized.

void[] | [Options | Label | Severity] | [boolean | Label | Severity, Options],
Tree
>
): Plugin<void[] | [Options | Severity] | [boolean | Severity, Options], Tree>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doing so makes the lintRule() signature (which is external) a little simpler, I think?

@wooorm
Copy link
Member

wooorm commented Apr 1, 2022

Can you fill out the checklist in the template? :)

@github-actions github-actions bot added 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Apr 1, 2022
@jablko
Copy link
Contributor Author

jablko commented Apr 1, 2022

  • Sorry, filled out now. 👍

@wooorm
Copy link
Member

wooorm commented Apr 4, 2022

Meh, I feel like they’re semantically a different thing?

  • Severity is the number with meaning
  • Label are word that map to certain of those numbers

What’s the reason you want to make this change? What does it improve?

@jablko
Copy link
Contributor Author

jablko commented Apr 4, 2022

Does the difference matter? Outside of the implementation true, 'on', 'warn', and 1 don't feel different? Replacing boolean|Label|Severity with Severity simplifies the types/signatures a little bit.

What does it improve?

Little, admittedly. 😬

I'm happy to let it go if you'd prefer not to.

@jablko jablko changed the title Combine label and numeric severity types Combine severity types Apr 4, 2022
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