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
no-reserved-keys
and quote-props
have incompatibilities.
#1539
Comments
Can you include some actual examples and the output you're seeing? |
var minimist = require('minimist');
var args = minimist(process.argv.slice(2), {
string: 'env',
boolean: ['sourcemaps', 'minify'],
'default': {
env: 'development'
}
}); If "boolean" is unqouted:
If "boolean" is quoted:
|
Using CSS 'as JS' causes this problem. const imgStyle = {
'float': 'right'
};
// error Unnecessarily quoted property `float` found quote-props const imgStyle = {
float: 'right'
};
// error Reserved word 'float' used as key no-reserved-keys |
Would it make sense to merge the two rules? We could keep |
We'd need to work on the option name, but it would seem helpful to standardize on just quote-props |
OK, I'll work on a PR. |
Can you discuss what you're planning on doing first? Make it easier for people to chime in (and less thrash on the PR) |
Hum, I was planning to merge the two rules into
|
We've had some issues with keyword lists. See: #1616 I'm not sure if as-needed-es3 is clear enough or if there needs to be something more (or ability to specify which words to enforce). |
As far as I can see, the only rules that deal with explicit keyword lists are BTW, I couldn't find any examples of a common resource used by several rules, apart from the /**
* Rule X
*/
var keywords = require("../utils/keywords");
// ... // cc @nzakas |
We've debated how to share amongst rules, and I think at some point we just need to go for it and see what happens, so that approach is fine by me. I think what we really need for this rule is a configuration like:
|
A few odds and ends I found:
|
@jrvidal please open a separate issue for those and include the actual ESLintb output. This topic is too tangential for this issue. |
Update: merge `no-reserved-keys` into `quote-props` (fixes #1539)
The following
Identifiers
give warnings fromno-reserved-keys
when not quoted, but also give warnings fromquote-props
when set in "asNeeded" mode.Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: