eslint --print-config no longer works when given a directory
See original GitHub issueTell us about your environment
- ESLint Version: v6.0.0
- Node Version: v11.15.0
- npm Version: 6.9.0
What parser (default, Babel-ESLint, etc.) are you using? default
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true
},
extends: [
'standard',
'plugin:vue/recommended',
'prettier',
'prettier/babel',
'prettier/standard',
'prettier/vue'
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: ['babel', 'prettier', 'standard', 'vue'],
rules: { 'prettier/prettier': 'error' }
};
$ cd /home/user/www/project && yarn run eslint --print-config .
What did you expect to happen? Printing config
What actually happened? Please include the actual, raw output from ESLint. Looks in upper path instead of current.
Oops! Something went wrong! :(
ESLint: 6.0.0.
ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:
eslint --init
ESLint looked for configuration files in /home/user/www and its ancestors.
Project path is located at /home/user/www/project
.
Are you willing to submit a pull request to fix this bug? No, sorry.
Issue Analytics
- State:
- Created 4 years ago
- Comments:21 (10 by maintainers)
Top Results From Across the Web
Command Line Interface - 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 >Why does "eslint --print-config blah.js > outfile.json" result in ...
It seems that this is a bug in ESLint v7.3.0. A temporary fix would be to downgrade ESLint to v7.2.0 - "eslint": "^7.3.0"...
Read more >eslint/eslint - Gitter
Has anyone reported an issue with .eslintrc.js globals not working in a ... now that I can't extend root and still override it...
Read more >xo-browser-focused-fork - npm
Opinionated but configurable ESLint wrapper with lots of goodies included. Enforces strict and readable code. Never discuss code style on a ...
Read more >Local Install of ESLint Breaks In-Editor Linting
The ESLint CLI still functions as it should and the issue is not ... I'm going to do some more research but may...
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 Free
Top 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
Since v4.1.0, ESLint has supported glob-based configuration. So
--print-config
with a directory path doesn’t make sense anymore. Configurations are not per directory.And the document says requiring a file path and print the configuration for linting the given file. I think that the solution is a better error message when a directory path was given.
I have a similar problem, despite having proper packages in place: