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
Add option to --init for shareable configs #7488
Comments
That's an interesting idea. We really only intended How would you envision it working? (FWIW, I'm not sure we can really show a list of installed shareable configs because there's no guaranteed location where shareable configs are installed nor do we have any transparency into whether or not the shareable config package contains multiple configs.) |
@nzakas As I said before, I'm new to ESLint, so I'm not exactly sure how the init process works. Originally I had thought that it would just add a shareable config that was already installed, but maybe it can download the shareable config by the npm address, just like it does for "Use a popular style guide". The new menu entry would go below the three that are already there, and would read something like |
Gotcha. That's an interesting idea, though I'm a bit concerned that some configs require dependencies to be manually installed to work properly. We currently special case the style guides we support in Let's see what others think. |
@nzakas I didn't realize that it was a special-case implementation for the popular ones—I thought it was just automated (but with hardcoded package names). Now that I've gone back and experimented a bit, it seems that, when using |
There's no documentation on how it works, but here's the code: |
I think this issue could be a good enhancement after something like this is implemented: #7338 (comment) |
This is a really interesting idea - seems worth exploring further (maybe after #7338 (comment) has been finalized). |
eslint could add flags to skip some prompt:
A shortcut would be nice to, e.g. |
Thanks for your interest in improving ESLint. Unfortunately, it looks like this issue didn't get consensus from the team, so I'm closing it. We define consensus as having three 👍s from team members, as well as a team member willing to champion the proposal. This is a high bar by design -- we can't realistically accept and maintain every feature request in the long term, so we only accept feature requests which are useful enough that there is consensus among the team that they're worth adding. |
I'm sad about that, but I understand because you explained it well. Thanks, @not-an-aardvark. |
What version are you using? 3.9.0
What did you do? Try to add an already installed shareable config after installing (during
--init
)What happened? I couldn't
What did you expect to happen? To be able to
Here's more detail:
I mainly use ESLint with the linter-eslint Atom plugin, and I created a shareable config so I wouldn't have to manually sort that part out for each new project. So now I just run
$ npm install eslint @jsejcksn/eslint-config --save-dev
in the beginning, but I still need a.eslintrc.*
file, which I have to create manually. Right? Am I missing something?It seems natural that after running
./node_modules/.bin/eslint --init
, one of the main menu options should be to specify an already installed shareable config (and not just "the most popular ones")—in my case, I would enter@jsejcksn
. (I couldn't find this in the docs, but I did find this comment in an issue.And that would produce the
.eslintrc.*
file with the following:I am still pretty new to ESLint, so maybe I am missing an easier option that doesn't require copying from another project or manually creating my
.eslintrc.json
file myself in order to have ESLint use my shareable config.The text was updated successfully, but these errors were encountered: