-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
New rule: no-reserved-imports
#87
Comments
cc @Turbo87 ☝️ |
You can already do this with ESLint with this rule:
|
Oh, true @t-sauer. Then I think we should add this to recommended config. |
that would require a breaking change release again and I'm very much against that in the foreseeable future. IMHO we should only do breaking change releases if we actually need to break how a rule behaves, the recommended config should ideally live outside of this repo/project. |
@t-sauer the potential advantage of having a custom rule would be that it can be |
I found that there was a similar suggestion made to the Airbnb eslint base and it was not merged, with this as the reasoning: airbnb/javascript#667 (comment) |
I think that having a dedicated fixable rule just for the ember object, string, etc. might be a good idea, I'd personally find it valuable. |
Ok, so it looks like indeed having a dedicated rule will be most valuable in this case. |
Picking this up then - will probably make a PR around saturday/sunday |
According to https://github.com/ember-cli/ember-rfc176-data I think we can add a rule that will check if reserved identifiers like
Object
are being imported.Incorrect:
Correct:
All reserved keys are here: https://github.com/ember-cli/ember-rfc176-data/blob/master/reserved.json
The text was updated successfully, but these errors were encountered: