-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Do not require modules with shareable config to be named eslint-config-* #9188
Comments
Thanks for the proposal. I'm pretty sure there was a reason for requiring configs to be prefixed with Keep in mind that you can also specify a relative path in the extends: './node_modules/my-config' |
It looks like this issue is related: #2415 |
@not-an-aardvark it'd be nice if when a path to a specific file was provided, the prefix wasn't added. Specifically, |
That makes sense, although I think some people use files in shareable configs which are intended to be resolved in that manner. For example, if I put As a workaround, you could use |
@eslint/eslint-team Could someone comment on why we required sharable configs to start with
|
I don't remember the exact reasoning behind having a prefix, but when shareable configs were created, one of the reasons was discoverability, as well as a way to differentiate between configs and plugins. Also I think we used prefixes to avoid naming collisions. |
All of that makes perfect sense, but doesn't necessitate the prefix when including a relative file path :-) |
Also it breaks everyone who use one repo for all linters (not only for eslint) in the same repo. Plus it actually breaks the nodejs resolution which is a bad practice in the first place. |
Unfortunately, it looks like there wasn't enough interest from the team or community to implement this change. While we wish we'd be able to accommodate everyone's requests, we do need to prioritize. We've found that issues failing to be implemented after 90 days tend to never be implemented, and as such, we close those issues. This doesn't mean the idea isn't interesting or useful, just that it's not something the team can commit to. |
Absolutely agree with @yhaskell. It seems that I'm not the only one, which is cool. Recently i created one scoped package to host all the configs for all the linters and tools. For example, I have eslint
babel
typescript
nyc
Before few months I dreamed about: Current behavior is wrong, for sure. In reality it should be easy:
Meeh, isn't it pretty intuitive and making sense? Everything which was working until now will work or I'm wrong? Yes, it is breaking change, because someone may depend on For last few months I'm thinking to make a wrapper package that create a CLI wrapper around some tool. And so, it willl search/resolve the configs that way and pass the the full filepath as a |
In our team we use eslint with a bunch of projects. Naturally we want to use the same eslint configuration in our projects. To do that we have created a separate package with the shared .eslintrc. We include it as dev dependency in our projects and pass its .eslintrc on the command line via -c option.
This works but then we found that we cannot use local .eslintrc files to extend/override the shared configuration.
Now I have found Shareable Configs which is a great idea. Unfortunately it requires that "the module name begins with
eslint-config-
". This seems rather restrictive. To use it, we would have to rename our package with shared config, which would be a breaking change.Why not make this an optional prefix?
For example if we have
Then search for package:
The text was updated successfully, but these errors were encountered: