Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Suggestion: standardize against prefixing rule names with "no-"#6022
-
Many ESLint and TSLint rules start with "no-" to indicate a preference against some behavior. Some behaviors are always bad (e.g.
Having only some rules start with Since it's already a conversion to go from TSLint to ESLint, can there be a preference set for not starting rule names with "no-"? In the two cases above, it'd be better if they were |
BetaWas this translation helpful?Give feedback.
All reactions
👍 5😄 1👀 1
Replies: 16 comments 4 replies
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Changing names of rules is considered breaking change and can be done only in major release I don't disagree that some of rules should not be prefixed with |
BetaWas this translation helpful?Give feedback.
All reactions
-
How about rule aliases? As in, having a Just to clarify: for rules that aren't yet ported, would removing the |
BetaWas this translation helpful?Give feedback.
All reactions
👍 4
-
eslint provides api for deprecation and replacing rules
https://eslint.org/docs/developer-guide/working-with-rules#rule-basics |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
I don't have "final" answer for you now about usage of prefix. my opinion is that we should follow eslint rule naming convention https://eslint.org/docs/developer-guide/working-with-rules#rule-naming-conventions
@typescript-eslint/core-team what is your opinion on this? |
BetaWas this translation helpful?Give feedback.
All reactions
-
Yeah we need to knuckle out some guidance around this. Most of our Now that we are much bigger, we should definitely nut out some guidance docs around this. We can deprecate and redirect users to new rules to replace some of the |
BetaWas this translation helpful?Give feedback.
All reactions
-
Note also that you can'tjust rename the rule from Not saying it wouldn't be a good change, it's just not simple to do, and can't really be done with aliases unless there is some refactoring done. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Just I mention about the deprecation policy in ESLint core.
Related references: |
BetaWas this translation helpful?Give feedback.
All reactions
👍 3
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Should we do a 2.0 and get rid of all the |
BetaWas this translation helpful?Give feedback.
All reactions
-
A number of the Going through the list (checkmark = imo should be renamed):
|
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
i don't see point in rules like:
it's better to keep rules simple |
BetaWas this translation helpful?Give feedback.
All reactions
-
the problem with two rules is now you can have a state where you're both not allowed to use interfaces and not allowed to use type aliases. we can have a rule |
BetaWas this translation helpful?Give feedback.
All reactions
👍 3
-
Regarding the change to add options to |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
@gavinbarron I was hoping someone would file a specific issue for this one 😄 but nobody ended up filing it. If you (or anybody else!) wants to, feel free to file one - it's a bit outside this discussion but I can see why you'd want it. Though, to be honest, I wonder if the current name is fine? |
BetaWas this translation helpful?Give feedback.
All reactions
-
Marking as accepting breaking change PRs per the list in#203 (comment). |
BetaWas this translation helpful?Give feedback.
All reactions
-
would like to add that some "no-" rules' names don't lend themselves well to understanding; for example, "no-inferrable-types" can (and has multiple times on my team) give the impression that it does the opposite of what it does. It has been floated that "force-type-inference" would be a good disambiguation. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hmm, interesting. I'm not on the same page for this one. But feel free to file a new issue if you'd like as I'm closing this discussion. |
BetaWas this translation helpful?Give feedback.
All reactions
-
perhaps a better name would be |
BetaWas this translation helpful?Give feedback.
All reactions
-
Can we at least keep the |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
This is reasonable, yes. ✔️ |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
For the
For |
BetaWas this translation helpful?Give feedback.
All reactions
This discussion was converted from issue #203 on November 17, 2022 15:54.