standard / eslint-config-standard

ESLint Config for JavaScript Standard Style

Home Page:https://standardjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configuration for rule "indent" is invalid: Value "[object Object]" should NOT have additional properties.

booxood opened this issue · comments

commented
"eslint": "^4.18.1",
"eslint-config-standard": "^11.0.0",

Seeing the same failures with eslint-config-standard@11.0.0 and eslint@3.19.0

Didn't see it at eslit-config-standard@11.0.0-beta.0 and eslint@3.19.0

@joeLepper It's not expected to work with eslint@3 since the indent rules got stricter in eslint@4 and we took the opportunity to specify them fully after that beta version you're using.

@booxood Can you share the output of npm ls --depth=9999 eslint?

Noted. Thanks.

commented

@feross

├── eslint@4.18.1 
└─┬ react-scripts@1.1.1
  └── eslint@4.10.0 

This fails for me when running via gulp-eslint. My npm output is

├─┬ apc-build@0.4.2
│ └─┬ gulp-eslint@4.0.2
│   └── eslint@4.13.1 
└─┬ apc-style@1.1.0
  ├─┬ eslint-config-apc@1.1.0
  │ └── eslint@4.18.1 
  └─┬ sass-lint@1.12.1
    └── eslint@2.13.1 

Deleting and re-generating my yarn lock file has solved this:

octopus@0.1.0 /Users/iegner/Code/octopus
├─┬ apc-build@0.4.2
│ └─┬ gulp-eslint@4.0.2
│   └── eslint@4.18.1 
└─┬ apc-style@1.1.0
  ├─┬ eslint-config-apc@1.1.0
  │ └── eslint@4.18.1  deduped
  └─┬ sass-lint@1.12.1
    └── eslint@2.13.1 

@booxood It seems the eslint from react-scripts is somehow being used instead of the one that you explicitly installed at version 4.18.1. Without knowing more about your specific setup, it's not clear how to help you.

There is no bug with this eslint shareable configuration, so I'm going to close this issue.

@webdevian It doesn't appear that you're actually using standard.

commented

@feross eslint@4.10.0 do not support this indent configuration?

commented

I create a repo for reproduce the problem.

@feross eslint-config-apc has standard as a dependency

I had multiple times this error and it always had to do that I did not have the latest eslint package, but an older which provided the same error. npm i eslint@latest and this error vanishes because it probably is again in sync with the latest features eslint provides.

@booxood 这个问题你是如何解决的?

commented

@pei-han 换版本

@booxood 的确如此,我按照@joeyvandijk的方法,解决问题。
看来是新版的eslint中rule才支持的属性吧。

@joeyvandijk thanks so much

I have this same issue because of react-scripts too. For anybody that has this same issue and is using VS Code with the ESLint extension you can add the following to your workspace settings:

{
  "eslint.nodePath": "./node_modules/standard/node_modules/eslint/",
}

This will ensure the extension uses the version of ESLint that standard expects.