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.

consuming config package with multiple rules

See original GitHub issue

ESLint Version: 4.16.0

I try to use a config package that exposes multiple styles.

// eslintrc.json

{
  "extends": "unional/latest"
}

In IDE (VSCode 1.19.3 with Eslint plugin), this config seems to be working fine.

However, cli doesn’t work:

> eslint src
Error: Cannot find module 'unional/latest'

To make cli happy, I have to change the config to:

{
  "extends": "./node_modules/eslint-config-unional/latest.json"
}

Which I know is a supported way. But it would be much nicer to keep it as unional/latest.

By the way, are the eslint:recommended and eslint:all hardcoded? Is it possible to make the config package to be consumable as unional:latest?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
platinumazurecommented, Jan 31, 2018

If it works in VSCode but not in the CLI, that might imply you’re using different versions of ESLint in those cases. Try investigating that and shoring that up first.


Shameless plug for ESLint plugins here:

The best way to expose and consume multiple potential configurations is as a plugin. Plugins can export multiple configurations.

See this section for more info on how to consume a plugin configuration.

See here for more info on how to create configurations in plugins.

0reactions
nzakascommented, Sep 18, 2018

It looks like the conversation is stalled here. As this is a question rather than an action item, I’m closing the issue. If you still need help, please send a message to our mailing list or chatroom. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Package Source Mapping | Microsoft Learn
Package Source Mapping settings are applied following nuget.config precedence rules when multiple nuget.config files at various levels ...
Read more >
AWS Config best practices - Amazon.com
This feature allows you to aggregate AWS Config Rules compliance statuses from multiple accounts and Regions into a single account to provide an ......
Read more >
package.json - npm Docs
Some rules: The name must be less than or equal to 214 characters. This includes the scope for scoped packages. The names of...
Read more >
Creating and using config maps - Working with pods | Nodes
A config map must be created before its contents can be consumed in pods. Controllers can be written to tolerate missing configuration data....
Read more >
Configure a Pod to Use a ConfigMap - Kubernetes
Many applications rely on configuration which is used during either application initialization or runtime. Most of the times there is a ...
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