Configuration for rule "semi" is invalid: Cannot read property 'concat' of undefined
See original GitHub issueTell us about your environment
-
ESLint Version: ^3.19.0
-
Node Version: 8.9.3
-
npm Version: 5.5.1
What parser (default, Babel-ESLint, etc.) are you using? Babel-ESLint
Please show your full configuration:
Configuration
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true, jquery: true
},
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
extends: ['standard'],
// required to lint *.vue files
plugins: [
'html'
],
// add your custom rules here
'rules': {
// allow paren-less arrow functions
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
// allow debugger during development
'no-debugger': (process.env.NODE_ENV === 'production' ? 2 : 0),
// force semicolon
'semi': [2, 'always'],
// remove space before function paren
'space-before-function-paren': [2, 'never'],
// vue
'html-self-closing': 0,
'html-end-tags': 0,
'max-attributes-per-line': 0
}
}
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
It appears the error is caused by the configuration. The only thing I did was running npm run lint
, which translates to:
eslint --ext .js,.vue src --fix
It is what came with Vue Webpack template, only thing is that I added the --fix
at the end.
What did you expect to happen?
Wanted to fix linting errors with current files, such as semicolons.
What actually happened? Please include the actual, raw output from ESLint.
It throws error with lots of configurations, even if I remove the last rules up until the semi
rule. ESLint does not work in any setup for me, even without --fix
. The full output is the issue title:
“/home/full/path/.eslintrc.js: Configuration for rule “semi” is invalid: Cannot read property ‘concat’ of undefined”
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (7 by maintainers)
Top GitHub Comments
Hi 👋
I was the one who published the broken is-my-json-valid 🙈 sorry about that!
A new version was published shortly after, and the broken one have been deprecated on npm.
You can either just reinstall eslint, or manually update is-my-json-valid by running
npm install is-my-json-valid@2.17.1
@LinusU I missed this bit in your last comment:
Hopefully you were just speaking generally, but just in case you weren’t: I did not mean to imply that you were negligent or that you didn’t care about breaking a module. If I did inadvertently imply either of those, please accept my apologies and please know that I appreciate your diligence in getting a fix out so quickly. Thanks!