indent MemberExpression not working
See original GitHub issueTell us about your environment
- ESLint Version: 2.13.1
- Node Version: v6.5.0
- npm Version: 3.10.3
What parser (default, Babel-ESLint, etc.) are you using? none
Please show your full configuration:
What did you do? Please include the actual source code causing the issue. Created tmp.js with this example from doc
/*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/
var foo = [];
foo
.bar
.baz();
Then ran:
node_modules/eslint/bin/eslint.js tmp.js
What did you expect to happen? Error about lack of spaces before indents What actually happened? Please include the actual, raw output from ESLint.
/Users/mikael/Work/lint/.eslintrc:
Configuration for rule "indent" is invalid:
Value "data["1"].MemberExpression" has additional properties.
Error: /Users/mikael/Work/lint/.eslintrc:
Configuration for rule "indent" is invalid:
Value "data["1"].MemberExpression" has additional properties.
at validateRuleOptions (/Users/mikael/Work/lint/node_modules/eslint/lib/config/config-validator.js:119:15)
at /Users/mikael/Work/lint/node_modules/eslint/lib/config/config-validator.js:166:13
at Array.forEach (native)
at Object.validate (/Users/mikael/Work/lint/node_modules/eslint/lib/config/config-validator.js:165:35)
at Object.load (/Users/mikael/Work/lint/node_modules/eslint/lib/config/config-file.js:523:19)
at loadConfig (/Users/mikael/Work/lint/node_modules/eslint/lib/config.js:64:33)
at getLocalConfig (/Users/mikael/Work/lint/node_modules/eslint/lib/config.js:126:23)
at Config.getConfig (/Users/mikael/Work/lint/node_modules/eslint/lib/config.js:227:22)
at processText (/Users/mikael/Work/lint/node_modules/eslint/lib/cli-engine.js:223:27)
at processFile (/Users/mikael/Work/lint/node_modules/eslint/lib/cli-engine.js:298:18)
Maybe because MemberExpression isn’t defined in the schema for indent?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
eslint indent rule indents decorated members - Stack Overflow
but now I am experiencing problem with decorators, which get indented although my preference is to have them aligned with the member. @prop({ ......
Read more >indent - 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 >ESLint - indent - The --fix option on the command line can ...
indent. The --fix option on the command line can automatically fix some of the problems reported by this rule. Enforces consistent indentation.
Read more >[Solved]-Eslint indent with chained methods-Reactjs
"Indent of 2 spaces with MemberExpression set to 0 will indent the multi-line property chains ... Eslint (Airbnb) indentation issues with React code(JSX) ......
Read more >indent-legacy - Rules - ESLint - Pluggable JavaScript linter | Js中文网
"MemberExpression" (off by default) enforces indentation level for ... Indent of 2 spaces with SwitchCase set to 0 will not indent case clauses...
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
Yes, the problem was with eslint 2.5, works in 3.1.
-mikael
friendly ping @marneborn, were you able to verify if your issue is solved after upgrading your version of ESLint?