diff --git a/lib/utils/indent-common.js b/lib/utils/indent-common.js index 7d2349d3c..8ec6bbe41 100644 --- a/lib/utils/indent-common.js +++ b/lib/utils/indent-common.js @@ -1498,8 +1498,11 @@ module.exports.defineVisitor = function create( } if (namedSpecifiers.length) { const leftBrace = tokenStore.getTokenBefore(namedSpecifiers[0]) - const rightBrace = tokenStore.getTokenAfter( - namedSpecifiers[namedSpecifiers.length - 1] + const rightBrace = /** @type {Token} */ ( + tokenStore.getTokenAfter( + namedSpecifiers[namedSpecifiers.length - 1], + isClosingBraceToken + ) ) processNodeList(namedSpecifiers, leftBrace, rightBrace, 1) for (const token of tokenStore.getTokensBetween( diff --git a/tests/fixtures/script-indent/import-declaration-11.vue b/tests/fixtures/script-indent/import-declaration-11.vue new file mode 100644 index 000000000..83289b1f4 --- /dev/null +++ b/tests/fixtures/script-indent/import-declaration-11.vue @@ -0,0 +1,7 @@ + + +