tslint-eslint-rules
tslint-eslint-rules copied to clipboard
Implement smart tabs for indent rule
Smart tabs allows the use of tabs for indentation, spaces for alignment. This is a crucial feature that there is basically no alternative to, if you're using tabs for indentation. Please implement this. I used it with ESLint and didn't come across any issues.
Not a priority for this project, but feel free to fork it and open a PR, I'll be glad to help you.
The solution for this is to implement a new rule to give a TSLine equivalent to no-mixed-spaces-and-tabs
. I have implemented this rule and I will submit a pull request.
@jez9999 , I've tried these rules and, given a tab followed by a space, am still getting a lint Error of "indentation has mixed tabs and spaces (ter-no-mixed-spaces-and-tabs)" when smartTabs is set to true. I have tried both "ter-no-mixed-spaces-and-tabs": { "smartTabs": true }
and "ter-no-mixed-spaces-and-tabs": { "type": "tabs", "smartTabs": true }
, although I'm not sure what the difference ought to be between those two options.