v3.6 ignores "smart-tabs" rule and notifies of indent errors
See original GitHub issueI’m a maintainer of Leaflet, and we use an eslint config with smart-tabs
, like:
"no-mixed-spaces-and-tabs": [2, "smart-tabs"],
"indent": ["error", "tab", {"VariableDeclarator": 0}],
eslint 3.0 through 3.5 work just fine. However, after an upgrade to eslint 3.6, we’ve got error messages like the following:
/home/ivan/devel/Leaflet/src/control/Control.js
64:7 error Expected indentation of 2 tabs but found 4 spaces and 2 tabs indent
This can be reproduced by checking out the Leaflet repo, then running npm install
and then npm test
. Note that running npm install eslint@3.5
then npm test
will work as expected.
We don’t use any transpiler in the Leaflet toolchain; full eslint config is available on the Leaflet repo; and the bug is reproducible on the environments of more than one developer.
Looking at eslint’s changelog, I’ll guess that this is caused by #7076 (ping @not-an-aardvark)
Issue Analytics
- State:
- Created 7 years ago
- Comments:19 (16 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 >How to supress error: Mixed spaces and tabs? - Stack Overflow
Disable rule per section. To ignore that error for multiple lines of code, surround the code with eslint-disable no-mixed-spaces-and-tabs ...
Read more >Unexpected Indent Error in Visual Studio Python Interactive ...
I successfully ran your code in Visual Studio 2017, whether it is four spaces or a Tab, it runs successfully. for j in...
Read more >Tabs and indents settings does not work
Hello,. I have a problem with tab and indents settings. In settings->codestyle->php->tabs&indents I have set tab character for indent.
Read more >Developers Who Use Spaces Make More Money Than Those ...
Do you use tabs or spaces for code indentation? ... But for now, the universality and raw power of vi & vim is...
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
Ah yes, looked at this too quickly, you’re right. I’ll look at reverting that for now and we can revisit whether or not there should be two rules at a later point.
I made a PR to fix the issue at https://github.com/eslint/eslint/pull/7266.
Fair enough, will keep that in mind for future PRs.