diff --git a/.eslintignore b/.eslintignore index 6fd64068c..d55c57aca 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,3 +7,4 @@ !/.vscode !/.github /prettier-playground +/tests/fixtures/rules/indent/invalid/ts \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 452935c22..90181610a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -37,6 +37,12 @@ module.exports = { { files: ["*.svelte"], parser: "svelte-eslint-parser", + parserOptions: { + parser: { + ts: "@typescript-eslint/parser", + js: "espree", + }, + }, }, { files: ["*.ts"], diff --git a/docs/rules/indent.md b/docs/rules/indent.md index 400c424b2..b43540da3 100644 --- a/docs/rules/indent.md +++ b/docs/rules/indent.md @@ -17,7 +17,7 @@ since: "v0.3.0" This rule enforces a consistent indentation style in `.svelte`. The default style is 2 spaces. - This rule checks all tags, also all expressions in directives and mustaches. -- In the expressions, this rule supports ECMAScript 2021 syntaxes. It ignores unknown AST nodes, but it might be confused by non-standard syntaxes. +- In the expressions, this rule supports ECMAScript 2021 syntaxes and some TypeScript syntaxes. It ignores unknown AST nodes, but it might be confused by non-standard syntaxes. diff --git a/package.json b/package.json index b5aaea141..92cb27a57 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "pretest:base": "cross-env DEBUG=eslint-plugin-svelte*", "test": "mocha --require ts-node/register \"tests/src/**/*.ts\" --reporter dot --timeout 60000", "cover": "nyc --reporter=lcov npm run test", - "debug": "mocha --require ts-node/register/transpile-only \"tests/src/**/*.ts\" --reporter dot", + "debug": "mocha --require ts-node/register/transpile-only \"tests/src/**/*.ts\" --reporter dot --timeout 60000", "lint": "eslint .", "eslint-fix": "eslint . --fix", "update": "ts-node --transpile-only ./tools/update.ts && npm run eslint-fix && npm run test", diff --git a/src/rules/indent-helpers/ast.ts b/src/rules/indent-helpers/ast.ts index 2cbcfc973..c6c6bcffa 100644 --- a/src/rules/indent-helpers/ast.ts +++ b/src/rules/indent-helpers/ast.ts @@ -17,6 +17,8 @@ export function isNotWhitespace( token: AnyToken | ESTree.Comment | null | undefined, ): boolean { return ( - token != null && (token.type !== "HTMLText" || Boolean(token.value.trim())) + token != null && + (token.type !== "HTMLText" || Boolean(token.value.trim())) && + (token.type !== "JSXText" || Boolean(token.value.trim())) ) } diff --git a/src/rules/indent-helpers/commons.ts b/src/rules/indent-helpers/commons.ts index d689e86c1..5a048a5c2 100644 --- a/src/rules/indent-helpers/commons.ts +++ b/src/rules/indent-helpers/commons.ts @@ -3,7 +3,12 @@ import type { AST } from "svelte-eslint-parser" import { isOpeningParenToken, isClosingParenToken } from "eslint-utils" import { isNotWhitespace, isWhitespace } from "./ast" -type AnyToken = AST.Token | AST.Comment +export type AnyToken = AST.Token | AST.Comment +export type MaybeNode = { + type: string + range: [number, number] + loc: AST.SourceLocation +} export type IndentOptions = { indentChar: " " | "\t" @@ -49,9 +54,9 @@ export type IndentContext = { */ export function setOffsetNodes( { sourceCode, setOffset }: IndentContext, - nodes: (ASTNode | AnyToken | null | undefined)[], - baseNodeOrToken: ASTNode | AnyToken, - lastNodeOrToken: ASTNode | AnyToken | null, + nodes: (ASTNode | AnyToken | MaybeNode | null | undefined)[], + baseNodeOrToken: ASTNode | AnyToken | MaybeNode, + lastNodeOrToken: ASTNode | AnyToken | MaybeNode | null, offset: number, ): void { const baseToken = sourceCode.getFirstToken(baseNodeOrToken) @@ -105,7 +110,7 @@ export function setOffsetNodes( */ export function getFirstAndLastTokens( sourceCode: SourceCode, - node: ASTNode | AnyToken, + node: ASTNode | AnyToken | MaybeNode, borderOffset = 0, ): { firstToken: AST.Token; lastToken: AST.Token } { let firstToken = sourceCode.getFirstToken(node) @@ -133,3 +138,15 @@ export function getFirstAndLastTokens( return { firstToken, lastToken } } + +/** + * Check whether the given node or token is the beginning of a line. + */ +export function isBeginningOfLine( + sourceCode: SourceCode, + node: ASTNode | AnyToken | MaybeNode, +): boolean { + const prevToken = sourceCode.getTokenBefore(node, { includeComments: false }) + + return !prevToken || prevToken.loc.end.line < node.loc!.start.line +} diff --git a/src/rules/indent-helpers/es.ts b/src/rules/indent-helpers/es.ts index b6d291beb..9c2ee668d 100644 --- a/src/rules/indent-helpers/es.ts +++ b/src/rules/indent-helpers/es.ts @@ -1,5 +1,6 @@ import type { AST } from "svelte-eslint-parser" import type * as ESTree from "estree" +import type { TSESTree } from "@typescript-eslint/types" import type { ASTNode } from "../../types" import type { IndentContext } from "./commons" import { getFirstAndLastTokens } from "./commons" @@ -35,10 +36,7 @@ type NodeListener = { * @param context The rule context. * @returns AST event handlers. */ -export function defineVisitor(context: IndentContext): NodeListener & { - ":expression": (node: ESTree.Expression) => void - ":statement": (node: ESTree.Statement) => void -} { +export function defineVisitor(context: IndentContext): NodeListener { const { sourceCode, options, setOffsetBaseLine, setOffset } = context /** @@ -80,13 +78,12 @@ export function defineVisitor(context: IndentContext): NodeListener & { } }, ArrayExpression(node: ESTree.ArrayExpression | ESTree.ArrayPattern) { - setOffsetNodes( - context, - node.elements, - sourceCode.getFirstToken(node), - sourceCode.getLastToken(node), - 1, + const firstToken = sourceCode.getFirstToken(node) + const rightToken = sourceCode.getTokenAfter( + node.elements[node.elements.length - 1] || firstToken, + { filter: isClosingBracketToken, includeComments: false }, ) + setOffsetNodes(context, node.elements, firstToken, rightToken, 1) }, ArrayPattern(node: ESTree.ArrayPattern) { visitor.ArrayExpression(node) @@ -250,7 +247,7 @@ export function defineVisitor(context: IndentContext): NodeListener & { setOffset(sourceCode.getFirstToken(node.id), 1, classToken) } if (node.superClass != null) { - const extendsToken = sourceCode.getTokenAfter(node.id || classToken)! + const extendsToken = sourceCode.getTokenBefore(node.superClass)! const superClassToken = sourceCode.getTokenAfter(extendsToken) setOffset(extendsToken, 1, classToken) setOffset(superClassToken, 1, extendsToken) @@ -461,43 +458,49 @@ export function defineVisitor(context: IndentContext): NodeListener & { ) { const firstToken = sourceCode.getFirstToken(node) let leftParenToken, bodyBaseToken - if (isOpeningParenToken(firstToken)) { + if (firstToken.type === "Punctuator") { // method leftParenToken = firstToken bodyBaseToken = sourceCode.getFirstToken(getParent(node)!) } else { - const functionToken = node.async - ? sourceCode.getTokenAfter(firstToken)! - : firstToken - const starToken = node.generator - ? sourceCode.getTokenAfter(functionToken) - : null - const idToken = node.id && sourceCode.getFirstToken(node.id) - - if (node.async) { - setOffset(functionToken, 0, firstToken) - } - if (node.generator) { - setOffset(starToken, 1, firstToken) - } - if (node.id != null) { - setOffset(idToken, 1, firstToken) + let nextToken = sourceCode.getTokenAfter(firstToken) + let nextTokenOffset = 0 + while ( + nextToken && + !isOpeningParenToken(nextToken) && + nextToken.value !== "<" + ) { + if ( + nextToken.value === "*" || + (node.id && nextToken.range[0] === node.id.range![0]) + ) { + nextTokenOffset = 1 + } + setOffset(nextToken, nextTokenOffset, firstToken) + nextToken = sourceCode.getTokenAfter(nextToken) } + leftParenToken = nextToken! + bodyBaseToken = firstToken + } + + if ( + !isOpeningParenToken(leftParenToken) && + (node as TSESTree.FunctionExpression).typeParameters + ) { leftParenToken = sourceCode.getTokenAfter( - idToken || starToken || functionToken, + (node as TSESTree.FunctionExpression).typeParameters!, )! - bodyBaseToken = firstToken } const rightParenToken = sourceCode.getTokenAfter( node.params[node.params.length - 1] || leftParenToken, { filter: isClosingParenToken, includeComments: false }, )! - const bodyToken = sourceCode.getFirstToken(node.body) - setOffset(leftParenToken, 1, bodyBaseToken) setOffsetNodes(context, node.params, leftParenToken, rightParenToken, 1) + + const bodyToken = sourceCode.getFirstToken(node.body) setOffset(bodyToken, 0, bodyBaseToken) }, FunctionExpression(node: ESTree.FunctionExpression) { @@ -709,22 +712,13 @@ export function defineVisitor(context: IndentContext): NodeListener & { lastKeyToken = keyTokens.lastToken } - if ( - node.type === "MethodDefinition" || - (node.type === "Property" && node.method === true) - ) { - const leftParenToken = sourceCode.getTokenAfter(lastKeyToken) - setOffset(leftParenToken, 1, lastKeyToken) - } else if (node.type === "Property" && !node.shorthand) { - const colonToken = sourceCode.getTokenAfter(lastKeyToken)! - const valueToken = sourceCode.getTokenAfter(colonToken) - - setOffset([colonToken, valueToken], 1, lastKeyToken) - } else if (node.type === "PropertyDefinition" && node.value != null) { - const eqToken = sourceCode.getTokenAfter(lastKeyToken)! - const initToken = sourceCode.getTokenAfter(eqToken) - - setOffset([eqToken, initToken], 1, lastKeyToken) + if (node.value) { + const initToken = sourceCode.getFirstToken(node.value) + setOffset( + [...sourceCode.getTokensBetween(lastKeyToken, initToken), initToken], + 1, + lastKeyToken, + ) } }, Property(node: ESTree.Property) { @@ -753,13 +747,12 @@ export function defineVisitor(context: IndentContext): NodeListener & { } }, ObjectExpression(node: ESTree.ObjectExpression | ESTree.ObjectPattern) { - setOffsetNodes( - context, - node.properties, - sourceCode.getFirstToken(node), - sourceCode.getLastToken(node), - 1, + const firstToken = sourceCode.getFirstToken(node) + const rightToken = sourceCode.getTokenAfter( + node.properties[node.properties.length - 1] || firstToken, + { filter: isClosingBraceToken, includeComments: false }, ) + setOffsetNodes(context, node.properties, firstToken, rightToken, 1) }, ObjectPattern(node: ESTree.ObjectPattern) { visitor.ObjectExpression(node) @@ -929,9 +922,6 @@ export function defineVisitor(context: IndentContext): NodeListener & { DebuggerStatement() { // noop }, - EmptyStatement() { - // noop - }, Identifier() { // noop }, @@ -962,17 +952,20 @@ export function defineVisitor(context: IndentContext): NodeListener & { ChainExpression() { // noop }, + EmptyStatement() { + // noop + }, } - return { - ...visitor, - ":statement"(node: ESTree.Statement) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- ignore + const commonVisitor: any = { + ":statement, PropertyDefinition"(node: ESTree.Statement) { const firstToken = sourceCode.getFirstToken(node) const lastToken = sourceCode.getLastToken(node) if (isSemicolonToken(lastToken) && firstToken !== lastToken) { const next = sourceCode.getTokenAfter(lastToken) if (!next || lastToken.loc.start.line < next.loc.start.line) { - // Lone semicolons + // End of line semicolons setOffset(lastToken, 0, firstToken) } } @@ -998,6 +991,12 @@ export function defineVisitor(context: IndentContext): NodeListener & { } }, } + const v: NodeListener = visitor + + return { + ...v, + ...commonVisitor, + } } /** Get the parent node from the given node */ diff --git a/src/rules/indent-helpers/index.ts b/src/rules/indent-helpers/index.ts index 5d686eb92..fd2ad6080 100644 --- a/src/rules/indent-helpers/index.ts +++ b/src/rules/indent-helpers/index.ts @@ -3,16 +3,16 @@ import type * as ESTree from "estree" import type { ASTNode, RuleContext, RuleListener } from "../../types" import * as SV from "./svelte" import * as ES from "./es" +import * as TS from "./ts" import { isNotWhitespace } from "./ast" import { isCommentToken } from "eslint-utils" -import type { IndentOptions } from "./commons" +import type { AnyToken, IndentOptions } from "./commons" type IndentUserOptions = { indent?: number | "tab" switchCase?: number ignoredNodes?: string[] } -type AnyToken = AST.Token | AST.Comment /** * Normalize options. @@ -309,7 +309,14 @@ export function defineVisitor( saveExpectedIndent(tokens, actualIndent) return } - saveExpectedIndent(tokens, expectedIndent) + saveExpectedIndent( + tokens, + Math.min( + ...tokens + .map(getExpectedIndentFromToken) + .filter((i): i is number => i != null), + ), + ) let prev = prevToken if (prevComments.length) { @@ -334,6 +341,7 @@ export function defineVisitor( const nodesVisitor = { ...ES.defineVisitor(indentContext), ...SV.defineVisitor(indentContext), + ...TS.defineVisitor(indentContext), } const knownNodes = new Set(Object.keys(nodesVisitor)) @@ -365,6 +373,8 @@ export function defineVisitor( "*:exit"(node: ASTNode) { // Ignore tokens of unknown nodes. if (!knownNodes.has(node.type)) { + // debugger + // console.log(node.type, node.loc!.start.line) ignore(node) } }, diff --git a/src/rules/indent-helpers/svelte.ts b/src/rules/indent-helpers/svelte.ts index dd5225aec..bfa62aee7 100644 --- a/src/rules/indent-helpers/svelte.ts +++ b/src/rules/indent-helpers/svelte.ts @@ -4,12 +4,12 @@ import { isNotWhitespace } from "./ast" import type { IndentContext } from "./commons" import { getFirstAndLastTokens } from "./commons" import { setOffsetNodes } from "./commons" -type NodeWithParent = Exclude< +type NodeWithoutES = Exclude< AST.SvelteNode, AST.SvelteProgram | AST.SvelteReactiveStatement > -type NodeListenerMap = { - [key in NodeWithParent["type"]]: T extends { type: key } ? T : never +type NodeListenerMap = { + [key in NodeWithoutES["type"]]: T extends { type: key } ? T : never } type NodeListener = { diff --git a/src/rules/indent-helpers/ts.ts b/src/rules/indent-helpers/ts.ts new file mode 100644 index 000000000..a534ca138 --- /dev/null +++ b/src/rules/indent-helpers/ts.ts @@ -0,0 +1,1111 @@ +import type { TSESTree } from "@typescript-eslint/types" +import type * as ESTree from "estree" +import { + isClosingBracketToken, + isClosingParenToken, + isNotClosingParenToken, + isOpeningBraceToken, + isOpeningBracketToken, + isOpeningParenToken, + isSemicolonToken, +} from "eslint-utils" +import type { AnyToken, IndentContext } from "./commons" +import { isBeginningOfLine } from "./commons" +import { setOffsetNodes } from "./commons" +import { getFirstAndLastTokens } from "./commons" + +type NodeWithoutES = Exclude< + TSESTree.Node, + | { type: ESTree.Node["type"] } + | TSESTree.JSXAttribute + | TSESTree.JSXClosingElement + | TSESTree.JSXClosingFragment + | TSESTree.JSXElement + | TSESTree.JSXEmptyExpression + | TSESTree.JSXExpressionContainer + | TSESTree.JSXFragment + | TSESTree.JSXIdentifier + | TSESTree.JSXMemberExpression + | TSESTree.JSXNamespacedName + | TSESTree.JSXOpeningElement + | TSESTree.JSXOpeningFragment + | TSESTree.JSXSpreadAttribute + | TSESTree.JSXSpreadChild + | TSESTree.JSXText +> +type NodeListenerMap = { + [key in NodeWithoutES["type"]]: T extends { type: key } ? T : never +} +type NodeListener = { + [T in keyof NodeListenerMap]: (node: NodeListenerMap[T]) => void +} + +/** + * Creates AST event handlers for svelte nodes. + * + * @param context The rule context. + * @returns AST event handlers. + */ +export function defineVisitor(context: IndentContext): NodeListener { + const { setOffset, sourceCode, copyOffset } = context + const visitor = { + TSTypeAnnotation(node: TSESTree.TSTypeAnnotation) { + // : Type + // => Type + const [colonOrArrowToken, secondToken] = sourceCode.getFirstTokens(node, { + count: 2, + includeComments: false, + }) + const baseToken = sourceCode.getFirstToken(node.parent!) + setOffset([colonOrArrowToken, secondToken], 1, baseToken) + + const before = sourceCode.getTokenBefore(colonOrArrowToken) + if (before && before.value === "?") { + setOffset(before, 1, baseToken) + } + }, + TSAsExpression(node: TSESTree.TSAsExpression) { + // foo as T + const expressionTokens = getFirstAndLastTokens( + sourceCode, + node.expression as ESTree.Expression, + ) + const asToken = sourceCode.getTokenAfter(expressionTokens.lastToken)! + setOffset( + [ + asToken, + getFirstAndLastTokens(sourceCode, node.typeAnnotation).firstToken, + ], + 1, + expressionTokens.firstToken, + ) + }, + TSTypeReference(node: TSESTree.TSTypeReference) { + // T + if (node.typeParameters) { + const typeNameTokens = getFirstAndLastTokens(sourceCode, node.typeName) + setOffset( + sourceCode.getFirstToken(node.typeParameters), + 1, + typeNameTokens.firstToken, + ) + } + }, + TSTypeParameterInstantiation( + node: + | TSESTree.TSTypeParameterInstantiation + | TSESTree.TSTypeParameterDeclaration, + ) { + // + setOffsetNodes( + context, + node.params, + sourceCode.getFirstToken(node), + sourceCode.getLastToken(node), + 1, + ) + }, + TSTypeParameterDeclaration(node: TSESTree.TSTypeParameterDeclaration) { + // + visitor.TSTypeParameterInstantiation(node) + }, + TSTypeAliasDeclaration(node: TSESTree.TSTypeAliasDeclaration) { + // type T = {} + const typeToken = sourceCode.getFirstToken(node) + const idToken = sourceCode.getFirstToken(node.id) + setOffset(idToken, 1, typeToken) + + let eqToken + if (node.typeParameters) { + setOffset(sourceCode.getFirstToken(node.typeParameters), 1, idToken) + eqToken = sourceCode.getTokenAfter(node.typeParameters)! + } else { + eqToken = sourceCode.getTokenAfter(node.id)! + } + + const initToken = sourceCode.getTokenAfter(eqToken) + + setOffset([eqToken, initToken], 1, idToken) + }, + TSFunctionType(node: TSESTree.TSFunctionType | TSESTree.TSConstructorType) { + // ()=>void + const firstToken = sourceCode.getFirstToken(node) + // new or < or ( + let currToken = firstToken + if (node.type === "TSConstructorType") { + // currToken is new token + // < or ( + currToken = sourceCode.getTokenAfter(currToken)! + setOffset(currToken, 1, firstToken) + } + if (node.typeParameters) { + // currToken is < token + // ( + currToken = sourceCode.getTokenAfter(node.typeParameters)! + setOffset(currToken, 1, firstToken) + } + const leftParenToken = currToken + const rightParenToken = sourceCode.getTokenAfter( + node.params[node.params.length - 1] || leftParenToken, + { filter: isClosingParenToken, includeComments: false }, + )! + setOffsetNodes(context, node.params, leftParenToken, rightParenToken, 1) + + const arrowToken = sourceCode.getTokenAfter(rightParenToken) + setOffset(arrowToken, 1, leftParenToken) + }, + TSConstructorType(node: TSESTree.TSConstructorType) { + // new ()=>void + visitor.TSFunctionType(node) + }, + TSTypeLiteral(node: TSESTree.TSTypeLiteral) { + // {foo:any} + setOffsetNodes( + context, + node.members, + sourceCode.getFirstToken(node), + sourceCode.getLastToken(node), + 1, + ) + }, + TSPropertySignature(node: TSESTree.TSPropertySignature) { + // { target:any } + // ^^^^^^^^^^ + const firstToken = sourceCode.getFirstToken(node) + const keyTokens = getFirstAndLastTokens(sourceCode, node.key) + let keyLast + if (node.computed) { + const closeBracket = sourceCode.getTokenAfter(keyTokens.lastToken)! + setOffsetNodes(context, [node.key], firstToken, closeBracket, 1) + keyLast = closeBracket + } else { + keyLast = keyTokens.lastToken + } + if (node.typeAnnotation) { + const typeAnnotationToken = sourceCode.getFirstToken( + node.typeAnnotation, + ) + setOffset( + [ + ...sourceCode.getTokensBetween(keyLast, typeAnnotationToken), + typeAnnotationToken, + ], + 1, + firstToken, + ) + } else if (node.optional) { + const qToken = sourceCode.getLastToken(node) + setOffset(qToken, 1, firstToken) + } + }, + TSIndexSignature(node: TSESTree.TSIndexSignature) { + // { [k: string ]: string[] }; + // ^^^^^^^^^^^^^^^^^^^^^^ + const leftBracketToken = sourceCode.getFirstToken(node) + const rightBracketToken = sourceCode.getTokenAfter( + node.parameters[node.parameters.length - 1] || leftBracketToken, + { filter: isClosingBracketToken, includeComments: false }, + )! + setOffsetNodes( + context, + node.parameters, + leftBracketToken, + rightBracketToken, + 1, + ) + const keyLast = rightBracketToken + if (node.typeAnnotation) { + const typeAnnotationToken = sourceCode.getFirstToken( + node.typeAnnotation, + ) + setOffset( + [ + ...sourceCode.getTokensBetween(keyLast, typeAnnotationToken), + typeAnnotationToken, + ], + 1, + leftBracketToken, + ) + } + }, + TSArrayType(node: TSESTree.TSArrayType) { + // T[] + const firstToken = sourceCode.getFirstToken(node) + setOffset( + sourceCode.getLastTokens(node, { count: 2, includeComments: false }), + 0, + firstToken, + ) + }, + TSTupleType(node: TSESTree.TSTupleType) { + // [T, U] + setOffsetNodes( + context, + node.elementTypes, + sourceCode.getFirstToken(node), + sourceCode.getLastToken(node), + 1, + ) + }, + TSQualifiedName(node: TSESTree.TSQualifiedName) { + // A.B + const objectToken = sourceCode.getFirstToken(node) + const dotToken = sourceCode.getTokenBefore(node.right)! + const propertyToken = sourceCode.getTokenAfter(dotToken) + + setOffset([dotToken, propertyToken], 1, objectToken) + }, + TSIndexedAccessType(node: TSESTree.TSIndexedAccessType) { + // A[B] + const objectToken = sourceCode.getFirstToken(node) + + const leftBracketToken = sourceCode.getTokenBefore(node.indexType, { + filter: isOpeningBracketToken, + includeComments: false, + })! + const rightBracketToken = sourceCode.getTokenAfter(node.indexType, { + filter: isClosingBracketToken, + includeComments: false, + }) + + setOffset(leftBracketToken, 1, objectToken) + setOffsetNodes( + context, + [node.indexType], + leftBracketToken, + rightBracketToken, + 1, + ) + }, + TSUnionType(node: TSESTree.TSUnionType | TSESTree.TSIntersectionType) { + // A | B + const firstToken = sourceCode.getFirstToken(node) + const types = [...node.types] + if ( + getFirstAndLastTokens(sourceCode, types[0]).firstToken === firstToken + ) { + types.shift() + } + setOffsetNodes( + context, + types, + firstToken, + null, + isBeginningOfLine(sourceCode, firstToken) ? 0 : 1, + ) + }, + TSIntersectionType(node: TSESTree.TSIntersectionType) { + // A & B + visitor.TSUnionType(node) + }, + TSParenthesizedType(node: TSESTree.TSParenthesizedType) { + // (T) + setOffsetNodes( + context, + [node.typeAnnotation], + sourceCode.getFirstToken(node), + sourceCode.getLastToken(node), + 1, + ) + }, + TSMappedType(node: TSESTree.TSMappedType) { + // {[key in foo]: bar} + const leftBraceToken = sourceCode.getFirstToken(node) + + const leftBracketToken = sourceCode.getTokenBefore(node.typeParameter)! + const rightBracketToken = sourceCode.getTokenAfter( + node.nameType || node.typeParameter, + )! + setOffset( + [ + ...sourceCode.getTokensBetween(leftBraceToken, leftBracketToken), + leftBracketToken, + ], + 1, + leftBraceToken, + ) + setOffsetNodes( + context, + [node.typeParameter, node.nameType], + leftBracketToken, + rightBracketToken, + 1, + ) + + const rightBraceToken = sourceCode.getLastToken(node) + if (node.typeAnnotation) { + const typeAnnotationToken = sourceCode.getFirstToken( + node.typeAnnotation, + ) + setOffset( + [ + ...sourceCode.getTokensBetween( + rightBracketToken, + typeAnnotationToken, + ), + typeAnnotationToken, + ], + 1, + leftBraceToken, + ) + } else { + setOffset( + [...sourceCode.getTokensBetween(rightBracketToken, rightBraceToken)], + 1, + leftBraceToken, + ) + } + + setOffset(rightBraceToken, 0, leftBraceToken) + }, + TSTypeParameter(node: TSESTree.TSTypeParameter) { + // {[key in foo]: bar} + // ^^^^^^^^^^ + // type T + // ^^^^^^^^^^^^^^^ + const [firstToken, ...afterTokens] = sourceCode.getTokens(node) + + for (const child of [node.constraint, node.default]) { + if (!child) { + continue + } + const [, ...removeTokens] = sourceCode.getTokens(child) + for (const token of removeTokens) { + const i = afterTokens.indexOf(token) + if (i >= 0) { + afterTokens.splice(i, 1) + } + } + } + const secondToken = afterTokens.shift() + if (!secondToken) { + return + } + setOffset(secondToken, 1, firstToken) + + if (secondToken.value === "extends") { + let prevToken: AnyToken | null = null + let token = afterTokens.shift() + while (token) { + if (token.value === "=") { + break + } + setOffset(token, 1, secondToken) + prevToken = token + token = afterTokens.shift() + } + while (token) { + setOffset(token, 1, prevToken || secondToken) + token = afterTokens.shift() + } + } else { + setOffset(afterTokens, 1, firstToken) + } + }, + TSConditionalType(node: TSESTree.TSConditionalType) { + // T extends Foo ? T : U + const checkTypeToken = sourceCode.getFirstToken(node) + const extendsToken = sourceCode.getTokenAfter(node.checkType)! + const extendsTypeToken = sourceCode.getFirstToken(node.extendsType) + + setOffset(extendsToken, 1, checkTypeToken) + setOffset(extendsTypeToken, 1, extendsToken) + + const questionToken = sourceCode.getTokenAfter(node.extendsType, { + filter: isNotClosingParenToken, + includeComments: false, + })! + + const consequentToken = sourceCode.getTokenAfter(questionToken) + const colonToken = sourceCode.getTokenAfter(node.trueType, { + filter: isNotClosingParenToken, + includeComments: false, + })! + const alternateToken = sourceCode.getTokenAfter(colonToken) + + let baseNode = node + let parent = baseNode.parent + while ( + parent && + parent.type === "TSConditionalType" && + parent.falseType === baseNode + ) { + baseNode = parent + parent = baseNode.parent + } + const baseToken = sourceCode.getFirstToken(baseNode) + + setOffset([questionToken, colonToken], 1, baseToken) + setOffset(consequentToken, 1, questionToken) + setOffset(alternateToken, 1, colonToken) + }, + TSInterfaceDeclaration(node: TSESTree.TSInterfaceDeclaration) { + // interface I {} + const interfaceToken = sourceCode.getFirstToken(node) + setOffset(sourceCode.getFirstToken(node.id), 1, interfaceToken) + if (node.typeParameters != null) { + setOffset( + sourceCode.getFirstToken(node.typeParameters), + 1, + sourceCode.getFirstToken(node.id), + ) + } + if (node.extends != null && node.extends.length) { + const extendsToken = sourceCode.getTokenBefore(node.extends[0])! + setOffset(extendsToken, 1, interfaceToken) + setOffsetNodes(context, node.extends, extendsToken, null, 1) + } + // It may not calculate the correct location because the visitor key is not provided. + // if (node.implements != null && node.implements.length) { + // const implementsToken = sourceCode.getTokenBefore(node.implements[0])! + // setOffset(implementsToken, 1, interfaceToken) + // setOffsetNodes(context, node.implements, implementsToken, null, 1) + // } + const bodyToken = sourceCode.getFirstToken(node.body) + setOffset(bodyToken, 0, interfaceToken) + }, + TSInterfaceBody(node: TSESTree.TSInterfaceBody | TSESTree.TSModuleBlock) { + setOffsetNodes( + context, + node.body, + sourceCode.getFirstToken(node), + sourceCode.getLastToken(node), + 1, + ) + }, + TSClassImplements( + node: TSESTree.TSClassImplements | TSESTree.TSInterfaceHeritage, + ) { + // class C implements T {} + // ^ + if (node.typeParameters) { + setOffset( + sourceCode.getFirstToken(node.typeParameters), + 1, + sourceCode.getFirstToken(node), + ) + } + }, + TSInterfaceHeritage(node: TSESTree.TSInterfaceHeritage) { + // interface I extends E implements T {} + // ^ ^ + visitor.TSClassImplements(node) + }, + TSEnumDeclaration(node: TSESTree.TSEnumDeclaration) { + // enum E {} + const firstToken = sourceCode.getFirstToken(node) + const idTokens = getFirstAndLastTokens(sourceCode, node.id) + const prefixTokens = sourceCode.getTokensBetween( + firstToken, + idTokens.firstToken, + ) + setOffset(prefixTokens, 0, firstToken) + setOffset(idTokens.firstToken, 1, firstToken) + + const leftBraceToken = sourceCode.getTokenAfter(idTokens.lastToken)! + const rightBraceToken = sourceCode.getLastToken(node) + setOffset(leftBraceToken, 0, firstToken) + setOffsetNodes(context, node.members, leftBraceToken, rightBraceToken, 1) + }, + TSModuleDeclaration(node: TSESTree.TSModuleDeclaration) { + const firstToken = sourceCode.getFirstToken(node) + const idTokens = getFirstAndLastTokens(sourceCode, node.id) + const prefixTokens = sourceCode.getTokensBetween( + firstToken, + idTokens.firstToken, + ) + setOffset(prefixTokens, 0, firstToken) + setOffset(idTokens.firstToken, 1, firstToken) + + if (node.body) { + const bodyFirstToken = sourceCode.getFirstToken(node.body) + setOffset( + bodyFirstToken, + isOpeningBraceToken(bodyFirstToken) ? 0 : 1, + firstToken, + ) + } + }, + TSModuleBlock(node: TSESTree.TSModuleBlock) { + visitor.TSInterfaceBody(node) + }, + TSMethodSignature(node: TSESTree.TSMethodSignature) { + // fn(arg: A): R | null; + const firstToken = sourceCode.getFirstToken(node) + const keyTokens = getFirstAndLastTokens(sourceCode, node.key) + let keyLast + if (node.computed) { + const closeBracket = sourceCode.getTokenAfter(keyTokens.lastToken)! + setOffsetNodes(context, [node.key], firstToken, closeBracket, 1) + keyLast = closeBracket + } else { + keyLast = keyTokens.lastToken + } + const leftParenToken = sourceCode.getTokenAfter(keyLast, { + filter: isOpeningParenToken, + includeComments: false, + })! + setOffset( + [ + ...sourceCode.getTokensBetween(keyLast, leftParenToken), + leftParenToken, + ], + 1, + firstToken, + ) + const rightParenToken = sourceCode.getTokenAfter( + node.params[node.params.length - 1] || leftParenToken, + { filter: isClosingParenToken, includeComments: false }, + )! + setOffsetNodes(context, node.params, leftParenToken, rightParenToken, 1) + if (node.returnType) { + const typeAnnotationToken = sourceCode.getFirstToken(node.returnType) + setOffset( + [ + ...sourceCode.getTokensBetween(keyLast, typeAnnotationToken), + typeAnnotationToken, + ], + 1, + firstToken, + ) + } + }, + TSCallSignatureDeclaration( + node: + | TSESTree.TSCallSignatureDeclaration + | TSESTree.TSConstructSignatureDeclaration, + ) { + // interface A { (e: E): R } + // ^^^^^^^^^^^^^ + const firstToken = sourceCode.getFirstToken(node) + // new or < or ( + let currToken = firstToken + if (node.type === "TSConstructSignatureDeclaration") { + // currToken is new token + // < or ( + currToken = sourceCode.getTokenAfter(currToken)! + setOffset(currToken, 1, firstToken) + } + if (node.typeParameters) { + // currToken is < token + // ( + currToken = sourceCode.getTokenAfter(node.typeParameters)! + setOffset(currToken, 1, firstToken) + } + const leftParenToken = currToken + const rightParenToken = sourceCode.getTokenAfter( + node.params[node.params.length - 1] || leftParenToken, + { filter: isClosingParenToken, includeComments: false }, + )! + setOffsetNodes(context, node.params, leftParenToken, rightParenToken, 1) + + if (node.returnType) { + const typeAnnotationToken = sourceCode.getFirstToken(node.returnType) + setOffset( + [ + ...sourceCode.getTokensBetween( + rightParenToken, + typeAnnotationToken, + ), + typeAnnotationToken, + ], + 1, + firstToken, + ) + } + }, + TSConstructSignatureDeclaration( + node: TSESTree.TSConstructSignatureDeclaration, + ) { + // interface A { new (e: E): R } + // ^^^^^^^^^^^^^^^^^ + visitor.TSCallSignatureDeclaration(node) + }, + TSEmptyBodyFunctionExpression( + node: TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSDeclareFunction, + ) { + const firstToken = sourceCode.getFirstToken(node) + let leftParenToken, bodyBaseToken + if (firstToken.type === "Punctuator") { + // method + leftParenToken = firstToken + bodyBaseToken = sourceCode.getFirstToken(node.parent!) + } else { + let nextToken = sourceCode.getTokenAfter(firstToken) + let nextTokenOffset = 0 + while ( + nextToken && + !isOpeningParenToken(nextToken) && + nextToken.value !== "<" + ) { + if ( + nextToken.value === "*" || + (node.id && nextToken.range[0] === node.id.range[0]) + ) { + nextTokenOffset = 1 + } + setOffset(nextToken, nextTokenOffset, firstToken) + nextToken = sourceCode.getTokenAfter(nextToken) + } + + leftParenToken = nextToken! + bodyBaseToken = firstToken + } + + if (!isOpeningParenToken(leftParenToken) && node.typeParameters) { + leftParenToken = sourceCode.getTokenAfter(node.typeParameters)! + } + + const rightParenToken = sourceCode.getTokenAfter( + node.params[node.params.length - 1] || leftParenToken, + { filter: isClosingParenToken, includeComments: false }, + )! + + setOffset(leftParenToken, 1, bodyBaseToken) + setOffsetNodes(context, node.params, leftParenToken, rightParenToken, 1) + }, + TSDeclareFunction(node: TSESTree.TSDeclareFunction) { + // function fn(): void; + visitor.TSEmptyBodyFunctionExpression(node) + }, + TSTypeOperator( + node: + | TSESTree.TSTypeOperator + | TSESTree.TSTypeQuery + | TSESTree.TSInferType, + ) { + // keyof T + const firstToken = sourceCode.getFirstToken(node) + const nextToken = sourceCode.getTokenAfter(firstToken) + + setOffset(nextToken, 1, firstToken) + }, + TSTypeQuery(node: TSESTree.TSTypeQuery) { + // type T = typeof a + visitor.TSTypeOperator(node) + }, + TSInferType(node: TSESTree.TSInferType) { + // infer U + visitor.TSTypeOperator(node) + }, + TSTypePredicate(node: TSESTree.TSTypePredicate) { + // v is T + const firstToken = sourceCode.getFirstToken(node) + const opToken = sourceCode.getTokenAfter(node.parameterName, { + filter: isNotClosingParenToken, + includeComments: false, + })! + const rightToken = + node.typeAnnotation && + getFirstAndLastTokens(sourceCode, node.typeAnnotation).firstToken + + setOffset( + [opToken, rightToken], + 1, + getFirstAndLastTokens(sourceCode, firstToken).firstToken, + ) + }, + TSAbstractMethodDefinition( + node: + | TSESTree.TSAbstractMethodDefinition + | TSESTree.TSAbstractClassProperty + | TSESTree.ClassProperty + | TSESTree.TSEnumMember, + ) { + const { keyNode, valueNode } = + node.type === "TSEnumMember" + ? { keyNode: node.id, valueNode: node.initializer } + : { keyNode: node.key, valueNode: node.value } + + const firstToken = sourceCode.getFirstToken(node) + const keyTokens = getFirstAndLastTokens(sourceCode, keyNode) + const prefixTokens = sourceCode.getTokensBetween( + firstToken, + keyTokens.firstToken, + ) + if (node.computed) { + prefixTokens.pop() // pop [ + } + setOffset(prefixTokens, 0, firstToken) + + let lastKeyToken + if (node.computed) { + const leftBracketToken = sourceCode.getTokenBefore( + keyTokens.firstToken, + )! + const rightBracketToken = (lastKeyToken = sourceCode.getTokenAfter( + keyTokens.lastToken, + )!) + setOffset(leftBracketToken, 0, firstToken) + setOffsetNodes( + context, + [keyNode], + leftBracketToken, + rightBracketToken, + 1, + ) + } else { + setOffset(keyTokens.firstToken, 0, firstToken) + lastKeyToken = keyTokens.lastToken + } + + if (valueNode != null) { + const initToken = sourceCode.getFirstToken(valueNode) + setOffset( + [...sourceCode.getTokensBetween(lastKeyToken, initToken), initToken], + 1, + lastKeyToken, + ) + } + }, + TSAbstractClassProperty(node: TSESTree.TSAbstractClassProperty) { + visitor.TSAbstractMethodDefinition(node) + }, + TSEnumMember(node: TSESTree.TSEnumMember) { + visitor.TSAbstractMethodDefinition(node) + }, + TSOptionalType( + node: TSESTree.TSOptionalType | TSESTree.TSNonNullExpression, + ) { + // [number?] + // ^^^^^^^ + setOffset( + sourceCode.getLastToken(node), + 1, + sourceCode.getFirstToken(node), + ) + }, + TSNonNullExpression(node: TSESTree.TSNonNullExpression) { + // v! + visitor.TSOptionalType(node) + }, + TSJSDocNonNullableType( + // @ts-expect-error -- Missing TSJSDocNonNullableType type + node: TSESTree.TSJSDocNonNullableType, + ) { + // T! + visitor.TSOptionalType(node) + }, + TSTypeAssertion(node: TSESTree.TSTypeAssertion) { + // + const firstToken = sourceCode.getFirstToken(node) + const expressionToken = getFirstAndLastTokens( + sourceCode, + node.expression, + ).firstToken + setOffsetNodes( + context, + [node.typeAnnotation], + firstToken, + sourceCode.getTokenBefore(expressionToken), + 1, + ) + setOffset(expressionToken, 1, firstToken) + }, + TSImportType(node: TSESTree.TSImportType) { + // import('foo').B + const firstToken = sourceCode.getFirstToken(node) + const leftParenToken = sourceCode.getTokenAfter(firstToken, { + filter: isOpeningParenToken, + includeComments: false, + })! + setOffset(leftParenToken, 1, firstToken) + const rightParenToken = sourceCode.getTokenAfter(node.parameter, { + filter: isClosingParenToken, + includeComments: false, + })! + setOffsetNodes( + context, + [node.parameter], + leftParenToken, + rightParenToken, + 1, + ) + if (node.qualifier) { + const dotToken = sourceCode.getTokenBefore(node.qualifier)! + const propertyToken = sourceCode.getTokenAfter(dotToken) + setOffset([dotToken, propertyToken], 1, firstToken) + } + if (node.typeParameters) { + setOffset(sourceCode.getFirstToken(node.typeParameters), 1, firstToken) + } + }, + TSParameterProperty(node: TSESTree.TSParameterProperty) { + // constructor(private a) + const firstToken = sourceCode.getFirstToken(node) + const parameterToken = sourceCode.getFirstToken(node.parameter) + setOffset( + [ + ...sourceCode.getTokensBetween(firstToken, parameterToken), + parameterToken, + ], + 1, + firstToken, + ) + }, + TSImportEqualsDeclaration(node: TSESTree.TSImportEqualsDeclaration) { + // import foo = require('foo') + const importToken = sourceCode.getFirstToken(node) + const idTokens = getFirstAndLastTokens(sourceCode, node.id) + setOffset(idTokens.firstToken, 1, importToken) + + const opToken = sourceCode.getTokenAfter(idTokens.lastToken) + + setOffset( + [opToken, sourceCode.getFirstToken(node.moduleReference)], + 1, + idTokens.lastToken, + ) + }, + TSExternalModuleReference(node: TSESTree.TSExternalModuleReference) { + // require('foo') + const requireToken = sourceCode.getFirstToken(node) + const leftParenToken = sourceCode.getTokenAfter(requireToken, { + filter: isOpeningParenToken, + includeComments: false, + })! + const rightParenToken = sourceCode.getLastToken(node) + + setOffset(leftParenToken, 1, requireToken) + setOffsetNodes( + context, + [node.expression], + leftParenToken, + rightParenToken, + 1, + ) + }, + TSExportAssignment(node: TSESTree.TSExportAssignment) { + // export = foo + const exportNode = sourceCode.getFirstToken(node) + const exprTokens = getFirstAndLastTokens(sourceCode, node.expression) + const opToken = sourceCode.getTokenBefore(exprTokens.firstToken) + + setOffset([opToken, exprTokens.firstToken], 1, exportNode) + }, + TSNamedTupleMember(node: TSESTree.TSNamedTupleMember) { + // [a: string, ...b: string[]] + // ^^^^^^^^^ + const labelToken = sourceCode.getFirstToken(node) + const elementTokens = getFirstAndLastTokens(sourceCode, node.elementType) + setOffset( + [ + ...sourceCode.getTokensBetween(labelToken, elementTokens.firstToken), + elementTokens.firstToken, + ], + 1, + labelToken, + ) + }, + TSRestType(node: TSESTree.TSRestType) { + // [a: string, ...b: string[]] + // ^^^^^^^^^^^^^^ + const firstToken = sourceCode.getFirstToken(node) + const nextToken = sourceCode.getTokenAfter(firstToken) + + setOffset(nextToken, 1, firstToken) + }, + TSNamespaceExportDeclaration(node: TSESTree.TSNamespaceExportDeclaration) { + const firstToken = sourceCode.getFirstToken(node) + const idToken = sourceCode.getFirstToken(node.id) + + setOffset( + [...sourceCode.getTokensBetween(firstToken, idToken), idToken], + 1, + firstToken, + ) + }, + TSTemplateLiteralType(node: TSESTree.TSTemplateLiteralType) { + const firstToken = sourceCode.getFirstToken(node) + const quasiTokens = node.quasis + .slice(1) + .map((n) => sourceCode.getFirstToken(n)) + const expressionToken = node.quasis + .slice(0, -1) + .map((n) => sourceCode.getTokenAfter(n)) + + setOffset(quasiTokens, 0, firstToken) + setOffset(expressionToken, 1, firstToken) + }, + + // ---------------------------------------------------------------------- + // NON-STANDARD NODES + // ---------------------------------------------------------------------- + ClassProperty(node: TSESTree.ClassProperty) { + visitor.TSAbstractMethodDefinition(node) + }, + Decorator(node: TSESTree.Decorator) { + // @Decorator + const [atToken, secondToken] = sourceCode.getFirstTokens(node, { + count: 2, + includeComments: false, + }) + setOffset(secondToken, 0, atToken) + + const parent = node.parent! + const { decorators } = parent as { decorators?: TSESTree.Decorator[] } + if (!decorators || decorators.length === 0) { + return + } + if (decorators[0] === node) { + if (parent.range[0] === node.range[0]) { + const startParentToken = sourceCode.getTokenAfter( + decorators[decorators?.length - 1], + ) + setOffset(startParentToken, 0, atToken) + } else { + const startParentToken = sourceCode.getFirstToken( + parent.parent && + (parent.parent.type === "ExportDefaultDeclaration" || + parent.parent.type === "ExportNamedDeclaration") && + node.range[0] < parent.parent.range[0] + ? parent.parent + : parent, + ) + copyOffset(atToken, startParentToken) + } + } else { + setOffset(atToken, 0, sourceCode.getFirstToken(decorators[0])) + } + }, + // ---------------------------------------------------------------------- + // SINGLE TOKEN NODES + // ---------------------------------------------------------------------- + // VALUES KEYWORD + TSAnyKeyword() { + // noop + }, + TSBigIntKeyword() { + // noop + }, + TSBooleanKeyword() { + // noop + }, + TSNeverKeyword() { + // noop + }, + TSNullKeyword() { + // noop + }, + TSNumberKeyword() { + // noop + }, + TSObjectKeyword() { + // noop + }, + TSStringKeyword() { + // noop + }, + TSSymbolKeyword() { + // noop + }, + TSUndefinedKeyword() { + // noop + }, + TSUnknownKeyword() { + // noop + }, + TSVoidKeyword() { + // noop + }, + // MODIFIERS KEYWORD + TSAbstractKeyword() { + // noop + }, + TSAsyncKeyword() { + // noop + }, + TSPrivateKeyword() { + // noop + }, + TSProtectedKeyword() { + // noop + }, + TSPublicKeyword() { + // noop + }, + TSReadonlyKeyword() { + // noop + }, + TSStaticKeyword() { + // noop + }, + // OTHERS KEYWORD + TSDeclareKeyword() { + // noop + }, + TSExportKeyword() { + // noop + }, + TSIntrinsicKeyword() { + // noop + }, + // OTHERS + TSThisType() { + // noop + }, + // ---------------------------------------------------------------------- + // WRAPPER NODES + // ---------------------------------------------------------------------- + TSLiteralType() { + // noop + }, + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- ignore + const commonsVisitor: any = { + // Process semicolons. + ["TSTypeAliasDeclaration, TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSImportEqualsDeclaration," + + "TSAbstractMethodDefinition, TSAbstractClassProperty, TSEnumMember, ClassProperty," + + "TSPropertySignature, TSIndexSignature, TSMethodSignature"]( + node: ESTree.Node, + ) { + const firstToken = sourceCode.getFirstToken(node) + const lastToken = sourceCode.getLastToken(node) + if (isSemicolonToken(lastToken) && firstToken !== lastToken) { + const next = sourceCode.getTokenAfter(lastToken) + if (!next || lastToken.loc.start.line < next.loc.start.line) { + // End of line semicolons + setOffset(lastToken, 0, firstToken) + } + } + }, + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- ignore + const extendsESVisitor: any = { + ["ClassDeclaration[implements], ClassDeclaration[typeParameters], ClassDeclaration[superTypeParameters]," + + "ClassExpression[implements], ClassExpression[typeParameters], ClassExpression[superTypeParameters]"]( + node: TSESTree.ClassDeclaration | TSESTree.ClassExpression, + ) { + if (node.typeParameters != null) { + setOffset( + sourceCode.getFirstToken(node.typeParameters), + 1, + sourceCode.getFirstToken(node.id || node), + ) + } + if (node.superTypeParameters != null && node.superClass != null) { + setOffset( + sourceCode.getFirstToken(node.superTypeParameters), + 1, + sourceCode.getFirstToken(node.superClass), + ) + } + if (node.implements != null && node.implements.length) { + const classToken = sourceCode.getFirstToken(node) + const implementsToken = sourceCode.getTokenBefore(node.implements[0])! + setOffset(implementsToken, 1, classToken) + + setOffsetNodes(context, node.implements, implementsToken, null, 1) + } + }, + } + const v: NodeListener = visitor + + return { + ...v, + ...commonsVisitor, + ...extendsESVisitor, + } +} diff --git a/src/types.ts b/src/types.ts index e108e4369..0c15f1261 100644 --- a/src/types.ts +++ b/src/types.ts @@ -7,8 +7,12 @@ import type { } from "eslint" import type { AST } from "svelte-eslint-parser" import type * as ESTree from "estree" +import type { TSESTree } from "@typescript-eslint/types" -export type ASTNode = AST.SvelteNode | ESTree.Node +export type ASTNode = + | AST.SvelteNode + | ESTree.Node + | Exclude type ASTNodeWithParent = | (Exclude & { parent: ASTNode }) | AST.SvelteProgram diff --git a/tests/fixtures/rules/indent/invalid/script-methods01-errors.json b/tests/fixtures/rules/indent/invalid/script-methods01-errors.json new file mode 100644 index 000000000..a659945f7 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/script-methods01-errors.json @@ -0,0 +1,102 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 10, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 24, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/script-methods01-input.svelte b/tests/fixtures/rules/indent/invalid/script-methods01-input.svelte new file mode 100644 index 000000000..f50ab07fa --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/script-methods01-input.svelte @@ -0,0 +1,27 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/script-methods01-output.svelte b/tests/fixtures/rules/indent/invalid/script-methods01-output.svelte new file mode 100644 index 000000000..9ffc8deb5 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/script-methods01-output.svelte @@ -0,0 +1,27 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/script-yield-expression01-errors.json b/tests/fixtures/rules/indent/invalid/script-yield-expression01-errors.json new file mode 100644 index 000000000..f0097feda --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/script-yield-expression01-errors.json @@ -0,0 +1,22 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 6, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/script-yield-expression01-input.svelte b/tests/fixtures/rules/indent/invalid/script-yield-expression01-input.svelte new file mode 100644 index 000000000..7bc1cdd14 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/script-yield-expression01-input.svelte @@ -0,0 +1,9 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/script-yield-expression01-output.svelte b/tests/fixtures/rules/indent/invalid/script-yield-expression01-output.svelte new file mode 100644 index 000000000..8a41e2c2c --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/script-yield-expression01-output.svelte @@ -0,0 +1,9 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-class01-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-class01-errors.json new file mode 100644 index 000000000..05e3df5d5 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-class01-errors.json @@ -0,0 +1,277 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 10, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 14, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 24, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 25, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 26, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 27, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 28, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 29, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 30, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 31, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 32, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 33, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 34, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 35, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 36, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 37, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 38, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 39, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 40, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 41, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 42, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 43, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 45, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 46, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 47, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 48, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 49, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 50, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 51, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 52, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 53, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 54, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 55, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 56, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 57, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 58, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 59, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-class01-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-class01-input.svelte new file mode 100644 index 000000000..4de9a2cf4 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-class01-input.svelte @@ -0,0 +1,62 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-class01-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-class01-output.svelte new file mode 100644 index 000000000..02970027d --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-class01-output.svelte @@ -0,0 +1,62 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-class02-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-class02-errors.json new file mode 100644 index 000000000..e40f468b6 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-class02-errors.json @@ -0,0 +1,167 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 10, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 14, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 12 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 12 spaces but found 0 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 24, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 25, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 26, + "column": 1 + }, + { + "message": "Expected indentation of 12 spaces but found 0 spaces.", + "line": 27, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 28, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 29, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 30, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 31, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 32, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 33, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 34, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 35, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-class02-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-class02-input.svelte new file mode 100644 index 000000000..f63162811 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-class02-input.svelte @@ -0,0 +1,38 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-class02-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-class02-output.svelte new file mode 100644 index 000000000..3230b9d28 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-class02-output.svelte @@ -0,0 +1,38 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-class03-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-class03-errors.json new file mode 100644 index 000000000..97a18ec4b --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-class03-errors.json @@ -0,0 +1,27 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 8, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-class03-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-class03-input.svelte new file mode 100644 index 000000000..0d42eee69 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-class03-input.svelte @@ -0,0 +1,11 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-class03-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-class03-output.svelte new file mode 100644 index 000000000..77e591a6b --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-class03-output.svelte @@ -0,0 +1,11 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-conditional-type01-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-conditional-type01-errors.json new file mode 100644 index 000000000..06f396c38 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-conditional-type01-errors.json @@ -0,0 +1,37 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 9, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-conditional-type01-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-conditional-type01-input.svelte new file mode 100644 index 000000000..2426cbff6 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-conditional-type01-input.svelte @@ -0,0 +1,12 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-conditional-type01-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-conditional-type01-output.svelte new file mode 100644 index 000000000..c52056a58 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-conditional-type01-output.svelte @@ -0,0 +1,12 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-d-ts-eslint-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-d-ts-eslint-errors.json new file mode 100644 index 000000000..10f6a94dd --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-d-ts-eslint-errors.json @@ -0,0 +1,3072 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 24, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 25, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 26, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 27, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 28, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 29, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 30, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 33, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 34, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 35, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 36, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 40, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 41, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 47, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 48, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 49, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 50, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 52, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 54, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 56, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 57, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 59, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 61, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 65, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 66, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 67, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 68, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 69, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 70, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 71, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 72, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 73, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 74, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 75, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 76, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 77, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 78, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 79, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 80, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 81, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 82, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 83, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 84, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 85, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 86, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 90, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 91, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 92, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 93, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 97, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 98, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 99, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 100, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 101, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 103, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 105, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 107, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 109, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 111, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 115, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 116, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 117, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 118, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 119, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 14 spaces.", + "line": 120, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 14 spaces.", + "line": 121, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 14 spaces.", + "line": 122, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 10 spaces.", + "line": 123, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 124, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 14 spaces.", + "line": 125, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 14 spaces.", + "line": 126, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 14 spaces.", + "line": 127, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 10 spaces.", + "line": 128, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 129, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 130, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 133, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 135, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 137, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 202, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 205, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 206, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 214, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 216, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 218, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 219, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 220, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 221, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 222, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 228, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 232, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 233, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 234, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 235, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 236, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 237, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 238, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 239, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 240, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 241, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 242, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 243, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 244, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 245, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 246, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 247, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 248, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 249, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 250, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 251, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 252, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 253, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 254, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 255, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 256, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 257, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 258, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 259, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 260, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 264, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 265, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 266, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 267, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 268, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 269, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 270, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 271, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 272, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 273, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 274, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 275, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 276, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 277, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 278, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 279, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 280, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 281, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 282, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 283, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 284, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 285, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 286, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 287, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 288, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 289, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 290, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 291, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 292, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 296, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 297, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 298, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 299, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 300, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 301, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 302, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 303, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 304, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 305, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 306, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 307, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 308, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 309, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 310, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 311, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 312, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 313, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 314, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 315, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 316, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 317, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 318, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 319, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 320, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 321, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 322, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 323, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 324, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 328, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 329, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 330, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 331, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 332, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 333, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 334, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 335, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 336, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 337, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 338, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 339, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 340, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 341, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 342, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 343, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 344, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 345, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 346, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 347, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 348, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 349, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 350, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 351, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 352, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 353, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 354, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 355, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 356, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 360, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 361, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 362, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 363, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 364, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 365, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 366, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 367, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 368, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 369, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 370, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 371, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 372, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 373, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 374, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 375, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 376, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 377, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 378, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 379, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 380, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 381, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 382, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 383, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 384, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 385, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 386, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 387, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 388, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 389, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 390, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 391, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 392, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 396, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 397, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 398, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 399, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 400, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 401, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 402, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 403, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 404, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 405, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 406, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 407, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 408, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 409, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 410, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 411, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 412, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 413, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 414, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 415, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 416, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 417, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 418, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 419, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 420, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 421, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 422, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 423, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 424, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 425, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 16 spaces.", + "line": 426, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 427, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 428, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 430, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 432, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 434, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 436, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 437, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 442, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 443, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 444, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 445, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 446, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 447, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 448, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 449, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 450, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 451, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 452, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 453, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 454, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 455, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 456, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 457, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 458, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 459, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 460, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 461, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 462, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 463, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 464, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 465, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 466, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 467, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 468, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 469, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 470, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 471, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 472, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 473, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 474, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 475, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 476, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 477, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 478, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 479, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 480, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 481, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 482, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 483, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 484, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 485, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 486, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 487, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 488, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 489, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 490, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 491, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 492, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 493, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 494, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 495, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 496, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 497, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 498, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 499, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 500, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 501, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 502, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 503, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 504, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 505, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 506, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 507, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 508, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 509, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 513, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 518, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 520, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 522, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 524, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 526, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 528, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 529, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 530, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 531, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 532, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 533, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 534, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 538, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 539, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 540, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 541, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 542, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 543, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 544, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 545, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 549, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 550, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 551, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 552, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 556, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 557, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 558, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 559, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 560, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 561, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 562, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 563, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 564, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 565, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 566, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 567, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 568, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 569, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 570, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 571, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 572, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 576, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 577, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 578, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 579, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 580, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 581, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 583, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 585, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 587, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 589, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 591, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 593, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 595, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 597, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 601, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 603, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 610, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 616, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 617, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 620, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 622, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 624, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 626, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 628, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 630, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 632, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 634, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 638, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 639, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 641, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 643, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 645, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 667, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 669, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 678, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 682, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 686, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 687, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 688, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 689, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 690, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 691, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 692, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 693, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 694, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 695, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 696, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 697, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 701, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 702, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 707, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 708, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 712, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 713, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 714, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 715, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 716, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 717, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 718, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 719, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 720, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 721, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 725, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 726, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 727, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 728, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 729, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 730, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 731, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 735, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 736, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 737, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 741, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 742, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 743, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 744, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 745, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 746, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 747, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 748, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 749, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 750, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 751, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 752, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 753, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 754, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 758, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 762, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 763, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 764, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 768, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 14 spaces.", + "line": 769, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 10 spaces.", + "line": 770, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 771, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 14 spaces.", + "line": 772, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 10 spaces.", + "line": 773, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 776, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 777, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 778, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 779, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 783, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 784, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 789, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 790, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 791, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 793, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 795, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 799, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 817, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 819, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 821, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 822, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 823, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 824, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 825, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 826, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 827, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 829, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 830, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 831, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 832, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 833, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 834, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 835, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 836, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 837, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 838, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 840, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 841, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 842, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 844, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 845, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 846, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 847, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 851, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 852, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 853, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 854, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 855, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 856, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 857, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 858, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 859, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 863, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 864, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 865, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 869, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 870, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 874, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 879, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 881, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 886, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 912, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 914, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 915, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 917, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 918, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 919, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 920, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 921, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 922, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 923, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 924, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 925, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 926, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 927, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 928, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 929, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 930, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 931, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 932, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 933, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 934, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 935, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 936, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 937, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 938, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 939, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 940, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 941, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 942, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 950, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 951, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 952, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 953, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 954, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 955, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 961, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 963, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 967, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 971, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 972, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 973, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 974, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 12 spaces.", + "line": 975, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 976, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 978, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 980, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 982, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 983, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 984, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 985, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 986, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 987, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 988, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 992, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 993, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 994, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 995, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 999, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 1000, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 1004, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 1005, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 1006, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 1007, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 1008, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 1009, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 1010, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 1011, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 8 spaces.", + "line": 1012, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 1014, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-d-ts-eslint-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-d-ts-eslint-input.svelte new file mode 100644 index 000000000..85ce0df82 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-d-ts-eslint-input.svelte @@ -0,0 +1,1019 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-d-ts-eslint-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-d-ts-eslint-output.svelte new file mode 100644 index 000000000..6983c38a8 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-d-ts-eslint-output.svelte @@ -0,0 +1,1019 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-decorator01-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-decorator01-errors.json new file mode 100644 index 000000000..28a3e1047 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-decorator01-errors.json @@ -0,0 +1,952 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 10, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 14, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 24, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 25, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 26, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 27, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 28, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 29, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 30, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 32, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 33, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 34, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 35, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 36, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 37, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 38, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 39, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 40, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 41, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 42, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 43, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 44, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 45, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 46, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 48, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 49, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 50, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 51, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 52, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 53, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 54, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 55, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 56, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 57, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 58, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 59, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 60, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 61, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 62, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 63, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 64, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 65, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 66, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 67, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 68, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 70, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 71, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 72, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 73, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 74, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 75, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 76, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 77, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 78, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 79, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 80, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 81, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 82, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 83, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 84, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 85, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 86, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 88, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 89, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 90, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 91, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 92, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 93, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 94, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 96, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 97, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 98, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 99, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 100, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 101, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 102, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 103, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 104, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 105, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 106, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 107, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 109, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 110, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 111, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 112, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 113, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 114, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 115, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 116, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 117, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 118, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 119, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 120, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 121, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 123, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 124, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 125, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 126, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 127, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 128, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 129, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 130, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 131, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 132, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 133, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 134, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 135, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 136, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 137, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 138, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 139, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 140, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 142, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 143, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 144, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 146, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 147, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 148, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 150, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 151, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 152, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 153, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 154, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 155, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 156, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 157, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 158, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 159, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 160, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 161, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 162, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 163, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 164, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 165, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 166, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 168, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 169, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 170, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 171, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 172, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 173, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 174, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 175, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 176, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 177, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 178, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 179, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 180, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 181, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 182, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 183, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 184, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 185, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 186, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 187, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 188, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 189, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 190, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 191, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 192, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 193, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 194, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 195, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 196, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 197, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 198, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 199, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 200, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 201, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 202, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 203, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 204, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-decorator01-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-decorator01-input.svelte new file mode 100644 index 000000000..11fe26aab --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-decorator01-input.svelte @@ -0,0 +1,207 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-decorator01-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-decorator01-output.svelte new file mode 100644 index 000000000..2307a1d12 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-decorator01-output.svelte @@ -0,0 +1,207 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-decorator02-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-decorator02-errors.json new file mode 100644 index 000000000..fcf82eb90 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-decorator02-errors.json @@ -0,0 +1,57 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 10, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 13, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-decorator02-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-decorator02-input.svelte new file mode 100644 index 000000000..a6c86134b --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-decorator02-input.svelte @@ -0,0 +1,16 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-decorator02-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-decorator02-output.svelte new file mode 100644 index 000000000..6496d9e96 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-decorator02-output.svelte @@ -0,0 +1,16 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-enum01-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-enum01-errors.json new file mode 100644 index 000000000..46d84daab --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-enum01-errors.json @@ -0,0 +1,107 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 14, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 24, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-enum01-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-enum01-input.svelte new file mode 100644 index 000000000..ec5c894f2 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-enum01-input.svelte @@ -0,0 +1,27 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-enum01-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-enum01-output.svelte new file mode 100644 index 000000000..d6cac4302 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-enum01-output.svelte @@ -0,0 +1,27 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-function01-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-function01-errors.json new file mode 100644 index 000000000..a6aa81117 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-function01-errors.json @@ -0,0 +1,182 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 10, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 14, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 24, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 25, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 26, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 27, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 28, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 29, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 31, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 32, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 33, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 34, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 35, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 36, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 37, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 38, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 39, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 40, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-function01-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-function01-input.svelte new file mode 100644 index 000000000..7576a68df --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-function01-input.svelte @@ -0,0 +1,43 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-function01-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-function01-output.svelte new file mode 100644 index 000000000..f5466b5c5 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-function01-output.svelte @@ -0,0 +1,43 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-function02-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-function02-errors.json new file mode 100644 index 000000000..5ccb31a61 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-function02-errors.json @@ -0,0 +1,67 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 10, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 14, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 15, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-function02-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-function02-input.svelte new file mode 100644 index 000000000..67c63dd7c --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-function02-input.svelte @@ -0,0 +1,18 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-function02-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-function02-output.svelte new file mode 100644 index 000000000..1b89bbfef --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-function02-output.svelte @@ -0,0 +1,18 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-import-export01-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-import-export01-errors.json new file mode 100644 index 000000000..9492154af --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-import-export01-errors.json @@ -0,0 +1,82 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 10, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 20, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-import-export01-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-import-export01-input.svelte new file mode 100644 index 000000000..429f14b59 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-import-export01-input.svelte @@ -0,0 +1,23 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-import-export01-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-import-export01-output.svelte new file mode 100644 index 000000000..07805afac --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-import-export01-output.svelte @@ -0,0 +1,23 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-interface01-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-interface01-errors.json new file mode 100644 index 000000000..e285112fc --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-interface01-errors.json @@ -0,0 +1,277 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 10, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 14, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 24, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 25, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 26, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 27, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 28, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 29, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 30, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 31, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 32, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 33, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 34, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 35, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 36, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 37, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 39, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 40, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 41, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 42, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 43, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 44, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 45, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 46, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 47, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 48, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 49, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 50, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 51, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 52, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 53, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 54, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 55, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 56, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 57, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 58, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-interface01-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-interface01-input.svelte new file mode 100644 index 000000000..3df03712e --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-interface01-input.svelte @@ -0,0 +1,61 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-interface01-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-interface01-output.svelte new file mode 100644 index 000000000..563065869 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-interface01-output.svelte @@ -0,0 +1,61 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-interface02-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-interface02-errors.json new file mode 100644 index 000000000..69f14e820 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-interface02-errors.json @@ -0,0 +1,247 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 10, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 24, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 26, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 27, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 28, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 29, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 30, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 31, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 32, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 33, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 34, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 35, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 36, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 37, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 38, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 39, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 40, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 42, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 43, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 44, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 45, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 46, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 47, + "column": 1 + }, + { + "message": "Expected indentation of 12 spaces but found 0 spaces.", + "line": 48, + "column": 1 + }, + { + "message": "Expected indentation of 12 spaces but found 0 spaces.", + "line": 49, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 50, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 51, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 52, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 53, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 54, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-interface02-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-interface02-input.svelte new file mode 100644 index 000000000..f982e6fc7 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-interface02-input.svelte @@ -0,0 +1,57 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-interface02-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-interface02-output.svelte new file mode 100644 index 000000000..d668d7e76 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-interface02-output.svelte @@ -0,0 +1,57 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-interface03-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-interface03-errors.json new file mode 100644 index 000000000..92fb4cdeb --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-interface03-errors.json @@ -0,0 +1,27 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 12, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-interface03-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-interface03-input.svelte new file mode 100644 index 000000000..fac69709d --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-interface03-input.svelte @@ -0,0 +1,15 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-interface03-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-interface03-output.svelte new file mode 100644 index 000000000..78c950161 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-interface03-output.svelte @@ -0,0 +1,15 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-template-literal-type01-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-template-literal-type01-errors.json new file mode 100644 index 000000000..e703a0601 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-template-literal-type01-errors.json @@ -0,0 +1,187 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 10, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 14, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 24, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 25, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 26, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 27, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 28, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 29, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 30, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 31, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 32, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 33, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 34, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 35, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 36, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 37, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 38, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 39, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-template-literal-type01-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-template-literal-type01-input.svelte new file mode 100644 index 000000000..d5c44eb26 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-template-literal-type01-input.svelte @@ -0,0 +1,43 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-template-literal-type01-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-template-literal-type01-output.svelte new file mode 100644 index 000000000..92bfd5948 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-template-literal-type01-output.svelte @@ -0,0 +1,43 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation01-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation01-errors.json new file mode 100644 index 000000000..d30558277 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation01-errors.json @@ -0,0 +1,132 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 10, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 14, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 24, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 26, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 27, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 28, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 29, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 30, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation01-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation01-input.svelte new file mode 100644 index 000000000..2b56525c7 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation01-input.svelte @@ -0,0 +1,33 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation01-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation01-output.svelte new file mode 100644 index 000000000..bba78d0bc --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation01-output.svelte @@ -0,0 +1,33 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation02-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation02-errors.json new file mode 100644 index 000000000..48b8adc85 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation02-errors.json @@ -0,0 +1,177 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 10, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 14, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 24, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 26, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 27, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 28, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 29, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 30, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 31, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 33, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 34, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 35, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 36, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 37, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 38, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 39, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 40, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation02-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation02-input.svelte new file mode 100644 index 000000000..c6c32b36b --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation02-input.svelte @@ -0,0 +1,43 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation02-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation02-output.svelte new file mode 100644 index 000000000..038024d25 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation02-output.svelte @@ -0,0 +1,43 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation03-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation03-errors.json new file mode 100644 index 000000000..b4fdf24b6 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation03-errors.json @@ -0,0 +1,207 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 14, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 24, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 25, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 26, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 27, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 28, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 29, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 30, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 31, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 32, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 33, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 36, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 37, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 38, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 39, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 40, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 41, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 42, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 43, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 44, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 45, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 46, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 47, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation03-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation03-input.svelte new file mode 100644 index 000000000..3c00d5074 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation03-input.svelte @@ -0,0 +1,50 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation03-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation03-output.svelte new file mode 100644 index 000000000..ce4770881 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-type-annotation03-output.svelte @@ -0,0 +1,50 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-types01-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-types01-errors.json new file mode 100644 index 000000000..5a5edffea --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-types01-errors.json @@ -0,0 +1,357 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 14, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 24, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 25, + "column": 1 + }, + { + "message": "Expected indentation of 12 spaces but found 0 spaces.", + "line": 26, + "column": 1 + }, + { + "message": "Expected indentation of 14 spaces but found 0 spaces.", + "line": 27, + "column": 1 + }, + { + "message": "Expected indentation of 12 spaces but found 0 spaces.", + "line": 28, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 29, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 30, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 31, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 32, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 33, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 34, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 35, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 36, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 37, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 38, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 39, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 40, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 41, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 42, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 43, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 44, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 45, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 46, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 47, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 48, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 49, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 50, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 51, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 52, + "column": 1 + }, + { + "message": "Expected indentation of 12 spaces but found 0 spaces.", + "line": 53, + "column": 1 + }, + { + "message": "Expected indentation of 12 spaces but found 0 spaces.", + "line": 54, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 55, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 56, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 57, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 58, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 59, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 60, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 61, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 62, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 63, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 64, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 65, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 66, + "column": 1 + }, + { + "message": "Expected indentation of 12 spaces but found 0 spaces.", + "line": 67, + "column": 1 + }, + { + "message": "Expected indentation of 12 spaces but found 0 spaces.", + "line": 68, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 69, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 70, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 71, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 72, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 73, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 74, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-types01-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-types01-input.svelte new file mode 100644 index 000000000..a5e4fbf1b --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-types01-input.svelte @@ -0,0 +1,77 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-types01-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-types01-output.svelte new file mode 100644 index 000000000..e338e7feb --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-types01-output.svelte @@ -0,0 +1,77 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-types02-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-types02-errors.json new file mode 100644 index 000000000..9b3111be0 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-types02-errors.json @@ -0,0 +1,337 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 8, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 11, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 14, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 25, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 26, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 27, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 28, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 29, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 30, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 31, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 32, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 33, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 34, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 35, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 36, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 37, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 38, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 39, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 40, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 41, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 42, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 43, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 44, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 45, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 46, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 48, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 49, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 50, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 51, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 52, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 53, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 54, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 55, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 56, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 57, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 58, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 59, + "column": 1 + }, + { + "message": "Expected indentation of 12 spaces but found 0 spaces.", + "line": 60, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 61, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 62, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 63, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 64, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 65, + "column": 1 + }, + { + "message": "Expected indentation of 12 spaces but found 0 spaces.", + "line": 66, + "column": 1 + }, + { + "message": "Expected indentation of 14 spaces but found 0 spaces.", + "line": 67, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 68, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 69, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 70, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 71, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 72, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 73, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-types02-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-types02-input.svelte new file mode 100644 index 000000000..4c81e772d --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-types02-input.svelte @@ -0,0 +1,76 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-types02-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-types02-output.svelte new file mode 100644 index 000000000..e546194ec --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-types02-output.svelte @@ -0,0 +1,76 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-types03-errors.json b/tests/fixtures/rules/indent/invalid/ts/ts-types03-errors.json new file mode 100644 index 000000000..58c1e1f15 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-types03-errors.json @@ -0,0 +1,162 @@ +[ + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 3, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 4, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 5, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 6, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 7, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 9, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 10, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 12, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 13, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 14, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 15, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 16, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 17, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 18, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 19, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 20, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 21, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 22, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 23, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 24, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 25, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 26, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 27, + "column": 1 + }, + { + "message": "Expected indentation of 2 spaces but found 0 spaces.", + "line": 29, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 30, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 31, + "column": 1 + }, + { + "message": "Expected indentation of 6 spaces but found 0 spaces.", + "line": 32, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 33, + "column": 1 + }, + { + "message": "Expected indentation of 8 spaces but found 0 spaces.", + "line": 34, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 35, + "column": 1 + }, + { + "message": "Expected indentation of 10 spaces but found 0 spaces.", + "line": 36, + "column": 1 + }, + { + "message": "Expected indentation of 4 spaces but found 0 spaces.", + "line": 37, + "column": 1 + } +] diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-types03-input.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-types03-input.svelte new file mode 100644 index 000000000..c50d7feb2 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-types03-input.svelte @@ -0,0 +1,41 @@ + + + + diff --git a/tests/fixtures/rules/indent/invalid/ts/ts-types03-output.svelte b/tests/fixtures/rules/indent/invalid/ts/ts-types03-output.svelte new file mode 100644 index 000000000..4f0544df2 --- /dev/null +++ b/tests/fixtures/rules/indent/invalid/ts/ts-types03-output.svelte @@ -0,0 +1,41 @@ + + + + diff --git a/tests/src/rules/indent.ts b/tests/src/rules/indent.ts index 5051b6ba2..f886a86de 100644 --- a/tests/src/rules/indent.ts +++ b/tests/src/rules/indent.ts @@ -6,6 +6,10 @@ const tester = new RuleTester({ parserOptions: { ecmaVersion: 2020, sourceType: "module", + parser: { + ts: "@typescript-eslint/parser", + js: "espree", + }, }, }) diff --git a/tests/utils/utils.ts b/tests/utils/utils.ts index f9716cf68..4c65f0239 100644 --- a/tests/utils/utils.ts +++ b/tests/utils/utils.ts @@ -183,6 +183,10 @@ function writeFixtures( parserOptions: { ecmaVersion: 2020, sourceType: "module", + parser: { + ts: "@typescript-eslint/parser", + js: "espree", + }, }, }, config.filename,