Open niftylettuce opened 6 years ago
Yes, I think that makes sense. It should be in a "xo"
object though, so it won't conflict with ESLint config.
It should support these options:
space
semicolon
prettier
nodeVersion
extensions
esnext
The rest of the XO options can already be defined as ESLint config.
It can also only be directly in a shareable config and not nested or in an extended config, as ESLint doesn't expose a method to flatten the extend tree.
I'd love this feature, and I have attempted to work it out by editing optionsManager.buildConfig
(here).
However, I'm unsure on how to handle options.xo.extensions
.
(EDIT: Just noticed eslint/eslint#10828 -- if ESLint will supports extensions
, then this commit should be enough.)
Any info on this? Can one create a config with top level options and use xo directly? I've tried doing so, but ESLint then complains about unexpected top-level properties.
Should we allow shareable configs to use top level rules such as "prettier" and "space" in shareable XO configs? It would set the option for xo but delete it before passing along to eslint?
Otherwise I have to do this in all my projects: