Local Config File Resolution throw error in file protocol
See original GitHub issuehttps://cn.eslint.org/docs/developer-guide/shareable-configs#local-config-file-resolution
I create my config @scope/eslint-config-myconfig
in local, and install it by npm install file:../eslint-config-myconfig
eslint-config-myconfig
// index.js
module.exports = {
parser: 'babel-eslint',
extends: ['./base.js'],
};
// base.js
module.exports = {
extends: ['other-config'],
rules: {
},
};
// vue.js
module.exports = {
extends: ['@scope/eslint-config-myconfig', 'plugin:vue/essential'],
rules: {
},
};
project-1
module.exports = {
extends: '@scope/eslint-config-myconfig/vue'
};
when i run eslint src
, it throw error
Oops! Something went wrong! :(
ESLint: 7.1.0
ESLint couldn't find the config "@scope/eslint-config-myconfig" to extend from. Please check that the name of the config is correct.
The config "@scope/eslint-config-myconfig" was referenced from the config file in "/Users/my/scope/eslint-config-myconfig/vue.js".
If you still have problems, please stop by https://eslint.org/chat to chat with the team.
but it succeed after published to npm
Tell us about your environment
- ESLint Version: 7.1.0
- Node Version: 10.16.3
- npm Version: 6.11.3
Resolved
I used extends: ['./base']
to resolved it, but i diff to document
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
ExpressJs is return error `ERR_MODULE_NOT_FOUND` if I ...
If someone is still searching, I got this error using node version 15, I was importing the files without the .js file extension, ......
Read more >Error message definitions for WebSphere® Application ... - IBM
Cause: AS400 only: configuration file name not specified. Resolution: Specify file name in web server configuration. Message: ws_common: ...
Read more >Configuration options | Yarn - Package Manager
List of all the configuration option for Yarn (yarnrc files) ... If throw (the default), Yarn will throw an exception on yarn install...
Read more >How to Resolve the "Temporary failure in name resolution" Error
The "Temporary failure in name resolution" error appears due to bad system configuration. This article shows how to troubleshoot and fix it.
Read more >git-config Documentation - Git
This command will fail with non-zero status upon error. Some exit codes are: ... --local. For writing options: write to the repository .git/config...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK, so this is the designed behavior. You have to write
eslint-config-myconfig
as working fine with this behavior.I’m not familiar with lerna, so I mention another solution: I guess you can use
extends:"./index.js"
or something like instead ofextends:"@scope/eslint-config-myconfig"
, becauserequire("./index.js")
in thevue.js
should work fine.Unfortunately, it looks like there wasn’t enough interest from the team or community to implement this change. While we wish we’d be able to accommodate everyone’s requests, we do need to prioritize. We’ve found that accepted issues failing to be implemented after 90 days tend to never be implemented, and as such, we close those issues. This doesn’t mean the idea isn’t interesting or useful, just that it’s not something the team can commit to.
Thanks for contributing to ESLint and we appreciate your understanding.