diff --git a/packages/eslint-plugin/src/rules/indent.ts b/packages/eslint-plugin/src/rules/indent.ts index a3c6f5971d5..85187a7046b 100644 --- a/packages/eslint-plugin/src/rules/indent.ts +++ b/packages/eslint-plugin/src/rules/indent.ts @@ -74,6 +74,7 @@ const KNOWN_NODES = new Set([ AST_NODE_TYPES.TSTypeOperator, AST_NODE_TYPES.TSTypeParameter, AST_NODE_TYPES.TSTypeParameterDeclaration, + AST_NODE_TYPES.TSTypeParameterInstantiation, AST_NODE_TYPES.TSTypeReference, AST_NODE_TYPES.TSUnionType, ]); diff --git a/packages/eslint-plugin/tests/rules/indent.test.ts b/packages/eslint-plugin/tests/rules/indent.test.ts index d845a871172..7fb18428d9f 100644 --- a/packages/eslint-plugin/tests/rules/indent.test.ts +++ b/packages/eslint-plugin/tests/rules/indent.test.ts @@ -742,6 +742,30 @@ const foo : Foo = { `, options: [4, { VariableDeclarator: { const: 3 } }], }, + { + code: ` +const name: string = ' Typescript ' + .toUpperCase() + .trim(), + + greeting: string = (" Hello " + name) + .toUpperCase() + .trim(); + `, + options: [2, { VariableDeclarator: { const: 3 } }], + }, + { + code: ` +const div: JQuery = $('
') + .addClass('some-class') + .appendTo($('body')), + + button: JQuery = $('