diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 6b0db3f8be..839c15e7fa 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -70,7 +70,14 @@ rules: import/extensions: off # typescript doesn't support this import/no-unresolved: off # TODO: fix internal modules import/prefer-default-export: off # prefer named exports - indent: off # use @typescript-eslint/indent instead for better compatibility + indent: [error, 4, { + SwitchCase: 0, + ignoredNodes: [ # https://stackoverflow.com/a/72897089 + "FunctionExpression > .params[decorators.length > 0]", + "FunctionExpression > .params > :matches(Decorator, :not(:first-child))", + "ClassBody.body > PropertyDefinition[decorators.length > 0] > .key", + ] + }] lines-between-class-members: off # be more lenient on member declarations max-classes-per-file: off # helper classes are common @@ -103,9 +110,6 @@ rules: 'ts-nocheck': true, 'ts-check': false, }] - '@typescript-eslint/indent': [warn, 4, { - SwitchCase: 0 - }] '@typescript-eslint/no-unused-expressions': warn # TODO: this is just too much work