Add option to --init for shareable configs
See original GitHub issueWhat 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:
{ "extends": "@jsejcksn" }
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.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (6 by maintainers)
Top GitHub Comments
There’s no documentation on how it works, but here’s the code: https://github.com/eslint/eslint/blob/master/lib/config/config-initializer.js#L262
I’m sad about that, but I understand because you explained it well. Thanks, @not-an-aardvark.