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.

Configuration for rule "semi" is invalid: Cannot read property 'concat' of undefined

See original GitHub issue

Tell 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:closed
  • Created 6 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
LinusUcommented, Dec 18, 2017

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

1reaction
platinumazurecommented, Dec 18, 2017

@LinusU I missed this bit in your last comment:

I understand that it’s annoying when tings break, and I assure you that I do not taking breaking a such widely used module as is-my-json-valid lightly

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'concat' of Undefined in JS
The "Cannot read property 'concat' of undefined" error occurs when calling the concat() method on an undefined value. To solve the error, provide...
Read more >
TypeError: Cannot read property 'concat' of undefined
My problem is that when i run my project it gives me an error that says: TypeError: Cannot read property 'concat' of undefined....
Read more >
eslint/eslint - Gitter
I am having an issue with ESLint while deploying my react app to Heroku. I am getting this error "Oops! Something went wrong!...
Read more >
TypeError: Cannot read property 'concat' of undefined
Description of the problem: When I run my experiment I get an error which says, 'TypeError: Cannot read property 'concat' of undefined'.
Read more >
Rules - ESLint - Pluggable JavaScript Linter
The "extends": "eslint:recommended" property in a configuration file enables ... These rules relate to possible logic errors in code: ... no-invalid-regexp.
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