-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
Better solution for configs & plugins in dependencies #646
Comments
I wouldn't say that. They're working on a new config format which will enable this: eslint/eslint#13481 It's likely it will happen this year: eslint/eslint#15383 (comment) |
This patches ESLint and could break at any time. It might also break certain cases. I don't think I want to risk that.
I'm unlikely to bundle dependencies in XO. |
Could enabling the patch be done via a CLI flag so it's explicitly opt-in? |
It technically could, but I'm still the one that has to deal with any issues that occur with the CLI flag specified. I would personally prefer to just wait it out. |
I wrote a wrapper plugin that requires no patching, plays by the rules of eslint and nodejs, and allows plugins and configs to act pretty much like normal dependencies. As a bonus, it lets you locally define rules for your project that don’t need to be published in a separate package. It’s also pretty simple, just a single file with no dependencies itself. (There is a trade off - it prefixes the rules it wraps, and requires using a JavaScript, not json/yaml, config file) We’ve been using it at my work for a while and it works well enough, while we wait for the proper solution. |
The flat config has landed in ESLint. This is the way to go now: |
It's been nearly 6.5 years since eslint/eslint#3458 was opened and very little progress has been made on their side.
What can we do to improve the XO user experience while we wait for a fix from ESLint?
The best solution seems to be using Microsoft's @rushstack/eslint-patch to patch ESLint's module resolver.
Another solution which worked for TypeScript + XO users is using
bundledDependencies
inpackage.json
.Related:
Most issues are for XO + Prettier.
The text was updated successfully, but these errors were encountered: