From ae4e44e588d4be0afbe2854b78ecd44fb7a746ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=BE=E6=98=8E=E5=81=A5?= <1187356256@qq.com> Date: Mon, 19 Sep 2022 10:25:42 +0800 Subject: [PATCH] fix: improve indent for decorators (#114) --- packages/typescript/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/typescript/index.js b/packages/typescript/index.js index 1521e34..9b71628 100644 --- a/packages/typescript/index.js +++ b/packages/typescript/index.js @@ -58,6 +58,9 @@ module.exports = { 'JSXEmptyExpression', 'JSXSpreadChild', 'TSTypeParameterInstantiation', + 'FunctionExpression > .params[decorators.length > 0]', + 'FunctionExpression > .params > :matches(Decorator, :not(:first-child))', + 'ClassBody.body > PropertyDefinition[decorators.length > 0] > .key', ], offsetTernaryExpressions: true, }],