Skip to content

Commit 2c3b75d

Browse files
committed
Merge pull request airbnb#606 from airbnb/ljharb/fix_switch_indent
[breaking] Fix switch statement indentation rule
2 parents 6e6a2b9 + 4ccd04b commit 2c3b75d

File tree

1 file changed

+2
-1
lines changed
  • packages/eslint-config-airbnb/rules

1 file changed

+2
-1
lines changed

packages/eslint-config-airbnb/rules/style.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ module.exports = {
2323
// this option enforces minimum and maximum identifier lengths (variable names, property names etc.)
2424
'id-length': 0,
2525
// this option sets a specific tab width for your code
26-
'indent': [2, 2],
26+
// https://github.com/eslint/eslint/blob/master/docs/rules/indent.md
27+
'indent': [2, 2, { "SwitchCase": 1, "VariableDeclarator": 1 }],
2728
// specify whether double or single quotes should be used in JSX attributes
2829
'jsx-quotes': 2,
2930
// enforces spacing between keys and values in object literal properties

0 commit comments

Comments
 (0)