[@typescript-eslint/indent] SwitchCase default inconsistent with docs and ESLint #608
Labels
bug
Something isn't working
documentation
Documentation ("docs") that needs adding/updating
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Milestone
The documentation states that the default indentation level for
SwitchCase
is zero:https://github.com/typescript-eslint/typescript-eslint/blame/61e6385c65b147a5a8b4caa2f3241e5a92c9b1bf/packages/eslint-plugin/docs/rules/indent.md#L77
The default for ESLint is also zero:
https://eslint.org/docs/rules/indent#options
In practice, the level is actually
1
. Other than the documentation being incorrect, I'd argue that turning ESLint'sindent
off and setting@typescript-eslint/indent
toerror
should not produce new violations on code covered by both rules.Repro
Expected Result
Does not raise a violation.
Actual Result
Raises a violation.
Additional Info
Can be worked around by explicitly setting the
SwitchCase
level. Unfortunately this requires being explicit about the indentation depth also:Versions
@typescript-eslint/eslint-plugin
1.10.2
@typescript-eslint/parser
1.10.2
TypeScript
3.3.1
ESLint
5.12.1
node
10.15.4
yarn
1.16.0
The text was updated successfully, but these errors were encountered: