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

Normalize rules for proposals vs rules for features #149

Closed
zloirock opened this issue Apr 17, 2024 · 0 comments · Fixed by #150
Closed

Normalize rules for proposals vs rules for features #149

zloirock opened this issue Apr 17, 2024 · 0 comments · Fixed by #150

Comments

@zloirock
Copy link

zloirock commented Apr 17, 2024

It's described here: #145 (comment)

For different use cases, it could be good to have different ways to forbid some specific features.

It could be good to have a way to forbid all features from a proposal in one line, in one rule.

However, this way has some problems. For example, the Set methods proposal case. Early Safari / Bun implementations add methods from this proposal... but missed Set.prototype.difference, oven-sh/bun#2309. After that, when the proposal was already available in some engines, the algorithm of Set.prototype.intersection and the order of result were changed. Etc.

So it could be good to have also a way to forbid some specific features from proposals.

I see it as a rule for a proposal and rules for each feature. As an option, it could be an option with the features list for proposal rules - however, it's not so intuitive as separate rules with names of features.

Also, I think that the approach should be normalized even for existent rules since for something we have rules for proposals like es-x/no-object-map-groupby, for some other proposals - rules for separate features, like es-x/no-array-prototype-toreversed or es-x/no-array-prototype-with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant