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

Why not include xo/config/plugins.js? #30

Closed
teehemkay opened this issue Aug 18, 2016 · 5 comments
Closed

Why not include xo/config/plugins.js? #30

teehemkay opened this issue Aug 18, 2016 · 5 comments

Comments

@teehemkay
Copy link

teehemkay commented Aug 18, 2016

Unless I'm mistaken, it seems to me that the settings under xo./config/plugins.js are not included here.

E.g. all the rules related to the eslint-plugin-import` plugin.

Why is that, I would thought that these rules are quite useful?

I'm actually using XO but in some case (lack of editor integration) I need to revert to using ESLint directly with 'eslint-plugin-xo,eslint-config-xo` etc.

@sindresorhus
Copy link
Member

It's because of eslint/eslint#3458 (follow and comment on that thread). Shareable configs can't have dependencies, so I would have to force the user to manually install all the plugins XO uses.

@sindresorhus
Copy link
Member

What editor integrations are you missing?

@teehemkay
Copy link
Author

Thank you for the quick answer!

Re: the editor: WebStorm

@sindresorhus
Copy link
Member

@teehemkay Re WebStorm, see: xojs/xo#67 (comment) Should be possible to set it up with XO.

@teehemkay
Copy link
Author

Thank you for the pointer. I think it boils down to manually replicating all the ESLint setup / configuration that XO does automatically and adjusting WebStorm default settings so that they don't conflict with XO's...

Which I had done already. I used eslint-plugin-xo, eslint-config-xo-space and eslint-config-xo-react) and created an .eslintrc* config that's essentially xo/config/plugins.js extended with the eslint-*-xo* shareable configs above.

It's was not complicated since thanks to you all the pieces are already readily available and I just needed to assemble them.

While writing this I had the an idea that maybe could help to automate the above.

But I see that someone else already suggested it :-): xojs/xo#76

So I'll add a comment there.

Thank you again for your help, I really appreciate it.

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

No branches or pull requests

2 participants