question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add option to --init for shareable configs

See original GitHub issue

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:

{ "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:closed
  • Created 7 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
nzakascommented, Nov 4, 2016

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

0reactions
jsejcksncommented, Nov 5, 2017

I’m sad about that, but I understand because you explained it well. Thanks, @not-an-aardvark.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Shareable Configs - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
How to Create Your Own ESLint Config Package
This post will show how to create your own repository of configurations, giving you the option to centralize all your rule definitions.
Read more >
Compose file version 3 reference - Docker Documentation
Grant access to configs on a per-service basis using the per-service configs configuration. Two different syntax variants are supported. Note: The config must ......
Read more >
config
global configuration file (defaults to $PREFIX/etc/npmrc ; configurable via CLI option --globalconfig or environment variable $NPM_CONFIG_GLOBALCONFIG ); npm's ...
Read more >
Git - git-init Documentation
By default, the configuration flag receive.denyNonFastForwards is enabled in shared repositories, so that you cannot force a non fast-forwarding push into it.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found