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.

Do not require modules with shareable config to be named eslint-config-*

See original GitHub issue

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

extends: xyz

Then search for package:

  1. eslint-config-xyz
  2. xyz

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
yhaskellcommented, May 8, 2018

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.

2reactions
ljharbcommented, Jan 10, 2018

@not-an-aardvark it’d be nice if when a path to a specific file was provided, the prefix wasn’t added. Specifically, package/path/to/file.js.

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 ESLint Resolves Plugins And Shareable Configs
TLDR: plugins are searched for relative to the end user's project, while shareable configs are searched for relative to the config file where...
Read more >
How to Create Your Own ESLint Config Package
First you'll need to create a new folder and npm project. By convention, the module name begins with eslint-config- , such as eslint-config-test ......
Read more >
Shared eslint config cannot find node modules - Stack Overflow
eslintrc': Cannot find module '@typescript-eslint/parser'`. I don't have any node_modules in the root and I would like to avoid it. javascript ...
Read more >
eslint-config-standard - npm
This module is for advanced users. You probably want to use standard instead :) npm install eslint-config-standard ...
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