From 4ccd04b69a8ca915b9637ac63e6f792f73f57553 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 3 Dec 2015 00:09:12 -0800 Subject: [PATCH] I abhor switch statements, but their indentation should be: ```js switch (foo) { case 'bar': break; } ``` not what the plugin currently requires: ```js switch (foo) { case: 'bar': break; } ``` --- packages/eslint-config-airbnb/rules/style.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/eslint-config-airbnb/rules/style.js b/packages/eslint-config-airbnb/rules/style.js index 90e5aae3..b2494375 100644 --- a/packages/eslint-config-airbnb/rules/style.js +++ b/packages/eslint-config-airbnb/rules/style.js @@ -23,7 +23,8 @@ module.exports = { // this option enforces minimum and maximum identifier lengths (variable names, property names etc.) 'id-length': 0, // this option sets a specific tab width for your code - 'indent': [2, 2], + // https://github.com/eslint/eslint/blob/master/docs/rules/indent.md + 'indent': [2, 2, { "SwitchCase": 1, "VariableDeclarator": 1 }], // specify whether double or single quotes should be used in JSX attributes 'jsx-quotes': 2, // enforces spacing between keys and values in object literal properties