From fe5de6953aa1e072055058f8a8a8b9b95c924b1b Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 13 Feb 2020 15:03:51 +0400 Subject: [PATCH] feat(eslint): Rule "indent" Signed-off-by: Valentin Popov --- ROADMAP.md | 2 +- src/rules/eslint.json | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index a40ad05..fe03ecc 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -50,7 +50,7 @@ - [ ] "id-length" - [ ] "id-match" - [ ] "implicit-arrow-linebreak" -- [ ] "indent" +- [X] "indent" - [X] "indent-legacy" - [ ] "init-declarations" - [ ] "jsx-quotes" diff --git a/src/rules/eslint.json b/src/rules/eslint.json index db1785e..20f946f 100644 --- a/src/rules/eslint.json +++ b/src/rules/eslint.json @@ -3,6 +3,33 @@ "error", "always" ], + "indent": [ + "error", + "tab", + { + "ArrayExpression": 1, + "CallExpression": { + "arguments": 1 + }, + "FunctionDeclaration": { + "body": 1, + "parameters": 1 + }, + "FunctionExpression": { + "body": 1, + "parameters": 1 + }, + "ImportDeclaration": 1, + "MemberExpression": 1, + "ObjectExpression": 1, + "SwitchCase": 1, + "VariableDeclarator": "first", + "flatTernaryExpressions": true, + "ignoreComments": false, + "ignoredNodes": [], + "outerIIFEBody": 1 + } + ], "indent-legacy": [ "off" ],