eslint: v3.6 ignores "smart-tabs" rule and notifies of indent errors
I’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)
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19 (16 by maintainers)
Commits related to this issue
- Clamp eslint to <3.6.0 because of eslint/eslint#7248 — committed to Leaflet/Leaflet by IvanSanchez 8 years ago
- Fix: avoid indent and no-mixed-spaces-and-tabs conflicts (fixes #7248) — committed to not-an-aardvark/eslint by not-an-aardvark 8 years ago
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.