From bf19dc0adb5ea9f919bc4e622da596ede6d3a9d5 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 17 Apr 2022 13:17:35 +0800 Subject: [PATCH] fix: indents --- packages/typescript/index.js | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/packages/typescript/index.js b/packages/typescript/index.js index 53ffd31..a03ca66 100644 --- a/packages/typescript/index.js +++ b/packages/typescript/index.js @@ -30,11 +30,39 @@ module.exports = { 'no-useless-constructor': 'off', 'indent': 'off', '@typescript-eslint/indent': ['error', 2, { + SwitchCase: 1, + VariableDeclarator: 1, + outerIIFEBody: 1, + MemberExpression: 1, + FunctionDeclaration: { parameters: 1, body: 1 }, + FunctionExpression: { parameters: 1, body: 1 }, + CallExpression: { arguments: 1 }, + ArrayExpression: 1, + ObjectExpression: 1, + ImportDeclaration: 1, + flatTernaryExpressions: false, + ignoreComments: false, ignoredNodes: [ + 'TemplateLiteral *', + 'JSXElement', + 'JSXElement > *', 'JSXAttribute', + 'JSXIdentifier', + 'JSXNamespacedName', + 'JSXMemberExpression', + 'JSXSpreadAttribute', + 'JSXExpressionContainer', + 'JSXOpeningElement', + 'JSXClosingElement', + 'JSXFragment', + 'JSXOpeningFragment', + 'JSXClosingFragment', + 'JSXText', + 'JSXEmptyExpression', + 'JSXSpreadChild', 'TSTypeParameterInstantiation', ], - SwitchCase: 1, + offsetTernaryExpressions: true, }], 'no-unused-vars': 'off', '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],