-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
Use ESLint-style config options #319
Comments
The advantage of having XO configuration is not extendable. However it allows to extend ESLint shareable config, so there might be cases where one want to disable some global or env values. On of the challenge is that those 2 options can be set via CLI. That means we would need to use dot notation: xo --env.foo --env.bar false
// => {env: {foo: true, bar: flase} We will also have to maintain compatibility with the current array format for backward compatibility and as ESLint supports it as well. So that would require a bit of transformation. Does that concerns only the |
The only two I was using were
Just to be clear, the behavior now is essentially that: "xo" : {
"globals": [
"foo"
]
} turns directly into: "eslintConfig": {
"globals": {
"foo": true
}
} |
As long as the old format with arrays is preserved, I don't mind supporting this. I went with array as I never needed to set the writability of globals. |
@IssueHunt has funded $60.00 to this issue.
|
Problem
Issue is described here: https://gitter.im/xojs/Lobby?at=5af49381bd10f34a68f18c4d
TLDR; XO's config options are not the same format as ESLint's, leading to increased risk for errors/bugs/confusion, as well as being less powerful (compare XO's
"global": []
to ESLint's"global": {}
, for example).Proposal
Use the conventions defined in ESLint's config settings, i.e., objects instead of arrays and uniform naming "env", not "envs".
The text was updated successfully, but these errors were encountered: