indent rule bug?
See original GitHub issueInformation
eslint@1.4.3
.eslintrc
{
"rules": {
"indent": [2, 2]
}
}
JavaScript code: (The first line indent error)
'use strict';
const detector = {};
const NA_VERSION = '-1';
const rules = require('./rules');
...
eslint result:
$ ./node_modules/.bin/eslint detector.js
/Users/hotoo/workbench/hotoo/detector/detector.js
3:1 error Expected indentation of 1 space character but found 0 indent
4:1 error Expected indentation of 1 space character but found 0 indent
5:1 error Expected indentation of 1 space character but found 0 indent
...
right code:
Problem
The first line indent error, but I got every following 0 indent line error.
Issue Analytics
- State:
- Created 8 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
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 >Cannot fix eslint rule on indenting case statements in switch ...
I googled for a solution and saw suggestions to add both switchCase and indentSwitchCase, but my .eslintrc rules are all - spaced, not...
Read more >EDITING: Right (after) indent of paragraph does not work in lists
Bug 83532 - EDITING: Right (after) indent of paragraph does not work in ... when the right indentation is moved on the top...
Read more >Indentation Error in Python | How to Solve it - Edureka
As mentioned in the introduction paragraph, one of the main reasons for the indentation error is the absence of tabs and or whitespaces...
Read more >79843 - CSS text-indent bug in editable elements - Monorail
1.a textarea or input or something else get contentEditable="true", when set a text-indent rule to it,by default the cursor will appear at the...
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
Upon further investigation it seems that the problem was within my editor (Atom) entering spaces instead of tabs. Once I set
tabType: "hard"
in Atom’s config and changed all spaces to tabs, my problems disappeared.Feel free to close this issue.
Had the same issue as @grawlinson and switched to tabType hard and now it works. There is a trick in Atom if you wanna convert spaces to tabs in your current file. Ctrl+shift+p and search for Whitespace, then select Convert spaces to tabs.