diff --git a/ets2panda/linter/README.md b/ets2panda/linter/README.md index b056d3b4750a387b67caa6548bd8f3fd661a457b..906d5798dfccd084e9a8b437be93dcfd5385f309 100644 --- a/ets2panda/linter/README.md +++ b/ets2panda/linter/README.md @@ -44,16 +44,12 @@ Possible command options: `--deveco-plugin-mode` - this options defines special mode to launch from IDE and should NOT be used when running from command line. -`--relax` - defines 'relax' mode in which only problematic TypeScript language elements that cannot be transpiled by TypeScript migrator are counted. - `--project-folder ` - defines path to folder with TypeScript sources and subfolders which linter walks recurscevely. This option may be repeated in command line with different paths. `-p, --project ` - defines path to TS project configuration file (commonly known as tsconfig.json). If no input file is defined directly as command-line argument, then all source files from tsconfig.json will be processed by linter. Otherwise, linter will only process input files from command-line, that are included into project (i.e. files that belong to intersection of input files from command-line and tsconfig.json file). `-E, --TSC_Errors` - enables logging messages about compilation errors and unresolved symbols. -`--warnings-as-errors` - linter detects two kinds of problems: warnings and errors. This parameter make treatment of warnings as errors. - All other command line arguments are considered as paths to TypeScript files. To prevent command line buffer overflow, response file may be used. It is specified by adding `@` prefix to file name (e.g.: `tslinter.sh @response-file.txt` ). Response file should contain TypeScript source paths (one at each line). The response file argument should be the last command argument (any following argument will be ignored). diff --git a/ets2panda/linter/cookbook_convertor/src/cookbook_convertor.ts b/ets2panda/linter/cookbook_convertor/src/cookbook_convertor.ts index 20a72854ab53c87abac10f873ad8787b79ba59f5..12f1f51a6bde1f988391954f49e071d6ff22c7d3 100644 --- a/ets2panda/linter/cookbook_convertor/src/cookbook_convertor.ts +++ b/ets2panda/linter/cookbook_convertor/src/cookbook_convertor.ts @@ -18,7 +18,7 @@ import { join } from 'path'; const COPYRIGHT_HEADER = '/* \n\ - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. \n\ + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. \n\ * Licensed under the Apache License, Version 2.0 (the "License"); \n\ * you may not use this file except in compliance with the License. \n\ * You may obtain a copy of the License at \n\ diff --git a/ets2panda/linter/lib/Autofixer.ts b/ets2panda/linter/lib/Autofixer.ts index 7192c11d7a0112fd0adccd1e6795940110a1a037..7ceef597a84c126a878d5f148e72a28d04d23ad9 100644 --- a/ets2panda/linter/lib/Autofixer.ts +++ b/ets2panda/linter/lib/Autofixer.ts @@ -17,6 +17,7 @@ import * as ts from 'typescript'; import type { AutofixInfo } from './autofixes/AutofixInfo'; import { FaultID } from './Problems'; import { isAssignmentOperator } from './utils/functions/isAssignmentOperator'; +import { TsUtils } from './utils/TsUtils'; export const AUTOFIX_ALL: AutofixInfo = { problemID: '', @@ -31,7 +32,11 @@ export const AUTOFIX_ALL: AutofixInfo = { * algorithm is improved to guarantee that fixes can be applied * safely and won't break program code. */ -const UNSAFE_FIXES: FaultID[] = [FaultID.LiteralAsPropertyName, FaultID.PropertyAccessByIndex]; +const UNSAFE_FIXES: FaultID[] = [ + FaultID.LiteralAsPropertyName, + FaultID.PropertyAccessByIndex, + FaultID.PrivateIdentifier +]; export interface Autofix { replacementText: string; @@ -113,7 +118,7 @@ export function fixFunctionExpression( return { start: funcExpr.getStart(), end: funcExpr.getEnd(), replacementText: text }; } -export function fixReturnType(funcLikeDecl: ts.FunctionLikeDeclaration, typeNode: ts.TypeNode): Autofix { +export function fixMissingReturnType(funcLikeDecl: ts.FunctionLikeDeclaration, typeNode: ts.TypeNode): Autofix { const text = ': ' + printer.printNode(ts.EmitHint.Unspecified, typeNode, funcLikeDecl.getSourceFile()); const pos = getReturnTypePosition(funcLikeDecl); return { start: pos, end: pos, replacementText: text }; @@ -221,3 +226,115 @@ function needsParentheses(node: ts.FunctionExpression): boolean { ts.isBinaryExpression(parent) && !isAssignmentOperator(parent.operatorToken) ); } + +export function fixCtorParameterProperties( + ctorDecl: ts.ConstructorDeclaration, paramTypes: ts.TypeNode[] +): Autofix[] | undefined { + const fieldInitStmts: ts.Statement[] = []; + const newFieldPos = ctorDecl.getStart(); + const autofixes: Autofix[] = [{ start: newFieldPos, end: newFieldPos, replacementText: '' }]; + + for (let i = 0; i < ctorDecl.parameters.length; i++) { + const param = ctorDecl.parameters[i]; + + // Parameter property can not be a destructuring parameter. + if (!ts.isIdentifier(param.name)) { + continue; + } + + if (TsUtils.hasAccessModifier(param)) { + const propIdent = ts.factory.createIdentifier(param.name.text); + + const newFieldNode = ts.factory.createPropertyDeclaration( + ts.getModifiers(param), propIdent, undefined, paramTypes[i], undefined + ); + const newFieldText = printer.printNode(ts.EmitHint.Unspecified, newFieldNode, ctorDecl.getSourceFile()) + '\n'; + autofixes[0].replacementText += newFieldText; + + const newParamDecl = ts.factory.createParameterDeclaration( + undefined, undefined, param.name, param.questionToken, param.type, param.initializer + ); + const newParamText = printer.printNode(ts.EmitHint.Unspecified, newParamDecl, ctorDecl.getSourceFile()); + autofixes.push({ start: param.getStart(), end: param.getEnd(), replacementText: newParamText }); + + fieldInitStmts.push(ts.factory.createExpressionStatement(ts.factory.createAssignment( + ts.factory.createPropertyAccessExpression( + ts.factory.createThis(), + propIdent + ), + propIdent + ))); + } + } + + // Note: Bodyless ctors can't have parameter properties. + if (ctorDecl.body) { + const newBody = ts.factory.createBlock(fieldInitStmts.concat(ctorDecl.body.statements), true); + const newBodyText = printer.printNode(ts.EmitHint.Unspecified, newBody, ctorDecl.getSourceFile()); + autofixes.push({ start: ctorDecl.body.getStart(), end: ctorDecl.body.getEnd(), replacementText: newBodyText }); + } + + return autofixes; +} + +export function fixPrivateIdentifier(ident: ts.PrivateIdentifier): Autofix { + if ( + ts.isPropertyDeclaration(ident.parent) || ts.isMethodDeclaration(ident.parent) || + ts.isGetAccessorDeclaration(ident.parent) || ts.isSetAccessorDeclaration(ident.parent) + ) { + // Note: 'private' modifier should always be first. + const mods = ts.getModifiers(ident.parent); + let newMods: ts.Modifier[] = [ts.factory.createModifier(ts.SyntaxKind.PrivateKeyword)]; + if (mods) { + newMods = newMods.concat(mods); + } + + const newName = ident.text.slice(1, ident.text.length); + const newDecl = replacePrivateIdentInDeclarationName(newMods, newName, ident.parent); + const text = printer.printNode(ts.EmitHint.Unspecified, newDecl, ident.getSourceFile()); + return { start: ident.parent.getStart(), end: ident.parent.getEnd(), replacementText: text }; + } + + return { start: ident.getStart(), end: ident.getEnd(), replacementText: ident.text.slice(1, ident.text.length) }; +} + +function replacePrivateIdentInDeclarationName( + mods: ts.Modifier[], + name: string, + oldDecl: ts.PropertyDeclaration | ts.MethodDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration +): ts.Declaration { + if (ts.isPropertyDeclaration(oldDecl)) { + return ts.factory.createPropertyDeclaration( + mods, + ts.factory.createIdentifier(name), + oldDecl.questionToken ?? oldDecl.exclamationToken, + oldDecl.type, + oldDecl.initializer + ); + } else if (ts.isMethodDeclaration(oldDecl)) { + return ts.factory.createMethodDeclaration( + mods, + oldDecl.asteriskToken, + ts.factory.createIdentifier(name), + oldDecl.questionToken, + oldDecl.typeParameters, + oldDecl.parameters, + oldDecl.type, + oldDecl.body + ); + } else if (ts.isGetAccessorDeclaration(oldDecl)) { + return ts.factory.createGetAccessorDeclaration( + mods, + ts.factory.createIdentifier(name), + oldDecl.parameters, + oldDecl.type, + oldDecl.body + ); + } + return ts.factory.createSetAccessorDeclaration( + mods, + ts.factory.createIdentifier(name), + oldDecl.parameters, + oldDecl.body + ); +} diff --git a/ets2panda/linter/lib/CommandLineOptions.ts b/ets2panda/linter/lib/CommandLineOptions.ts index 60916b0fff670cdcb13db6240ab3de9ef5380053..70d3fce6070172af00bcd959498d366e90565851 100644 --- a/ets2panda/linter/lib/CommandLineOptions.ts +++ b/ets2panda/linter/lib/CommandLineOptions.ts @@ -18,7 +18,6 @@ import type { AutofixInfo } from './autofixes/AutofixInfo'; export interface CommandLineOptions { testMode?: boolean; - strictMode?: boolean; ideMode?: boolean; logTscErrors?: boolean; warningsAsErrors: boolean; diff --git a/ets2panda/linter/lib/FaultAttrs.ts b/ets2panda/linter/lib/FaultAttrs.ts index 6fc7709eaaafc1be55b8b8e85a177c57085a662f..3d336d1a926b200d99bf7695637343362dc15270 100644 --- a/ets2panda/linter/lib/FaultAttrs.ts +++ b/ets2panda/linter/lib/FaultAttrs.ts @@ -19,19 +19,18 @@ import { ProblemSeverity } from './ProblemSeverity'; export class FaultAttributes { constructor( public cookBookRef: number, - public migratable: boolean = false, public severity: ProblemSeverity = ProblemSeverity.ERROR ) {} } export const faultsAttrs: FaultAttributes[] = []; -faultsAttrs[FaultID.LiteralAsPropertyName] = new FaultAttributes(1, true); +faultsAttrs[FaultID.LiteralAsPropertyName] = new FaultAttributes(1); faultsAttrs[FaultID.ComputedPropertyName] = new FaultAttributes(1); faultsAttrs[FaultID.SymbolType] = new FaultAttributes(2); -faultsAttrs[FaultID.PrivateIdentifier] = new FaultAttributes(3, true); -faultsAttrs[FaultID.DeclWithDuplicateName] = new FaultAttributes(4, true); -faultsAttrs[FaultID.VarDeclaration] = new FaultAttributes(5, true); +faultsAttrs[FaultID.PrivateIdentifier] = new FaultAttributes(3); +faultsAttrs[FaultID.DeclWithDuplicateName] = new FaultAttributes(4); +faultsAttrs[FaultID.VarDeclaration] = new FaultAttributes(5); faultsAttrs[FaultID.AnyType] = new FaultAttributes(8); faultsAttrs[FaultID.UnknownType] = new FaultAttributes(8); faultsAttrs[FaultID.CallSignature] = new FaultAttributes(14); @@ -41,38 +40,38 @@ faultsAttrs[FaultID.IndexMember] = new FaultAttributes(17); faultsAttrs[FaultID.IntersectionType] = new FaultAttributes(19); faultsAttrs[FaultID.ThisType] = new FaultAttributes(21); faultsAttrs[FaultID.ConditionalType] = new FaultAttributes(22); -faultsAttrs[FaultID.ParameterProperties] = new FaultAttributes(25, true); +faultsAttrs[FaultID.ParameterProperties] = new FaultAttributes(25); faultsAttrs[FaultID.ConstructorIface] = new FaultAttributes(27); faultsAttrs[FaultID.IndexedAccessType] = new FaultAttributes(28); -faultsAttrs[FaultID.PropertyAccessByIndex] = new FaultAttributes(29, true); +faultsAttrs[FaultID.PropertyAccessByIndex] = new FaultAttributes(29); faultsAttrs[FaultID.StructuralIdentity] = new FaultAttributes(30); faultsAttrs[FaultID.GenericCallNoTypeArgs] = new FaultAttributes(34); faultsAttrs[FaultID.ObjectLiteralNoContextType] = new FaultAttributes(38); faultsAttrs[FaultID.ObjectTypeLiteral] = new FaultAttributes(40); faultsAttrs[FaultID.ArrayLiteralNoContextType] = new FaultAttributes(43); -faultsAttrs[FaultID.FunctionExpression] = new FaultAttributes(46, true); -faultsAttrs[FaultID.LambdaWithTypeParameters] = new FaultAttributes(49, true); -faultsAttrs[FaultID.ClassExpression] = new FaultAttributes(50, true); +faultsAttrs[FaultID.FunctionExpression] = new FaultAttributes(46); +faultsAttrs[FaultID.LambdaWithTypeParameters] = new FaultAttributes(49); +faultsAttrs[FaultID.ClassExpression] = new FaultAttributes(50); faultsAttrs[FaultID.ImplementsClass] = new FaultAttributes(51); faultsAttrs[FaultID.MethodReassignment] = new FaultAttributes(52); -faultsAttrs[FaultID.TypeAssertion] = new FaultAttributes(53, true); +faultsAttrs[FaultID.TypeAssertion] = new FaultAttributes(53); faultsAttrs[FaultID.JsxElement] = new FaultAttributes(54); faultsAttrs[FaultID.UnaryArithmNotNumber] = new FaultAttributes(55); faultsAttrs[FaultID.DeleteOperator] = new FaultAttributes(59); faultsAttrs[FaultID.TypeQuery] = new FaultAttributes(60); faultsAttrs[FaultID.InstanceofUnsupported] = new FaultAttributes(65); faultsAttrs[FaultID.InOperator] = new FaultAttributes(66); -faultsAttrs[FaultID.DestructuringAssignment] = new FaultAttributes(69, true); +faultsAttrs[FaultID.DestructuringAssignment] = new FaultAttributes(69); faultsAttrs[FaultID.CommaOperator] = new FaultAttributes(71); -faultsAttrs[FaultID.DestructuringDeclaration] = new FaultAttributes(74, true); -faultsAttrs[FaultID.CatchWithUnsupportedType] = new FaultAttributes(79, true); +faultsAttrs[FaultID.DestructuringDeclaration] = new FaultAttributes(74); +faultsAttrs[FaultID.CatchWithUnsupportedType] = new FaultAttributes(79); faultsAttrs[FaultID.ForInStatement] = new FaultAttributes(80); faultsAttrs[FaultID.MappedType] = new FaultAttributes(83); faultsAttrs[FaultID.WithStatement] = new FaultAttributes(84); -faultsAttrs[FaultID.ThrowStatement] = new FaultAttributes(87, true); -faultsAttrs[FaultID.LimitedReturnTypeInference] = new FaultAttributes(90, true); +faultsAttrs[FaultID.ThrowStatement] = new FaultAttributes(87); +faultsAttrs[FaultID.LimitedReturnTypeInference] = new FaultAttributes(90); faultsAttrs[FaultID.DestructuringParameter] = new FaultAttributes(91); -faultsAttrs[FaultID.LocalFunction] = new FaultAttributes(92, true); +faultsAttrs[FaultID.LocalFunction] = new FaultAttributes(92); faultsAttrs[FaultID.FunctionContainsThis] = new FaultAttributes(93); faultsAttrs[FaultID.GeneratorFunction] = new FaultAttributes(94); faultsAttrs[FaultID.YieldExpression] = new FaultAttributes(94); @@ -86,25 +85,25 @@ faultsAttrs[FaultID.EnumMemberNonConstInit] = new FaultAttributes(111); faultsAttrs[FaultID.EnumMerging] = new FaultAttributes(113); faultsAttrs[FaultID.NamespaceAsObject] = new FaultAttributes(114); faultsAttrs[FaultID.NonDeclarationInNamespace] = new FaultAttributes(116); -faultsAttrs[FaultID.DefaultImport] = new FaultAttributes(120, true); +faultsAttrs[FaultID.DefaultImport] = new FaultAttributes(120); faultsAttrs[FaultID.ImportAssignment] = new FaultAttributes(121); faultsAttrs[FaultID.ExportAssignment] = new FaultAttributes(126); faultsAttrs[FaultID.ShorthandAmbientModuleDecl] = new FaultAttributes(128); faultsAttrs[FaultID.WildcardsInModuleName] = new FaultAttributes(129); faultsAttrs[FaultID.UMDModuleDefinition] = new FaultAttributes(130); faultsAttrs[FaultID.NewTarget] = new FaultAttributes(132); -faultsAttrs[FaultID.DefiniteAssignment] = new FaultAttributes(134, false, ProblemSeverity.WARNING); +faultsAttrs[FaultID.DefiniteAssignment] = new FaultAttributes(134, ProblemSeverity.WARNING); faultsAttrs[FaultID.Prototype] = new FaultAttributes(136); -faultsAttrs[FaultID.GlobalThis] = new FaultAttributes(137, false, ProblemSeverity.WARNING); +faultsAttrs[FaultID.GlobalThis] = new FaultAttributes(137, ProblemSeverity.WARNING); faultsAttrs[FaultID.UtilityType] = new FaultAttributes(138); faultsAttrs[FaultID.PropertyDeclOnFunction] = new FaultAttributes(139); -faultsAttrs[FaultID.FunctionBind] = new FaultAttributes(140, false, ProblemSeverity.WARNING); +faultsAttrs[FaultID.FunctionBind] = new FaultAttributes(140, ProblemSeverity.WARNING); faultsAttrs[FaultID.ConstAssertion] = new FaultAttributes(142); faultsAttrs[FaultID.ImportAssertion] = new FaultAttributes(143); faultsAttrs[FaultID.LimitedStdLibApi] = new FaultAttributes(144); faultsAttrs[FaultID.StrictDiagnostic] = new FaultAttributes(145); faultsAttrs[FaultID.ErrorSuppression] = new FaultAttributes(146); -faultsAttrs[FaultID.ClassAsObject] = new FaultAttributes(149, false, ProblemSeverity.WARNING); +faultsAttrs[FaultID.ClassAsObject] = new FaultAttributes(149, ProblemSeverity.WARNING); faultsAttrs[FaultID.ImportAfterStatement] = new FaultAttributes(150); -faultsAttrs[FaultID.EsObjectType] = new FaultAttributes(151, false, ProblemSeverity.WARNING); +faultsAttrs[FaultID.EsObjectType] = new FaultAttributes(151, ProblemSeverity.WARNING); faultsAttrs[FaultID.FunctionApplyCall] = new FaultAttributes(152); diff --git a/ets2panda/linter/lib/LinterRunner.ts b/ets2panda/linter/lib/LinterRunner.ts index 5573d39bcc6f51f46300786b47dd4c0b5e5d9eed..8580211f4f3e56d64fc4cd5ce95201f186bc3fb7 100644 --- a/ets2panda/linter/lib/LinterRunner.ts +++ b/ets2panda/linter/lib/LinterRunner.ts @@ -66,11 +66,6 @@ function countProblems(linter: TypeScriptLinter): [number, number] { let errorNodesTotal = 0; let warningNodes = 0; for (let i = 0; i < FaultID.LAST_ID; i++) { - // if Strict mode - count all cases - if (!linter.strictMode && faultsAttrs[i].migratable) { - // In relax mode skip migratable - continue; - } switch (faultsAttrs[i].severity) { case ProblemSeverity.ERROR: errorNodesTotal += linter.nodeCounters[i]; @@ -107,7 +102,6 @@ export function lint(options: LintOptions): LintRunResult { const linter = new TypeScriptLinter( tsProgram.getTypeChecker(), new AutofixInfoSet(cmdOptions.autofixInfo), - !!cmdOptions.strictMode, cancellationToken, options.incrementalLintInfo, tscStrictDiagnostics, @@ -236,11 +230,6 @@ function logTotalProblemsInfo(errorNodes: number, warningNodes: number, linter: function logProblemsPercentageByFeatures(linter: TypeScriptLinter): void { consoleLog('\nPercent by features: '); for (let i = 0; i < FaultID.LAST_ID; i++) { - // if Strict mode - count all cases - if (!linter.strictMode && faultsAttrs[i].migratable) { - continue; - } - const nodes = linter.nodeCounters[i]; const lines = linter.lineCounters[i]; const pecentage = (nodes / linter.totalVisitedNodes * 100).toFixed(2).padEnd(7, ' '); diff --git a/ets2panda/linter/lib/TypeScriptLinter.ts b/ets2panda/linter/lib/TypeScriptLinter.ts index f12a5f4d6f48874b5977b8700b0ac58b18460e2a..29b57204b2dcd0c6878a0a21c616fd73bfd7766d 100644 --- a/ets2panda/linter/lib/TypeScriptLinter.ts +++ b/ets2panda/linter/lib/TypeScriptLinter.ts @@ -117,7 +117,6 @@ export class TypeScriptLinter { constructor( private readonly tsTypeChecker: ts.TypeChecker, private readonly autofixesInfo: AutofixInfoSet, - readonly strictMode: boolean, private readonly cancellationToken?: ts.CancellationToken, private readonly incrementalLintInfo?: IncrementalLintInfo, private readonly tscStrictDiagnostics?: Map, @@ -184,7 +183,9 @@ export class TypeScriptLinter { [ts.SyntaxKind.SetAccessor, this.handleSetAccessor], [ts.SyntaxKind.ConstructSignature, this.handleConstructSignature], [ts.SyntaxKind.ExpressionWithTypeArguments, this.handleExpressionWithTypeArguments], - [ts.SyntaxKind.ComputedPropertyName, this.handleComputedPropertyName] + [ts.SyntaxKind.ComputedPropertyName, this.handleComputedPropertyName], + [ts.SyntaxKind.Constructor, this.handleConstructorDeclaration], + [ts.SyntaxKind.PrivateIdentifier, this.handlePrivateIdentifier] ]); private getLineAndCharacterOfNode(node: ts.Node | ts.CommentRange): ts.LineAndCharacter { @@ -200,11 +201,6 @@ export class TypeScriptLinter { autofixable: boolean = false, autofix?: Autofix[] ): void { - if (!this.strictMode && faultsAttrs[faultId].migratable) { - // In relax mode skip migratable - return; - } - this.nodeCounters[faultId]++; const { line, character } = this.getLineAndCharacterOfNode(node); if (TypeScriptLinter.ideMode) { @@ -360,6 +356,9 @@ export class TypeScriptLinter { if (ts.isIdentifier(ident2) && ts.isPrivateIdentifier(ident1)) { return ident2.text === ident1.text.substring(1); } + if (ts.isPrivateIdentifier(ident1) && ts.isPrivateIdentifier(ident2)) { + return ident1.text.substring(1) === ident2.text.substring(1); + } return false; } @@ -371,29 +370,59 @@ export class TypeScriptLinter { } private countClassMembersWithDuplicateName(tsClassDecl: ts.ClassDeclaration): void { - const nClassMembers = tsClassDecl.members.length; - const isNodeReported = new Array(nClassMembers); - for (let curIdx = 0; curIdx < nClassMembers; ++curIdx) { - const tsCurrentMember = tsClassDecl.members[curIdx]; - if (!TypeScriptLinter.isIdentifierOrPrivateIdentifier(tsCurrentMember.name)) { + for (const currentMember of tsClassDecl.members) { + if (this.classMemberHasDuplicateName(currentMember, tsClassDecl)) { + this.incrementCounters(currentMember, FaultID.DeclWithDuplicateName); + } + } + } + + private classMemberHasDuplicateName( + targetMember: ts.ClassElement, tsClassLikeDecl: ts.ClassLikeDeclaration, classType?: ts.Type + ): boolean { + + /* + * If two class members have the same name where one is a private identifer, + * then such members are considered to have duplicate names. + */ + if (!TypeScriptLinter.isIdentifierOrPrivateIdentifier(targetMember.name)) { + return false; + } + + for (const classMember of tsClassLikeDecl.members) { + if (targetMember === classMember) { continue; } - if (isNodeReported[curIdx]) { + + // Check constructor parameter properties. + if (ts.isConstructorDeclaration(classMember) && classMember.parameters.some((x) => { + return ts.isIdentifier(x.name) && TsUtils.hasAccessModifier(x) && + TypeScriptLinter.isPrivateIdentifierDuplicateOfIdentifier(targetMember.name as ts.Identifier, x.name); + })) { + return true; + } + + if (!TypeScriptLinter.isIdentifierOrPrivateIdentifier(classMember.name)) { continue; } - for (let idx = curIdx + 1; idx < nClassMembers; ++idx) { - const tsClassMember = tsClassDecl.members[idx]; - if (!TypeScriptLinter.isIdentifierOrPrivateIdentifier(tsClassMember.name)) { - continue; - } - if (TypeScriptLinter.isPrivateIdentifierDuplicateOfIdentifier(tsCurrentMember.name, tsClassMember.name)) { - this.incrementCounters(tsCurrentMember, FaultID.DeclWithDuplicateName); - this.incrementCounters(tsClassMember, FaultID.DeclWithDuplicateName); - isNodeReported[idx] = true; - break; + + if (TypeScriptLinter.isPrivateIdentifierDuplicateOfIdentifier(targetMember.name, classMember.name)) { + return true; + } + } + + classType ??= this.tsTypeChecker.getTypeAtLocation(tsClassLikeDecl); + if (classType) { + const baseType = TsUtils.getBaseClassType(classType); + if (baseType) { + const baseDecl = baseType.getSymbol()?.valueDeclaration as ts.ClassLikeDeclaration; + if (baseDecl) { + return this.classMemberHasDuplicateName(targetMember, baseDecl); } } } + + return false; } private isPrototypePropertyAccess( @@ -534,16 +563,6 @@ export class TypeScriptLinter { if (ts.isArrayBindingPattern(tsParam.name) || ts.isObjectBindingPattern(tsParam.name)) { this.incrementCounters(node, FaultID.DestructuringParameter); } - const tsParamMods = ts.getModifiers(tsParam); - if ( - tsParamMods && - (TsUtils.hasModifier(tsParamMods, ts.SyntaxKind.PublicKeyword) || - TsUtils.hasModifier(tsParamMods, ts.SyntaxKind.ProtectedKeyword) || - TsUtils.hasModifier(tsParamMods, ts.SyntaxKind.ReadonlyKeyword) || - TsUtils.hasModifier(tsParamMods, ts.SyntaxKind.PrivateKeyword)) - ) { - this.incrementCounters(node, FaultID.ParameterProperties); - } this.handleDeclarationInferredType(tsParam); } @@ -923,6 +942,10 @@ export class TypeScriptLinter { private handleMissingReturnType( funcLikeDecl: ts.FunctionLikeDeclaration | ts.MethodSignature ): [boolean, ts.TypeNode | undefined] { + if (funcLikeDecl.type) { + return [false, funcLikeDecl.type]; + } + // Note: Return type can't be inferred for function without body. const isSignature = ts.isMethodSignature(funcLikeDecl); if (isSignature || !funcLikeDecl.body) { @@ -960,11 +983,12 @@ export class TypeScriptLinter { hasLimitedRetTypeInference = true; } else if (hasLimitedRetTypeInference) { newRetTypeNode = this.tsTypeChecker.typeToTypeNode(tsRetType, funcLikeDecl, ts.NodeBuilderFlags.None); - if (newRetTypeNode && !isFuncExpr) { - autofixable = true; - if (this.autofixesInfo.shouldAutofix(funcLikeDecl, FaultID.LimitedReturnTypeInference)) { - autofix = [Autofixer.fixReturnType(funcLikeDecl, newRetTypeNode)]; - } + autofixable = !!newRetTypeNode; + + if (newRetTypeNode && !isFuncExpr && + this.autofixesInfo.shouldAutofix(funcLikeDecl, FaultID.LimitedReturnTypeInference) + ) { + autofix = [Autofixer.fixMissingReturnType(funcLikeDecl, newRetTypeNode)]; } } } @@ -1208,7 +1232,7 @@ export class TypeScriptLinter { * In TS catch clause doesn't permit specification of the exception varible type except 'any' or 'unknown'. * It is not compatible with STS 'catch' where the exception variable has to be of type * Error or derived from it. - * So each 'catch' which has explicit type for the exception object goes to problems in strict mode. + * So each 'catch' which has explicit type for the exception object goes to problems. */ if (tsCatch.variableDeclaration?.type) { let autofix: Autofix[] | undefined; @@ -2118,6 +2142,69 @@ export class TypeScriptLinter { forEachNodeInSubtree(scope, callback, stopCondition); } + private handleConstructorDeclaration(node: ts.Node): void { + const ctorDecl = node as ts.ConstructorDeclaration; + + if (ctorDecl.parameters.some((x) => { + return TsUtils.hasAccessModifier(x); + })) { + let paramTypes: ts.TypeNode[] | undefined; + if (ctorDecl.body) { + paramTypes = this.collectCtorParamTypes(ctorDecl); + } + + const autofixable = !!paramTypes; + let autofix: Autofix[] | undefined; + + if (autofixable && paramTypes !== undefined && + this.autofixesInfo.shouldAutofix(node, FaultID.ParameterProperties) + ) { + autofix = Autofixer.fixCtorParameterProperties(ctorDecl, paramTypes); + } + + this.incrementCounters(node, FaultID.ParameterProperties, autofixable, autofix); + } + } + + private collectCtorParamTypes(ctorDecl: ts.ConstructorDeclaration): ts.TypeNode[] | undefined { + const paramTypes: ts.TypeNode[] = []; + + for (const param of ctorDecl.parameters) { + let paramTypeNode = param.type; + if (!paramTypeNode) { + const paramType = this.tsTypeChecker.getTypeAtLocation(param); + paramTypeNode = this.tsTypeChecker.typeToTypeNode(paramType, param, ts.NodeBuilderFlags.None); + } + if (!paramTypeNode || !this.tsUtils.isSupportedType(paramTypeNode)) { + return undefined; + } + paramTypes.push(paramTypeNode); + } + + return paramTypes; + } + + private handlePrivateIdentifier(node: ts.Node): void { + const ident = node as ts.PrivateIdentifier; + let autofix: Autofix[] | undefined; + let autofixable = false; + + const classMember = this.tsTypeChecker.getSymbolAtLocation(ident); + if (classMember && (classMember.getFlags() & ts.SymbolFlags.ClassMember) !== 0 && classMember.valueDeclaration) { + const memberDecl = classMember.valueDeclaration as ts.ClassElement; + const parentDecl = memberDecl.parent; + if (ts.isClassLike(parentDecl) && !this.classMemberHasDuplicateName(memberDecl, parentDecl)) { + autofixable = true; + + if (this.autofixesInfo.shouldAutofix(node, FaultID.PrivateIdentifier)) { + autofix = [Autofixer.fixPrivateIdentifier(ident)]; + } + } + } + + this.incrementCounters(node, FaultID.PrivateIdentifier, autofixable, autofix); + } + lint(sourceFile: ts.SourceFile): void { this.walkedComments.clear(); this.sourceFile = sourceFile; diff --git a/ets2panda/linter/lib/TypeScriptLinterConfig.ts b/ets2panda/linter/lib/TypeScriptLinterConfig.ts index 6051e73445e3b338779ff4f094450023dc12caba..0429b16bc37c5c839538697f3e3d70bd8fae07a4 100644 --- a/ets2panda/linter/lib/TypeScriptLinterConfig.ts +++ b/ets2panda/linter/lib/TypeScriptLinterConfig.ts @@ -133,7 +133,6 @@ export class LinterConfig { [ts.SyntaxKind.IntersectionType, FaultID.IntersectionType], [ts.SyntaxKind.TypeLiteral, FaultID.ObjectTypeLiteral], [ts.SyntaxKind.ConstructorType, FaultID.ConstructorFuncs], - [ts.SyntaxKind.PrivateIdentifier, FaultID.PrivateIdentifier], [ts.SyntaxKind.ConditionalType, FaultID.ConditionalType], [ts.SyntaxKind.MappedType, FaultID.MappedType], [ts.SyntaxKind.JsxElement, FaultID.JsxElement], diff --git a/ets2panda/linter/lib/autofixes/AutofixTitles.ts b/ets2panda/linter/lib/autofixes/AutofixTitles.ts index 546dbdba616ffd4166fb2c1546f91732b17cac00..efb3ee24803b8019537a270812ef8f16c7293125 100644 --- a/ets2panda/linter/lib/autofixes/AutofixTitles.ts +++ b/ets2panda/linter/lib/autofixes/AutofixTitles.ts @@ -16,11 +16,12 @@ // generated from recipes.rst export const cookBookRefToFixTitle: Map = new Map([ [1, 'Replace property name with identifier'], + [3, 'Replace with \'private\' modifier'], + [25, 'Replace with field declaration'], [29, 'Replace with dot notation'], [46, 'Convert to arrow function'], [53, 'Replace to \'as\' expression'], [79, 'Remove type annotation'], - [87, 'Wrap in \'Error\''], [90, 'Annotate return type'], [120, 'Replace with explicit import'] ]); diff --git a/ets2panda/linter/lib/utils/TsUtils.ts b/ets2panda/linter/lib/utils/TsUtils.ts index 8e88946275d6b1a0ec6284b1a217f19f408aa0f2..45b0d04519d6605b4341620fd0f14f5de12f38c9 100644 --- a/ets2panda/linter/lib/utils/TsUtils.ts +++ b/ets2panda/linter/lib/utils/TsUtils.ts @@ -1009,9 +1009,15 @@ export class TsUtils { [FaultID.DeclWithDuplicateName, TsUtils.getDeclWithDuplicateNameHighlightRange], [FaultID.ObjectLiteralNoContextType, TsUtils.getObjectLiteralNoContextTypeHighlightRange], [FaultID.ClassExpression, TsUtils.getClassExpressionHighlightRange], - [FaultID.MultipleStaticBlocks, TsUtils.getMultipleStaticBlocksHighlightRange] + [FaultID.MultipleStaticBlocks, TsUtils.getMultipleStaticBlocksHighlightRange], + [FaultID.ParameterProperties, TsUtils.getParameterPropertiesHighlightRange] ]); + static getKeywordHighlightRange(nodeOrComment: ts.Node | ts.CommentRange, keyword: string): [number, number] { + const start = this.getStartPos(nodeOrComment); + return [start, start + keyword.length]; + } + static getVarDeclarationHighlightRange(nodeOrComment: ts.Node | ts.CommentRange): [number, number] | undefined { return this.getKeywordHighlightRange(nodeOrComment, 'var'); } @@ -1120,9 +1126,12 @@ export class TsUtils { return this.getKeywordHighlightRange(nodeOrComment, 'static'); } - static getKeywordHighlightRange(nodeOrComment: ts.Node | ts.CommentRange, keyword: string): [number, number] { - const start = this.getStartPos(nodeOrComment); - return [start, start + keyword.length]; + static getParameterPropertiesHighlightRange(nodeOrComment: ts.Node | ts.CommentRange): [number, number] | undefined { + const params = (nodeOrComment as ts.ConstructorDeclaration).parameters; + if (params.length) { + return [params[0].getStart(), params[params.length - 1].getEnd()]; + } + return undefined; } isStdRecordType(type: ts.Type): boolean { @@ -1556,4 +1565,44 @@ export class TsUtils { return !!sourceFile && !!isEtsFileCb && isEtsFileCb(sourceFile) && sourceFile.isDeclarationFile && !!decl.modifiers?.some((m) => { return m.kind === ts.SyntaxKind.PrivateKeyword; }); } + + static hasAccessModifier(decl: ts.HasModifiers): boolean { + const modifiers = ts.getModifiers(decl); + return ( + !!modifiers && + (TsUtils.hasModifier(modifiers, ts.SyntaxKind.PublicKeyword) || + TsUtils.hasModifier(modifiers, ts.SyntaxKind.ProtectedKeyword) || + TsUtils.hasModifier(modifiers, ts.SyntaxKind.PrivateKeyword)) + ); + } + + static getModifier( + modifiers: readonly ts.Modifier[] | undefined, modifierKind: ts.SyntaxKind + ): ts.Modifier | undefined { + if (!modifiers) { + return undefined; + } + return modifiers.find((x) => { + return x.kind === modifierKind; + }); + } + + static getAccessModifier(modifiers: readonly ts.Modifier[] | undefined): ts.Modifier | undefined { + return TsUtils.getModifier(modifiers, ts.SyntaxKind.PublicKeyword) ?? + TsUtils.getModifier(modifiers, ts.SyntaxKind.ProtectedKeyword) ?? + TsUtils.getModifier(modifiers, ts.SyntaxKind.PrivateKeyword); + } + + static getBaseClassType(type: ts.Type): ts.InterfaceType | undefined { + const baseTypes = type.getBaseTypes(); + if (baseTypes) { + for (const baseType of baseTypes) { + if (baseType.isClass()) { + return baseType; + } + } + } + + return undefined; + } } diff --git a/ets2panda/linter/scripts/update-test-results.mjs b/ets2panda/linter/scripts/update-test-results.mjs index 533eeb87450b56a60309aaafa096dd27f78d3cda..552af2fc694df74e6c236d3193c6d824c1b72999 100644 --- a/ets2panda/linter/scripts/update-test-results.mjs +++ b/ets2panda/linter/scripts/update-test-results.mjs @@ -21,14 +21,12 @@ const TSX_EXT = ".tsx"; const D_TS_EXT = '.d.ts'; class Mode { - static STRICT = 1; - static RELAX = 2; - static AUTOFIX = 3 + static DEFAULT = 1; + static AUTOFIX = 2 } const RESULT_EXT = []; -RESULT_EXT[Mode.STRICT] = '.strict.json'; -RESULT_EXT[Mode.RELAX] = '.relax.json'; +RESULT_EXT[Mode.DEFAULT] = '.json'; RESULT_EXT[Mode.AUTOFIX] = '.autofix.json'; const AUTOFIX_SKIP_EXT = '.autofix.skip'; const DIFF_EXT = '.diff'; @@ -114,10 +112,9 @@ for (let testDir of testDirs) { if (!testFiles) continue; - // Update result for each test for Strict and Relax modes: + // Update result for each test for Default and Autofix modes: for (let testFile of testFiles) { - updateTest(testDir, testFile, Mode.RELAX); - updateTest(testDir, testFile, Mode.STRICT); + updateTest(testDir, testFile, Mode.DEFAULT); updateTest(testDir, testFile, Mode.AUTOFIX); } } \ No newline at end of file diff --git a/ets2panda/linter/src/CommandLineParser.ts b/ets2panda/linter/src/CommandLineParser.ts index c51dd6cc8aa2de77f336c066d253aa09cc21419d..56e3a8ff2625069014cceeb241be066db9338864 100644 --- a/ets2panda/linter/src/CommandLineParser.ts +++ b/ets2panda/linter/src/CommandLineParser.ts @@ -62,15 +62,8 @@ function addProjectFolder(projectFolder: string, previous: string[]): string[] { } function formCommandLineOptions(program: Command): CommandLineOptions { - const opts: CommandLineOptions = { inputFiles: [], warningsAsErrors: false }; - // Default mode of the linter. - opts.strictMode = true; - opts.inputFiles = inputFiles; - + const opts: CommandLineOptions = { inputFiles: inputFiles, warningsAsErrors: false }; const options = program.opts(); - if (options.relax) { - opts.strictMode = false; - } if (options.TSC_Errors) { opts.logTscErrors = true; } @@ -101,7 +94,6 @@ export function parseCommandLine(commandLineArgs: string[]): CommandLineOptions version('0.0.1'); program. option('-E, --TSC_Errors', 'show error messages from Tsc'). - option('--relax', 'relax mode On'). option('--test-mode', 'run linter as if running TS test files'). option('--deveco-plugin-mode', 'run as IDE plugin'). option('-p, --project ', 'path to TS project config file'). diff --git a/ets2panda/linter/src/TestRunner.ts b/ets2panda/linter/src/TestRunner.ts index dcec13bc8656cd510ab58ee187a590eee11e798d..e6469e15322dc9b2f362fc78fbd77b9cab3f4277 100644 --- a/ets2panda/linter/src/TestRunner.ts +++ b/ets2panda/linter/src/TestRunner.ts @@ -41,14 +41,12 @@ interface TestNodeInfo { } enum Mode { - STRICT, - RELAX, + DEFAULT, AUTOFIX } const RESULT_EXT: string[] = []; -RESULT_EXT[Mode.STRICT] = '.strict.json'; -RESULT_EXT[Mode.RELAX] = '.relax.json'; +RESULT_EXT[Mode.DEFAULT] = '.json'; RESULT_EXT[Mode.AUTOFIX] = '.autofix.json'; const AUTOFIX_CONFIG_EXT = '.autofix.cfg.json'; const AUTOFIX_SKIP_EXT = '.autofix.skip'; @@ -79,9 +77,9 @@ function runTests(testDirs: string[]): number { ); }); Logger.info(`\nProcessing "${testDir}" directory:\n`); - // Run each test in Strict, Autofix, and Relax mode: + // Run each test in Default and Autofix mode: for (const testFile of testFiles) { - if (runTest(testDir, testFile, Mode.STRICT)) { + if (runTest(testDir, testFile, Mode.DEFAULT)) { failed++; hasComparisonFailures = true; } else { @@ -93,12 +91,6 @@ function runTests(testDirs: string[]): number { } else { passed++; } - if (runTest(testDir, testFile, Mode.RELAX)) { - failed++; - hasComparisonFailures = true; - } else { - passed++; - } } } Logger.info(`\nSUMMARY: ${passed + failed} total, ${passed} passed or skipped, ${failed} failed.`); @@ -119,9 +111,7 @@ function parseArgs(testDir: string, testFile: string, mode: Mode): CommandLineOp } } - if (mode === Mode.RELAX) { - args.push('--relax'); - } else if (mode === Mode.AUTOFIX) { + if (mode === Mode.AUTOFIX) { args.push('--autofix'); const autofixCfg = path.join(testDir, testFile + AUTOFIX_CONFIG_EXT); if (fs.existsSync(autofixCfg)) { diff --git a/ets2panda/linter/test/UMD_module.ts.relax.json b/ets2panda/linter/test/UMD_module.ts.json old mode 100755 new mode 100644 similarity index 93% rename from ets2panda/linter/test/UMD_module.ts.relax.json rename to ets2panda/linter/test/UMD_module.ts.json index 01ab4a223c370b75e9c47550ac57c8f653965a6f..f8f2a83c9b774f13c09de8b5e13bff2c8881c84e --- a/ets2panda/linter/test/UMD_module.ts.relax.json +++ b/ets2panda/linter/test/UMD_module.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/UMD_module.ts.strict.json b/ets2panda/linter/test/UMD_module.ts.strict.json deleted file mode 100755 index 01ab4a223c370b75e9c47550ac57c8f653965a6f..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/UMD_module.ts.strict.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 1, - "problem": "UMDModuleDefinition" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/ambient_module.ts.relax.json b/ets2panda/linter/test/ambient_module.ts.json old mode 100755 new mode 100644 similarity index 100% rename from ets2panda/linter/test/ambient_module.ts.relax.json rename to ets2panda/linter/test/ambient_module.ts.json diff --git a/ets2panda/linter/test/ambient_module.ts.strict.json b/ets2panda/linter/test/ambient_module.ts.strict.json deleted file mode 100755 index 4ea9700f6a8243b5c8bcacca225f66621b4258de..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/ambient_module.ts.strict.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "ShorthandAmbientModuleDecl", - "suggest": "", - "rule": "Ambient module declaration is not supported (arkts-no-ambient-decls)" - }, - { - "line": 22, - "column": 3, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)" - }, - { - "line": 20, - "column": 1, - "problem": "ShorthandAmbientModuleDecl", - "suggest": "", - "rule": "Ambient module declaration is not supported (arkts-no-ambient-decls)" - }, - { - "line": 20, - "column": 1, - "problem": "WildcardsInModuleName", - "suggest": "", - "rule": "Wildcards in module names are not supported (arkts-no-module-wildcards)" - }, - { - "line": 27, - "column": 3, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)" - }, - { - "line": 25, - "column": 1, - "problem": "ShorthandAmbientModuleDecl", - "suggest": "", - "rule": "Ambient module declaration is not supported (arkts-no-ambient-decls)" - }, - { - "line": 25, - "column": 1, - "problem": "WildcardsInModuleName", - "suggest": "", - "rule": "Wildcards in module names are not supported (arkts-no-module-wildcards)" - }, - { - "line": 26, - "column": 16, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 30, - "column": 1, - "problem": "ShorthandAmbientModuleDecl", - "suggest": "", - "rule": "Ambient module declaration is not supported (arkts-no-ambient-decls)" - }, - { - "line": 30, - "column": 1, - "problem": "WildcardsInModuleName", - "suggest": "", - "rule": "Wildcards in module names are not supported (arkts-no-module-wildcards)" - }, - { - "line": 32, - "column": 1, - "problem": "ShorthandAmbientModuleDecl", - "suggest": "", - "rule": "Ambient module declaration is not supported (arkts-no-ambient-decls)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/arkui_decorators.ts.relax.json b/ets2panda/linter/test/arkui_decorators.ts.json similarity index 100% rename from ets2panda/linter/test/arkui_decorators.ts.relax.json rename to ets2panda/linter/test/arkui_decorators.ts.json diff --git a/ets2panda/linter/test/arkui_decorators.ts.strict.json b/ets2panda/linter/test/arkui_decorators.ts.strict.json deleted file mode 100644 index 7e6c5f32c97a8671046eb4edbdec7103b34fb007..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/arkui_decorators.ts.strict.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 31, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 16, - "column": 49, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 18, - "column": 30, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 22, - "column": 33, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 22, - "column": 36, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 44, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 47, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 29, - "column": 32, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 29, - "column": 35, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 37, - "column": 34, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 37, - "column": 37, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 39, - "column": 40, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 39, - "column": 43, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 40, - "column": 63, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 40, - "column": 66, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 43, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'name' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'name' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 44, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'age' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'age' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 61, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'localStorage' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'localStorage' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 71, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'provide' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'provide' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 74, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'state' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'state' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 78, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'storage' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'storage' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 81, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'style' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'style' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 84, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'watch' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'watch' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 94, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'invalid' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'invalid' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 106, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'data' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'data' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/array_literal_spread.ts.relax.json b/ets2panda/linter/test/array_literal_spread.ts.json similarity index 100% rename from ets2panda/linter/test/array_literal_spread.ts.relax.json rename to ets2panda/linter/test/array_literal_spread.ts.json diff --git a/ets2panda/linter/test/array_literals.ts.strict.json b/ets2panda/linter/test/array_literals.ts.json similarity index 98% rename from ets2panda/linter/test/array_literals.ts.strict.json rename to ets2panda/linter/test/array_literals.ts.json index 77cde08220dfcd6b1ebd0f87d20cfb7ea1759b61..7d566de7bd0cabdff4853f18f1f91338d0c80863 100644 --- a/ets2panda/linter/test/array_literals.ts.strict.json +++ b/ets2panda/linter/test/array_literals.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/array_literals.ts.relax.json b/ets2panda/linter/test/array_literals.ts.relax.json deleted file mode 100644 index ca829d8e77c0d656a13d5a04734add5f2c6f4c48..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/array_literals.ts.relax.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 6, - "problem": "AnyType" - }, - { - "line": 18, - "column": 6, - "problem": "AnyType" - }, - { - "line": 25, - "column": 12, - "problem": "AnyType" - }, - { - "line": 26, - "column": 12, - "problem": "AnyType" - }, - { - "line": 43, - "column": 8, - "problem": "AnyType" - }, - { - "line": 44, - "column": 8, - "problem": "AnyType" - }, - { - "line": 72, - "column": 18, - "problem": "AnyType" - }, - { - "line": 75, - "column": 18, - "problem": "AnyType" - }, - { - "line": 97, - "column": 18, - "problem": "AnyType" - }, - { - "line": 100, - "column": 18, - "problem": "AnyType" - }, - { - "line": 126, - "column": 11, - "problem": "ArrayLiteralNoContextType" - }, - { - "line": 126, - "column": 13, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 126, - "column": 30, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 18, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 19, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 20, - "column": 3, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/assign_to_method.ts.relax.json b/ets2panda/linter/test/assign_to_method.ts.json similarity index 95% rename from ets2panda/linter/test/assign_to_method.ts.relax.json rename to ets2panda/linter/test/assign_to_method.ts.json index e316167a30687fed6c7cf7ac3bc3d42ace75d85b..fc8d5a3b1448281146715dd4d484a9e25705f11b 100644 --- a/ets2panda/linter/test/assign_to_method.ts.relax.json +++ b/ets2panda/linter/test/assign_to_method.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/assign_to_method.ts.strict.json b/ets2panda/linter/test/assign_to_method.ts.strict.json deleted file mode 100644 index e316167a30687fed6c7cf7ac3bc3d42ace75d85b..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/assign_to_method.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 26, - "column": 1, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - }, - { - "line": 27, - "column": 1, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - }, - { - "line": 34, - "column": 5, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/binary_wrong_types.ts.relax.json b/ets2panda/linter/test/binary_wrong_types.ts.json similarity index 96% rename from ets2panda/linter/test/binary_wrong_types.ts.relax.json rename to ets2panda/linter/test/binary_wrong_types.ts.json index 30ed120e91ad4e3e0b003f8471c660454cbe204e..66624ba5ad5c22f9b2a8e6272b55f88f9de803f8 100644 --- a/ets2panda/linter/test/binary_wrong_types.ts.relax.json +++ b/ets2panda/linter/test/binary_wrong_types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -50,4 +50,4 @@ "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test/binary_wrong_types.ts.strict.json b/ets2panda/linter/test/binary_wrong_types.ts.strict.json deleted file mode 100644 index 30ed120e91ad4e3e0b003f8471c660454cbe204e..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/binary_wrong_types.ts.strict.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 28, - "column": 12, - "problem": "UnaryArithmNotNumber", - "suggest": "", - "rule": "Unary operators \"+\", \"-\" and \"~\" work only on numbers (arkts-no-polymorphic-unops)" - }, - { - "line": 39, - "column": 15, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 45, - "column": 7, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 46, - "column": 7, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 95, - "column": 15, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - } - ] -} diff --git a/ets2panda/linter/test/catch_clause.ts.autofix.json b/ets2panda/linter/test/catch_clause.ts.autofix.json index 53819a024f8f41c0873fa6792abf2369762400ae..024250d2a67bc4f38b286cf73041888fad02f1b8 100755 --- a/ets2panda/linter/test/catch_clause.ts.autofix.json +++ b/ets2panda/linter/test/catch_clause.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/catch_clause.ts.strict.json b/ets2panda/linter/test/catch_clause.ts.json similarity index 97% rename from ets2panda/linter/test/catch_clause.ts.strict.json rename to ets2panda/linter/test/catch_clause.ts.json index 7a9cf239b843e663ce3b63c44326d897c3696f31..305324e8520b8c4f26a5c637b623857e6df02077 100644 --- a/ets2panda/linter/test/catch_clause.ts.strict.json +++ b/ets2panda/linter/test/catch_clause.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/catch_clause.ts.relax.json b/ets2panda/linter/test/catch_clause.ts.relax.json deleted file mode 100644 index 2369efdbce4acc716de53fdaf8eacd38a0b30bf0..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/catch_clause.ts.relax.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 13, - "problem": "AnyType" - }, - { - "line": 24, - "column": 13, - "problem": "UnknownType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/dynamic_object_literals.ts.strict.json b/ets2panda/linter/test/classA.ts.json similarity index 92% rename from ets2panda/linter/test/dynamic_object_literals.ts.strict.json rename to ets2panda/linter/test/classA.ts.json index e7d2d6779bbeb56cae88903ecb7da87087831260..ad85bf6b8411598cd234172ea0b9b87380c475f3 100644 --- a/ets2panda/linter/test/dynamic_object_literals.ts.strict.json +++ b/ets2panda/linter/test/classA.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/classA.ts.relax.json b/ets2panda/linter/test/classA.ts.relax.json deleted file mode 100644 index 92d4052d12b48c22fddd22fd31496c0530cff36d..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/classA.ts.relax.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - - ] -} diff --git a/ets2panda/linter/test/classA.ts.strict.json b/ets2panda/linter/test/classA.ts.strict.json deleted file mode 100644 index 92d4052d12b48c22fddd22fd31496c0530cff36d..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/classA.ts.strict.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - - ] -} diff --git a/ets2panda/linter/test_rules/rule93.ts.strict.json b/ets2panda/linter/test/classB.ts.json similarity index 89% rename from ets2panda/linter/test_rules/rule93.ts.strict.json rename to ets2panda/linter/test/classB.ts.json index 160f413784400ddef41c946e81d5dae39a763cf9..5a4a2306bb9372ee11ef7181a6fb74add9d958f5 100644 --- a/ets2panda/linter/test_rules/rule93.ts.strict.json +++ b/ets2panda/linter/test/classB.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -15,8 +15,8 @@ ], "nodes": [ { - "line": 17, - "column": 5, + "line": 25, + "column": 16, "problem": "FunctionContainsThis", "suggest": "", "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" diff --git a/ets2panda/linter/test/classB.ts.relax.json b/ets2panda/linter/test/classB.ts.relax.json deleted file mode 100644 index dc2b9ced44f0b0fed43aafdf3a49426c859daf07..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/classB.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 25, - "column": 16, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - } - ] -} diff --git a/ets2panda/linter/test/classB.ts.strict.json b/ets2panda/linter/test/classB.ts.strict.json deleted file mode 100644 index dc2b9ced44f0b0fed43aafdf3a49426c859daf07..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/classB.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 25, - "column": 16, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - } - ] -} diff --git a/ets2panda/linter/test/class_as_object.ts.relax.json b/ets2panda/linter/test/class_as_object.ts.json similarity index 98% rename from ets2panda/linter/test/class_as_object.ts.relax.json rename to ets2panda/linter/test/class_as_object.ts.json index ebe30080e0920cd92ae2320990d9786929a655f9..2c6378c2ef22bb0ce1d1f1e6812eb27262531bfc 100644 --- a/ets2panda/linter/test/class_as_object.ts.relax.json +++ b/ets2panda/linter/test/class_as_object.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/class_as_object.ts.strict.json b/ets2panda/linter/test/class_as_object.ts.strict.json deleted file mode 100644 index ebe30080e0920cd92ae2320990d9786929a655f9..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/class_as_object.ts.strict.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "http://www.apache.org/licenses/LICENSE-2.0", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 27, - "column": 9, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 28, - "column": 5, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 29, - "column": 11, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 30, - "column": 7, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 38, - "column": 20, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 39, - "column": 6, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 42, - "column": 12, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 45, - "column": 20, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 46, - "column": 8, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 49, - "column": 14, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 58, - "column": 22, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 60, - "column": 7, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 87, - "column": 39, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 91, - "column": 12, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 96, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 98, - "column": 8, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 116, - "column": 42, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/class_static_block.ts.strict.json b/ets2panda/linter/test/class_static_block.ts.json similarity index 92% rename from ets2panda/linter/test/class_static_block.ts.strict.json rename to ets2panda/linter/test/class_static_block.ts.json index 224c7261abe2d694daeefa2c1f803520e94d09b3..c83680e5b038a0b30056aef316a9ce8d73f888eb 100644 --- a/ets2panda/linter/test/class_static_block.ts.strict.json +++ b/ets2panda/linter/test/class_static_block.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/class_static_block.ts.relax.json b/ets2panda/linter/test/class_static_block.ts.relax.json deleted file mode 100644 index 224c7261abe2d694daeefa2c1f803520e94d09b3..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/class_static_block.ts.relax.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "http://www.apache.org/licenses/LICENSE-2.0", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 23, - "column": 3, - "problem": "MultipleStaticBlocks" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule3.ts.autofix.skip b/ets2panda/linter/test/conditional_types.ts.autofix.skip similarity index 90% rename from ets2panda/linter/test_rules/rule3.ts.autofix.skip rename to ets2panda/linter/test/conditional_types.ts.autofix.skip index 13982e9c910b164b802d0921a8cc7d56e1bf383e..ebd4f995a277f10b85f5b9193b5f5bce236bd974 100644 --- a/ets2panda/linter/test_rules/rule3.ts.autofix.skip +++ b/ets2panda/linter/test/conditional_types.ts.autofix.skip @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,4 +11,4 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ \ No newline at end of file diff --git a/ets2panda/linter/test/conditional_types.ts.strict.json b/ets2panda/linter/test/conditional_types.ts.json similarity index 97% rename from ets2panda/linter/test/conditional_types.ts.strict.json rename to ets2panda/linter/test/conditional_types.ts.json index 9607e2b3e1213e7950e1eb13a5eeefc79956822d..86ae97325fc81620e3b4968566bf415f59293863 100644 --- a/ets2panda/linter/test/conditional_types.ts.strict.json +++ b/ets2panda/linter/test/conditional_types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/conditional_types.ts.relax.json b/ets2panda/linter/test/conditional_types.ts.relax.json deleted file mode 100644 index 849cd5a27b35407f8acf688646b23225d345ab5e..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/conditional_types.ts.relax.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 1, - "problem": "InterfaceMerging" - }, - { - "line": 22, - "column": 17, - "problem": "ConditionalType" - }, - { - "line": 23, - "column": 17, - "problem": "ConditionalType" - }, - { - "line": 31, - "column": 44, - "problem": "ConditionalType" - }, - { - "line": 41, - "column": 21, - "problem": "ConditionalType" - }, - { - "line": 41, - "column": 31, - "problem": "ObjectTypeLiteral" - }, - { - "line": 41, - "column": 42, - "problem": "UnknownType" - }, - { - "line": 41, - "column": 54, - "problem": "IndexedAccessType" - }, - { - "line": 45, - "column": 1, - "problem": "InterfaceMerging" - }, - { - "line": 51, - "column": 19, - "problem": "ConditionalType" - }, - { - "line": 51, - "column": 29, - "problem": "AnyType" - }, - { - "line": 51, - "column": 37, - "problem": "IndexedAccessType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/const_assertion.ts.relax.json b/ets2panda/linter/test/const_assertion.ts.json old mode 100755 new mode 100644 similarity index 96% rename from ets2panda/linter/test/const_assertion.ts.relax.json rename to ets2panda/linter/test/const_assertion.ts.json index d38b74f0a2146ca0b422283e0d224a75e589beb5..cf6cab5c8c0c17e212f1cbbffe4ed42cde30daa4 --- a/ets2panda/linter/test/const_assertion.ts.relax.json +++ b/ets2panda/linter/test/const_assertion.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/const_assertion.ts.strict.json b/ets2panda/linter/test/const_assertion.ts.strict.json deleted file mode 100755 index d38b74f0a2146ca0b422283e0d224a75e589beb5..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/const_assertion.ts.strict.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 19, - "problem": "ConstAssertion", - "suggest": "", - "rule": "\"as const\" assertions are not supported (arkts-no-as-const)" - }, - { - "line": 17, - "column": 20, - "problem": "ConstAssertion", - "suggest": "", - "rule": "\"as const\" assertions are not supported (arkts-no-as-const)" - }, - { - "line": 19, - "column": 27, - "problem": "ConstAssertion", - "suggest": "", - "rule": "\"as const\" assertions are not supported (arkts-no-as-const)" - }, - { - "line": 20, - "column": 28, - "problem": "ConstAssertion", - "suggest": "", - "rule": "\"as const\" assertions are not supported (arkts-no-as-const)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/constructor_types.ts.strict.json b/ets2panda/linter/test/constructor_types.ts.json similarity index 97% rename from ets2panda/linter/test/constructor_types.ts.strict.json rename to ets2panda/linter/test/constructor_types.ts.json index 94a926f9c35c5101aa35dae99eef3a28d99596ce..0d4914b34f552667aff0e20b2fe1bb594cabb4ba 100644 --- a/ets2panda/linter/test/constructor_types.ts.strict.json +++ b/ets2panda/linter/test/constructor_types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -90,4 +90,4 @@ "problem": "ClassAsObject" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test/constructor_types.ts.relax.json b/ets2panda/linter/test/constructor_types.ts.relax.json deleted file mode 100644 index 73924c66b833d1d76b9372f0126c46576ae46e5f..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/constructor_types.ts.relax.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 45, - "column": 27, - "problem": "ConstructorFuncs" - }, - { - "line": 55, - "column": 31, - "problem": "ClassAsObject" - }, - { - "line": 56, - "column": 30, - "problem": "ClassAsObject" - }, - { - "line": 61, - "column": 11, - "problem": "ConstructorFuncs" - }, - { - "line": 68, - "column": 31, - "problem": "ClassAsObject" - }, - { - "line": 69, - "column": 30, - "problem": "ClassAsObject" - }, - { - "line": 73, - "column": 3, - "problem": "ConstructorIface" - }, - { - "line": 82, - "column": 24, - "problem": "ObjectTypeLiteral" - }, - { - "line": 83, - "column": 3, - "problem": "ConstructorType" - }, - { - "line": 94, - "column": 19, - "problem": "ConstructorFuncs" - }, - { - "line": 100, - "column": 9, - "problem": "ConstructorFuncs" - }, - { - "line": 107, - "column": 31, - "problem": "ClassAsObject" - }, - { - "line": 108, - "column": 31, - "problem": "ClassAsObject" - } - ] -} diff --git a/ets2panda/linter/test/d_ts.ts.autofix.json b/ets2panda/linter/test/d_ts.ts.autofix.json deleted file mode 100644 index 834217ed96d676162e5d8427588e130a71355282..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/d_ts.ts.autofix.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 53, - "column": 3, - "problem": "IndexMember", - "autofixable": false, - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - }, - { - "line": 55, - "column": 22, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 59, - "column": 1, - "problem": "PropertyAccessByIndex", - "autofixable": true, - "suggest": "", - "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" - }, - { - "line": 60, - "column": 1, - "problem": "PropertyAccessByIndex", - "autofixable": true, - "suggest": "", - "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)" - }, - { - "line": 82, - "column": 19, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/iife.ts.autofix.skip b/ets2panda/linter/test/d_ts.ts.autofix.skip similarity index 90% rename from ets2panda/linter/test/iife.ts.autofix.skip rename to ets2panda/linter/test/d_ts.ts.autofix.skip index 13982e9c910b164b802d0921a8cc7d56e1bf383e..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f 100644 --- a/ets2panda/linter/test/iife.ts.autofix.skip +++ b/ets2panda/linter/test/d_ts.ts.autofix.skip @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,4 +11,4 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ \ No newline at end of file diff --git a/ets2panda/linter/test/d_ts.ts.strict.json b/ets2panda/linter/test/d_ts.ts.json similarity index 97% rename from ets2panda/linter/test/d_ts.ts.strict.json rename to ets2panda/linter/test/d_ts.ts.json index 136a9c5a374184b4fffcf705da09554ad7d2499b..2be10b5e9cc4997081432759abf1f5d9984a67aa 100644 --- a/ets2panda/linter/test/d_ts.ts.strict.json +++ b/ets2panda/linter/test/d_ts.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/d_ts.ts.relax.json b/ets2panda/linter/test/d_ts.ts.relax.json deleted file mode 100644 index 02da8775b6ab79c1fac63fd38eccfc92f26fd181..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/d_ts.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 53, - "column": 3, - "problem": "IndexMember", - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - }, - { - "line": 55, - "column": 22, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 82, - "column": 19, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/default_imports.ts.autofix.json b/ets2panda/linter/test/default_imports.ts.autofix.json index b083d587f19d1116c31f7ac1486b08dc89500359..a27317b20ed5846836f0bb87a25e6dbb639c8aea 100755 --- a/ets2panda/linter/test/default_imports.ts.autofix.json +++ b/ets2panda/linter/test/default_imports.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/default_imports.ts.strict.json b/ets2panda/linter/test/default_imports.ts.json old mode 100755 new mode 100644 similarity index 95% rename from ets2panda/linter/test/default_imports.ts.strict.json rename to ets2panda/linter/test/default_imports.ts.json index ffea8cd37a136b792cb2a77f05e5caa14c7634b3..95dcd9cd64da18fe67ce1f4822e7b2648ae1622b --- a/ets2panda/linter/test/default_imports.ts.strict.json +++ b/ets2panda/linter/test/default_imports.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/definite_assignment.ts.strict.json b/ets2panda/linter/test/definite_assignment.ts.json similarity index 93% rename from ets2panda/linter/test/definite_assignment.ts.strict.json rename to ets2panda/linter/test/definite_assignment.ts.json index 6c3d89f235dc6937fc05c1a9787aa380d741d964..049e5f2163412273e7e4cf0c294e9f7be1733ed7 100644 --- a/ets2panda/linter/test/definite_assignment.ts.strict.json +++ b/ets2panda/linter/test/definite_assignment.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/definite_assignment.ts.relax.json b/ets2panda/linter/test/definite_assignment.ts.relax.json deleted file mode 100644 index 6c3d89f235dc6937fc05c1a9787aa380d741d964..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/definite_assignment.ts.relax.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 5, - "problem": "DefiniteAssignment" - }, - { - "line": 33, - "column": 3, - "problem": "DefiniteAssignment" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/delete_operator.ts.strict.json b/ets2panda/linter/test/delete_operator.ts.json similarity index 97% rename from ets2panda/linter/test/delete_operator.ts.strict.json rename to ets2panda/linter/test/delete_operator.ts.json index 2addafd48ca717f4504bee9d7708f24964da3a1e..d79beedf5b6271a6643780d4e83c14469c14962c 100644 --- a/ets2panda/linter/test/delete_operator.ts.strict.json +++ b/ets2panda/linter/test/delete_operator.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/delete_operator.ts.relax.json b/ets2panda/linter/test/delete_operator.ts.relax.json deleted file mode 100644 index 2addafd48ca717f4504bee9d7708f24964da3a1e..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/delete_operator.ts.relax.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 11, - "problem": "ObjectTypeLiteral" - }, - { - "line": 17, - "column": 10, - "problem": "AnyType" - }, - { - "line": 20, - "column": 23, - "problem": "DeleteOperator" - }, - { - "line": 22, - "column": 11, - "problem": "ObjectTypeLiteral" - }, - { - "line": 23, - "column": 10, - "problem": "UnknownType" - }, - { - "line": 26, - "column": 23, - "problem": "DeleteOperator" - }, - { - "line": 28, - "column": 11, - "problem": "ObjectTypeLiteral" - }, - { - "line": 32, - "column": 23, - "problem": "DeleteOperator" - }, - { - "line": 34, - "column": 11, - "problem": "ObjectTypeLiteral" - }, - { - "line": 38, - "column": 23, - "problem": "DeleteOperator" - }, - { - "line": 40, - "column": 11, - "problem": "ObjectTypeLiteral" - }, - { - "line": 44, - "column": 23, - "problem": "DeleteOperator" - }, - { - "line": 44, - "column": 30, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/destructuring.ts.strict.json b/ets2panda/linter/test/destructuring.ts.json similarity index 99% rename from ets2panda/linter/test/destructuring.ts.strict.json rename to ets2panda/linter/test/destructuring.ts.json index 5eb42e143144a6ac81630202d638b0063c76081a..3affbb5e59e10096f5f22d89aa56fc1dcc7b425f 100644 --- a/ets2panda/linter/test/destructuring.ts.strict.json +++ b/ets2panda/linter/test/destructuring.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/destructuring.ts.relax.json b/ets2panda/linter/test/destructuring.ts.relax.json deleted file mode 100644 index 996437714e4c8004fd26fcab2054819db0d86854..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/destructuring.ts.relax.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 21, - "problem": "DestructuringParameter" - }, - { - "line": 20, - "column": 12, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 22, - "column": 18, - "problem": "DestructuringParameter" - }, - { - "line": 27, - "column": 18, - "problem": "DestructuringParameter" - }, - { - "line": 30, - "column": 6, - "problem": "ObjectTypeLiteral" - }, - { - "line": 34, - "column": 21, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 36, - "column": 18, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 44, - "column": 15, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 48, - "column": 10, - "problem": "SpreadOperator" - }, - { - "line": 55, - "column": 12, - "problem": "ObjectTypeLiteral" - }, - { - "line": 62, - "column": 7, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 62, - "column": 19, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 63, - "column": 31, - "problem": "ArrayLiteralNoContextType" - }, - { - "line": 63, - "column": 43, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 67, - "column": 23, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 70, - "column": 12, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 81, - "column": 18, - "problem": "ObjectTypeLiteral" - }, - { - "line": 81, - "column": 47, - "problem": "ArrayLiteralNoContextType" - }, - { - "line": 82, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 83, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 84, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 109, - "column": 18, - "problem": "ArrayLiteralNoContextType" - }, - { - "line": 110, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 112, - "column": 15, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 114, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 116, - "column": 15, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 132, - "column": 13, - "problem": "DestructuringParameter" - }, - { - "line": 136, - "column": 13, - "problem": "DestructuringParameter" - }, - { - "line": 136, - "column": 22, - "problem": "ObjectTypeLiteral" - }, - { - "line": 138, - "column": 4, - "problem": "ObjectLiteralNoContextType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/dynamic_import.ts.strict.json b/ets2panda/linter/test/dynamic_import.ts.json old mode 100755 new mode 100644 similarity index 95% rename from ets2panda/linter/test/dynamic_import.ts.strict.json rename to ets2panda/linter/test/dynamic_import.ts.json index e361de54cac3bd526b638381e262c39c7ea9fb46..d3220a568ec952e631e3e50983994a0f27d823db --- a/ets2panda/linter/test/dynamic_import.ts.strict.json +++ b/ets2panda/linter/test/dynamic_import.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/dynamic_object_literals.ts b/ets2panda/linter/test/dynamic_object_literals.ts index dc4de64dffcdc883ee0d3fa120cc0ab65598a816..3c6220218d48ce6e2f29304dfa058bd581b4cdd5 100644 --- a/ets2panda/linter/test/dynamic_object_literals.ts +++ b/ets2panda/linter/test/dynamic_object_literals.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/linter/test/iface2.ts.relax.json b/ets2panda/linter/test/dynamic_object_literals.ts.json similarity index 92% rename from ets2panda/linter/test/iface2.ts.relax.json rename to ets2panda/linter/test/dynamic_object_literals.ts.json index b06227021f092f20110cdafb2a6d660605c2ff96..ad85bf6b8411598cd234172ea0b9b87380c475f3 100644 --- a/ets2panda/linter/test/iface2.ts.relax.json +++ b/ets2panda/linter/test/dynamic_object_literals.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/enum_indexing.ts.relax.json b/ets2panda/linter/test/enum_indexing.ts.json similarity index 93% rename from ets2panda/linter/test/enum_indexing.ts.relax.json rename to ets2panda/linter/test/enum_indexing.ts.json index 1cb184ed348796563334f02bb62bfc50c059f380..eb5a22d9abc1105c16b67ebcb147ee7e43298a4e 100644 --- a/ets2panda/linter/test/enum_indexing.ts.relax.json +++ b/ets2panda/linter/test/enum_indexing.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/enum_indexing.ts.strict.json b/ets2panda/linter/test/enum_indexing.ts.strict.json deleted file mode 100644 index 1cb184ed348796563334f02bb62bfc50c059f380..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/enum_indexing.ts.strict.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 11, - "problem": "ClassAsObject" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/enum_member_non_constant.ts b/ets2panda/linter/test/enum_member_non_constant.ts index 9666d197b97215710224bdae26974f205dd9b410..4ae90fde17ad97fea7356b7896d1f9ebda35fcb2 100644 --- a/ets2panda/linter/test/enum_member_non_constant.ts +++ b/ets2panda/linter/test/enum_member_non_constant.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/ets2panda/linter/test/enum_member_non_constant.ts.relax.json b/ets2panda/linter/test/enum_member_non_constant.ts.json similarity index 95% rename from ets2panda/linter/test/enum_member_non_constant.ts.relax.json rename to ets2panda/linter/test/enum_member_non_constant.ts.json index 1305936dd33b5b2bebc2b4a29109be8221c306a0..bfe1bdcad2527abb97efd0d471638113f5cf5cf7 100644 --- a/ets2panda/linter/test/enum_member_non_constant.ts.relax.json +++ b/ets2panda/linter/test/enum_member_non_constant.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -29,4 +29,4 @@ "rule": "Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test/enum_member_non_constant.ts.strict.json b/ets2panda/linter/test/enum_member_non_constant.ts.strict.json deleted file mode 100644 index 1305936dd33b5b2bebc2b4a29109be8221c306a0..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/enum_member_non_constant.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 48, - "column": 3, - "problem": "EnumMemberNonConstInit", - "suggest": "", - "rule": "Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)" - }, - { - "line": 52, - "column": 3, - "problem": "EnumMemberNonConstInit", - "suggest": "", - "rule": "Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)" - } - ] -} diff --git a/ets2panda/linter/test/es_object.ts.relax.json b/ets2panda/linter/test/es_object.ts.json similarity index 99% rename from ets2panda/linter/test/es_object.ts.relax.json rename to ets2panda/linter/test/es_object.ts.json index 5bab1a3eee7a781b35c0996be116badfe9617820..0dac4afe26aac725cf87c2d4d54c02005e5622d8 100644 --- a/ets2panda/linter/test/es_object.ts.relax.json +++ b/ets2panda/linter/test/es_object.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/es_object.ts.strict.json b/ets2panda/linter/test/es_object.ts.strict.json deleted file mode 100644 index 86c0f49acf614ff7fd4b654983ee1a6684b0d3a3..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/es_object.ts.strict.json +++ /dev/null @@ -1,683 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 17, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 20, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 21, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 22, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 25, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 26, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 27, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 29, - "column": 21, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 29, - "column": 35, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 29, - "column": 53, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 14, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 46, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 58, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 14, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 46, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 58, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 14, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 46, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 60, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 19, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 33, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 51, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 63, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 19, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 33, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 51, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 63, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 19, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 33, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 51, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 65, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 60, - "column": 16, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 61, - "column": 12, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 64, - "column": 18, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 64, - "column": 32, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 64, - "column": 50, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 66, - "column": 15, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 67, - "column": 17, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 70, - "column": 13, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 71, - "column": 15, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 77, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 78, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 79, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 80, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 82, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 83, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 85, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 86, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 87, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 88, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 90, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 91, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 93, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 94, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 95, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 96, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 98, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 99, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 103, - "column": 12, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 105, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 106, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 108, - "column": 18, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 109, - "column": 18, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 114, - "column": 25, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 115, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 119, - "column": 25, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 119, - "column": 36, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 136, - "column": 25, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 136, - "column": 38, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 148, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 149, - "column": 1, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 154, - "column": 32, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 154, - "column": 45, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 154, - "column": 58, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 162, - "column": 32, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 162, - "column": 47, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 162, - "column": 60, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 170, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 172, - "column": 22, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 174, - "column": 30, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 176, - "column": 19, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 177, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 178, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 179, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 181, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 182, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 183, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 184, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 185, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 188, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 189, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 190, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/for_stmts.ts.relax.json b/ets2panda/linter/test/for_stmts.ts.json similarity index 97% rename from ets2panda/linter/test/for_stmts.ts.relax.json rename to ets2panda/linter/test/for_stmts.ts.json index 73a294f7d67ef56703e89f24ec9577c3a8ac19db..3c828969eb6e8596d537804dd3e27510fa00c4e4 100644 --- a/ets2panda/linter/test/for_stmts.ts.relax.json +++ b/ets2panda/linter/test/for_stmts.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/for_stmts.ts.strict.json b/ets2panda/linter/test/for_stmts.ts.strict.json deleted file mode 100644 index 73a294f7d67ef56703e89f24ec9577c3a8ac19db..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/for_stmts.ts.strict.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 14, - "problem": "ForInStatement", - "suggest": "", - "rule": "\"for .. in\" is not supported (arkts-no-for-in)" - }, - { - "line": 22, - "column": 17, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 49, - "column": 14, - "problem": "ForInStatement", - "suggest": "", - "rule": "\"for .. in\" is not supported (arkts-no-for-in)" - }, - { - "line": 75, - "column": 14, - "problem": "ForInStatement", - "suggest": "", - "rule": "\"for .. in\" is not supported (arkts-no-for-in)" - }, - { - "line": 91, - "column": 14, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 91, - "column": 54, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 99, - "column": 7, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 124, - "column": 12, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/func_inferred_type_args.ts.strict.json b/ets2panda/linter/test/func_inferred_type_args.ts.json similarity index 98% rename from ets2panda/linter/test/func_inferred_type_args.ts.strict.json rename to ets2panda/linter/test/func_inferred_type_args.ts.json index 24341526de7282a167dddab20a6e9bf432eb0380..d6eab1b638d408907ae78860d3128f70572585db 100644 --- a/ets2panda/linter/test/func_inferred_type_args.ts.strict.json +++ b/ets2panda/linter/test/func_inferred_type_args.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/func_inferred_type_args.ts.relax.json b/ets2panda/linter/test/func_inferred_type_args.ts.relax.json deleted file mode 100644 index 24341526de7282a167dddab20a6e9bf432eb0380..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/func_inferred_type_args.ts.relax.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 26, - "column": 5, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 26, - "column": 9, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)" - }, - { - "line": 28, - "column": 21, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 31, - "column": 1, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)" - }, - { - "line": 38, - "column": 1, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)" - }, - { - "line": 46, - "column": 8, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 47, - "column": 16, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 49, - "column": 8, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 51, - "column": 5, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 51, - "column": 11, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)" - }, - { - "line": 56, - "column": 5, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 56, - "column": 9, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)" - }, - { - "line": 58, - "column": 11, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)" - }, - { - "line": 60, - "column": 19, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 62, - "column": 10, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 69, - "column": 11, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 63, - "column": 1, - "problem": "StrictDiagnostic", - "suggest": "Variable 'd' is used before being assigned.", - "rule": "Variable 'd' is used before being assigned." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/func_return_type.ts.autofix.json b/ets2panda/linter/test/func_return_type.ts.autofix.json index 683c01ee856666cafe4b5f4ca5416c75e77075f7..a0fc5a5b3f47433a18b2feee4956745d3afaed69 100644 --- a/ets2panda/linter/test/func_return_type.ts.autofix.json +++ b/ets2panda/linter/test/func_return_type.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/func_return_type.ts.strict.json b/ets2panda/linter/test/func_return_type.ts.json similarity index 99% rename from ets2panda/linter/test/func_return_type.ts.strict.json rename to ets2panda/linter/test/func_return_type.ts.json index 2e0cdf0b69757695eb91d6ceb70ee5067de9b63e..2383cd253bfc698b24bc9170964bfab08c5f939f 100644 --- a/ets2panda/linter/test/func_return_type.ts.strict.json +++ b/ets2panda/linter/test/func_return_type.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/func_return_type.ts.relax.json b/ets2panda/linter/test/func_return_type.ts.relax.json deleted file mode 100644 index 513a0217d51b1539287c0339caf76140040d4284..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/func_return_type.ts.relax.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 57, - "column": 15, - "problem": "AnyType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/function_expression.ts.autofix.json b/ets2panda/linter/test/function_expression.ts.autofix.json index 8421030d57a51afa6422a3609e49afe8c5826d8a..59206876f81b5f61c699dfebe68dd1e007b7afd4 100644 --- a/ets2panda/linter/test/function_expression.ts.autofix.json +++ b/ets2panda/linter/test/function_expression.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/function_expression.ts.strict.json b/ets2panda/linter/test/function_expression.ts.json similarity index 99% rename from ets2panda/linter/test/function_expression.ts.strict.json rename to ets2panda/linter/test/function_expression.ts.json index f44592a877d0a7ac5ea169e2a6ec3b634b3dc9a0..ffee4f7553e9d54e2c3abb6a86eb44b91010f3ca 100644 --- a/ets2panda/linter/test/function_expression.ts.strict.json +++ b/ets2panda/linter/test/function_expression.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/function_expression.ts.relax.json b/ets2panda/linter/test/function_expression.ts.relax.json deleted file mode 100644 index 565d2ad18dfe0cb25a2d8715b67d18022da1acf4..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/function_expression.ts.relax.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 39, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 48, - "column": 35, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 52, - "column": 19, - "problem": "GeneratorFunction", - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - }, - { - "line": 53, - "column": 3, - "problem": "YieldExpression", - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - }, - { - "line": 82, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 102, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 104, - "column": 7, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/function_object_methods.ts.strict.json b/ets2panda/linter/test/function_object_methods.ts.json similarity index 99% rename from ets2panda/linter/test/function_object_methods.ts.strict.json rename to ets2panda/linter/test/function_object_methods.ts.json index 69daf85ea247a6e3351ce452f1d205c7cb3650fc..667345ccfc91f774fcb4a0cc436b7aa3e4f3d761 100644 --- a/ets2panda/linter/test/function_object_methods.ts.strict.json +++ b/ets2panda/linter/test/function_object_methods.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/function_object_methods.ts.relax.json b/ets2panda/linter/test/function_object_methods.ts.relax.json deleted file mode 100644 index c9e4d85124199f1dfa6cdbbc35a767122ca6aa3f..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/function_object_methods.ts.relax.json +++ /dev/null @@ -1,250 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 29, - "column": 5, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - }, - { - "line": 29, - "column": 35, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 30, - "column": 5, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - }, - { - "line": 30, - "column": 45, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 37, - "column": 37, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 38, - "column": 40, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 68, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 68, - "column": 44, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 70, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 70, - "column": 35, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 75, - "column": 48, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 78, - "column": 48, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 81, - "column": 31, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 82, - "column": 31, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 87, - "column": 32, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 94, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 94, - "column": 37, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 96, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 96, - "column": 30, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 101, - "column": 42, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 104, - "column": 42, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 107, - "column": 20, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 108, - "column": 20, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 113, - "column": 21, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 116, - "column": 16, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 119, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 122, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 125, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 128, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 132, - "column": 17, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 136, - "column": 23, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 137, - "column": 23, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 138, - "column": 23, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 139, - "column": 23, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 141, - "column": 5, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/function_overload.ts.strict.json b/ets2panda/linter/test/function_overload.ts.json similarity index 96% rename from ets2panda/linter/test/function_overload.ts.strict.json rename to ets2panda/linter/test/function_overload.ts.json index 13aacbf8bddbb173935d625cc6d39095c506a328..0ecc8c6e9b419728b07e7387bf4d8868bc771bd8 100644 --- a/ets2panda/linter/test/function_overload.ts.strict.json +++ b/ets2panda/linter/test/function_overload.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/function_overload.ts.relax.json b/ets2panda/linter/test/function_overload.ts.relax.json deleted file mode 100644 index 37ee072d73cd87d4c838af6433f68f0c18171ef1..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/function_overload.ts.relax.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 37, - "column": 19, - "problem": "AnyType" - }, - { - "line": 37, - "column": 28, - "problem": "AnyType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/function_spread_arg.ts.strict.json b/ets2panda/linter/test/function_spread_arg.ts.json similarity index 96% rename from ets2panda/linter/test/function_spread_arg.ts.strict.json rename to ets2panda/linter/test/function_spread_arg.ts.json index 300f6ea4c9556e5d1629637ea9a2fa6d0b408c6c..59b30bcd87eba9cc1b776d7741cec6b7732773db 100644 --- a/ets2panda/linter/test/function_spread_arg.ts.strict.json +++ b/ets2panda/linter/test/function_spread_arg.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/function_spread_arg.ts.relax.json b/ets2panda/linter/test/function_spread_arg.ts.relax.json deleted file mode 100644 index 300f6ea4c9556e5d1629637ea9a2fa6d0b408c6c..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/function_spread_arg.ts.relax.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 14, - "problem": "AnyType" - }, - { - "line": 16, - "column": 17, - "problem": "AnyType" - }, - { - "line": 16, - "column": 20, - "problem": "AnyType" - }, - { - "line": 21, - "column": 5, - "problem": "SpreadOperator" - }, - { - "line": 23, - "column": 14, - "problem": "AnyType" - }, - { - "line": 23, - "column": 17, - "problem": "AnyType" - }, - { - "line": 23, - "column": 20, - "problem": "AnyType" - }, - { - "line": 27, - "column": 12, - "problem": "SpreadOperator" - }, - { - "line": 42, - "column": 5, - "problem": "AnyType" - }, - { - "line": 87, - "column": 11, - "problem": "SpreadOperator" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/functions.ts.autofix.json b/ets2panda/linter/test/functions.ts.autofix.json deleted file mode 100755 index 0b6af45e6e03484b2768c01a8afaeb72405fa74d..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/functions.ts.autofix.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 20, - "column": 3, - "problem": "LocalFunction", - "autofixable": false, - "suggest": "", - "rule": "Nested functions are not supported (arkts-no-nested-funcs)" - }, - { - "line": 20, - "column": 17, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 20, - "column": 20, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 29, - "column": 3, - "problem": "GeneratorFunction", - "autofixable": false, - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - }, - { - "line": 33, - "column": 7, - "problem": "YieldExpression", - "autofixable": false, - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - }, - { - "line": 53, - "column": 19, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 55, - "column": 17, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 58, - "column": 27, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 60, - "column": 19, - "problem": "LambdaWithTypeParameters", - "autofixable": false, - "suggest": "", - "rule": "Use generic functions instead of generic arrow functions (arkts-no-generic-lambdas)" - }, - { - "line": 64, - "column": 3, - "problem": "FunctionContainsThis", - "autofixable": false, - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 67, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Property 'c' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'c' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 93, - "column": 7, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 97, - "column": 5, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 101, - "column": 5, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 102, - "column": 12, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 106, - "column": 7, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 107, - "column": 14, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 108, - "column": 16, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 116, - "column": 5, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 118, - "column": 7, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 120, - "column": 11, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 122, - "column": 11, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/parameter_properties.ts.autofix.skip b/ets2panda/linter/test/functions.ts.autofix.skip similarity index 90% rename from ets2panda/linter/test/parameter_properties.ts.autofix.skip rename to ets2panda/linter/test/functions.ts.autofix.skip index 13982e9c910b164b802d0921a8cc7d56e1bf383e..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f 100644 --- a/ets2panda/linter/test/parameter_properties.ts.autofix.skip +++ b/ets2panda/linter/test/functions.ts.autofix.skip @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,4 +11,4 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ \ No newline at end of file diff --git a/ets2panda/linter/test/functions.ts.strict.json b/ets2panda/linter/test/functions.ts.json similarity index 99% rename from ets2panda/linter/test/functions.ts.strict.json rename to ets2panda/linter/test/functions.ts.json index d57b74aa35f727c11969750a8ddbd117512ecf46..63595a78f21ae879df05c3175e820b69467d733c 100644 --- a/ets2panda/linter/test/functions.ts.strict.json +++ b/ets2panda/linter/test/functions.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/functions.ts.relax.json b/ets2panda/linter/test/functions.ts.relax.json deleted file mode 100644 index 6729c50d23c446b1835bbe8bb90355aa46755ce6..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/functions.ts.relax.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 20, - "column": 17, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 20, - "column": 20, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 29, - "column": 3, - "problem": "GeneratorFunction", - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - }, - { - "line": 33, - "column": 7, - "problem": "YieldExpression", - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - }, - { - "line": 53, - "column": 19, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 55, - "column": 17, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 58, - "column": 27, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 64, - "column": 3, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 67, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'c' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'c' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 93, - "column": 7, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 97, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 101, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 102, - "column": 12, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 106, - "column": 7, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 107, - "column": 14, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 108, - "column": 16, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 116, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 118, - "column": 7, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 120, - "column": 11, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - }, - { - "line": 122, - "column": 11, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'string'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/generators.ts.strict.json b/ets2panda/linter/test/generators.ts.json similarity index 98% rename from ets2panda/linter/test/generators.ts.strict.json rename to ets2panda/linter/test/generators.ts.json index 1617219889f7783654ef716a340b91f241d1aa51..acc78735df360757c2eb2e96ac664e3964fdef6d 100644 --- a/ets2panda/linter/test/generators.ts.strict.json +++ b/ets2panda/linter/test/generators.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/generators.ts.relax.json b/ets2panda/linter/test/generators.ts.relax.json deleted file mode 100644 index 35b51a940379146949adcaa9b8a00c8dfa71ee34..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/generators.ts.relax.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "GeneratorFunction" - }, - { - "line": 19, - "column": 5, - "problem": "YieldExpression" - }, - { - "line": 23, - "column": 13, - "problem": "GeneratorFunction" - }, - { - "line": 24, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 25, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 26, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 35, - "column": 3, - "problem": "GeneratorFunction" - }, - { - "line": 39, - "column": 7, - "problem": "YieldExpression" - }, - { - "line": 49, - "column": 1, - "problem": "GeneratorFunction" - }, - { - "line": 50, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 52, - "column": 1, - "problem": "GeneratorFunction" - }, - { - "line": 53, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 55, - "column": 7, - "problem": "UnknownType" - }, - { - "line": 58, - "column": 1, - "problem": "GeneratorFunction" - }, - { - "line": 59, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 60, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 61, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 63, - "column": 1, - "problem": "GeneratorFunction" - }, - { - "line": 64, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 65, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 66, - "column": 3, - "problem": "YieldExpression" - }, - { - "line": 68, - "column": 7, - "problem": "UnknownType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/global_this.ts.strict.json b/ets2panda/linter/test/global_this.ts.json old mode 100755 new mode 100644 similarity index 95% rename from ets2panda/linter/test/global_this.ts.strict.json rename to ets2panda/linter/test/global_this.ts.json index 76fe7bbf40a9fe2006e6ee7277230617b746eced..5f6fc92f8539802f0a196dea670930d62a88b2ee --- a/ets2panda/linter/test/global_this.ts.strict.json +++ b/ets2panda/linter/test/global_this.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/global_this.ts.relax.json b/ets2panda/linter/test/global_this.ts.relax.json deleted file mode 100755 index 76fe7bbf40a9fe2006e6ee7277230617b746eced..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/global_this.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 7, - "problem": "GlobalThis", - "suggest": "", - "rule": "\"globalThis\" is not supported (arkts-no-globalthis)" - }, - { - "line": 21, - "column": 10, - "problem": "GlobalThis", - "suggest": "", - "rule": "\"globalThis\" is not supported (arkts-no-globalthis)" - }, - { - "line": 24, - "column": 17, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/array_literal_spread.ts.strict.json b/ets2panda/linter/test/iface2.ts.json similarity index 100% rename from ets2panda/linter/test/array_literal_spread.ts.strict.json rename to ets2panda/linter/test/iface2.ts.json diff --git a/ets2panda/linter/test/iface2.ts.strict.json b/ets2panda/linter/test/iface2.ts.strict.json deleted file mode 100644 index b06227021f092f20110cdafb2a6d660605c2ff96..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/iface2.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/iife.ts b/ets2panda/linter/test/iife.ts deleted file mode 100644 index fe14cd16fd5f5d033fb98282faa2b902582c835c..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/iife.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(() => { - let a = 5; - let b = 10; - let c = a + b; -})(); - diff --git a/ets2panda/linter/test/iife.ts.relax.json b/ets2panda/linter/test/iife.ts.relax.json deleted file mode 100644 index b06227021f092f20110cdafb2a6d660605c2ff96..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/iife.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/iife.ts.strict.json b/ets2panda/linter/test/iife.ts.strict.json deleted file mode 100644 index b06227021f092f20110cdafb2a6d660605c2ff96..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/iife.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/implements_class.ts.strict.json b/ets2panda/linter/test/implements_class.ts.json similarity index 92% rename from ets2panda/linter/test/implements_class.ts.strict.json rename to ets2panda/linter/test/implements_class.ts.json index aee8626191fe87b5f8413ff0a871a54fea4cc20e..b2718c5d4ad9a4df03ccd120724a2d6b09a93ca6 100644 --- a/ets2panda/linter/test/implements_class.ts.strict.json +++ b/ets2panda/linter/test/implements_class.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/implements_class.ts.relax.json b/ets2panda/linter/test/implements_class.ts.relax.json deleted file mode 100644 index aee8626191fe87b5f8413ff0a871a54fea4cc20e..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/implements_class.ts.relax.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "http://www.apache.org/licenses/LICENSE-2.0", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 28, - "column": 33, - "problem": "ImplementsClass" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/import_after_statement.ts.strict.json b/ets2panda/linter/test/import_after_statement.ts.json similarity index 94% rename from ets2panda/linter/test/import_after_statement.ts.strict.json rename to ets2panda/linter/test/import_after_statement.ts.json index 2521bd90f39216a9db92255e91e6c2eabfc4bfe3..aa085f4c22382009b0ab0d35f0580ef54872fbb1 100644 --- a/ets2panda/linter/test/import_after_statement.ts.strict.json +++ b/ets2panda/linter/test/import_after_statement.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/import_after_statement.ts.relax.json b/ets2panda/linter/test/import_after_statement.ts.relax.json deleted file mode 100644 index 2521bd90f39216a9db92255e91e6c2eabfc4bfe3..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/import_after_statement.ts.relax.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 1, - "problem": "ImportAfterStatement" - }, - { - "line": 23, - "column": 1, - "problem": "ImportAfterStatement" - }, - { - "line": 24, - "column": 1, - "problem": "ImportAfterStatement" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/import_assertion.ts.relax.json b/ets2panda/linter/test/import_assertion.ts.json old mode 100755 new mode 100644 similarity index 97% rename from ets2panda/linter/test/import_assertion.ts.relax.json rename to ets2panda/linter/test/import_assertion.ts.json index c7b104909da20af339eaf416c633acfd781edaa0..d90897f03ed9c1f01578fc33b444a35f435208df --- a/ets2panda/linter/test/import_assertion.ts.relax.json +++ b/ets2panda/linter/test/import_assertion.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/import_assertion.ts.strict.json b/ets2panda/linter/test/import_assertion.ts.strict.json deleted file mode 100755 index c7b104909da20af339eaf416c633acfd781edaa0..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/import_assertion.ts.strict.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 38, - "problem": "ImportAssertion", - "suggest": "", - "rule": "Import assertions are not supported (arkts-no-import-assertions)" - }, - { - "line": 19, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 19, - "column": 43, - "problem": "ImportAssertion", - "suggest": "", - "rule": "Import assertions are not supported (arkts-no-import-assertions)" - }, - { - "line": 20, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 20, - "column": 49, - "problem": "ImportAssertion", - "suggest": "", - "rule": "Import assertions are not supported (arkts-no-import-assertions)" - }, - { - "line": 22, - "column": 18, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 23, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 23, - "column": 43, - "problem": "ImportAssertion", - "suggest": "", - "rule": "Import assertions are not supported (arkts-no-import-assertions)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/imported_use_as_object.ts.relax.json b/ets2panda/linter/test/imported_use_as_object.ts.json similarity index 97% rename from ets2panda/linter/test/imported_use_as_object.ts.relax.json rename to ets2panda/linter/test/imported_use_as_object.ts.json index 8120a622b65928f63d68401c8e82fc2465d22fc9..04b8a44b442ccdc9d02888563fe4808c037b0183 100644 --- a/ets2panda/linter/test/imported_use_as_object.ts.relax.json +++ b/ets2panda/linter/test/imported_use_as_object.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/imported_use_as_object.ts.strict.json b/ets2panda/linter/test/imported_use_as_object.ts.strict.json deleted file mode 100644 index 8120a622b65928f63d68401c8e82fc2465d22fc9..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/imported_use_as_object.ts.strict.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 25, - "column": 12, - "problem": "ClassAsObject" - }, - { - "line": 26, - "column": 6, - "problem": "ClassAsObject" - }, - { - "line": 27, - "column": 8, - "problem": "ClassAsObject" - }, - { - "line": 29, - "column": 12, - "problem": "NamespaceAsObject" - }, - { - "line": 30, - "column": 6, - "problem": "NamespaceAsObject" - }, - { - "line": 31, - "column": 8, - "problem": "NamespaceAsObject" - }, - { - "line": 33, - "column": 12, - "problem": "ClassAsObject" - }, - { - "line": 34, - "column": 6, - "problem": "ClassAsObject" - }, - { - "line": 35, - "column": 8, - "problem": "ClassAsObject" - }, - { - "line": 37, - "column": 12, - "problem": "ClassAsObject" - }, - { - "line": 38, - "column": 6, - "problem": "ClassAsObject" - }, - { - "line": 39, - "column": 8, - "problem": "ClassAsObject" - }, - { - "line": 41, - "column": 12, - "problem": "NamespaceAsObject" - }, - { - "line": 42, - "column": 6, - "problem": "NamespaceAsObject" - }, - { - "line": 43, - "column": 8, - "problem": "NamespaceAsObject" - }, - { - "line": 45, - "column": 12, - "problem": "ClassAsObject" - }, - { - "line": 46, - "column": 6, - "problem": "ClassAsObject" - }, - { - "line": 47, - "column": 8, - "problem": "ClassAsObject" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/default_imports.ts.relax.json b/ets2panda/linter/test/imported_use_as_object_module.ts.json old mode 100755 new mode 100644 similarity index 92% rename from ets2panda/linter/test/default_imports.ts.relax.json rename to ets2panda/linter/test/imported_use_as_object_module.ts.json index e7d2d6779bbeb56cae88903ecb7da87087831260..e8cff6c256f0ced150a687d40e9cc69ee4c2792b --- a/ets2panda/linter/test/default_imports.ts.relax.json +++ b/ets2panda/linter/test/imported_use_as_object_module.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/imported_use_as_object_module.ts.relax.json b/ets2panda/linter/test/imported_use_as_object_module.ts.relax.json deleted file mode 100644 index 9ef9898408bf9c5ea3e83bb864a24990bad74aa7..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/imported_use_as_object_module.ts.relax.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/imported_use_as_object_module.ts.strict.json b/ets2panda/linter/test/imported_use_as_object_module.ts.strict.json deleted file mode 100644 index 9ef9898408bf9c5ea3e83bb864a24990bad74aa7..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/imported_use_as_object_module.ts.strict.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/dynamic_object_literals.ts.relax.json b/ets2panda/linter/test/indexed_derived_from_array.ts.json similarity index 92% rename from ets2panda/linter/test/dynamic_object_literals.ts.relax.json rename to ets2panda/linter/test/indexed_derived_from_array.ts.json index e7d2d6779bbeb56cae88903ecb7da87087831260..ad85bf6b8411598cd234172ea0b9b87380c475f3 100644 --- a/ets2panda/linter/test/dynamic_object_literals.ts.relax.json +++ b/ets2panda/linter/test/indexed_derived_from_array.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/indexed_derived_from_array.ts.relax.json b/ets2panda/linter/test/indexed_derived_from_array.ts.relax.json deleted file mode 100644 index f3fdebc36ba34686111fa54ccffd040ee3afc179..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/indexed_derived_from_array.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} diff --git a/ets2panda/linter/test/indexed_derived_from_array.ts.strict.json b/ets2panda/linter/test/indexed_derived_from_array.ts.strict.json deleted file mode 100644 index f3fdebc36ba34686111fa54ccffd040ee3afc179..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/indexed_derived_from_array.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} diff --git a/ets2panda/linter/test/inferred_type.ts.strict.json b/ets2panda/linter/test/inferred_type.ts.json similarity index 98% rename from ets2panda/linter/test/inferred_type.ts.strict.json rename to ets2panda/linter/test/inferred_type.ts.json index ea64409adcc609190c407328a88936623a9b84f0..d318751398dca8bfab2fd227c1fb7094713eb3e3 100644 --- a/ets2panda/linter/test/inferred_type.ts.strict.json +++ b/ets2panda/linter/test/inferred_type.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/inferred_type.ts.relax.json b/ets2panda/linter/test/inferred_type.ts.relax.json deleted file mode 100644 index ae15d496c261cefa3d2e4306734b17d445b16c4f..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/inferred_type.ts.relax.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 17, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 25, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 27, - "column": 14, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 28, - "column": 23, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 31, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 32, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 34, - "column": 7, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 34, - "column": 10, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 34, - "column": 13, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 37, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 38, - "column": 20, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 39, - "column": 20, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 42, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/instanceof.ts.strict.json b/ets2panda/linter/test/instanceof.ts.json similarity index 98% rename from ets2panda/linter/test/instanceof.ts.strict.json rename to ets2panda/linter/test/instanceof.ts.json index 4d3277e0d787ee19775c4399987297154de7948c..165e5da5ed174b308173e67da28dbed950efaa25 100644 --- a/ets2panda/linter/test/instanceof.ts.strict.json +++ b/ets2panda/linter/test/instanceof.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/instanceof.ts.relax.json b/ets2panda/linter/test/instanceof.ts.relax.json deleted file mode 100644 index 348b7dd402bd6eeb5708c096b16953569dfd731a..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/instanceof.ts.relax.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 13, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 23, - "column": 13, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 50, - "column": 14, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 55, - "column": 32, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 58, - "column": 39, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 61, - "column": 26, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 65, - "column": 23, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 70, - "column": 26, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 76, - "column": 29, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 76, - "column": 19, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/interfaces_props.ts.strict.json b/ets2panda/linter/test/interfaces_props.ts.json similarity index 95% rename from ets2panda/linter/test/interfaces_props.ts.strict.json rename to ets2panda/linter/test/interfaces_props.ts.json index de27e76f227f5a1c4c5fc8efcbb7ca9278b49b8a..4daa96036c2d4875f0dfbc723cd507c51948d472 100644 --- a/ets2panda/linter/test/interfaces_props.ts.strict.json +++ b/ets2panda/linter/test/interfaces_props.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/interfaces_props.ts.relax.json b/ets2panda/linter/test/interfaces_props.ts.relax.json deleted file mode 100644 index de27e76f227f5a1c4c5fc8efcbb7ca9278b49b8a..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/interfaces_props.ts.relax.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 16, - "problem": "ObjectTypeLiteral" - }, - { - "line": 23, - "column": 16, - "problem": "ObjectTypeLiteral" - }, - { - "line": 26, - "column": 1, - "problem": "IntefaceExtendDifProps" - }, - { - "line": 27, - "column": 16, - "problem": "ObjectTypeLiteral" - }, - { - "line": 42, - "column": 12, - "problem": "ObjectLiteralNoContextType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/interop_import.ts.relax.json b/ets2panda/linter/test/interop_import.ts.json similarity index 95% rename from ets2panda/linter/test/interop_import.ts.relax.json rename to ets2panda/linter/test/interop_import.ts.json index 636038c4bf846338d7ddb536b638d0cc510e2aa4..20036d49cca79754ab769e29eb16af1a8f421fee 100644 --- a/ets2panda/linter/test/interop_import.ts.relax.json +++ b/ets2panda/linter/test/interop_import.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -36,4 +36,4 @@ "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test/interop_import.ts.strict.json b/ets2panda/linter/test/interop_import.ts.strict.json deleted file mode 100644 index 636038c4bf846338d7ddb536b638d0cc510e2aa4..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/interop_import.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 29, - "column": 7, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 38, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 41, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} diff --git a/ets2panda/linter/test/interop_imports.ts.json b/ets2panda/linter/test/interop_imports.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..ad85bf6b8411598cd234172ea0b9b87380c475f3 --- /dev/null +++ b/ets2panda/linter/test/interop_imports.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test/interop_imports.ts.relax.json b/ets2panda/linter/test/interop_imports.ts.relax.json deleted file mode 100644 index 18ac144f5d3d23452ecc2c434dc236ece2a7b633..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/interop_imports.ts.relax.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/interop_imports.ts.strict.json b/ets2panda/linter/test/interop_imports.ts.strict.json deleted file mode 100644 index 18ac144f5d3d23452ecc2c434dc236ece2a7b633..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/interop_imports.ts.strict.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/jsx.tsx.strict.json b/ets2panda/linter/test/jsx.tsx.json similarity index 96% rename from ets2panda/linter/test/jsx.tsx.strict.json rename to ets2panda/linter/test/jsx.tsx.json index c8561e293d5b069110d947f1dbb6a04d43b9f4ee..edc9ec750821906b64d30fb619b9b43defd0bc54 100644 --- a/ets2panda/linter/test/jsx.tsx.strict.json +++ b/ets2panda/linter/test/jsx.tsx.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/jsx.tsx.relax.json b/ets2panda/linter/test/jsx.tsx.relax.json deleted file mode 100644 index 835896f99dad358b07d3f261febba426e9dfbfb7..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/jsx.tsx.relax.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 33, - "problem": "JsxElement" - }, - { - "line": 19, - "column": 27, - "problem": "JsxElement" - }, - { - "line": 21, - "column": 7, - "problem": "AnyType" - }, - { - "line": 22, - "column": 5, - "problem": "JsxElement" - }, - { - "line": 23, - "column": 38, - "problem": "JsxElement" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/limited_stdlib_api.ts.autofix.json b/ets2panda/linter/test/limited_stdlib_api.ts.autofix.json deleted file mode 100644 index 08f902699b1857c997ff3dc22d2ff0718f268750..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/limited_stdlib_api.ts.autofix.json +++ /dev/null @@ -1,530 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 1, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 31, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 32, - "column": 1, - "problem": "GlobalThis", - "autofixable": false, - "suggest": "", - "rule": "\"globalThis\" is not supported (arkts-no-globalthis)" - }, - { - "line": 32, - "column": 12, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 56, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 57, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 58, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 58, - "column": 31, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 59, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 61, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 62, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 63, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 64, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 65, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 66, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 67, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 68, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 69, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 70, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 71, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 72, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 73, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 74, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 75, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 76, - "column": 8, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 85, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 86, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 86, - "column": 32, - "problem": "ClassAsObject", - "autofixable": false, - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 87, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 87, - "column": 32, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 88, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 90, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 91, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 92, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 93, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 94, - "column": 9, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 104, - "column": 32, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 105, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 105, - "column": 28, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 106, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 106, - "column": 32, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 37, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 63, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 108, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 108, - "column": 37, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 109, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 109, - "column": 26, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 110, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 110, - "column": 47, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 111, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 111, - "column": 37, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 112, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 112, - "column": 26, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 113, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 113, - "column": 35, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 114, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 114, - "column": 30, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 115, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 115, - "column": 40, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 116, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 116, - "column": 26, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 117, - "column": 13, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 117, - "column": 37, - "problem": "LimitedStdLibApi", - "autofixable": false, - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - } - ] -} diff --git a/ets2panda/linter/test_rules/rule25.ts.autofix.skip b/ets2panda/linter/test/limited_stdlib_api.ts.autofix.skip similarity index 90% rename from ets2panda/linter/test_rules/rule25.ts.autofix.skip rename to ets2panda/linter/test/limited_stdlib_api.ts.autofix.skip index 13982e9c910b164b802d0921a8cc7d56e1bf383e..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f 100644 --- a/ets2panda/linter/test_rules/rule25.ts.autofix.skip +++ b/ets2panda/linter/test/limited_stdlib_api.ts.autofix.skip @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,4 +11,4 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ \ No newline at end of file diff --git a/ets2panda/linter/test/limited_stdlib_api.ts.strict.json b/ets2panda/linter/test/limited_stdlib_api.ts.json similarity index 99% rename from ets2panda/linter/test/limited_stdlib_api.ts.strict.json rename to ets2panda/linter/test/limited_stdlib_api.ts.json index 55e798673cbf641d8e6d7f0979c79cd280bcb43c..1c9d6a1dc86f96a8ff8b45e891e106f20b7bd5ad 100644 --- a/ets2panda/linter/test/limited_stdlib_api.ts.strict.json +++ b/ets2panda/linter/test/limited_stdlib_api.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -463,4 +463,4 @@ "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test/limited_stdlib_api.ts.relax.json b/ets2panda/linter/test/limited_stdlib_api.ts.relax.json deleted file mode 100644 index 55e798673cbf641d8e6d7f0979c79cd280bcb43c..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/limited_stdlib_api.ts.relax.json +++ /dev/null @@ -1,466 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 1, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 31, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 32, - "column": 1, - "problem": "GlobalThis", - "suggest": "", - "rule": "\"globalThis\" is not supported (arkts-no-globalthis)" - }, - { - "line": 32, - "column": 12, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 56, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 57, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 58, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 58, - "column": 31, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 59, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 61, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 62, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 63, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 64, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 65, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 66, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 67, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 68, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 69, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 70, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 71, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 72, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 73, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 74, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 75, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 76, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 85, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 86, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 86, - "column": 32, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 87, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 87, - "column": 32, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 88, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 90, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 91, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 92, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 93, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 94, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 104, - "column": 32, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 105, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 105, - "column": 28, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 106, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 106, - "column": 32, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 63, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 108, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 108, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 109, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 109, - "column": 26, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 110, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 110, - "column": 47, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 111, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 111, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 112, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 112, - "column": 26, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 113, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 113, - "column": 35, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 114, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 114, - "column": 30, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 115, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 115, - "column": 40, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 116, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 116, - "column": 26, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 117, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 117, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - } - ] -} diff --git a/ets2panda/linter/test/literals_as_prop_names.ts.autofix.json b/ets2panda/linter/test/literals_as_prop_names.ts.autofix.json index fe67e4ebe8dd53dbe4ffd08e3a9b36e9e46a181e..6b8ad9e6126ba9b3478d89a1c506b899f4f1f175 100644 --- a/ets2panda/linter/test/literals_as_prop_names.ts.autofix.json +++ b/ets2panda/linter/test/literals_as_prop_names.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/literals_as_prop_names.ts.strict.json b/ets2panda/linter/test/literals_as_prop_names.ts.json similarity index 98% rename from ets2panda/linter/test/literals_as_prop_names.ts.strict.json rename to ets2panda/linter/test/literals_as_prop_names.ts.json index 96feeb09ac3172f8594eee753ee070378634485d..5fcfd95e40164e47d7946e2e10363e476018ac20 100644 --- a/ets2panda/linter/test/literals_as_prop_names.ts.strict.json +++ b/ets2panda/linter/test/literals_as_prop_names.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/literals_as_prop_names.ts.relax.json b/ets2panda/linter/test/literals_as_prop_names.ts.relax.json deleted file mode 100644 index d0e9e2159796ceb8a87f9a4a309557f668d7dc24..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/literals_as_prop_names.ts.relax.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 49, - "column": 9, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 59, - "column": 13, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 34, - "column": 11, - "problem": "StrictDiagnostic", - "suggest": "Property '_2' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property '_2' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 35, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'Two' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'Two' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 55, - "column": 12, - "problem": "StrictDiagnostic", - "suggest": "Property 'name' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'name' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 56, - "column": 12, - "problem": "StrictDiagnostic", - "suggest": "Property '_2' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property '_2' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/loop_over_set.ts.relax.json b/ets2panda/linter/test/loop_over_set.ts.json similarity index 95% rename from ets2panda/linter/test/loop_over_set.ts.relax.json rename to ets2panda/linter/test/loop_over_set.ts.json index c73b5837a34ae8f02b33328373aa64dcc5b4d3dd..69f96af1cd8b96f8ccde61d7fb1454086988843a 100644 --- a/ets2panda/linter/test/loop_over_set.ts.relax.json +++ b/ets2panda/linter/test/loop_over_set.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/loop_over_set.ts.strict.json b/ets2panda/linter/test/loop_over_set.ts.strict.json deleted file mode 100644 index c73b5837a34ae8f02b33328373aa64dcc5b4d3dd..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/loop_over_set.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 15, - "problem": "ForInStatement", - "suggest": "", - "rule": "\"for .. in\" is not supported (arkts-no-for-in)" - }, - { - "line": 18, - "column": 18, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 22, - "column": 33, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/mapped_types.ts.strict.json b/ets2panda/linter/test/mapped_types.ts.json similarity index 98% rename from ets2panda/linter/test/mapped_types.ts.strict.json rename to ets2panda/linter/test/mapped_types.ts.json index 6e9f6f0879144cbda34e05a34f285263e8423c88..b995161a19c8b60c20905a2769a850c1cbdc8e7f 100644 --- a/ets2panda/linter/test/mapped_types.ts.strict.json +++ b/ets2panda/linter/test/mapped_types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/mapped_types.ts.relax.json b/ets2panda/linter/test/mapped_types.ts.relax.json deleted file mode 100644 index 6e9f6f0879144cbda34e05a34f285263e8423c88..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/mapped_types.ts.relax.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 17, - "problem": "MappedType", - "suggest": "", - "rule": "Mapped type expression is not supported (arkts-no-mapped-types)" - }, - { - "line": 19, - "column": 16, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 26, - "column": 26, - "problem": "MappedType", - "suggest": "", - "rule": "Mapped type expression is not supported (arkts-no-mapped-types)" - }, - { - "line": 27, - "column": 29, - "problem": "IndexedAccessType", - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" - }, - { - "line": 29, - "column": 22, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 36, - "column": 26, - "problem": "MappedType", - "suggest": "", - "rule": "Mapped type expression is not supported (arkts-no-mapped-types)" - }, - { - "line": 37, - "column": 21, - "problem": "IndexedAccessType", - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" - }, - { - "line": 39, - "column": 22, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 47, - "column": 31, - "problem": "MappedType", - "suggest": "", - "rule": "Mapped type expression is not supported (arkts-no-mapped-types)" - }, - { - "line": 48, - "column": 26, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 49, - "column": 5, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 50, - "column": 15, - "problem": "IndexedAccessType", - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" - }, - { - "line": 60, - "column": 22, - "problem": "MappedType", - "suggest": "", - "rule": "Mapped type expression is not supported (arkts-no-mapped-types)" - }, - { - "line": 61, - "column": 22, - "problem": "ConditionalType", - "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" - }, - { - "line": 61, - "column": 22, - "problem": "IndexedAccessType", - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" - }, - { - "line": 61, - "column": 38, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 65, - "column": 15, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 66, - "column": 13, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 67, - "column": 12, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/modules.ts.autofix.json b/ets2panda/linter/test/modules.ts.autofix.json index a7456973f6dd610435b4ed3d3048f827130ae85c..9d942efdabcc01875d89ff78b7ae8b64b65cd856 100755 --- a/ets2panda/linter/test/modules.ts.autofix.json +++ b/ets2panda/linter/test/modules.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/modules.ts.strict.json b/ets2panda/linter/test/modules.ts.json similarity index 99% rename from ets2panda/linter/test/modules.ts.strict.json rename to ets2panda/linter/test/modules.ts.json index ad66b1bcd36ad0ea17f1b4533e10e50445705c40..bbfac53a61d581a02b2c45daa15b2864e7006579 100644 --- a/ets2panda/linter/test/modules.ts.strict.json +++ b/ets2panda/linter/test/modules.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/modules.ts.relax.json b/ets2panda/linter/test/modules.ts.relax.json deleted file mode 100644 index 20b99889edb011a1b84b38259078add97b84b02e..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/modules.ts.relax.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 3, - "problem": "WithStatement", - "suggest": "", - "rule": "\"with\" statement is not supported (arkts-no-with)" - }, - { - "line": 23, - "column": 11, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 43, - "column": 3, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)" - }, - { - "line": 44, - "column": 3, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)" - }, - { - "line": 64, - "column": 11, - "problem": "NamespaceAsObject", - "suggest": "", - "rule": "Namespaces cannot be used as objects (arkts-no-ns-as-obj)" - }, - { - "line": 67, - "column": 15, - "problem": "NamespaceAsObject", - "suggest": "", - "rule": "Namespaces cannot be used as objects (arkts-no-ns-as-obj)" - }, - { - "line": 70, - "column": 18, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 73, - "column": 6, - "problem": "NamespaceAsObject", - "suggest": "", - "rule": "Namespaces cannot be used as objects (arkts-no-ns-as-obj)" - }, - { - "line": 75, - "column": 20, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 78, - "column": 9, - "problem": "NamespaceAsObject", - "suggest": "", - "rule": "Namespaces cannot be used as objects (arkts-no-ns-as-obj)" - }, - { - "line": 80, - "column": 1, - "problem": "ImportAfterStatement", - "suggest": "", - "rule": "\"import\" statements after other statements are not allowed (arkts-no-misplaced-imports)" - }, - { - "line": 92, - "column": 1, - "problem": "ImportAfterStatement", - "suggest": "", - "rule": "\"import\" statements after other statements are not allowed (arkts-no-misplaced-imports)" - }, - { - "line": 93, - "column": 1, - "problem": "ImportAfterStatement", - "suggest": "", - "rule": "\"import\" statements after other statements are not allowed (arkts-no-misplaced-imports)" - }, - { - "line": 94, - "column": 1, - "problem": "ImportAfterStatement", - "suggest": "", - "rule": "\"import\" statements after other statements are not allowed (arkts-no-misplaced-imports)" - }, - { - "line": 106, - "column": 1, - "problem": "ExportAssignment", - "suggest": "", - "rule": "\"export = ...\" assignment is not supported (arkts-no-export-assignment)" - }, - { - "line": 108, - "column": 1, - "problem": "ImportAssignment", - "suggest": "", - "rule": "\"require\" and \"import\" assignment are not supported (arkts-no-require)" - }, - { - "line": 109, - "column": 1, - "problem": "ImportAssignment", - "suggest": "", - "rule": "\"require\" and \"import\" assignment are not supported (arkts-no-require)" - }, - { - "line": 111, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 111, - "column": 5, - "problem": "ImportAssignment", - "suggest": "", - "rule": "\"require\" and \"import\" assignment are not supported (arkts-no-require)" - }, - { - "line": 112, - "column": 7, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 112, - "column": 7, - "problem": "ImportAssignment", - "suggest": "", - "rule": "\"require\" and \"import\" assignment are not supported (arkts-no-require)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/namespace_export_assignment.ts.autofix.json b/ets2panda/linter/test/namespace_export_assignment.ts.autofix.json deleted file mode 100644 index 18ac144f5d3d23452ecc2c434dc236ece2a7b633..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/namespace_export_assignment.ts.autofix.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/namespace_export_assignment.ts.autofix.skip b/ets2panda/linter/test/namespace_export_assignment.ts.autofix.skip new file mode 100644 index 0000000000000000000000000000000000000000..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f --- /dev/null +++ b/ets2panda/linter/test/namespace_export_assignment.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/namespace_export_assignment.ts.json b/ets2panda/linter/test/namespace_export_assignment.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..ad85bf6b8411598cd234172ea0b9b87380c475f3 --- /dev/null +++ b/ets2panda/linter/test/namespace_export_assignment.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test/namespace_export_assignment.ts.relax.json b/ets2panda/linter/test/namespace_export_assignment.ts.relax.json deleted file mode 100644 index 18ac144f5d3d23452ecc2c434dc236ece2a7b633..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/namespace_export_assignment.ts.relax.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/namespace_export_assignment.ts.strict.json b/ets2panda/linter/test/namespace_export_assignment.ts.strict.json deleted file mode 100644 index 18ac144f5d3d23452ecc2c434dc236ece2a7b633..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/namespace_export_assignment.ts.strict.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/new_target.ts.strict.json b/ets2panda/linter/test/new_target.ts.json similarity index 94% rename from ets2panda/linter/test/new_target.ts.strict.json rename to ets2panda/linter/test/new_target.ts.json index 0b83a11983237ced2f41aa64eaaeb370019ee51f..61118654d837c190bbf0d1f73bda9d6f9845e1e4 100644 --- a/ets2panda/linter/test/new_target.ts.strict.json +++ b/ets2panda/linter/test/new_target.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/new_target.ts.relax.json b/ets2panda/linter/test/new_target.ts.relax.json deleted file mode 100644 index 0b83a11983237ced2f41aa64eaaeb370019ee51f..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/new_target.ts.relax.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 12, - "problem": "LimitedStdLibApi" - }, - { - "line": 19, - "column": 44, - "problem": "Prototype" - }, - { - "line": 19, - "column": 33, - "problem": "NewTarget" - }, - { - "line": 24, - "column": 7, - "problem": "NewTarget" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/non_initializable_prop_decorators.ts.relax.json b/ets2panda/linter/test/non_initializable_prop_decorators.ts.json similarity index 98% rename from ets2panda/linter/test/non_initializable_prop_decorators.ts.relax.json rename to ets2panda/linter/test/non_initializable_prop_decorators.ts.json index 3290a48d742204d9a15bbc8ecf4559440d013248..efe8fd333fecdb55ee92088b4572c003c8ba5b1d 100644 --- a/ets2panda/linter/test/non_initializable_prop_decorators.ts.relax.json +++ b/ets2panda/linter/test/non_initializable_prop_decorators.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/non_initializable_prop_decorators.ts.strict.json b/ets2panda/linter/test/non_initializable_prop_decorators.ts.strict.json deleted file mode 100644 index 3290a48d742204d9a15bbc8ecf4559440d013248..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/non_initializable_prop_decorators.ts.strict.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 31, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 16, - "column": 49, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 17, - "column": 30, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 24, - "column": 36, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 39, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 55, - "column": 7, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 57, - "column": 3, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 43, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'pr' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'pr' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 46, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'pr2' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'pr2' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 53, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'f2' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'f2' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 70, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'controller' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'controller' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/null_check_calls.ts.strict.json b/ets2panda/linter/test/null_check_calls.ts.json similarity index 98% rename from ets2panda/linter/test/null_check_calls.ts.strict.json rename to ets2panda/linter/test/null_check_calls.ts.json index 6ae1263ea8889c0434cf633704ca2787dddc5c9f..a4723127c4d9e883478d70e52939cc8615fd1761 100644 --- a/ets2panda/linter/test/null_check_calls.ts.strict.json +++ b/ets2panda/linter/test/null_check_calls.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/null_check_calls.ts.relax.json b/ets2panda/linter/test/null_check_calls.ts.relax.json deleted file mode 100644 index dda25acbfec4d84cec0fc79719420f95ed456b73..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/null_check_calls.ts.relax.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 37, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'number[]'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'number[]'." - }, - { - "line": 42, - "column": 20, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'null' is not assignable to parameter of type 'number'.", - "rule": "Argument of type 'null' is not assignable to parameter of type 'number'." - }, - { - "line": 43, - "column": 42, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'number | null' is not assignable to parameter of type 'number'.\n Type 'null' is not assignable to type 'number'.", - "rule": "Argument of type 'number | null' is not assignable to parameter of type 'number'.\n Type 'null' is not assignable to type 'number'." - }, - { - "line": 47, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'number | null' is not assignable to parameter of type 'number'.\n Type 'null' is not assignable to type 'number'.", - "rule": "Argument of type 'number | null' is not assignable to parameter of type 'number'.\n Type 'null' is not assignable to type 'number'." - }, - { - "line": 52, - "column": 12, - "problem": "StrictDiagnostic", - "suggest": "Type 'null' is not assignable to type 'Object'.", - "rule": "Type 'null' is not assignable to type 'Object'." - }, - { - "line": 56, - "column": 17, - "problem": "StrictDiagnostic", - "suggest": "Type 'null' is not assignable to type 'Object'.", - "rule": "Type 'null' is not assignable to type 'Object'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals.ts.strict.json b/ets2panda/linter/test/object_literals.ts.json similarity index 99% rename from ets2panda/linter/test/object_literals.ts.strict.json rename to ets2panda/linter/test/object_literals.ts.json index 88c80c5016b67fddcda932fd7bd57d2f0122813e..33b86ea8a527e65ecc9e0ec51c02cc5b74aa4b55 100644 --- a/ets2panda/linter/test/object_literals.ts.strict.json +++ b/ets2panda/linter/test/object_literals.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/object_literals.ts.relax.json b/ets2panda/linter/test/object_literals.ts.relax.json deleted file mode 100644 index 04a06d0ad55c4ada84d9328b8e78bcef13eea43e..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_literals.ts.relax.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 27, - "column": 6, - "problem": "ObjectTypeLiteral" - }, - { - "line": 28, - "column": 6, - "problem": "AnyType" - }, - { - "line": 35, - "column": 12, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 36, - "column": 11, - "problem": "AnyType" - }, - { - "line": 37, - "column": 11, - "problem": "ObjectTypeLiteral" - }, - { - "line": 37, - "column": 38, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 40, - "column": 16, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 42, - "column": 8, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 49, - "column": 8, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 51, - "column": 8, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 54, - "column": 8, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 56, - "column": 8, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 64, - "column": 20, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 67, - "column": 20, - "problem": "AnyType" - }, - { - "line": 70, - "column": 20, - "problem": "ObjectTypeLiteral" - }, - { - "line": 70, - "column": 47, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 81, - "column": 7, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 83, - "column": 8, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 90, - "column": 12, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 92, - "column": 20, - "problem": "AnyType" - }, - { - "line": 95, - "column": 20, - "problem": "ObjectTypeLiteral" - }, - { - "line": 96, - "column": 12, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 109, - "column": 26, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 109, - "column": 46, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 110, - "column": 13, - "problem": "AnyType" - }, - { - "line": 111, - "column": 13, - "problem": "ObjectTypeLiteral" - }, - { - "line": 112, - "column": 7, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 113, - "column": 7, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 119, - "column": 16, - "problem": "ArrayLiteralNoContextType" - }, - { - "line": 120, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 121, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 123, - "column": 15, - "problem": "AnyType" - }, - { - "line": 127, - "column": 15, - "problem": "ObjectTypeLiteral" - }, - { - "line": 127, - "column": 44, - "problem": "ArrayLiteralNoContextType" - }, - { - "line": 128, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 129, - "column": 5, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 22, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 23, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 27, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 29, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 30, - "column": 3, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals2.ts.autofix.json b/ets2panda/linter/test/object_literals2.ts.autofix.json deleted file mode 100644 index 80427f5ac4c7557664640b6ebbd5bf2dfc879a37..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_literals2.ts.autofix.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 18, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 20, - "column": 11, - "problem": "ObjectTypeLiteral", - "autofixable": false, - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 20, - "column": 16, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 22, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 32, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 42, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 86, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 96, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 106, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 118, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 128, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 138, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 150, - "column": 12, - "problem": "ObjectTypeLiteral", - "autofixable": false, - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 157, - "column": 22, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 167, - "column": 12, - "problem": "ObjectTypeLiteral", - "autofixable": false, - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 174, - "column": 22, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 184, - "column": 12, - "problem": "ObjectTypeLiteral", - "autofixable": false, - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 193, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 205, - "column": 39, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 215, - "column": 39, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 225, - "column": 58, - "problem": "ObjectLiteralNoContextType", - "autofixable": false, - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals2.ts.autofix.skip b/ets2panda/linter/test/object_literals2.ts.autofix.skip new file mode 100644 index 0000000000000000000000000000000000000000..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f --- /dev/null +++ b/ets2panda/linter/test/object_literals2.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals2.ts.strict.json b/ets2panda/linter/test/object_literals2.ts.json similarity index 99% rename from ets2panda/linter/test/object_literals2.ts.strict.json rename to ets2panda/linter/test/object_literals2.ts.json index ac4768cb7ad11b3a90c09c49bdc1821236542fa9..a3fd6c595acbbdffd581f64435e206b9117e95d9 100644 --- a/ets2panda/linter/test/object_literals2.ts.strict.json +++ b/ets2panda/linter/test/object_literals2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/object_literals2.ts.relax.json b/ets2panda/linter/test/object_literals2.ts.relax.json deleted file mode 100644 index ac4768cb7ad11b3a90c09c49bdc1821236542fa9..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_literals2.ts.relax.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 18, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 20, - "column": 11, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 20, - "column": 16, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 22, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 32, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 42, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 86, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 96, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 106, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 118, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 128, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 138, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 150, - "column": 12, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 157, - "column": 22, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 167, - "column": 12, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 174, - "column": 22, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 184, - "column": 12, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 193, - "column": 23, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 205, - "column": 39, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 215, - "column": 39, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 225, - "column": 58, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals3.ts.autofix.json b/ets2panda/linter/test/object_literals3.ts.autofix.json deleted file mode 100644 index b06227021f092f20110cdafb2a6d660605c2ff96..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_literals3.ts.autofix.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals3.ts.autofix.skip b/ets2panda/linter/test/object_literals3.ts.autofix.skip new file mode 100644 index 0000000000000000000000000000000000000000..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f --- /dev/null +++ b/ets2panda/linter/test/object_literals3.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals3.ts.json b/ets2panda/linter/test/object_literals3.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..e8cff6c256f0ced150a687d40e9cc69ee4c2792b --- /dev/null +++ b/ets2panda/linter/test/object_literals3.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals3.ts.relax.json b/ets2panda/linter/test/object_literals3.ts.relax.json deleted file mode 100644 index b06227021f092f20110cdafb2a6d660605c2ff96..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_literals3.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals3.ts.strict.json b/ets2panda/linter/test/object_literals3.ts.strict.json deleted file mode 100644 index b06227021f092f20110cdafb2a6d660605c2ff96..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_literals3.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_2.ts.strict.json b/ets2panda/linter/test/object_literals_2.ts.json similarity index 97% rename from ets2panda/linter/test/object_literals_2.ts.strict.json rename to ets2panda/linter/test/object_literals_2.ts.json index 18cb6f505eb2ac6c518f38dc1d70bba537547c2e..0adbdf7d4f86dd70356fdf84457a29cc5f950586 100644 --- a/ets2panda/linter/test/object_literals_2.ts.strict.json +++ b/ets2panda/linter/test/object_literals_2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/object_literals_2.ts.relax.json b/ets2panda/linter/test/object_literals_2.ts.relax.json deleted file mode 100644 index 18cb6f505eb2ac6c518f38dc1d70bba537547c2e..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_literals_2.ts.relax.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 11, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 72, - "column": 14, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 87, - "column": 14, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 91, - "column": 12, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 102, - "column": 14, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 122, - "column": 18, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 123, - "column": 18, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 144, - "column": 12, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 283, - "column": 19, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 285, - "column": 19, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 187, - "column": 5, - "problem": "StrictDiagnostic" - }, - { - "line": 195, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 196, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 205, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 206, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 224, - "column": 5, - "problem": "StrictDiagnostic" - }, - { - "line": 225, - "column": 5, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface.ts.autofix.json b/ets2panda/linter/test/object_literals_iface.ts.autofix.json deleted file mode 100644 index a53e63acbe9b3d1ee2ac7a9f686970dd12717112..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_literals_iface.ts.autofix.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 24, - "column": 30, - "problem": "ObjectLiteralNoContextType", - "autofixable": false - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface.ts.autofix.skip b/ets2panda/linter/test/object_literals_iface.ts.autofix.skip new file mode 100644 index 0000000000000000000000000000000000000000..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f --- /dev/null +++ b/ets2panda/linter/test/object_literals_iface.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface.ts.relax.json b/ets2panda/linter/test/object_literals_iface.ts.json similarity index 93% rename from ets2panda/linter/test/object_literals_iface.ts.relax.json rename to ets2panda/linter/test/object_literals_iface.ts.json index 83b487cb17cf87aa10cf966f65fcde83a9939320..005fee18e3f94c04d640f71160449e0380669ee0 100644 --- a/ets2panda/linter/test/object_literals_iface.ts.relax.json +++ b/ets2panda/linter/test/object_literals_iface.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/object_literals_iface.ts.strict.json b/ets2panda/linter/test/object_literals_iface.ts.strict.json deleted file mode 100644 index 83b487cb17cf87aa10cf966f65fcde83a9939320..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_literals_iface.ts.strict.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 24, - "column": 30, - "problem": "ObjectLiteralNoContextType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface_interop.ts.args.json b/ets2panda/linter/test/object_literals_iface_interop.ts.args.json index 0e197c0337621a0b9fd20923f2e1c2e96ecad053..3284cc66374dec4ca6a92131c9a3b85f7b6b7bf9 100644 --- a/ets2panda/linter/test/object_literals_iface_interop.ts.args.json +++ b/ets2panda/linter/test/object_literals_iface_interop.ts.args.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/object_literals_iface_interop.ts.autofix.json b/ets2panda/linter/test/object_literals_iface_interop.ts.autofix.json deleted file mode 100644 index e7d2d6779bbeb56cae88903ecb7da87087831260..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_literals_iface_interop.ts.autofix.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface_interop.ts.autofix.skip b/ets2panda/linter/test/object_literals_iface_interop.ts.autofix.skip new file mode 100644 index 0000000000000000000000000000000000000000..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f --- /dev/null +++ b/ets2panda/linter/test/object_literals_iface_interop.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface_interop.ts.json b/ets2panda/linter/test/object_literals_iface_interop.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..ad85bf6b8411598cd234172ea0b9b87380c475f3 --- /dev/null +++ b/ets2panda/linter/test/object_literals_iface_interop.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface_interop.ts.relax.json b/ets2panda/linter/test/object_literals_iface_interop.ts.relax.json deleted file mode 100644 index e7d2d6779bbeb56cae88903ecb7da87087831260..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_literals_iface_interop.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_iface_interop.ts.strict.json b/ets2panda/linter/test/object_literals_iface_interop.ts.strict.json deleted file mode 100644 index e7d2d6779bbeb56cae88903ecb7da87087831260..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_literals_iface_interop.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_prop_func_type.ts.autofix.json b/ets2panda/linter/test/object_literals_prop_func_type.ts.autofix.json deleted file mode 100644 index 7699bc663e8770cf286ea87d869a17f18e4307e5..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_literals_prop_func_type.ts.autofix.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 3, - "problem": "CallSignature", - "autofixable": false - }, - { - "line": 23, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false - }, - { - "line": 24, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false - }, - { - "line": 25, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false - }, - { - "line": 26, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_prop_func_type.ts.autofix.skip b/ets2panda/linter/test/object_literals_prop_func_type.ts.autofix.skip new file mode 100644 index 0000000000000000000000000000000000000000..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f --- /dev/null +++ b/ets2panda/linter/test/object_literals_prop_func_type.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/object_literals_prop_func_type.ts.relax.json b/ets2panda/linter/test/object_literals_prop_func_type.ts.json similarity index 95% rename from ets2panda/linter/test/object_literals_prop_func_type.ts.relax.json rename to ets2panda/linter/test/object_literals_prop_func_type.ts.json index ba76794ce7651fcc89054886e8f0040d327dfd27..d74c18680d6774344346d0d8ddcdceb1af911b13 100644 --- a/ets2panda/linter/test/object_literals_prop_func_type.ts.relax.json +++ b/ets2panda/linter/test/object_literals_prop_func_type.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/object_literals_prop_func_type.ts.strict.json b/ets2panda/linter/test/object_literals_prop_func_type.ts.strict.json deleted file mode 100644 index ba76794ce7651fcc89054886e8f0040d327dfd27..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_literals_prop_func_type.ts.strict.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 3, - "problem": "CallSignature" - }, - { - "line": 23, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 24, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 25, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 26, - "column": 3, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/object_spread.ts.relax.json b/ets2panda/linter/test/object_spread.ts.json similarity index 94% rename from ets2panda/linter/test/object_spread.ts.relax.json rename to ets2panda/linter/test/object_spread.ts.json index a39dce8972a02f4ac10f3b30c4be777353f8b42f..4ce16c7097d77a16906bdab0123116e7070f1a9a 100644 --- a/ets2panda/linter/test/object_spread.ts.relax.json +++ b/ets2panda/linter/test/object_spread.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/object_spread.ts.strict.json b/ets2panda/linter/test/object_spread.ts.strict.json deleted file mode 100644 index a39dce8972a02f4ac10f3b30c4be777353f8b42f..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/object_spread.ts.strict.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 14, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 20, - "column": 14, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 20, - "column": 16, - "problem": "SpreadOperator" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/optional_library_types.ts.strict.json b/ets2panda/linter/test/optional_library_types.ts.json similarity index 98% rename from ets2panda/linter/test/optional_library_types.ts.strict.json rename to ets2panda/linter/test/optional_library_types.ts.json index 28244d68d46bb0ca41704673618a2bcfe9a2ab80..9d4b1921e34751de3c3f5f85f4aa003ae8a2375d 100644 --- a/ets2panda/linter/test/optional_library_types.ts.strict.json +++ b/ets2panda/linter/test/optional_library_types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/optional_library_types.ts.relax.json b/ets2panda/linter/test/optional_library_types.ts.relax.json deleted file mode 100644 index 0e10ce75483d7e7a742170e05aade5201f25dd5b..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/optional_library_types.ts.relax.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 29, - "column": 26, - "problem": "AnyType" - }, - { - "line": 37, - "column": 19, - "problem": "AnyType" - }, - { - "line": 40, - "column": 21, - "problem": "AnyType" - }, - { - "line": 43, - "column": 21, - "problem": "AnyType" - }, - { - "line": 46, - "column": 20, - "problem": "AnyType" - }, - { - "line": 51, - "column": 7, - "problem": "AnyType" - }, - { - "line": 57, - "column": 9, - "problem": "AnyType" - }, - { - "line": 63, - "column": 9, - "problem": "AnyType" - }, - { - "line": 69, - "column": 8, - "problem": "AnyType" - }, - { - "line": 102, - "column": 8, - "problem": "AnyType" - }, - { - "line": 103, - "column": 8, - "problem": "AnyType" - }, - { - "line": 104, - "column": 8, - "problem": "AnyType" - }, - { - "line": 116, - "column": 8, - "problem": "AnyType" - }, - { - "line": 117, - "column": 8, - "problem": "AnyType" - }, - { - "line": 118, - "column": 8, - "problem": "AnyType" - }, - { - "line": 130, - "column": 8, - "problem": "AnyType" - }, - { - "line": 131, - "column": 8, - "problem": "AnyType" - }, - { - "line": 132, - "column": 8, - "problem": "AnyType" - }, - { - "line": 144, - "column": 11, - "problem": "AnyType" - }, - { - "line": 145, - "column": 11, - "problem": "AnyType" - }, - { - "line": 146, - "column": 11, - "problem": "AnyType" - }, - { - "line": 158, - "column": 11, - "problem": "AnyType" - }, - { - "line": 159, - "column": 11, - "problem": "AnyType" - }, - { - "line": 160, - "column": 11, - "problem": "AnyType" - }, - { - "line": 172, - "column": 11, - "problem": "AnyType" - }, - { - "line": 173, - "column": 11, - "problem": "AnyType" - }, - { - "line": 174, - "column": 11, - "problem": "AnyType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/parameter_properties.ts b/ets2panda/linter/test/parameter_properties.ts index 2a7a10b3fe339ce7938ef90cb41e69fd99b5cd35..fba40cf53193a78cd860b43a2d33fb549d8f995e 100644 --- a/ets2panda/linter/test/parameter_properties.ts +++ b/ets2panda/linter/test/parameter_properties.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -class Params { +class A { constructor( public readonly x: number, protected y: number, @@ -25,11 +25,24 @@ class Params { } } -class DerivedParams extends Params { - bar(): void { - console.log(this.x + this.y); +const a = new A(1, 2, 3); +console.log(a.x); + +class B { + public f: number = 10; + + constructor(q: number, public w = 'default', e: boolean, private readonly r: number[] = [1, 2, 3]) { + console.log(q, this.w, e, this.r, this.f); } } -const a = new Params(1, 2, 3); -console.log(a.x); +const b = new B(1, '2', true, []); +console.log(b.w); + +class C { + constructor(public a: any) {} // not fixable +} + +class D { + constructor(public a: number, private b: {x: string}) {} // not fixable +} \ No newline at end of file diff --git a/ets2panda/linter/test/conditional_types.ts.autofix.json b/ets2panda/linter/test/parameter_properties.ts.autofix.json old mode 100755 new mode 100644 similarity index 33% rename from ets2panda/linter/test/conditional_types.ts.autofix.json rename to ets2panda/linter/test/parameter_properties.ts.autofix.json index 9e4d4e6b9f42add4b7120147e3129506a4aafcaf..4085d82e2bb857c38b503f7c16949a9d3e845cdc --- a/ets2panda/linter/test/conditional_types.ts.autofix.json +++ b/ets2panda/linter/test/parameter_properties.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -15,108 +15,101 @@ ], "nodes": [ { - "line": 19, - "column": 1, - "problem": "InterfaceMerging", - "autofixable": false, - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 22, - "column": 17, - "problem": "ConditionalType", - "autofixable": false, + "line": 18, + "column": 5, + "problem": "ParameterProperties", + "autofixable": true, + "autofix": [ + { + "start": 622, + "end": 622, + "replacementText": "public readonly x: number;\nprotected y: number;\nprivate z: number;\n" + }, + { + "start": 639, + "end": 664, + "replacementText": "x: number" + }, + { + "start": 670, + "end": 689, + "replacementText": "y: number" + }, + { + "start": 695, + "end": 712, + "replacementText": "z: number" + }, + { + "start": 717, + "end": 719, + "replacementText": "{\n this.x = x;\n this.y = y;\n this.z = z;\n}" + } + ], "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" }, { - "line": 23, - "column": 17, - "problem": "ConditionalType", - "autofixable": false, + "line": 34, + "column": 15, + "problem": "ParameterProperties", + "autofixable": true, + "autofix": [ + { + "start": 870, + "end": 870, + "replacementText": "public w: string;\nprivate readonly r: number[];\n" + }, + { + "start": 893, + "end": 913, + "replacementText": "w = 'default'" + }, + { + "start": 927, + "end": 967, + "replacementText": "r: number[] = [1, 2, 3]" + }, + { + "start": 969, + "end": 1021, + "replacementText": "{\n this.w = w;\n this.r = r;\n console.log(q, this.w, e, this.r, this.f);\n}" + } + ], "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" }, { - "line": 31, - "column": 44, - "problem": "ConditionalType", + "line": 43, + "column": 15, + "problem": "ParameterProperties", "autofixable": false, "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" }, { - "line": 35, - "column": 3, - "problem": "ThrowStatement", + "line": 43, + "column": 25, + "problem": "AnyType", "autofixable": false, "suggest": "", - "rule": "\"throw\" statements cannot accept values of arbitrary types (arkts-limited-throw)" + "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" }, { - "line": 41, - "column": 21, - "problem": "ConditionalType", + "line": 47, + "column": 15, + "problem": "ParameterProperties", "autofixable": false, "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" }, { - "line": 41, - "column": 31, + "line": 47, + "column": 44, "problem": "ObjectTypeLiteral", "autofixable": false, "suggest": "", "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 41, - "column": 42, - "problem": "UnknownType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 41, - "column": 54, - "problem": "IndexedAccessType", - "autofixable": false, - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" - }, - { - "line": 45, - "column": 1, - "problem": "InterfaceMerging", - "autofixable": false, - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 51, - "column": 19, - "problem": "ConditionalType", - "autofixable": false, - "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" - }, - { - "line": 51, - "column": 29, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 51, - "column": 37, - "problem": "IndexedAccessType", - "autofixable": false, - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" } ] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule25.ts.strict.json b/ets2panda/linter/test/parameter_properties.ts.json similarity index 67% rename from ets2panda/linter/test_rules/rule25.ts.strict.json rename to ets2panda/linter/test/parameter_properties.ts.json index a54bc16dde75db86950f57250d5c86ff1b5beed8..60aa75dae4f0945080fc4c155a22b79c751c0abf 100644 --- a/ets2panda/linter/test_rules/rule25.ts.strict.json +++ b/ets2panda/linter/test/parameter_properties.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -16,31 +16,45 @@ "nodes": [ { "line": 18, - "column": 9, + "column": 5, "problem": "ParameterProperties", "suggest": "", "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" }, { - "line": 19, - "column": 9, + "line": 34, + "column": 15, "problem": "ParameterProperties", "suggest": "", "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" }, { - "line": 20, - "column": 9, + "line": 43, + "column": 15, "problem": "ParameterProperties", "suggest": "", "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" }, { - "line": 49, - "column": 17, + "line": 43, + "column": 25, + "problem": "AnyType", + "suggest": "", + "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" + }, + { + "line": 47, + "column": 15, "problem": "ParameterProperties", "suggest": "", "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" + }, + { + "line": 47, + "column": 44, + "problem": "ObjectTypeLiteral", + "suggest": "", + "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" } ] } \ No newline at end of file diff --git a/ets2panda/linter/test/parameter_properties.ts.relax.json b/ets2panda/linter/test/parameter_properties.ts.relax.json deleted file mode 100644 index e7d2d6779bbeb56cae88903ecb7da87087831260..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/parameter_properties.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/parameter_properties.ts.strict.json b/ets2panda/linter/test/parameter_properties.ts.strict.json deleted file mode 100644 index 6dd05ac8d07bc7a817b7d49e4bc19b193b3719f5..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/parameter_properties.ts.strict.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 5, - "problem": "ParameterProperties" - }, - { - "line": 19, - "column": 5, - "problem": "ParameterProperties" - }, - { - "line": 20, - "column": 5, - "problem": "ParameterProperties" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/partial_type.ts.autofix.json b/ets2panda/linter/test/partial_type.ts.autofix.json deleted file mode 100644 index 67eac61dfd9516da7e72c2525f517cd687ca2a27..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/partial_type.ts.autofix.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 21, - "column": 10, - "problem": "ObjectLiteralNoContextType", - "autofixable": false - }, - { - "line": 21, - "column": 12, - "problem": "SpreadOperator", - "autofixable": false - }, - { - "line": 21, - "column": 21, - "problem": "SpreadOperator", - "autofixable": false - }, - { - "line": 23, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "autofixable": false - }, - { - "line": 31, - "column": 20, - "problem": "UtilityType", - "autofixable": false - }, - { - "line": 32, - "column": 22, - "problem": "UtilityType", - "autofixable": false - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/partial_type.ts.autofix.skip b/ets2panda/linter/test/partial_type.ts.autofix.skip new file mode 100644 index 0000000000000000000000000000000000000000..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f --- /dev/null +++ b/ets2panda/linter/test/partial_type.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/partial_type.ts.relax.json b/ets2panda/linter/test/partial_type.ts.json similarity index 95% rename from ets2panda/linter/test/partial_type.ts.relax.json rename to ets2panda/linter/test/partial_type.ts.json index 013ae1a9781336adfce1e170e0c7975b4b287a6a..25da8b75bfe0f2a0826c21b67887b8d8bc8a9c65 100644 --- a/ets2panda/linter/test/partial_type.ts.relax.json +++ b/ets2panda/linter/test/partial_type.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/partial_type.ts.strict.json b/ets2panda/linter/test/partial_type.ts.strict.json deleted file mode 100644 index 013ae1a9781336adfce1e170e0c7975b4b287a6a..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/partial_type.ts.strict.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 21, - "column": 10, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 21, - "column": 12, - "problem": "SpreadOperator" - }, - { - "line": 21, - "column": 21, - "problem": "SpreadOperator" - }, - { - "line": 23, - "column": 15, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 31, - "column": 20, - "problem": "UtilityType" - }, - { - "line": 32, - "column": 22, - "problem": "UtilityType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/readonly_arr.ts b/ets2panda/linter/test/private_identifiers.ts similarity index 32% rename from ets2panda/linter/test/readonly_arr.ts rename to ets2panda/linter/test/private_identifiers.ts index b5bbb80dc5e15392814bd8fedd71bd20e238e920..5ed8b9f2d699560889d0a192efdf2ed75bff77f1 100644 --- a/ets2panda/linter/test/readonly_arr.ts +++ b/ets2panda/linter/test/private_identifiers.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,12 +13,63 @@ * limitations under the License. */ -class Person { - readonly name: string; // not count 'readonly' ! - age: number; +class C { + #p: number; + + p2: number; + #p2: string; // not fixable + + #q?: string; + #e!: string; + static #s = 0; + readonly #r = 20; + static readonly #sr = 0; + static readonly #srq?: string; + + #m(x: number): void {} + + m2(x: number): void {} + #m2(x: number): void {} // not fixable + + m3: boolean; + #m3(x: number): void {} // not fixable + + get #g1(): number { return 10; } + set #s1(x: number) { } + + static get #g2(): number { return 10; } + static set #s2(x: number) { } + + test() { + console.log(this.#p + this.#p2 + this.#q + this.#e + C.#s + this.#r + C.#sr + C.#srq); // '#p2' is not fixable + this.#m(10); + this.#m2(20); // not fixable + this.#m3(30); // not fixable + let x = this.#g1; + this.#s1 = x; + let y = C.#g2; + C.#s2 = y; + } } -function foo(arr: readonly string[]) { - arr.slice(); - arr.push('hello!'); +class D extends C { + #a: string; + #p: number; // not fixable + + #m(): string { return 'foo'; } // not fixable + + #bar(): string { return 'baz'; } + + test() { + console.log(this.#p + this.#a); // '#p' is not fixable + let x = this.#m(); // not fixable + let y = this.#bar(); + } } + +class E { + #a: number; + #b: string; // not fixable + + constructor(public b: number) {} +} \ No newline at end of file diff --git a/ets2panda/linter/test/private_identifiers.ts.autofix.json b/ets2panda/linter/test/private_identifiers.ts.autofix.json new file mode 100644 index 0000000000000000000000000000000000000000..44c2cd67121a66069b2f87adfc40d6cc989908e9 --- /dev/null +++ b/ets2panda/linter/test/private_identifiers.ts.autofix.json @@ -0,0 +1,507 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [ + { + "line": 19, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 20, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 31, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 32, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 34, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 35, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 17, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 20, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 22, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 23, + "column": 3, + "problem": "DefiniteAssignment", + "autofixable": false, + "suggest": "", + "rule": "Definite assignment assertions are not supported (arkts-no-definite-assignment)" + }, + { + "line": 23, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 24, + "column": 10, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 25, + "column": 12, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 26, + "column": 19, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 27, + "column": 19, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 29, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 32, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 35, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 37, + "column": 7, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 38, + "column": 7, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 40, + "column": 14, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 41, + "column": 14, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 22, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 32, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 43, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 53, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 60, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 70, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 77, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 85, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 45, + "column": 10, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 46, + "column": 10, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 47, + "column": 10, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 48, + "column": 18, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 49, + "column": 10, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 50, + "column": 15, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 51, + "column": 7, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 57, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 59, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 56, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 57, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 59, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 61, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 64, + "column": 22, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 64, + "column": 32, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 65, + "column": 18, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 66, + "column": 18, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 72, + "column": 3, + "problem": "DeclWithDuplicateName", + "autofixable": false, + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 71, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": true, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 72, + "column": 3, + "problem": "PrivateIdentifier", + "autofixable": false, + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 74, + "column": 15, + "problem": "ParameterProperties", + "autofixable": true, + "autofix": [ + { + "start": 1726, + "end": 1726, + "replacementText": "public b: number;\n" + }, + { + "start": 1738, + "end": 1754, + "replacementText": "b: number" + }, + { + "start": 1756, + "end": 1758, + "replacementText": "{\n this.b = b;\n}" + } + ], + "suggest": "", + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" + }, + { + "line": 17, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property '#p' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#p' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 19, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property 'p2' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property 'p2' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 20, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property '#p2' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#p2' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 34, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property 'm3' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property 'm3' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 56, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property '#a' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#a' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 57, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property '#p' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#p' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 71, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property '#a' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#a' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 72, + "column": 3, + "problem": "StrictDiagnostic", + "autofixable": false, + "suggest": "Property '#b' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#b' has no initializer and is not definitely assigned in the constructor." + } + ] +} \ No newline at end of file diff --git a/ets2panda/linter/test/private_identifiers.ts.json b/ets2panda/linter/test/private_identifiers.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..052df2f57408adb606370dd9248e56b24138549d --- /dev/null +++ b/ets2panda/linter/test/private_identifiers.ts.json @@ -0,0 +1,431 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [ + { + "line": 19, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 20, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 31, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 32, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 34, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 35, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 17, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 20, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 22, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 23, + "column": 3, + "problem": "DefiniteAssignment", + "suggest": "", + "rule": "Definite assignment assertions are not supported (arkts-no-definite-assignment)" + }, + { + "line": 23, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 24, + "column": 10, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 25, + "column": 12, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 26, + "column": 19, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 27, + "column": 19, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 29, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 32, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 35, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 37, + "column": 7, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 38, + "column": 7, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 40, + "column": 14, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 41, + "column": 14, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 22, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 32, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 43, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 53, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 60, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 70, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 77, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 44, + "column": 85, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 45, + "column": 10, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 46, + "column": 10, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 47, + "column": 10, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 48, + "column": 18, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 49, + "column": 10, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 50, + "column": 15, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 51, + "column": 7, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 57, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 59, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 56, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 57, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 59, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 61, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 64, + "column": 22, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 64, + "column": 32, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 65, + "column": 18, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 66, + "column": 18, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 72, + "column": 3, + "problem": "DeclWithDuplicateName", + "suggest": "", + "rule": "Use unique names for types and namespaces. (arkts-unique-names)" + }, + { + "line": 71, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 72, + "column": 3, + "problem": "PrivateIdentifier", + "suggest": "", + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" + }, + { + "line": 74, + "column": 15, + "problem": "ParameterProperties", + "suggest": "", + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" + }, + { + "line": 17, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property '#p' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#p' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 19, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property 'p2' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property 'p2' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 20, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property '#p2' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#p2' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 34, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property 'm3' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property 'm3' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 56, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property '#a' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#a' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 57, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property '#p' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#p' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 71, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property '#a' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#a' has no initializer and is not definitely assigned in the constructor." + }, + { + "line": 72, + "column": 3, + "problem": "StrictDiagnostic", + "suggest": "Property '#b' has no initializer and is not definitely assigned in the constructor.", + "rule": "Property '#b' has no initializer and is not definitely assigned in the constructor." + } + ] +} \ No newline at end of file diff --git a/ets2panda/linter/test/property_access_by_index.ts.autofix.json b/ets2panda/linter/test/property_access_by_index.ts.autofix.json index 8a928547655065fa02e35fd259a18de7556e7b0a..02aed772dc051ec62a75525b0f46126a24d4e535 100644 --- a/ets2panda/linter/test/property_access_by_index.ts.autofix.json +++ b/ets2panda/linter/test/property_access_by_index.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/property_access_by_index.ts.strict.json b/ets2panda/linter/test/property_access_by_index.ts.json similarity index 98% rename from ets2panda/linter/test/property_access_by_index.ts.strict.json rename to ets2panda/linter/test/property_access_by_index.ts.json index 0afff457f48e0802a36bc06eef8e5fefde828a12..6a486f9916322fdf4538f4871381f182492e7aa9 100644 --- a/ets2panda/linter/test/property_access_by_index.ts.strict.json +++ b/ets2panda/linter/test/property_access_by_index.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/property_access_by_index.ts.relax.json b/ets2panda/linter/test/property_access_by_index.ts.relax.json deleted file mode 100644 index b492ed7380feb4b306433cd940c731223e71b0ad..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/property_access_by_index.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 56, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 107, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 117, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/property_decl_on_function.ts.relax.json b/ets2panda/linter/test/property_decl_on_function.ts.json old mode 100755 new mode 100644 similarity index 95% rename from ets2panda/linter/test/property_decl_on_function.ts.relax.json rename to ets2panda/linter/test/property_decl_on_function.ts.json index 7cc12e9c497f6c2e5b50d73347a229d78f2b544d..c460825a9bc10a682e1000bb5e65664f1d4b99e3 --- a/ets2panda/linter/test/property_decl_on_function.ts.relax.json +++ b/ets2panda/linter/test/property_decl_on_function.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/property_decl_on_function.ts.strict.json b/ets2panda/linter/test/property_decl_on_function.ts.strict.json deleted file mode 100755 index 7cc12e9c497f6c2e5b50d73347a229d78f2b544d..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/property_decl_on_function.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 20, - "column": 1, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - }, - { - "line": 20, - "column": 1, - "problem": "PropertyDeclOnFunction", - "suggest": "", - "rule": "Declaring properties on functions is not supported (arkts-no-func-props)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/prototype_assignment.ts.autofix.json b/ets2panda/linter/test/prototype_assignment.ts.autofix.json deleted file mode 100755 index c1e3b5c631a1796b036aa3c90164158e70e21a2a..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/prototype_assignment.ts.autofix.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 26, - "column": 19, - "problem": "FunctionContainsThis", - "autofixable": false, - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 20, - "column": 20, - "problem": "FunctionExpression", - "autofixable": false, - "suggest": "", - "rule": "Use arrow functions instead of function expressions (arkts-no-func-expressions)" - }, - { - "line": 21, - "column": 5, - "problem": "FunctionContainsThis", - "autofixable": false, - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 20, - "column": 30, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 12, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 30, - "column": 12, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 30, - "column": 26, - "problem": "FunctionExpression", - "autofixable": false, - "suggest": "", - "rule": "Use arrow functions instead of function expressions (arkts-no-func-expressions)" - }, - { - "line": 31, - "column": 12, - "problem": "FunctionContainsThis", - "autofixable": false, - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 30, - "column": 36, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 34, - "column": 3, - "problem": "LocalFunction", - "autofixable": false, - "suggest": "", - "rule": "Nested functions are not supported (arkts-no-nested-funcs)" - }, - { - "line": 37, - "column": 7, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 38, - "column": 17, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 38, - "column": 7, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 39, - "column": 9, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 39, - "column": 25, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 42, - "column": 22, - "problem": "ClassExpression", - "autofixable": false, - "suggest": "", - "rule": "Class literals are not supported (arkts-no-class-literals)" - }, - { - "line": 45, - "column": 14, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 54, - "column": 5, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 55, - "column": 5, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 56, - "column": 20, - "problem": "Prototype", - "autofixable": false, - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 61, - "column": 5, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 64, - "column": 5, - "problem": "AnyType", - "autofixable": false, - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 43, - "column": 5, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Property 'p' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'p' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 50, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Property 'prototype' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'prototype' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 51, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false, - "suggest": "Property 'xy' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'xy' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/prototype_assignment.ts.autofix.skip b/ets2panda/linter/test/prototype_assignment.ts.autofix.skip new file mode 100644 index 0000000000000000000000000000000000000000..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f --- /dev/null +++ b/ets2panda/linter/test/prototype_assignment.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/prototype_assignment.ts.strict.json b/ets2panda/linter/test/prototype_assignment.ts.json similarity index 99% rename from ets2panda/linter/test/prototype_assignment.ts.strict.json rename to ets2panda/linter/test/prototype_assignment.ts.json index f1ebe772db7f34dbdfb39e3ff7cf91c80121ccde..1f0ef63098d83a836bbfee484647902596f080e3 100644 --- a/ets2panda/linter/test/prototype_assignment.ts.strict.json +++ b/ets2panda/linter/test/prototype_assignment.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/prototype_assignment.ts.relax.json b/ets2panda/linter/test/prototype_assignment.ts.relax.json deleted file mode 100644 index 79345f433f3e59b20e1a36a003d330eb58c5f4eb..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/prototype_assignment.ts.relax.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 26, - "column": 19, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 21, - "column": 5, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 20, - "column": 30, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 12, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 30, - "column": 12, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 31, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 30, - "column": 36, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 37, - "column": 7, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 38, - "column": 17, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 38, - "column": 7, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 39, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 39, - "column": 25, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 45, - "column": 14, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 54, - "column": 5, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 55, - "column": 5, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 56, - "column": 20, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 61, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 64, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 43, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Property 'p' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'p' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 50, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'prototype' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'prototype' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 51, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'xy' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'xy' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/readonly_arr.ts.autofix.json b/ets2panda/linter/test/readonly_arr.ts.autofix.json deleted file mode 100644 index 982cc7b6966d6abfb07137bf70365f353e0c3469..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/readonly_arr.ts.autofix.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 12, - "problem": "StrictDiagnostic", - "autofixable": false - }, - { - "line": 18, - "column": 3, - "problem": "StrictDiagnostic", - "autofixable": false - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/readonly_arr.ts.relax.json b/ets2panda/linter/test/readonly_arr.ts.relax.json deleted file mode 100644 index ac1284435817d0f67e436555207d30f3608aa8fd..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/readonly_arr.ts.relax.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 12, - "problem": "StrictDiagnostic" - }, - { - "line": 18, - "column": 3, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/readonly_arr.ts.strict.json b/ets2panda/linter/test/readonly_arr.ts.strict.json deleted file mode 100644 index ac1284435817d0f67e436555207d30f3608aa8fd..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/readonly_arr.ts.strict.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 12, - "problem": "StrictDiagnostic" - }, - { - "line": 18, - "column": 3, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/record_type.ts.autofix.json b/ets2panda/linter/test/record_type.ts.autofix.json deleted file mode 100644 index f1c5404ffea477a595c654539625e865d236ef17..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/record_type.ts.autofix.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 96, - "column": 7, - "problem": "ObjectLiteralNoContextType", - "autofixable": false - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/record_type.ts.autofix.skip b/ets2panda/linter/test/record_type.ts.autofix.skip new file mode 100644 index 0000000000000000000000000000000000000000..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f --- /dev/null +++ b/ets2panda/linter/test/record_type.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/record_type.ts.strict.json b/ets2panda/linter/test/record_type.ts.json similarity index 93% rename from ets2panda/linter/test/record_type.ts.strict.json rename to ets2panda/linter/test/record_type.ts.json index 3a0cdaf108e959b5e1247b9ec4edaaae73e820d5..dd327b9c90a59e43e56b1090024e40ccb5fcb40c 100644 --- a/ets2panda/linter/test/record_type.ts.strict.json +++ b/ets2panda/linter/test/record_type.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/record_type.ts.relax.json b/ets2panda/linter/test/record_type.ts.relax.json deleted file mode 100644 index 3a0cdaf108e959b5e1247b9ec4edaaae73e820d5..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/record_type.ts.relax.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 96, - "column": 7, - "problem": "ObjectLiteralNoContextType" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/recursive_types.ts.json b/ets2panda/linter/test/recursive_types.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..e8cff6c256f0ced150a687d40e9cc69ee4c2792b --- /dev/null +++ b/ets2panda/linter/test/recursive_types.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test/recursive_types.ts.relax.json b/ets2panda/linter/test/recursive_types.ts.relax.json deleted file mode 100644 index b06227021f092f20110cdafb2a6d660605c2ff96..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/recursive_types.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/recursive_types.ts.strict.json b/ets2panda/linter/test/recursive_types.ts.strict.json deleted file mode 100644 index b06227021f092f20110cdafb2a6d660605c2ff96..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/recursive_types.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test/strict_mode_error.ts.relax.json b/ets2panda/linter/test/strict_mode_error.ts.json similarity index 94% rename from ets2panda/linter/test/strict_mode_error.ts.relax.json rename to ets2panda/linter/test/strict_mode_error.ts.json index aa83c9ca332b681ea1af4aa13f3bd05dffef05f3..d69cb839dfd5ad890a5045514948bd072f59ff84 100644 --- a/ets2panda/linter/test/strict_mode_error.ts.relax.json +++ b/ets2panda/linter/test/strict_mode_error.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/strict_mode_error.ts.strict.json b/ets2panda/linter/test/strict_mode_error.ts.strict.json deleted file mode 100644 index aa83c9ca332b681ea1af4aa13f3bd05dffef05f3..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/strict_mode_error.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Type 'number | undefined' is not assignable to type 'number'.\n Type 'undefined' is not assignable to type 'number'.", - "rule": "Type 'number | undefined' is not assignable to type 'number'.\n Type 'undefined' is not assignable to type 'number'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/structural_identity.ts.relax.json b/ets2panda/linter/test/structural_identity.ts.json old mode 100755 new mode 100644 similarity index 99% rename from ets2panda/linter/test/structural_identity.ts.relax.json rename to ets2panda/linter/test/structural_identity.ts.json index 9217ab3185017581db863fe8525f5ced0d16e43d..a662a8d73a4c6d78a64d0c0efb23b0f3a20ad510 --- a/ets2panda/linter/test/structural_identity.ts.relax.json +++ b/ets2panda/linter/test/structural_identity.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/structural_identity.ts.strict.json b/ets2panda/linter/test/structural_identity.ts.strict.json deleted file mode 100755 index 9217ab3185017581db863fe8525f5ced0d16e43d..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/structural_identity.ts.strict.json +++ /dev/null @@ -1,312 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 44, - "column": 5, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 44, - "column": 19, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 47, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 49, - "column": 5, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 52, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 106, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 107, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 109, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 110, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 113, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 136, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 137, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 138, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 139, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 140, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 141, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 142, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 143, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 144, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 145, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 146, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 147, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 173, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 174, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 175, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 176, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 177, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 178, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 179, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 180, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 181, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 182, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 183, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 184, - "column": 4, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 339, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 342, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 343, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 346, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 349, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 354, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 355, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 358, - "column": 3, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/symbol_api.ts.relax.json b/ets2panda/linter/test/symbol_api.ts.json similarity index 98% rename from ets2panda/linter/test/symbol_api.ts.relax.json rename to ets2panda/linter/test/symbol_api.ts.json index e62c8c7b772eb72b7c1c2e435f564313f0be758a..5a731b3c8763e2d09bdf019799b53e5a38aae234 100644 --- a/ets2panda/linter/test/symbol_api.ts.relax.json +++ b/ets2panda/linter/test/symbol_api.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/symbol_api.ts.strict.json b/ets2panda/linter/test/symbol_api.ts.strict.json deleted file mode 100644 index e62c8c7b772eb72b7c1c2e435f564313f0be758a..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/symbol_api.ts.strict.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 17, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 18, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 20, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 21, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 22, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 23, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 24, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 25, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 26, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 27, - "column": 16, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 29, - "column": 9, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 31, - "column": 12, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 33, - "column": 17, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 35, - "column": 20, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 38, - "column": 44, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 39, - "column": 22, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 42, - "column": 14, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 46, - "column": 14, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 50, - "column": 12, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/template_literals.ts.relax.json b/ets2panda/linter/test/template_literals.ts.json similarity index 94% rename from ets2panda/linter/test/template_literals.ts.relax.json rename to ets2panda/linter/test/template_literals.ts.json index 323ad1905964436ad1e7faa49ce8f4c5da42bdd2..613c1340d009dd2504568de6684b8822e052f6c6 100644 --- a/ets2panda/linter/test/template_literals.ts.relax.json +++ b/ets2panda/linter/test/template_literals.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/template_literals.ts.strict.json b/ets2panda/linter/test/template_literals.ts.strict.json deleted file mode 100644 index 323ad1905964436ad1e7faa49ce8f4c5da42bdd2..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/template_literals.ts.strict.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 30, - "column": 57, - "problem": "AnyType" - }, - { - "line": 35, - "column": 14, - "problem": "AnyType" - }, - { - "line": 36, - "column": 4, - "problem": "TypeQuery" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/this_type.ts.strict.json b/ets2panda/linter/test/this_type.ts.json similarity index 97% rename from ets2panda/linter/test/this_type.ts.strict.json rename to ets2panda/linter/test/this_type.ts.json index 1e2f8ec865ed7f6ed4f21e8993d3e71c67fdcf08..8459ac2d2e24f74d932d031d735a9af80a6a0d4e 100644 --- a/ets2panda/linter/test/this_type.ts.strict.json +++ b/ets2panda/linter/test/this_type.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/this_type.ts.relax.json b/ets2panda/linter/test/this_type.ts.relax.json deleted file mode 100644 index 7afe8f170d0efa17b22cc362e19f4a8275a6fb4f..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/this_type.ts.relax.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 13, - "problem": "ThisType" - }, - { - "line": 19, - "column": 13, - "problem": "ThisType" - }, - { - "line": 21, - "column": 30, - "problem": "ThisType" - }, - { - "line": 31, - "column": 13, - "problem": "ThisType" - }, - { - "line": 36, - "column": 13, - "problem": "ThisType" - }, - { - "line": 41, - "column": 30, - "problem": "ThisType" - }, - { - "line": 53, - "column": 8, - "problem": "ThisType" - }, - { - "line": 73, - "column": 5, - "problem": "FunctionContainsThis" - }, - { - "line": 78, - "column": 3, - "problem": "FunctionContainsThis" - }, - { - "line": 81, - "column": 3, - "problem": "FunctionContainsThis" - }, - { - "line": 84, - "column": 3, - "problem": "FunctionContainsThis" - }, - { - "line": 89, - "column": 5, - "problem": "FunctionContainsThis" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/throw_error.ts.autofix.json b/ets2panda/linter/test/throw_error.ts.autofix.json deleted file mode 100644 index 6e0f88b9e9a1d5b3fd06f209750ad7d84bed8aa1..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/throw_error.ts.autofix.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 42, - "column": 3, - "problem": "ThrowStatement", - "autofixable": false, - "suggest": "", - "rule": "\"throw\" statements cannot accept values of arbitrary types (arkts-limited-throw)" - }, - { - "line": 43, - "column": 3, - "problem": "ThrowStatement", - "autofixable": false, - "suggest": "", - "rule": "\"throw\" statements cannot accept values of arbitrary types (arkts-limited-throw)" - }, - { - "line": 44, - "column": 3, - "problem": "ThrowStatement", - "autofixable": false, - "suggest": "", - "rule": "\"throw\" statements cannot accept values of arbitrary types (arkts-limited-throw)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/throw_error.ts.autofix.skip b/ets2panda/linter/test/throw_error.ts.autofix.skip new file mode 100644 index 0000000000000000000000000000000000000000..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f --- /dev/null +++ b/ets2panda/linter/test/throw_error.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/throw_error.ts.strict.json b/ets2panda/linter/test/throw_error.ts.json similarity index 94% rename from ets2panda/linter/test/throw_error.ts.strict.json rename to ets2panda/linter/test/throw_error.ts.json index a0fe890edde4422396297aad5d353bec905c9d55..bc832745b334e9ccb97fc367a6563e67a4fbaf96 100644 --- a/ets2panda/linter/test/throw_error.ts.strict.json +++ b/ets2panda/linter/test/throw_error.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -30,4 +30,4 @@ "problem": "ThrowStatement" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test/throw_error.ts.relax.json b/ets2panda/linter/test/throw_error.ts.relax.json deleted file mode 100644 index 397574237a869cae49a91112434a24ed2d190604..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/throw_error.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} diff --git a/ets2panda/linter/test/ts_ignore.ts.relax.json b/ets2panda/linter/test/ts_ignore.ts.json similarity index 98% rename from ets2panda/linter/test/ts_ignore.ts.relax.json rename to ets2panda/linter/test/ts_ignore.ts.json index f802c561b84b47c7e4c752428ed86cd5c76e97ae..b63dd11d82afdd81a904e0fff31fc09ba8ba8ab6 100644 --- a/ets2panda/linter/test/ts_ignore.ts.relax.json +++ b/ets2panda/linter/test/ts_ignore.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/ts_ignore.ts.strict.json b/ets2panda/linter/test/ts_ignore.ts.strict.json deleted file mode 100644 index f802c561b84b47c7e4c752428ed86cd5c76e97ae..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/ts_ignore.ts.strict.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 53, - "column": 3, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 55, - "column": 22, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 16, - "column": 1, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 21, - "column": 3, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 25, - "column": 19, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 30, - "column": 9, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 43, - "column": 9, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 52, - "column": 3, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 56, - "column": 9, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 58, - "column": 9, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 75, - "column": 1, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 18, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Type 'null' is not assignable to type 'number'.", - "rule": "Type 'null' is not assignable to type 'number'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/ts_ignore_2.ts.autofix.json b/ets2panda/linter/test/ts_ignore_2.ts.autofix.json deleted file mode 100644 index 87d88d712fc3a3270dfea505f0c516f13315746c..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/ts_ignore_2.ts.autofix.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 1, - "column": 1, - "problem": "ErrorSuppression", - "autofixable": false, - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/ts_ignore_2.ts.autofix.skip b/ets2panda/linter/test/ts_ignore_2.ts.autofix.skip new file mode 100644 index 0000000000000000000000000000000000000000..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f --- /dev/null +++ b/ets2panda/linter/test/ts_ignore_2.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/ts_ignore_2.ts.strict.json b/ets2panda/linter/test/ts_ignore_2.ts.json similarity index 94% rename from ets2panda/linter/test/ts_ignore_2.ts.strict.json rename to ets2panda/linter/test/ts_ignore_2.ts.json index 4f498993ad6702fb887f19305de80f93303dc86a..c5e21e6d2ad4e5546e257ca18eeb03be549dc3e5 100644 --- a/ets2panda/linter/test/ts_ignore_2.ts.strict.json +++ b/ets2panda/linter/test/ts_ignore_2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/ts_ignore_2.ts.relax.json b/ets2panda/linter/test/ts_ignore_2.ts.relax.json deleted file mode 100644 index 4f498993ad6702fb887f19305de80f93303dc86a..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/ts_ignore_2.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 1, - "column": 1, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/ts_nocheck.ts.relax.json b/ets2panda/linter/test/ts_nocheck.ts.json similarity index 93% rename from ets2panda/linter/test/ts_nocheck.ts.relax.json rename to ets2panda/linter/test/ts_nocheck.ts.json index 3fac79311be0f72220055991dff232be56d89cf1..b8e010cb3d33450ea0ff547f9ce1b4784cc90044 100644 --- a/ets2panda/linter/test/ts_nocheck.ts.relax.json +++ b/ets2panda/linter/test/ts_nocheck.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -25,4 +25,4 @@ "problem": "ErrorSuppression" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test/ts_nocheck.ts.strict.json b/ets2panda/linter/test/ts_nocheck.ts.strict.json deleted file mode 100644 index 3fac79311be0f72220055991dff232be56d89cf1..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/ts_nocheck.ts.strict.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 1, - "problem": "ErrorSuppression" - }, - { - "line": 21, - "column": 1, - "problem": "ErrorSuppression" - } - ] -} diff --git a/ets2panda/linter/test/ts_nocheck_2.ts.autofix.json b/ets2panda/linter/test/ts_nocheck_2.ts.autofix.json deleted file mode 100644 index e56817ef3edce23345c358dbc361fd68ae80794e..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/ts_nocheck_2.ts.autofix.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 1, - "column": 1, - "problem": "ErrorSuppression", - "autofixable": false, - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 2, - "column": 1, - "problem": "ErrorSuppression", - "autofixable": false, - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/ts_nocheck_2.ts.autofix.skip b/ets2panda/linter/test/ts_nocheck_2.ts.autofix.skip new file mode 100644 index 0000000000000000000000000000000000000000..64ca30f56b74088cfa6a816932ea1c0a5b9cac4f --- /dev/null +++ b/ets2panda/linter/test/ts_nocheck_2.ts.autofix.skip @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ \ No newline at end of file diff --git a/ets2panda/linter/test/ts_nocheck_2.ts.relax.json b/ets2panda/linter/test/ts_nocheck_2.ts.json similarity index 95% rename from ets2panda/linter/test/ts_nocheck_2.ts.relax.json rename to ets2panda/linter/test/ts_nocheck_2.ts.json index a8844f27fc64b1418c7a0a6929a5c77d38e3a4dc..b9446ecdb8cd0d75500117f4cc475bebc57d4a72 100644 --- a/ets2panda/linter/test/ts_nocheck_2.ts.relax.json +++ b/ets2panda/linter/test/ts_nocheck_2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/ts_nocheck_2.ts.strict.json b/ets2panda/linter/test/ts_nocheck_2.ts.strict.json deleted file mode 100644 index a8844f27fc64b1418c7a0a6929a5c77d38e3a4dc..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/ts_nocheck_2.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 1, - "column": 1, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 2, - "column": 1, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/type_declarations.ts.strict.json b/ets2panda/linter/test/type_declarations.ts.json similarity index 98% rename from ets2panda/linter/test/type_declarations.ts.strict.json rename to ets2panda/linter/test/type_declarations.ts.json index dc1f301bc9ed0c9544bc130e23c6a45a426cf4bc..7de1c418e180d60c4c14b3a6c5e7b04f1c7dd7d3 100644 --- a/ets2panda/linter/test/type_declarations.ts.strict.json +++ b/ets2panda/linter/test/type_declarations.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/type_declarations.ts.relax.json b/ets2panda/linter/test/type_declarations.ts.relax.json deleted file mode 100644 index 42cdf50f433f60271ea280e314dbf7147b90d00b..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/type_declarations.ts.relax.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 10, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 36, - "column": 14, - "problem": "InOperator", - "suggest": "", - "rule": "\"in\" operator is not supported (arkts-no-in)" - }, - { - "line": 36, - "column": 17, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 41, - "column": 18, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 55, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 55, - "column": 30, - "problem": "InterfaceExtendsClass", - "suggest": "", - "rule": "Interfaces cannot extend classes (arkts-extends-only-class)" - }, - { - "line": 59, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 59, - "column": 30, - "problem": "InterfaceExtendsClass", - "suggest": "", - "rule": "Interfaces cannot extend classes (arkts-extends-only-class)" - }, - { - "line": 63, - "column": 1, - "problem": "EnumMerging", - "suggest": "", - "rule": "\"enum\" declaration merging is not supported (arkts-no-enum-merging)" - }, - { - "line": 68, - "column": 1, - "problem": "EnumMerging", - "suggest": "", - "rule": "\"enum\" declaration merging is not supported (arkts-no-enum-merging)" - }, - { - "line": 84, - "column": 17, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 84, - "column": 25, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 96, - "column": 13, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 101, - "column": 24, - "problem": "InterfaceExtendsClass", - "suggest": "", - "rule": "Interfaces cannot extend classes (arkts-extends-only-class)" - }, - { - "line": 103, - "column": 23, - "problem": "ImplementsClass", - "suggest": "", - "rule": "Classes cannot be specified in \"implements\" clause (arkts-implements-only-iface)" - }, - { - "line": 108, - "column": 7, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 109, - "column": 7, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 42, - "column": 11, - "problem": "StrictDiagnostic", - "suggest": "Property 'pipe' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'pipe' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/types.ts.autofix.json b/ets2panda/linter/test/types.ts.autofix.json index 2d9bbd6638dd38a6b673b8905690a5fec6ba4853..b3a72b994bec3841b629057042430b53969c8fa7 100644 --- a/ets2panda/linter/test/types.ts.autofix.json +++ b/ets2panda/linter/test/types.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/types.ts.strict.json b/ets2panda/linter/test/types.ts.json similarity index 99% rename from ets2panda/linter/test/types.ts.strict.json rename to ets2panda/linter/test/types.ts.json index 0be6ecd0d17495c948b41b84d9838e0d8dcb8d76..2ec70db19b740390a2e5613eca195e10103aab67 100644 --- a/ets2panda/linter/test/types.ts.strict.json +++ b/ets2panda/linter/test/types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/types.ts.relax.json b/ets2panda/linter/test/types.ts.relax.json deleted file mode 100644 index ed2fa5fb0df50e59839f6212b6ab40b228d4a7a9..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/types.ts.relax.json +++ /dev/null @@ -1,263 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 15, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 18, - "column": 15, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 19, - "column": 20, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 26, - "column": 18, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 32, - "column": 16, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 34, - "column": 15, - "problem": "IndexedAccessType", - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" - }, - { - "line": 36, - "column": 24, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 37, - "column": 20, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 43, - "column": 24, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 43, - "column": 30, - "problem": "IsOperator", - "suggest": "", - "rule": "Type guarding is supported with \"instanceof\" and \"as\" (arkts-no-is)" - }, - { - "line": 54, - "column": 26, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 57, - "column": 3, - "problem": "ComputedPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)" - }, - { - "line": 58, - "column": 3, - "problem": "ComputedPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)" - }, - { - "line": 71, - "column": 19, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 72, - "column": 3, - "problem": "IndexMember", - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - }, - { - "line": 72, - "column": 18, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 76, - "column": 32, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 77, - "column": 11, - "problem": "InOperator", - "suggest": "", - "rule": "\"in\" operator is not supported (arkts-no-in)" - }, - { - "line": 92, - "column": 22, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 94, - "column": 28, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 96, - "column": 3, - "problem": "CallSignature", - "suggest": "", - "rule": "Use \"class\" instead of a type with call signature (arkts-no-call-signatures)" - }, - { - "line": 111, - "column": 19, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 112, - "column": 12, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 112, - "column": 35, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 116, - "column": 9, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 116, - "column": 25, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 119, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 119, - "column": 16, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 124, - "column": 13, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 128, - "column": 12, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 157, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 106, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property 'val' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'val' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 148, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Type 'undefined' is not assignable to type 'string'.", - "rule": "Type 'undefined' is not assignable to type 'string'." - }, - { - "line": 149, - "column": 18, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'undefined' is not assignable to parameter of type 'string'.", - "rule": "Argument of type 'undefined' is not assignable to parameter of type 'string'." - }, - { - "line": 150, - "column": 17, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'undefined' is not assignable to parameter of type 'number'.", - "rule": "Argument of type 'undefined' is not assignable to parameter of type 'number'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/unary_wrong_types.ts.relax.json b/ets2panda/linter/test/unary_wrong_types.ts.json similarity index 95% rename from ets2panda/linter/test/unary_wrong_types.ts.relax.json rename to ets2panda/linter/test/unary_wrong_types.ts.json index beef091349936bfb7ff1c0f1f40359b7d9312f76..6347fa9c1388eb99be283eec984af59feb024134 100644 --- a/ets2panda/linter/test/unary_wrong_types.ts.relax.json +++ b/ets2panda/linter/test/unary_wrong_types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/unary_wrong_types.ts.strict.json b/ets2panda/linter/test/unary_wrong_types.ts.strict.json deleted file mode 100644 index beef091349936bfb7ff1c0f1f40359b7d9312f76..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/unary_wrong_types.ts.strict.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 24, - "column": 12, - "problem": "UnaryArithmNotNumber" - }, - { - "line": 25, - "column": 12, - "problem": "UnaryArithmNotNumber" - }, - { - "line": 26, - "column": 12, - "problem": "UnaryArithmNotNumber" - }, - { - "line": 27, - "column": 12, - "problem": "UnaryArithmNotNumber" - }, - { - "line": 28, - "column": 12, - "problem": "UnaryArithmNotNumber" - }, - { - "line": 29, - "column": 12, - "problem": "UnaryArithmNotNumber" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/undefined_check_calls.ts.strict.json b/ets2panda/linter/test/undefined_check_calls.ts.json similarity index 96% rename from ets2panda/linter/test/undefined_check_calls.ts.strict.json rename to ets2panda/linter/test/undefined_check_calls.ts.json index 21f9e86912824a3b0262300c1ecf7d222a815994..1a3b15b8369ba6dce68a1e2cd965988f52b40287 100644 --- a/ets2panda/linter/test/undefined_check_calls.ts.strict.json +++ b/ets2panda/linter/test/undefined_check_calls.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/undefined_check_calls.ts.relax.json b/ets2panda/linter/test/undefined_check_calls.ts.relax.json deleted file mode 100644 index 21f9e86912824a3b0262300c1ecf7d222a815994..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/undefined_check_calls.ts.relax.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 37, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'undefined' is not assignable to parameter of type 'number[]'.", - "rule": "Argument of type 'undefined' is not assignable to parameter of type 'number[]'." - }, - { - "line": 51, - "column": 42, - "problem": "StrictDiagnostic", - "suggest": "Argument of type 'string | undefined' is not assignable to parameter of type 'ResourceStr'.", - "rule": "Argument of type 'string | undefined' is not assignable to parameter of type 'ResourceStr'." - }, - { - "line": 58, - "column": 12, - "problem": "StrictDiagnostic", - "suggest": "Type 'undefined' is not assignable to type 'Object'.", - "rule": "Type 'undefined' is not assignable to type 'Object'." - }, - { - "line": 62, - "column": 17, - "problem": "StrictDiagnostic", - "suggest": "Type 'undefined' is not assignable to type 'Object'.", - "rule": "Type 'undefined' is not assignable to type 'Object'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/unique_names.ts.strict.json b/ets2panda/linter/test/unique_names.ts.json similarity index 99% rename from ets2panda/linter/test/unique_names.ts.strict.json rename to ets2panda/linter/test/unique_names.ts.json index c9a962d16bf0ca0f31879f01a975e70fd3df141b..a96902a4f07ed22ba828e32e2f5151cb471a8005 100644 --- a/ets2panda/linter/test/unique_names.ts.strict.json +++ b/ets2panda/linter/test/unique_names.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/unique_names.ts.relax.json b/ets2panda/linter/test/unique_names.ts.relax.json deleted file mode 100644 index 6780a6aaded1c1565371b47f101266bc504722b8..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/unique_names.ts.relax.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 20, - "problem": "ImplementsClass" - }, - { - "line": 30, - "column": 3, - "problem": "InterfaceMerging" - }, - { - "line": 34, - "column": 3, - "problem": "InterfaceMerging" - }, - { - "line": 40, - "column": 3, - "problem": "InterfaceMerging" - }, - { - "line": 43, - "column": 3, - "problem": "InterfaceMerging" - }, - { - "line": 48, - "column": 1, - "problem": "ImportAfterStatement" - }, - { - "line": 54, - "column": 1, - "problem": "ImportAfterStatement" - }, - { - "line": 58, - "column": 30, - "problem": "ImplementsClass" - }, - { - "line": 134, - "column": 7, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 134, - "column": 19, - "problem": "ObjectLiteralNoContextType" - }, - { - "line": 206, - "column": 1, - "problem": "EnumMerging" - }, - { - "line": 207, - "column": 1, - "problem": "EnumMerging" - }, - { - "line": 209, - "column": 1, - "problem": "InterfaceMerging" - }, - { - "line": 210, - "column": 1, - "problem": "InterfaceMerging" - }, - { - "line": 163, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 164, - "column": 3, - "problem": "StrictDiagnostic" - }, - { - "line": 173, - "column": 3, - "problem": "StrictDiagnostic" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/unknown_params.ts.strict.json b/ets2panda/linter/test/unknown_params.ts.json similarity index 95% rename from ets2panda/linter/test/unknown_params.ts.strict.json rename to ets2panda/linter/test/unknown_params.ts.json index 52221ff05b55135a172cb1ec98c6c3ad7ee02713..aae3606a0a0b9a7b5674d8eea0caf1f1bc074cd2 100644 --- a/ets2panda/linter/test/unknown_params.ts.strict.json +++ b/ets2panda/linter/test/unknown_params.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/unknown_params.ts.relax.json b/ets2panda/linter/test/unknown_params.ts.relax.json deleted file mode 100644 index 8f486a9660829a684bfcdbbdb7a60f0ff3e5c1d3..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/unknown_params.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 51, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/utility_types.ts.strict.json b/ets2panda/linter/test/utility_types.ts.json similarity index 99% rename from ets2panda/linter/test/utility_types.ts.strict.json rename to ets2panda/linter/test/utility_types.ts.json index 22896007c7bb137a095d4f1929ddd7df48e23f8e..f2f10564923187d1ac42af1dc8f4b8fd045f03f1 100644 --- a/ets2panda/linter/test/utility_types.ts.strict.json +++ b/ets2panda/linter/test/utility_types.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/utility_types.ts.relax.json b/ets2panda/linter/test/utility_types.ts.relax.json deleted file mode 100644 index 5d007f9001218f33f37f2018736a373352875375..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/utility_types.ts.relax.json +++ /dev/null @@ -1,556 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 12, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 19, - "column": 12, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 21, - "column": 12, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 53, - "column": 22, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 55, - "column": 29, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 71, - "column": 22, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 73, - "column": 29, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 81, - "column": 19, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 83, - "column": 30, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 92, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 94, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 96, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 100, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 102, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 106, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 108, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 108, - "column": 43, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 112, - "column": 20, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 116, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 118, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 120, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 122, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 122, - "column": 24, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 124, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 124, - "column": 24, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 126, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 130, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 132, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 134, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 136, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 136, - "column": 35, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 140, - "column": 18, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 141, - "column": 12, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 144, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 146, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 148, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 150, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 152, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 152, - "column": 24, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 154, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 154, - "column": 24, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 156, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 165, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 165, - "column": 26, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 167, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 167, - "column": 26, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 169, - "column": 13, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 174, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 177, - "column": 30, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 177, - "column": 48, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 178, - "column": 18, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 184, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 187, - "column": 20, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 187, - "column": 38, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 187, - "column": 60, - "problem": "FunctionBind", - "suggest": "", - "rule": "\"Function.bind\" is not supported (arkts-no-func-bind)" - }, - { - "line": 208, - "column": 9, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 209, - "column": 9, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 193, - "column": 33, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 195, - "column": 15, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 195, - "column": 19, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 195, - "column": 28, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 198, - "column": 60, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 199, - "column": 39, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 200, - "column": 45, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 201, - "column": 12, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 201, - "column": 14, - "problem": "SpreadOperator", - "suggest": "", - "rule": "It is possible to spread only arrays or classes derived from arrays into the rest parameter or array literals (arkts-no-spread)" - }, - { - "line": 201, - "column": 23, - "problem": "SpreadOperator", - "suggest": "", - "rule": "It is possible to spread only arrays or classes derived from arrays into the rest parameter or array literals (arkts-no-spread)" - }, - { - "line": 201, - "column": 39, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - }, - { - "line": 204, - "column": 26, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 205, - "column": 11, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 206, - "column": 14, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 221, - "column": 25, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 223, - "column": 50, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 229, - "column": 24, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 231, - "column": 50, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 237, - "column": 19, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 242, - "column": 32, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/var_declarations.ts.strict.json b/ets2panda/linter/test/var_declarations.ts.json similarity index 97% rename from ets2panda/linter/test/var_declarations.ts.strict.json rename to ets2panda/linter/test/var_declarations.ts.json index 0f24e4b64aef33de8214efd069c2118b4b85f02a..dfe7c2a56455aabcaf141217da43c40b8096e817 100644 --- a/ets2panda/linter/test/var_declarations.ts.strict.json +++ b/ets2panda/linter/test/var_declarations.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test/var_declarations.ts.relax.json b/ets2panda/linter/test/var_declarations.ts.relax.json deleted file mode 100644 index 8606279121e3307ee695e46628c1b88b87657ef1..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test/var_declarations.ts.relax.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 31, - "column": 14, - "problem": "ForInStatement", - "suggest": "", - "rule": "\"for .. in\" is not supported (arkts-no-for-in)" - }, - { - "line": 23, - "column": 12, - "problem": "StrictDiagnostic", - "suggest": "Variable 'y' is used before being assigned.", - "rule": "Variable 'y' is used before being assigned." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14412.ts.json b/ets2panda/linter/test_regression/14412.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..e8cff6c256f0ced150a687d40e9cc69ee4c2792b --- /dev/null +++ b/ets2panda/linter/test_regression/14412.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14412.ts.relax.json b/ets2panda/linter/test_regression/14412.ts.relax.json deleted file mode 100755 index e4efb45db7a6974ed8ca27490e5acb755dfb13ca..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_regression/14412.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} diff --git a/ets2panda/linter/test_regression/14412.ts.strict.json b/ets2panda/linter/test_regression/14412.ts.strict.json deleted file mode 100755 index e4efb45db7a6974ed8ca27490e5acb755dfb13ca..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_regression/14412.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} diff --git a/ets2panda/linter/test_regression/14832.ts.json b/ets2panda/linter/test_regression/14832.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..ad85bf6b8411598cd234172ea0b9b87380c475f3 --- /dev/null +++ b/ets2panda/linter/test_regression/14832.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14832.ts.relax.json b/ets2panda/linter/test_regression/14832.ts.relax.json deleted file mode 100644 index e7d2d6779bbeb56cae88903ecb7da87087831260..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_regression/14832.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14832.ts.strict.json b/ets2panda/linter/test_regression/14832.ts.strict.json deleted file mode 100644 index e7d2d6779bbeb56cae88903ecb7da87087831260..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_regression/14832.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14860.ts.json b/ets2panda/linter/test_regression/14860.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..e8cff6c256f0ced150a687d40e9cc69ee4c2792b --- /dev/null +++ b/ets2panda/linter/test_regression/14860.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14860.ts.relax.json b/ets2panda/linter/test_regression/14860.ts.relax.json deleted file mode 100644 index 79536057ae42e081311b3780126f9420cc72de92..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_regression/14860.ts.relax.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] - } - \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14860.ts.strict.json b/ets2panda/linter/test_regression/14860.ts.strict.json deleted file mode 100644 index 79536057ae42e081311b3780126f9420cc72de92..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_regression/14860.ts.strict.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] - } - \ No newline at end of file diff --git a/ets2panda/linter/test_regression/14953.ts.strict.json b/ets2panda/linter/test_regression/14953.ts.json similarity index 97% rename from ets2panda/linter/test_regression/14953.ts.strict.json rename to ets2panda/linter/test_regression/14953.ts.json index 130f6099b6beab6af5352ce30119318fb0aef603..e1b17430ef781f8ab6886f93737ef796c3d29d95 100644 --- a/ets2panda/linter/test_regression/14953.ts.strict.json +++ b/ets2panda/linter/test_regression/14953.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_regression/14953.ts.relax.json b/ets2panda/linter/test_regression/14953.ts.relax.json deleted file mode 100644 index 130f6099b6beab6af5352ce30119318fb0aef603..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_regression/14953.ts.relax.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 29, - "column": 36, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 30, - "column": 3, - "problem": "ComputedPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)" - }, - { - "line": 37, - "column": 3, - "problem": "ComputedPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)" - }, - { - "line": 34, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property '['b']' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property '['b']' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 35, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property '[T.A]' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property '[T.A]' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 36, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property '[T.B]' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property '[T.B]' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 37, - "column": 3, - "problem": "StrictDiagnostic", - "suggest": "Property '[str1]' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property '[str1]' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/15086.ts.json b/ets2panda/linter/test_regression/15086.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..ad85bf6b8411598cd234172ea0b9b87380c475f3 --- /dev/null +++ b/ets2panda/linter/test_regression/15086.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/15086.ts.relax.json b/ets2panda/linter/test_regression/15086.ts.relax.json deleted file mode 100644 index c2495eb8c3919dd79cb3ed585a426ec4404f02a3..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_regression/15086.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} diff --git a/ets2panda/linter/test_regression/15086.ts.strict.json b/ets2panda/linter/test_regression/15086.ts.strict.json deleted file mode 100644 index c2495eb8c3919dd79cb3ed585a426ec4404f02a3..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_regression/15086.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} diff --git a/ets2panda/linter/test_regression/15431.ts.relax.json b/ets2panda/linter/test_regression/15431.ts.json similarity index 100% rename from ets2panda/linter/test_regression/15431.ts.relax.json rename to ets2panda/linter/test_regression/15431.ts.json diff --git a/ets2panda/linter/test_regression/15497.ts.relax.json b/ets2panda/linter/test_regression/15497.ts.json similarity index 100% rename from ets2panda/linter/test_regression/15497.ts.relax.json rename to ets2panda/linter/test_regression/15497.ts.json diff --git a/ets2panda/linter/test_rules/rule1.ts.autofix.json b/ets2panda/linter/test_rules/rule1.ts.autofix.json index 383a690f5d0b8ac2340f7d09ea097116caeab0a8..5392f3c3b744b29e4645d7c4b745a6307907b318 100644 --- a/ets2panda/linter/test_rules/rule1.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule1.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule1.ts.strict.json b/ets2panda/linter/test_rules/rule1.ts.json similarity index 98% rename from ets2panda/linter/test_rules/rule1.ts.strict.json rename to ets2panda/linter/test_rules/rule1.ts.json index 35adef8d5a8e4c1cd7a07bb326d6f6e43b9e98cb..873c70647533316c60e5d9e6fb67129ce5c39d46 100644 --- a/ets2panda/linter/test_rules/rule1.ts.strict.json +++ b/ets2panda/linter/test_rules/rule1.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule1.ts.relax.json b/ets2panda/linter/test_rules/rule1.ts.relax.json deleted file mode 100644 index 6038bcaea7b9bc0097011625a65666384e07dbfc..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule1.ts.relax.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 9, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 24, - "column": 9, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 43, - "column": 3, - "problem": "ComputedPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)" - }, - { - "line": 51, - "column": 3, - "problem": "ComputedPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule102.ts.strict.json b/ets2panda/linter/test_rules/rule102.ts.json similarity index 97% rename from ets2panda/linter/test_rules/rule102.ts.strict.json rename to ets2panda/linter/test_rules/rule102.ts.json index 0cd7fc809883ff6dc30b0af4019d5e9249e4445f..95ce866e08db6c7f786dcf383fa26fe083860580 100644 --- a/ets2panda/linter/test_rules/rule102.ts.strict.json +++ b/ets2panda/linter/test_rules/rule102.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule102.ts.relax.json b/ets2panda/linter/test_rules/rule102.ts.relax.json deleted file mode 100644 index 0cd7fc809883ff6dc30b0af4019d5e9249e4445f..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule102.ts.relax.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 17, - "column": 18, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 19, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 20, - "column": 18, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 23, - "column": 1, - "problem": "IntefaceExtendDifProps", - "suggest": "", - "rule": "Interface can not extend interfaces with the same method (arkts-no-extend-same-prop)" - }, - { - "line": 24, - "column": 18, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 35, - "column": 16, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 45, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 55, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule103.ts.strict.json b/ets2panda/linter/test_rules/rule103.ts.json similarity index 97% rename from ets2panda/linter/test_rules/rule103.ts.strict.json rename to ets2panda/linter/test_rules/rule103.ts.json index 82f8d331b97d9d345fc71dde9665c4c6b2ef93c6..f1885e1046e6bf4e1364d371c1045469cce917c6 100644 --- a/ets2panda/linter/test_rules/rule103.ts.strict.json +++ b/ets2panda/linter/test_rules/rule103.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule103.ts.relax.json b/ets2panda/linter/test_rules/rule103.ts.relax.json deleted file mode 100644 index 01a18135113d49ef45cf2a2756c7cf75f20d3db4..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule103.ts.relax.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 17, - "column": 28, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 20, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - }, - { - "line": 24, - "column": 1, - "problem": "InterfaceMerging", - "suggest": "", - "rule": "Declaration merging is not supported (arkts-no-decl-merging)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule104.ts.strict.json b/ets2panda/linter/test_rules/rule104.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule104.ts.strict.json rename to ets2panda/linter/test_rules/rule104.ts.json index d86c8262c477929be832fb614b7918339d543960..93315a24276b616457287792a1dd7fe553ceb943 100644 --- a/ets2panda/linter/test_rules/rule104.ts.strict.json +++ b/ets2panda/linter/test_rules/rule104.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule104.ts.relax.json b/ets2panda/linter/test_rules/rule104.ts.relax.json deleted file mode 100644 index d86c8262c477929be832fb614b7918339d543960..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule104.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 20, - "column": 37, - "problem": "InterfaceExtendsClass", - "suggest": "", - "rule": "Interfaces cannot extend classes (arkts-extends-only-class)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule106.ts.relax.json b/ets2panda/linter/test_rules/rule106.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule106.ts.relax.json rename to ets2panda/linter/test_rules/rule106.ts.json index f4388b8681ad7927ea98f83491bfe4bb37255c82..7923677d025492445eb86e460c08c733285708b3 100644 --- a/ets2panda/linter/test_rules/rule106.ts.relax.json +++ b/ets2panda/linter/test_rules/rule106.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule106.ts.strict.json b/ets2panda/linter/test_rules/rule106.ts.strict.json deleted file mode 100644 index f4388b8681ad7927ea98f83491bfe4bb37255c82..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule106.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 19, - "problem": "ConstructorFuncs", - "suggest": "", - "rule": "Constructor function type is not supported (arkts-no-ctor-signatures-funcs)" - }, - { - "line": 29, - "column": 29, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule111.ts.strict.json b/ets2panda/linter/test_rules/rule111.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule111.ts.strict.json rename to ets2panda/linter/test_rules/rule111.ts.json index 03e6a6a19651d7b97fdbdd51ca29c450dc2237ab..971371b25b6f52673f55c9ada608e33a094136ce 100644 --- a/ets2panda/linter/test_rules/rule111.ts.strict.json +++ b/ets2panda/linter/test_rules/rule111.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule111.ts.relax.json b/ets2panda/linter/test_rules/rule111.ts.relax.json deleted file mode 100644 index 03e6a6a19651d7b97fdbdd51ca29c450dc2237ab..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule111.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 5, - "problem": "EnumMemberNonConstInit", - "suggest": "", - "rule": "Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)" - }, - { - "line": 26, - "column": 5, - "problem": "EnumMemberNonConstInit", - "suggest": "", - "rule": "Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)" - }, - { - "line": 28, - "column": 5, - "problem": "EnumMemberNonConstInit", - "suggest": "", - "rule": "Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule113.ts.relax.json b/ets2panda/linter/test_rules/rule113.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule113.ts.relax.json rename to ets2panda/linter/test_rules/rule113.ts.json index 755ab330fcac30f5997c3b130dba8bf9bd5b8eb0..9463869c2260cf56795dfcc2200389ffe59a8715 100644 --- a/ets2panda/linter/test_rules/rule113.ts.relax.json +++ b/ets2panda/linter/test_rules/rule113.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule113.ts.strict.json b/ets2panda/linter/test_rules/rule113.ts.strict.json deleted file mode 100644 index 755ab330fcac30f5997c3b130dba8bf9bd5b8eb0..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule113.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "EnumMerging", - "suggest": "", - "rule": "\"enum\" declaration merging is not supported (arkts-no-enum-merging)" - }, - { - "line": 20, - "column": 1, - "problem": "EnumMerging", - "suggest": "", - "rule": "\"enum\" declaration merging is not supported (arkts-no-enum-merging)" - }, - { - "line": 23, - "column": 1, - "problem": "EnumMerging", - "suggest": "", - "rule": "\"enum\" declaration merging is not supported (arkts-no-enum-merging)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule114.ts.relax.json b/ets2panda/linter/test_rules/rule114.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule114.ts.relax.json rename to ets2panda/linter/test_rules/rule114.ts.json index 7ed1a16873a61e4e7ab0a9ca18ae988827ca9eae..a4a46c2547b5b468ff2d6d3552a3eb60a6c53cd0 100644 --- a/ets2panda/linter/test_rules/rule114.ts.relax.json +++ b/ets2panda/linter/test_rules/rule114.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule116.ts.relax.json b/ets2panda/linter/test_rules/rule116.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule116.ts.relax.json rename to ets2panda/linter/test_rules/rule116.ts.json index 47874cd20aa12ebc6f928145ee238c9c8e565fd9..f743f1b37a82790ad5eeec2407cd00cd117fe83f 100644 --- a/ets2panda/linter/test_rules/rule116.ts.relax.json +++ b/ets2panda/linter/test_rules/rule116.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule116.ts.strict.json b/ets2panda/linter/test_rules/rule116.ts.strict.json deleted file mode 100644 index 47874cd20aa12ebc6f928145ee238c9c8e565fd9..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule116.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 5, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule120.ts.autofix.json b/ets2panda/linter/test_rules/rule120.ts.autofix.json index 846f7a666359f67ae5f7957b4b67dcb6ece949a2..b4c2fba633239575724b94585e81e63ea8c0f984 100644 --- a/ets2panda/linter/test_rules/rule120.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule120.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule120.ts.strict.json b/ets2panda/linter/test_rules/rule120.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule120.ts.strict.json rename to ets2panda/linter/test_rules/rule120.ts.json index bbd6d72568a779b602a18a6c340946b7f4513563..bc27fc48b64078ca229230c9d2d04f4b551bf602 100644 --- a/ets2panda/linter/test_rules/rule120.ts.strict.json +++ b/ets2panda/linter/test_rules/rule120.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule120.ts.relax.json b/ets2panda/linter/test_rules/rule120.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule120.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule121.ts.relax.json b/ets2panda/linter/test_rules/rule121.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule121.ts.relax.json rename to ets2panda/linter/test_rules/rule121.ts.json index ab906c181706cc78c77297292ed1063be41804c3..4399e2cc75e4a0d24def9a62e128b3fe376f1086 100644 --- a/ets2panda/linter/test_rules/rule121.ts.relax.json +++ b/ets2panda/linter/test_rules/rule121.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule121.ts.strict.json b/ets2panda/linter/test_rules/rule121.ts.strict.json deleted file mode 100644 index ab906c181706cc78c77297292ed1063be41804c3..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule121.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "ImportAssignment", - "suggest": "", - "rule": "\"require\" and \"import\" assignment are not supported (arkts-no-require)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule126.ts.relax.json b/ets2panda/linter/test_rules/rule126.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule126.ts.relax.json rename to ets2panda/linter/test_rules/rule126.ts.json index 655712b06dd34ef493609fe882aead77a0924284..269824ea74711e7831fafd10ed1041a234508b5c 100644 --- a/ets2panda/linter/test_rules/rule126.ts.relax.json +++ b/ets2panda/linter/test_rules/rule126.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule126.ts.strict.json b/ets2panda/linter/test_rules/rule126.ts.strict.json deleted file mode 100644 index 655712b06dd34ef493609fe882aead77a0924284..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule126.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 5, - "problem": "ExportAssignment", - "suggest": "", - "rule": "\"export = ...\" assignment is not supported (arkts-no-export-assignment)" - }, - { - "line": 25, - "column": 5, - "problem": "ImportAssignment", - "suggest": "", - "rule": "\"require\" and \"import\" assignment are not supported (arkts-no-require)" - }, - { - "line": 27, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule128.ts.strict.json b/ets2panda/linter/test_rules/rule128.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule128.ts.strict.json rename to ets2panda/linter/test_rules/rule128.ts.json index 8dc44368023d8bfbcde54dfdcfaca9064cea9355..0ccbff35da2cdcb2be905d8d2ce546bd28fd334e 100644 --- a/ets2panda/linter/test_rules/rule128.ts.strict.json +++ b/ets2panda/linter/test_rules/rule128.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule128.ts.relax.json b/ets2panda/linter/test_rules/rule128.ts.relax.json deleted file mode 100644 index 8dc44368023d8bfbcde54dfdcfaca9064cea9355..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule128.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "ShorthandAmbientModuleDecl", - "suggest": "", - "rule": "Ambient module declaration is not supported (arkts-no-ambient-decls)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule129.ts.relax.json b/ets2panda/linter/test_rules/rule129.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule129.ts.relax.json rename to ets2panda/linter/test_rules/rule129.ts.json index 6139a0168a3f4e8a936999e3bff4acc9de88ce61..329894278ab23a445b9716abd77cc8f9ebc7093b 100644 --- a/ets2panda/linter/test_rules/rule129.ts.relax.json +++ b/ets2panda/linter/test_rules/rule129.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule129.ts.strict.json b/ets2panda/linter/test_rules/rule129.ts.strict.json deleted file mode 100644 index 6139a0168a3f4e8a936999e3bff4acc9de88ce61..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule129.ts.strict.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 9, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)" - }, - { - "line": 17, - "column": 5, - "problem": "ShorthandAmbientModuleDecl", - "suggest": "", - "rule": "Ambient module declaration is not supported (arkts-no-ambient-decls)" - }, - { - "line": 17, - "column": 5, - "problem": "WildcardsInModuleName", - "suggest": "", - "rule": "Wildcards in module names are not supported (arkts-no-module-wildcards)" - }, - { - "line": 23, - "column": 5, - "problem": "ImportAfterStatement", - "suggest": "", - "rule": "\"import\" statements after other statements are not allowed (arkts-no-misplaced-imports)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule130.ts.relax.json b/ets2panda/linter/test_rules/rule130.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule130.ts.relax.json rename to ets2panda/linter/test_rules/rule130.ts.json index c64d59909c18cb6811239bbcc0164ca3c86b3f3d..190ce38332cc975c2c163e47ffd03f98937caebc 100644 --- a/ets2panda/linter/test_rules/rule130.ts.relax.json +++ b/ets2panda/linter/test_rules/rule130.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule130.ts.strict.json b/ets2panda/linter/test_rules/rule130.ts.strict.json deleted file mode 100644 index c64d59909c18cb6811239bbcc0164ca3c86b3f3d..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule130.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 14, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 18, - "column": 1, - "problem": "UMDModuleDefinition", - "suggest": "", - "rule": "Universal module definitions (UMD) are not supported (arkts-no-umd)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule132.ts.relax.json b/ets2panda/linter/test_rules/rule132.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule132.ts.relax.json rename to ets2panda/linter/test_rules/rule132.ts.json index ff45ff9f280f78ddd2a6f6e9868360d2b8ab0e07..7407b0be965058d2e304439e452ad549f3841188 100644 --- a/ets2panda/linter/test_rules/rule132.ts.relax.json +++ b/ets2panda/linter/test_rules/rule132.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule132.ts.strict.json b/ets2panda/linter/test_rules/rule132.ts.strict.json deleted file mode 100644 index ff45ff9f280f78ddd2a6f6e9868360d2b8ab0e07..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule132.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 16, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 22, - "column": 48, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 22, - "column": 37, - "problem": "NewTarget", - "suggest": "", - "rule": "\"new.target\" is not supported (arkts-no-new-target)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule134.ts.relax.json b/ets2panda/linter/test_rules/rule134.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule134.ts.relax.json rename to ets2panda/linter/test_rules/rule134.ts.json index 87e4d6d23fb727e50e33896c385607f0ea353776..9a04a4e6fde2be86f2aa2d373fdc341942c9df67 100644 --- a/ets2panda/linter/test_rules/rule134.ts.relax.json +++ b/ets2panda/linter/test_rules/rule134.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule136.ts.strict.json b/ets2panda/linter/test_rules/rule136.ts.json similarity index 97% rename from ets2panda/linter/test_rules/rule136.ts.strict.json rename to ets2panda/linter/test_rules/rule136.ts.json index 6d11baeb2ff8376b76fc73e70fdfd96875f83cba..4d7df973f060a41b6c488b37779a4e83b7adee2f 100644 --- a/ets2panda/linter/test_rules/rule136.ts.strict.json +++ b/ets2panda/linter/test_rules/rule136.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule136.ts.relax.json b/ets2panda/linter/test_rules/rule136.ts.relax.json deleted file mode 100644 index 27801ce2f1970061583107cb766c6e2fe0310094..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule136.ts.relax.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 5, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 20, - "column": 3, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 26, - "column": 3, - "problem": "Prototype", - "suggest": "", - "rule": "Prototype assignment is not supported (arkts-no-prototype-assignment)" - }, - { - "line": 27, - "column": 12, - "problem": "FunctionContainsThis", - "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule137.ts.strict.json b/ets2panda/linter/test_rules/rule137.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule137.ts.strict.json rename to ets2panda/linter/test_rules/rule137.ts.json index ae76a6f5a66134c3ffc6964a0b16edb8be61ff9b..cae134c3d691f20d7a845b728c61918c716eacb2 100644 --- a/ets2panda/linter/test_rules/rule137.ts.strict.json +++ b/ets2panda/linter/test_rules/rule137.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule137.ts.relax.json b/ets2panda/linter/test_rules/rule137.ts.relax.json deleted file mode 100644 index 7b32678bbec7a03f03fbd5ab7f8ce1e1b301dd34..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule137.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 20, - "column": 5, - "problem": "GlobalThis", - "suggest": "", - "rule": "\"globalThis\" is not supported (arkts-no-globalthis)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule138.ts.relax.json b/ets2panda/linter/test_rules/rule138.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule138.ts.relax.json rename to ets2panda/linter/test_rules/rule138.ts.json index babfb35215fa1c600ee92423c57c292376593c23..c5fdf55db5f28bd7ba6dc70ffcfeaeec3c57bd4f 100644 --- a/ets2panda/linter/test_rules/rule138.ts.relax.json +++ b/ets2panda/linter/test_rules/rule138.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule138.ts.strict.json b/ets2panda/linter/test_rules/rule138.ts.strict.json deleted file mode 100644 index babfb35215fa1c600ee92423c57c292376593c23..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule138.ts.strict.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 15, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 22, - "column": 22, - "problem": "UtilityType", - "suggest": "", - "rule": "Some of utility types are not supported (arkts-no-utility-types)" - }, - { - "line": 25, - "column": 14, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 30, - "column": 12, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule140.ts.strict.json b/ets2panda/linter/test_rules/rule139.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule140.ts.strict.json rename to ets2panda/linter/test_rules/rule139.ts.json index 837f6f4256d32ec1078454597340a0658a401b3e..f0add014bf40b029c29f7339cbea7d0355cd86a0 100644 --- a/ets2panda/linter/test_rules/rule140.ts.strict.json +++ b/ets2panda/linter/test_rules/rule139.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule139.ts.relax.json b/ets2panda/linter/test_rules/rule139.ts.relax.json deleted file mode 100644 index 74bf30228c464e197191b77d84f089f106621ada..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule139.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 21, - "column": 35, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 35, - "column": 1, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - }, - { - "line": 35, - "column": 1, - "problem": "PropertyDeclOnFunction", - "suggest": "", - "rule": "Declaring properties on functions is not supported (arkts-no-func-props)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule14.ts.relax.json b/ets2panda/linter/test_rules/rule14.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule14.ts.relax.json rename to ets2panda/linter/test_rules/rule14.ts.json index 0c64ee2b8c6fa4606a2cfe43db606cfa6d73597e..ec4469b7010e415c9e61df718babe361fa51c9ed 100644 --- a/ets2panda/linter/test_rules/rule14.ts.relax.json +++ b/ets2panda/linter/test_rules/rule14.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule14.ts.strict.json b/ets2panda/linter/test_rules/rule14.ts.strict.json deleted file mode 100644 index 0c64ee2b8c6fa4606a2cfe43db606cfa6d73597e..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule14.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 28, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 18, - "column": 5, - "problem": "CallSignature", - "suggest": "", - "rule": "Use \"class\" instead of a type with call signature (arkts-no-call-signatures)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule139.ts.strict.json b/ets2panda/linter/test_rules/rule140.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule139.ts.strict.json rename to ets2panda/linter/test_rules/rule140.ts.json index 837f6f4256d32ec1078454597340a0658a401b3e..f0add014bf40b029c29f7339cbea7d0355cd86a0 100644 --- a/ets2panda/linter/test_rules/rule139.ts.strict.json +++ b/ets2panda/linter/test_rules/rule140.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule140.ts.relax.json b/ets2panda/linter/test_rules/rule140.ts.relax.json deleted file mode 100644 index 74bf30228c464e197191b77d84f089f106621ada..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule140.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 21, - "column": 35, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 35, - "column": 1, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - }, - { - "line": 35, - "column": 1, - "problem": "PropertyDeclOnFunction", - "suggest": "", - "rule": "Declaring properties on functions is not supported (arkts-no-func-props)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule142.ts.relax.json b/ets2panda/linter/test_rules/rule142.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule142.ts.relax.json rename to ets2panda/linter/test_rules/rule142.ts.json index 99f1066aec17403d70ad920297bed8f0ceb53da2..677f8a9167c3b76b5b1db15c22004e8dff3b8850 100644 --- a/ets2panda/linter/test_rules/rule142.ts.relax.json +++ b/ets2panda/linter/test_rules/rule142.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule142.ts.strict.json b/ets2panda/linter/test_rules/rule142.ts.strict.json deleted file mode 100644 index 99f1066aec17403d70ad920297bed8f0ceb53da2..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule142.ts.strict.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 21, - "problem": "ConstAssertion", - "suggest": "", - "rule": "\"as const\" assertions are not supported (arkts-no-as-const)" - }, - { - "line": 20, - "column": 22, - "problem": "ConstAssertion", - "suggest": "", - "rule": "\"as const\" assertions are not supported (arkts-no-as-const)" - }, - { - "line": 23, - "column": 31, - "problem": "ConstAssertion", - "suggest": "", - "rule": "\"as const\" assertions are not supported (arkts-no-as-const)" - }, - { - "line": 23, - "column": 13, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule143.ts.strict.json b/ets2panda/linter/test_rules/rule143.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule143.ts.strict.json rename to ets2panda/linter/test_rules/rule143.ts.json index 8e0993c9086840acbcdc244261285482250c1b42..b6fe800d909a8c05cb11eae62716dda1b6e384dc 100644 --- a/ets2panda/linter/test_rules/rule143.ts.strict.json +++ b/ets2panda/linter/test_rules/rule143.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule143.ts.relax.json b/ets2panda/linter/test_rules/rule143.ts.relax.json deleted file mode 100644 index 8e0993c9086840acbcdc244261285482250c1b42..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule143.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 38, - "problem": "ImportAssertion", - "suggest": "", - "rule": "Import assertions are not supported (arkts-no-import-assertions)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule144.ts.strict.json b/ets2panda/linter/test_rules/rule144.ts.json similarity index 99% rename from ets2panda/linter/test_rules/rule144.ts.strict.json rename to ets2panda/linter/test_rules/rule144.ts.json index 55e798673cbf641d8e6d7f0979c79cd280bcb43c..1c9d6a1dc86f96a8ff8b45e891e106f20b7bd5ad 100644 --- a/ets2panda/linter/test_rules/rule144.ts.strict.json +++ b/ets2panda/linter/test_rules/rule144.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -463,4 +463,4 @@ "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" } ] -} +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule144.ts.relax.json b/ets2panda/linter/test_rules/rule144.ts.relax.json deleted file mode 100644 index 55e798673cbf641d8e6d7f0979c79cd280bcb43c..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule144.ts.relax.json +++ /dev/null @@ -1,466 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 1, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 31, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 32, - "column": 1, - "problem": "GlobalThis", - "suggest": "", - "rule": "\"globalThis\" is not supported (arkts-no-globalthis)" - }, - { - "line": 32, - "column": 12, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 56, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 57, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 58, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 58, - "column": 31, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 59, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 61, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 62, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 63, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 64, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 65, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 66, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 67, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 68, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 69, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 70, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 71, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 72, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 73, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 74, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 75, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 76, - "column": 8, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 85, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 86, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 86, - "column": 32, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 87, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 87, - "column": 32, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 88, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 90, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 91, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 92, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 93, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 94, - "column": 9, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 104, - "column": 32, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 105, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 105, - "column": 28, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 106, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 106, - "column": 32, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 107, - "column": 63, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 108, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 108, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 109, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 109, - "column": 26, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 110, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 110, - "column": 47, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 111, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 111, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 112, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 112, - "column": 26, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 113, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 113, - "column": 35, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 114, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 114, - "column": 30, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 115, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 115, - "column": 40, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 116, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 116, - "column": 26, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 117, - "column": 13, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - }, - { - "line": 117, - "column": 37, - "problem": "LimitedStdLibApi", - "suggest": "", - "rule": "Usage of standard library is restricted (arkts-limited-stdlib)" - } - ] -} diff --git a/ets2panda/linter/test_rules/rule145.ts.strict.json b/ets2panda/linter/test_rules/rule145.ts.json similarity index 98% rename from ets2panda/linter/test_rules/rule145.ts.strict.json rename to ets2panda/linter/test_rules/rule145.ts.json index d6d511999ee6ff9c44d1118b779d2a26af079ba9..d8fdeeeed259ee8e9309e3fb20f7286dc3a32a85 100644 --- a/ets2panda/linter/test_rules/rule145.ts.strict.json +++ b/ets2panda/linter/test_rules/rule145.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule145.ts.relax.json b/ets2panda/linter/test_rules/rule145.ts.relax.json deleted file mode 100644 index d6d511999ee6ff9c44d1118b779d2a26af079ba9..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule145.ts.relax.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Property 'n' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'n' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 18, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Property 's' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 's' has no initializer and is not definitely assigned in the constructor." - }, - { - "line": 22, - "column": 26, - "problem": "StrictDiagnostic", - "suggest": "Function lacks ending return statement and return type does not include 'undefined'.", - "rule": "Function lacks ending return statement and return type does not include 'undefined'." - }, - { - "line": 31, - "column": 5, - "problem": "StrictDiagnostic", - "suggest": "Type 'null' is not assignable to type 'number'.", - "rule": "Type 'null' is not assignable to type 'number'." - }, - { - "line": 43, - "column": 19, - "problem": "StrictDiagnostic", - "suggest": "Function lacks ending return statement and return type does not include 'undefined'.", - "rule": "Function lacks ending return statement and return type does not include 'undefined'." - }, - { - "line": 54, - "column": 14, - "problem": "StrictDiagnostic", - "suggest": "Function lacks ending return statement and return type does not include 'undefined'.", - "rule": "Function lacks ending return statement and return type does not include 'undefined'." - }, - { - "line": 57, - "column": 32, - "problem": "StrictDiagnostic", - "suggest": "Function lacks ending return statement and return type does not include 'undefined'.", - "rule": "Function lacks ending return statement and return type does not include 'undefined'." - }, - { - "line": 59, - "column": 14, - "problem": "StrictDiagnostic", - "suggest": "Function lacks ending return statement and return type does not include 'undefined'.", - "rule": "Function lacks ending return statement and return type does not include 'undefined'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule146.ts.relax.json b/ets2panda/linter/test_rules/rule146.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule146.ts.relax.json rename to ets2panda/linter/test_rules/rule146.ts.json index 1d5753d5c6459603d56cac128a7b75b0dc5d5982..188f2d9e2ddc24626c11d72c5bb5c4d085694c53 100644 --- a/ets2panda/linter/test_rules/rule146.ts.relax.json +++ b/ets2panda/linter/test_rules/rule146.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule146.ts.strict.json b/ets2panda/linter/test_rules/rule146.ts.strict.json deleted file mode 100644 index 1d5753d5c6459603d56cac128a7b75b0dc5d5982..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule146.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 5, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - }, - { - "line": 23, - "column": 5, - "problem": "ErrorSuppression", - "suggest": "", - "rule": "Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule147.ts.strict.json b/ets2panda/linter/test_rules/rule147.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule147.ts.strict.json rename to ets2panda/linter/test_rules/rule147.ts.json index b24d58aa8a64da5372f93f0fd7c191a5e543994f..fde6aea2e92ec005555199791994847ceb4b0f40 100644 --- a/ets2panda/linter/test_rules/rule147.ts.strict.json +++ b/ets2panda/linter/test_rules/rule147.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule147.ts.relax.json b/ets2panda/linter/test_rules/rule147.ts.relax.json deleted file mode 100644 index ef8d5232ac4fb169c04763d1860e5fd252602132..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule147.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 5, - "problem": "ImportAfterStatement", - "suggest": "", - "rule": "\"import\" statements after other statements are not allowed (arkts-no-misplaced-imports)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule149.ts.relax.json b/ets2panda/linter/test_rules/rule149.ts.json similarity index 99% rename from ets2panda/linter/test_rules/rule149.ts.relax.json rename to ets2panda/linter/test_rules/rule149.ts.json index 28bc1d6d877ca11120570bbba8f82ed02ce0db16..5e2285390e65f24e8cd154808ad29f8cfa365032 100644 --- a/ets2panda/linter/test_rules/rule149.ts.relax.json +++ b/ets2panda/linter/test_rules/rule149.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule149.ts.strict.json b/ets2panda/linter/test_rules/rule149.ts.strict.json deleted file mode 100644 index 28bc1d6d877ca11120570bbba8f82ed02ce0db16..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule149.ts.strict.json +++ /dev/null @@ -1,205 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "http://www.apache.org/licenses/LICENSE-2.0", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 27, - "column": 9, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 28, - "column": 5, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 29, - "column": 11, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 30, - "column": 7, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 38, - "column": 20, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 39, - "column": 6, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 42, - "column": 12, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 45, - "column": 20, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 46, - "column": 8, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 49, - "column": 14, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 58, - "column": 22, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 60, - "column": 7, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 68, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 70, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 71, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 72, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 74, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 75, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 76, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 78, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 79, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 81, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 87, - "column": 39, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 91, - "column": 12, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - }, - { - "line": 96, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 98, - "column": 8, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 116, - "column": 42, - "problem": "ClassAsObject", - "suggest": "", - "rule": "Classes cannot be used as objects (arkts-no-classes-as-obj)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/15497.ts.strict.json b/ets2panda/linter/test_rules/rule14_1.ts.json similarity index 100% rename from ets2panda/linter/test_regression/15497.ts.strict.json rename to ets2panda/linter/test_rules/rule14_1.ts.json diff --git a/ets2panda/linter/test_rules/rule14_1.ts.relax.json b/ets2panda/linter/test_rules/rule14_1.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule14_1.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule14_1.ts.strict.json b/ets2panda/linter/test_rules/rule14_1.ts.strict.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule14_1.ts.strict.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule15.ts.relax.json b/ets2panda/linter/test_rules/rule15.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule15.ts.relax.json rename to ets2panda/linter/test_rules/rule15.ts.json index 025a3ea194cf816b5357d26286b73d44381f2e17..9566b2e4fa493ba5450f11c6377937801a66ffaa 100644 --- a/ets2panda/linter/test_rules/rule15.ts.relax.json +++ b/ets2panda/linter/test_rules/rule15.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule15.ts.strict.json b/ets2panda/linter/test_rules/rule15.ts.strict.json deleted file mode 100644 index 025a3ea194cf816b5357d26286b73d44381f2e17..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule15.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 18, - "column": 24, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 19, - "column": 5, - "problem": "ConstructorType", - "suggest": "", - "rule": "Use \"class\" instead of a type with constructor signature (arkts-no-ctor-signatures-type)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule150.ts.relax.json b/ets2panda/linter/test_rules/rule150.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule150.ts.relax.json rename to ets2panda/linter/test_rules/rule150.ts.json index 2521bd90f39216a9db92255e91e6c2eabfc4bfe3..aa085f4c22382009b0ab0d35f0580ef54872fbb1 100644 --- a/ets2panda/linter/test_rules/rule150.ts.relax.json +++ b/ets2panda/linter/test_rules/rule150.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2022-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule150.ts.strict.json b/ets2panda/linter/test_rules/rule150.ts.strict.json deleted file mode 100644 index 2521bd90f39216a9db92255e91e6c2eabfc4bfe3..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule150.ts.strict.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 1, - "problem": "ImportAfterStatement" - }, - { - "line": 23, - "column": 1, - "problem": "ImportAfterStatement" - }, - { - "line": 24, - "column": 1, - "problem": "ImportAfterStatement" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule151.ts.relax.json b/ets2panda/linter/test_rules/rule151.ts.json similarity index 99% rename from ets2panda/linter/test_rules/rule151.ts.relax.json rename to ets2panda/linter/test_rules/rule151.ts.json index 5bab1a3eee7a781b35c0996be116badfe9617820..0dac4afe26aac725cf87c2d4d54c02005e5622d8 100644 --- a/ets2panda/linter/test_rules/rule151.ts.relax.json +++ b/ets2panda/linter/test_rules/rule151.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule151.ts.strict.json b/ets2panda/linter/test_rules/rule151.ts.strict.json deleted file mode 100644 index 86c0f49acf614ff7fd4b654983ee1a6684b0d3a3..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule151.ts.strict.json +++ /dev/null @@ -1,683 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 17, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 20, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 21, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 22, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 25, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 26, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 27, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 29, - "column": 21, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 29, - "column": 35, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 29, - "column": 53, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 14, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 46, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 35, - "column": 58, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 14, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 46, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 39, - "column": 58, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 14, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 46, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 43, - "column": 60, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 19, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 33, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 51, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 48, - "column": 63, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 19, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 33, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 51, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 52, - "column": 63, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 19, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 33, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 51, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 56, - "column": 65, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 60, - "column": 16, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 61, - "column": 12, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 64, - "column": 18, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 64, - "column": 32, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 64, - "column": 50, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 66, - "column": 15, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 67, - "column": 17, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 70, - "column": 13, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 71, - "column": 15, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 77, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 78, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 79, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 80, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 82, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 83, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 85, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 86, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 87, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 88, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 90, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 91, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 93, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 94, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 95, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 96, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 98, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 99, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 103, - "column": 12, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 105, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 106, - "column": 11, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 108, - "column": 18, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 109, - "column": 18, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 114, - "column": 25, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 115, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 119, - "column": 25, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 119, - "column": 36, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 136, - "column": 25, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 136, - "column": 38, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 148, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 149, - "column": 1, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 154, - "column": 32, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 154, - "column": 45, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 154, - "column": 58, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 162, - "column": 32, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 162, - "column": 47, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 162, - "column": 60, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 170, - "column": 28, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 172, - "column": 22, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 174, - "column": 30, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 176, - "column": 19, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 177, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 178, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 179, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 181, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 182, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 183, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 184, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 185, - "column": 9, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 188, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 189, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - }, - { - "line": 190, - "column": 5, - "problem": "EsObjectType", - "suggest": "", - "rule": "Usage of \"ESObject\" type is restricted (arkts-limited-esobj)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule152.ts.strict.json b/ets2panda/linter/test_rules/rule152.ts.json similarity index 64% rename from ets2panda/linter/test_rules/rule152.ts.strict.json rename to ets2panda/linter/test_rules/rule152.ts.json index 4710c9dfe13fd23d1995abd0138473597bbe5961..611fe5106417f4135600e6c05ef73bc46658910a 100644 --- a/ets2panda/linter/test_rules/rule152.ts.strict.json +++ b/ets2panda/linter/test_rules/rule152.ts.json @@ -1,4 +1,18 @@ { + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], "nodes": [ { "line": 23, diff --git a/ets2panda/linter/test_rules/rule152.ts.relax.json b/ets2panda/linter/test_rules/rule152.ts.relax.json deleted file mode 100644 index ba0504709df4f1fbe271b123cc68f86608162588..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule152.ts.relax.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "nodes": [ - { - "line": 31, - "column": 23, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 32, - "column": 23, - "problem": "FunctionApplyCall", - "rule": "\"Function.apply\", \"Function.call\" are not supported (arkts-no-func-apply-call)" - }, - { - "line": 17, - "column": 4, - "problem": "StrictDiagnostic", - "suggest": "Property 'getName' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'getName' has no initializer and is not definitely assigned in the constructor." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule16.ts.relax.json b/ets2panda/linter/test_rules/rule16.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule16.ts.relax.json rename to ets2panda/linter/test_rules/rule16.ts.json index 1e376b4960c24d93b7760dbf081300b0ba2babd2..11bad3ff439189f616100fd5d946152e2a0547e9 100644 --- a/ets2panda/linter/test_rules/rule16.ts.relax.json +++ b/ets2panda/linter/test_rules/rule16.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule16.ts.strict.json b/ets2panda/linter/test_rules/rule16.ts.strict.json deleted file mode 100644 index 1e376b4960c24d93b7760dbf081300b0ba2babd2..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule16.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 5, - "problem": "MultipleStaticBlocks", - "suggest": "", - "rule": "Only one static block is supported (arkts-no-multiple-static-blocks)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule17.ts.strict.json b/ets2panda/linter/test_rules/rule17.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule17.ts.strict.json rename to ets2panda/linter/test_rules/rule17.ts.json index 0394329541b6cb2eee91bf3bf481eb1c12f5c2a7..a41a66c7458ede5c5f5d4d63e14245d32bd3d39d 100644 --- a/ets2panda/linter/test_rules/rule17.ts.strict.json +++ b/ets2panda/linter/test_rules/rule17.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule17.ts.relax.json b/ets2panda/linter/test_rules/rule17.ts.relax.json deleted file mode 100644 index 507c7ed6a9497bbe11133aa409ce8a07d76a54bf..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule17.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 5, - "problem": "IndexMember", - "suggest": "", - "rule": "Indexed signatures are not supported (arkts-no-indexed-signatures)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule19.ts.relax.json b/ets2panda/linter/test_rules/rule19.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule19.ts.relax.json rename to ets2panda/linter/test_rules/rule19.ts.json index 68a4df9459a4f04dcfb7da4875931a356ccd4f22..00e75d55dba783bcd6a4e54b57ab72d626664bb8 100644 --- a/ets2panda/linter/test_rules/rule19.ts.relax.json +++ b/ets2panda/linter/test_rules/rule19.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule19.ts.strict.json b/ets2panda/linter/test_rules/rule19.ts.strict.json deleted file mode 100644 index 68a4df9459a4f04dcfb7da4875931a356ccd4f22..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule19.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 26, - "column": 17, - "problem": "IntersectionType", - "suggest": "", - "rule": "Use inheritance instead of intersection types (arkts-no-intersection-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule2.ts.relax.json b/ets2panda/linter/test_rules/rule2.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule2.ts.relax.json rename to ets2panda/linter/test_rules/rule2.ts.json index d33b09d2dfeb80fe283eec8f89b6ff26be64f8c5..47b6eb103ff81f201781cc685a990890e4285cf8 100644 --- a/ets2panda/linter/test_rules/rule2.ts.relax.json +++ b/ets2panda/linter/test_rules/rule2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule2.ts.strict.json b/ets2panda/linter/test_rules/rule2.ts.strict.json deleted file mode 100644 index d33b09d2dfeb80fe283eec8f89b6ff26be64f8c5..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule2.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 13, - "problem": "SymbolType", - "suggest": "", - "rule": "\"Symbol()\" API is not supported (arkts-no-symbol)" - }, - { - "line": 19, - "column": 9, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 20, - "column": 4, - "problem": "ComputedPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule21.ts.strict.json b/ets2panda/linter/test_rules/rule21.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule21.ts.strict.json rename to ets2panda/linter/test_rules/rule21.ts.json index c676a821b119d13cb8b8d80518656c8c04103a95..cf5e9e32f42bbac0a5e125dd3c4215b4e2489223 100644 --- a/ets2panda/linter/test_rules/rule21.ts.strict.json +++ b/ets2panda/linter/test_rules/rule21.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule21.ts.relax.json b/ets2panda/linter/test_rules/rule21.ts.relax.json deleted file mode 100644 index c676a821b119d13cb8b8d80518656c8c04103a95..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule21.ts.relax.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 16, - "problem": "ThisType", - "suggest": "", - "rule": "Type notation using \"this\" is not supported (arkts-no-typing-with-this)" - }, - { - "line": 23, - "column": 10, - "problem": "ThisType", - "suggest": "", - "rule": "Type notation using \"this\" is not supported (arkts-no-typing-with-this)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule21_1.ts.relax.json b/ets2panda/linter/test_rules/rule21_1.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule21_1.ts.relax.json rename to ets2panda/linter/test_rules/rule21_1.ts.json index 15d6bd493a88b15762079ddb82d195122391c24d..4e9bd7bbafdbbeb33f60a0d74667b6ae404d7e43 100644 --- a/ets2panda/linter/test_rules/rule21_1.ts.relax.json +++ b/ets2panda/linter/test_rules/rule21_1.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule21_1.ts.strict.json b/ets2panda/linter/test_rules/rule21_1.ts.strict.json deleted file mode 100644 index 15d6bd493a88b15762079ddb82d195122391c24d..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule21_1.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 23, - "column": 16, - "problem": "ThisType", - "suggest": "", - "rule": "Type notation using \"this\" is not supported (arkts-no-typing-with-this)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule21_2.ts.relax.json b/ets2panda/linter/test_rules/rule21_2.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule21_2.ts.relax.json rename to ets2panda/linter/test_rules/rule21_2.ts.json index f192c53f940f290d03f21cbf5d10d1ab33ca901d..1c2880ab1b766cb7ced9450d52c8533a533e2af5 100644 --- a/ets2panda/linter/test_rules/rule21_2.ts.relax.json +++ b/ets2panda/linter/test_rules/rule21_2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule21_2.ts.strict.json b/ets2panda/linter/test_rules/rule21_2.ts.strict.json deleted file mode 100644 index f192c53f940f290d03f21cbf5d10d1ab33ca901d..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule21_2.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 16, - "problem": "ThisType", - "suggest": "", - "rule": "Type notation using \"this\" is not supported (arkts-no-typing-with-this)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule21_3.ts.relax.json b/ets2panda/linter/test_rules/rule21_3.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule21_3.ts.relax.json rename to ets2panda/linter/test_rules/rule21_3.ts.json index 9738fc8ff410b36033f9b7c8a5e02c3efe66a8ca..6a6e360abb3e1bee0201e7f576b6aa5bffa1889a 100644 --- a/ets2panda/linter/test_rules/rule21_3.ts.relax.json +++ b/ets2panda/linter/test_rules/rule21_3.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule21_3.ts.strict.json b/ets2panda/linter/test_rules/rule21_3.ts.strict.json deleted file mode 100644 index 9738fc8ff410b36033f9b7c8a5e02c3efe66a8ca..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule21_3.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 16, - "problem": "ThisType", - "suggest": "", - "rule": "Type notation using \"this\" is not supported (arkts-no-typing-with-this)" - }, - { - "line": 26, - "column": 16, - "problem": "ThisType", - "suggest": "", - "rule": "Type notation using \"this\" is not supported (arkts-no-typing-with-this)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule22.ts.relax.json b/ets2panda/linter/test_rules/rule22.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule22.ts.relax.json rename to ets2panda/linter/test_rules/rule22.ts.json index e031fd84ac4c6e40a878b48397cde8c82efd76b0..814e0599a6a01846eb409552f721e392c1be063e 100644 --- a/ets2panda/linter/test_rules/rule22.ts.relax.json +++ b/ets2panda/linter/test_rules/rule22.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule22.ts.strict.json b/ets2panda/linter/test_rules/rule22.ts.strict.json deleted file mode 100644 index e031fd84ac4c6e40a878b48397cde8c82efd76b0..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule22.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 13, - "problem": "ConditionalType", - "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" - }, - { - "line": 18, - "column": 13, - "problem": "ConditionalType", - "suggest": "", - "rule": "Conditional types are not supported (arkts-no-conditional-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test/dynamic_import.ts.relax.json b/ets2panda/linter/test_rules/rule25.ts.autofix.json old mode 100755 new mode 100644 similarity index 37% rename from ets2panda/linter/test/dynamic_import.ts.relax.json rename to ets2panda/linter/test_rules/rule25.ts.autofix.json index e361de54cac3bd526b638381e262c39c7ea9fb46..e5a1aaa8422a9433b0f86441c81fc327164590a2 --- a/ets2panda/linter/test/dynamic_import.ts.relax.json +++ b/ets2panda/linter/test_rules/rule25.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2022-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -14,19 +14,40 @@ "limitations under the License." ], "nodes": [ - { - "line": 17, - "column": 9, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, { "line": 18, "column": 9, - "problem": "AnyType", + "problem": "ParameterProperties", + "autofixable": true, + "autofix": [ + { + "start": 624, + "end": 624, + "replacementText": "protected ssn: string;\nprivate firstName: string;\nprivate lastName: string;\n" + }, + { + "start": 645, + "end": 666, + "replacementText": "ssn: string" + }, + { + "start": 676, + "end": 701, + "replacementText": "firstName: string" + }, + { + "start": 711, + "end": 735, + "replacementText": "lastName: string" + }, + { + "start": 742, + "end": 840, + "replacementText": "{\n this.ssn = ssn;\n this.firstName = firstName;\n this.lastName = lastName;\n this.ssn = ssn;\n this.firstName = firstName;\n this.lastName = lastName;\n}" + } + ], "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" } ] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule114.ts.strict.json b/ets2panda/linter/test_rules/rule25.ts.json similarity index 76% rename from ets2panda/linter/test_rules/rule114.ts.strict.json rename to ets2panda/linter/test_rules/rule25.ts.json index 7ed1a16873a61e4e7ab0a9ca18ae988827ca9eae..fa30edb0f6e454e6da7fa4784632ff03679f1959 100644 --- a/ets2panda/linter/test_rules/rule114.ts.strict.json +++ b/ets2panda/linter/test_rules/rule25.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -15,11 +15,11 @@ ], "nodes": [ { - "line": 20, + "line": 18, "column": 9, - "problem": "NamespaceAsObject", + "problem": "ParameterProperties", "suggest": "", - "rule": "Namespaces cannot be used as objects (arkts-no-ns-as-obj)" + "rule": "Declaring fields in \"constructor\" is not supported (arkts-no-ctor-prop-decls)" } ] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule25.ts.relax.json b/ets2panda/linter/test_rules/rule25.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule25.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule27.ts.relax.json b/ets2panda/linter/test_rules/rule27.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule27.ts.relax.json rename to ets2panda/linter/test_rules/rule27.ts.json index 94c448a4bd19de3bab11bd2f1997cb0a1227a280..cdbd4c2cf006c14e181735d1791d2c1b56083036 100644 --- a/ets2panda/linter/test_rules/rule27.ts.relax.json +++ b/ets2panda/linter/test_rules/rule27.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule27.ts.strict.json b/ets2panda/linter/test_rules/rule27.ts.strict.json deleted file mode 100644 index 94c448a4bd19de3bab11bd2f1997cb0a1227a280..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule27.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 5, - "problem": "ConstructorIface", - "suggest": "", - "rule": "Construct signatures are not supported in interfaces (arkts-no-ctor-signatures-iface)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule28.ts.relax.json b/ets2panda/linter/test_rules/rule28.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule28.ts.relax.json rename to ets2panda/linter/test_rules/rule28.ts.json index 7b39f5caf2631221c6a0bf240697c549ef700c8c..c14d1f08ce37f25e3246206a7bb52a5d20f6dc47 100644 --- a/ets2panda/linter/test_rules/rule28.ts.relax.json +++ b/ets2panda/linter/test_rules/rule28.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule28.ts.strict.json b/ets2panda/linter/test_rules/rule28.ts.strict.json deleted file mode 100644 index 7b39f5caf2631221c6a0bf240697c549ef700c8c..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule28.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 14, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 17, - "column": 10, - "problem": "IndexedAccessType", - "suggest": "", - "rule": "Indexed access types are not supported (arkts-no-aliases-by-index)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule29.ts.autofix.json b/ets2panda/linter/test_rules/rule29.ts.autofix.json index d7a662d6641e4a4d832af8d23f31a6ab5c8ff63e..bda7cae238b055a5727f58f367a56f962d878106 100644 --- a/ets2panda/linter/test_rules/rule29.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule29.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule29.ts.strict.json b/ets2panda/linter/test_rules/rule29.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule29.ts.strict.json rename to ets2panda/linter/test_rules/rule29.ts.json index 94aef882f10ba2d60f91bc5e4f2bbb1408fc3a36..dbf74bebef226611328375fb140e0e359ebdcb64 100644 --- a/ets2panda/linter/test_rules/rule29.ts.strict.json +++ b/ets2panda/linter/test_rules/rule29.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule29.ts.relax.json b/ets2panda/linter/test_rules/rule29.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule29.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule134.ts.strict.json b/ets2panda/linter/test_rules/rule3.ts.autofix.json similarity index 75% rename from ets2panda/linter/test_rules/rule134.ts.strict.json rename to ets2panda/linter/test_rules/rule3.ts.autofix.json index 87e4d6d23fb727e50e33896c385607f0ea353776..af257bbddb3a9515eef052c045dfd8c617a1c3ab 100644 --- a/ets2panda/linter/test_rules/rule134.ts.strict.json +++ b/ets2panda/linter/test_rules/rule3.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", @@ -15,11 +15,12 @@ ], "nodes": [ { - "line": 16, + "line": 18, "column": 5, - "problem": "DefiniteAssignment", + "problem": "PrivateIdentifier", + "autofixable": true, "suggest": "", - "rule": "Definite assignment assertions are not supported (arkts-no-definite-assignment)" + "rule": "Private '#' identifiers are not supported (arkts-no-private-identifiers)" } ] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule3.ts.strict.json b/ets2panda/linter/test_rules/rule3.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule3.ts.strict.json rename to ets2panda/linter/test_rules/rule3.ts.json index f0c88d936594d192942b8f157d5a6ff01e93ee1d..fec56a39b634dc04e6c9ee510b3eab90ad602e37 100644 --- a/ets2panda/linter/test_rules/rule3.ts.strict.json +++ b/ets2panda/linter/test_rules/rule3.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule3.ts.relax.json b/ets2panda/linter/test_rules/rule3.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule3.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30.ts.json b/ets2panda/linter/test_rules/rule30.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..0f0ef2c3a3baafdd51b3e68113101abf6a360ba3 --- /dev/null +++ b/ets2panda/linter/test_rules/rule30.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30.ts.relax.json b/ets2panda/linter/test_rules/rule30.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule30.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30.ts.strict.json b/ets2panda/linter/test_rules/rule30.ts.strict.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule30.ts.strict.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_1.ts.relax.json b/ets2panda/linter/test_rules/rule30_1.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule30_1.ts.relax.json rename to ets2panda/linter/test_rules/rule30_1.ts.json index a8fca7288ce4ca3c4cd9739418a6141f3c5d29b6..bcd49303b3e49d37a3d01fc6d5d9994c39615817 100644 --- a/ets2panda/linter/test_rules/rule30_1.ts.relax.json +++ b/ets2panda/linter/test_rules/rule30_1.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule30_1.ts.strict.json b/ets2panda/linter/test_rules/rule30_1.ts.strict.json deleted file mode 100644 index a8fca7288ce4ca3c4cd9739418a6141f3c5d29b6..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule30_1.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 36, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 39, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_2.ts.relax.json b/ets2panda/linter/test_rules/rule30_2.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule30_2.ts.relax.json rename to ets2panda/linter/test_rules/rule30_2.ts.json index 9c67fbb9f5be38820206d33b4b44d74d05366d74..12f011ffadbb3c9c98ea26c432de19bd56c60801 100644 --- a/ets2panda/linter/test_rules/rule30_2.ts.relax.json +++ b/ets2panda/linter/test_rules/rule30_2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule30_2.ts.strict.json b/ets2panda/linter/test_rules/rule30_2.ts.strict.json deleted file mode 100644 index 9c67fbb9f5be38820206d33b4b44d74d05366d74..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule30_2.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 35, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 38, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_3.ts.json b/ets2panda/linter/test_rules/rule30_3.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..ad85bf6b8411598cd234172ea0b9b87380c475f3 --- /dev/null +++ b/ets2panda/linter/test_rules/rule30_3.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_3.ts.relax.json b/ets2panda/linter/test_rules/rule30_3.ts.relax.json deleted file mode 100644 index e7d2d6779bbeb56cae88903ecb7da87087831260..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule30_3.ts.relax.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_3.ts.strict.json b/ets2panda/linter/test_rules/rule30_3.ts.strict.json deleted file mode 100644 index e7d2d6779bbeb56cae88903ecb7da87087831260..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule30_3.ts.strict.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_4.ts.relax.json b/ets2panda/linter/test_rules/rule30_4.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule30_4.ts.relax.json rename to ets2panda/linter/test_rules/rule30_4.ts.json index 30e8277c429671c8c8c197ed4005dc0ddde9d1f3..7503d3c56286a8d32db867986a2bd8cab7519363 100644 --- a/ets2panda/linter/test_rules/rule30_4.ts.relax.json +++ b/ets2panda/linter/test_rules/rule30_4.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule30_4.ts.strict.json b/ets2panda/linter/test_rules/rule30_4.ts.strict.json deleted file mode 100644 index 30e8277c429671c8c8c197ed4005dc0ddde9d1f3..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule30_4.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 50, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 53, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_5.ts.relax.json b/ets2panda/linter/test_rules/rule30_5.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule30_5.ts.relax.json rename to ets2panda/linter/test_rules/rule30_5.ts.json index 70bc29af7d4d381a23e9257f272c2da9841a50e4..b288dda7fd18850e7481e2d0f2fbd41fcbebce46 100644 --- a/ets2panda/linter/test_rules/rule30_5.ts.relax.json +++ b/ets2panda/linter/test_rules/rule30_5.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule30_5.ts.strict.json b/ets2panda/linter/test_rules/rule30_5.ts.strict.json deleted file mode 100644 index 70bc29af7d4d381a23e9257f272c2da9841a50e4..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule30_5.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 49, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule30_6.ts.relax.json b/ets2panda/linter/test_rules/rule30_6.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule30_6.ts.relax.json rename to ets2panda/linter/test_rules/rule30_6.ts.json index dc7649d15b74a4f2485bfd8afb87c9773e292fe9..3514c51b0e4d537c3070d09795df9674d4ade1e3 100644 --- a/ets2panda/linter/test_rules/rule30_6.ts.relax.json +++ b/ets2panda/linter/test_rules/rule30_6.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule30_6.ts.strict.json b/ets2panda/linter/test_rules/rule30_6.ts.strict.json deleted file mode 100644 index dc7649d15b74a4f2485bfd8afb87c9773e292fe9..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule30_6.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 51, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - }, - { - "line": 54, - "column": 1, - "problem": "StructuralIdentity", - "suggest": "", - "rule": "Structural typing is not supported (arkts-no-structural-typing)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule34.ts.relax.json b/ets2panda/linter/test_rules/rule34.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule34.ts.relax.json rename to ets2panda/linter/test_rules/rule34.ts.json index f642fe073afd29f7c5aa9731fb5ca650ce9cf4ad..b94792c9aaf93ffac494dee9392f43b0babaf6d2 100644 --- a/ets2panda/linter/test_rules/rule34.ts.relax.json +++ b/ets2panda/linter/test_rules/rule34.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule34.ts.strict.json b/ets2panda/linter/test_rules/rule34.ts.strict.json deleted file mode 100644 index f642fe073afd29f7c5aa9731fb5ca650ce9cf4ad..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule34.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 26, - "column": 5, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 26, - "column": 9, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule38.ts.json b/ets2panda/linter/test_rules/rule38.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..0f0ef2c3a3baafdd51b3e68113101abf6a360ba3 --- /dev/null +++ b/ets2panda/linter/test_rules/rule38.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule38.ts.relax.json b/ets2panda/linter/test_rules/rule38.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule38.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule38.ts.strict.json b/ets2panda/linter/test_rules/rule38.ts.strict.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule38.ts.strict.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule4.ts.strict.json b/ets2panda/linter/test_rules/rule4.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule4.ts.strict.json rename to ets2panda/linter/test_rules/rule4.ts.json index 154c06a491a96f3112ecdb3fb07b8c2aaaf99fa6..cbbb6a56cd083992ad9d0227dc285944acf2338d 100644 --- a/ets2panda/linter/test_rules/rule4.ts.strict.json +++ b/ets2panda/linter/test_rules/rule4.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule4.ts.relax.json b/ets2panda/linter/test_rules/rule4.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule4.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule40.ts.relax.json b/ets2panda/linter/test_rules/rule40.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule40.ts.relax.json rename to ets2panda/linter/test_rules/rule40.ts.json index 0d67744ac5e3452b90c861be8f929b8abc309214..c3ada1642023c992bee1dfcb6298057cdd15bba4 100644 --- a/ets2panda/linter/test_rules/rule40.ts.relax.json +++ b/ets2panda/linter/test_rules/rule40.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule40.ts.strict.json b/ets2panda/linter/test_rules/rule40.ts.strict.json deleted file mode 100644 index 0d67744ac5e3452b90c861be8f929b8abc309214..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule40.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 8, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - }, - { - "line": 16, - "column": 33, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 21, - "column": 14, - "problem": "ObjectTypeLiteral", - "suggest": "", - "rule": "Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule43.ts.strict.json b/ets2panda/linter/test_rules/rule43.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule43.ts.strict.json rename to ets2panda/linter/test_rules/rule43.ts.json index 9b490ce675e76d7c15394ca2405808044c77130f..fe93427b6e7f91625febea0c082e2da2bfa334f5 100644 --- a/ets2panda/linter/test_rules/rule43.ts.strict.json +++ b/ets2panda/linter/test_rules/rule43.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule43.ts.relax.json b/ets2panda/linter/test_rules/rule43.ts.relax.json deleted file mode 100644 index 9b490ce675e76d7c15394ca2405808044c77130f..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule43.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 9, - "problem": "ArrayLiteralNoContextType", - "suggest": "", - "rule": "Array literals must contain elements of only inferrable types (arkts-no-noninferrable-arr-literals)" - }, - { - "line": 16, - "column": 10, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 16, - "column": 26, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule46.ts.autofix.json b/ets2panda/linter/test_rules/rule46.ts.autofix.json index ff2bfe4f07bb017f724a921c9c3c2b99ba6ae4d3..158df69f1ec38fbe53396a1ec2f50395f6a21690 100644 --- a/ets2panda/linter/test_rules/rule46.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule46.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule46.ts.strict.json b/ets2panda/linter/test_rules/rule46.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule46.ts.strict.json rename to ets2panda/linter/test_rules/rule46.ts.json index 481697b8bc04d70f5c6496e070c6c6445c562ed0..2efd9330b374b681378fc957176f2859ae3cc776 100644 --- a/ets2panda/linter/test_rules/rule46.ts.strict.json +++ b/ets2panda/linter/test_rules/rule46.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule46.ts.relax.json b/ets2panda/linter/test_rules/rule46.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule46.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule49.ts.strict.json b/ets2panda/linter/test_rules/rule49.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule49.ts.strict.json rename to ets2panda/linter/test_rules/rule49.ts.json index 9e7ad0c44b8b08d9a01f6b600fa025758dd0d915..191a80284c19200b8b39dd63beed7d6da76dd435 100644 --- a/ets2panda/linter/test_rules/rule49.ts.strict.json +++ b/ets2panda/linter/test_rules/rule49.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule49.ts.relax.json b/ets2panda/linter/test_rules/rule49.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule49.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule5.ts.strict.json b/ets2panda/linter/test_rules/rule5.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule5.ts.strict.json rename to ets2panda/linter/test_rules/rule5.ts.json index 431bb92ee98b46a7540efad626867ce70de4357d..f5d20ea2a5ea15a6bed9c33fedc3138ace2f11ea 100644 --- a/ets2panda/linter/test_rules/rule5.ts.strict.json +++ b/ets2panda/linter/test_rules/rule5.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule5.ts.relax.json b/ets2panda/linter/test_rules/rule5.ts.relax.json deleted file mode 100644 index 786d2345d59b87618fce9eeb45ec2fc762cef9f8..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule5.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 21, - "column": 12, - "problem": "StrictDiagnostic", - "suggest": "Variable 'x' is used before being assigned.", - "rule": "Variable 'x' is used before being assigned." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule50.ts.strict.json b/ets2panda/linter/test_rules/rule50.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule50.ts.strict.json rename to ets2panda/linter/test_rules/rule50.ts.json index 2d751b7bd69fe34ff046492132ba000ea51ca912..92c1a6d8afe894c82c393e3addcd6f55da881caa 100644 --- a/ets2panda/linter/test_rules/rule50.ts.strict.json +++ b/ets2panda/linter/test_rules/rule50.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule50.ts.relax.json b/ets2panda/linter/test_rules/rule50.ts.relax.json deleted file mode 100644 index f8cc3bfc24495924280fe6c54e99c6d0951f23d9..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule50.ts.relax.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 23, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule51.ts.relax.json b/ets2panda/linter/test_rules/rule51.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule51.ts.relax.json rename to ets2panda/linter/test_rules/rule51.ts.json index 222569461362d8fed7771bb5594950b8d81af056..ebbf7f979d6a1ee5f8428208f98d88396be2db26 100644 --- a/ets2panda/linter/test_rules/rule51.ts.relax.json +++ b/ets2panda/linter/test_rules/rule51.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule51.ts.strict.json b/ets2panda/linter/test_rules/rule51.ts.strict.json deleted file mode 100644 index 222569461362d8fed7771bb5594950b8d81af056..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule51.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 20, - "column": 23, - "problem": "ImplementsClass", - "suggest": "", - "rule": "Classes cannot be specified in \"implements\" clause (arkts-implements-only-iface)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule52.ts.relax.json b/ets2panda/linter/test_rules/rule52.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule52.ts.relax.json rename to ets2panda/linter/test_rules/rule52.ts.json index 7be6dbb33fbcd886203bbd8e6af41740e5ff485e..0b1806f6e069f3184c55567a10479f23c00a36f4 100644 --- a/ets2panda/linter/test_rules/rule52.ts.relax.json +++ b/ets2panda/linter/test_rules/rule52.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule52.ts.strict.json b/ets2panda/linter/test_rules/rule52.ts.strict.json deleted file mode 100644 index 7be6dbb33fbcd886203bbd8e6af41740e5ff485e..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule52.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 30, - "column": 1, - "problem": "MethodReassignment", - "suggest": "", - "rule": "Reassigning object methods is not supported (arkts-no-method-reassignment)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_regression/15431.ts.strict.json b/ets2panda/linter/test_rules/rule53.ts.autofix.json similarity index 57% rename from ets2panda/linter/test_regression/15431.ts.strict.json rename to ets2panda/linter/test_rules/rule53.ts.autofix.json index cbbe46e47ae71ba4c70e8c1e36ca175fd5ca2b6f..3570923d6bf636333e04e68115947631606f0858 100644 --- a/ets2panda/linter/test_regression/15431.ts.strict.json +++ b/ets2panda/linter/test_rules/rule53.ts.autofix.json @@ -15,25 +15,27 @@ ], "nodes": [ { - "line": 22, - "column": 3, - "problem": "MultipleStaticBlocks", + "line": 24, + "column": 10, + "problem": "TypeAssertion", + "autofixable": true, + "autofix": [ + { + "start": 782, + "end": 804, + "replacementText": "createShape() as Circle" + } + ], "suggest": "", - "rule": "Only one static block is supported (arkts-no-multiple-static-blocks)" + "rule": "Only \"as T\" syntax is supported for type casts (arkts-as-casts)" }, { - "line": 30, - "column": 5, - "problem": "FunctionContainsThis", + "line": 36, + "column": 11, + "problem": "TypeAssertion", + "autofixable": false, "suggest": "", - "rule": "Using \"this\" inside stand-alone functions is not supported (arkts-no-standalone-this)" - }, - { - "line": 42, - "column": 3, - "problem": "MultipleStaticBlocks", - "suggest": "", - "rule": "Only one static block is supported (arkts-no-multiple-static-blocks)" + "rule": "Only \"as T\" syntax is supported for type casts (arkts-as-casts)" } ] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule53.ts.autofix.skip b/ets2panda/linter/test_rules/rule53.ts.autofix.skip deleted file mode 100644 index 13982e9c910b164b802d0921a8cc7d56e1bf383e..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule53.ts.autofix.skip +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ diff --git a/ets2panda/linter/test_rules/rule53.ts.strict.json b/ets2panda/linter/test_rules/rule53.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule53.ts.strict.json rename to ets2panda/linter/test_rules/rule53.ts.json index e02beaaf38703e5972a7b2ae2ef77c583888bbcf..b4175d37bf7a0e6059e2cb16c61564766f0733f1 100644 --- a/ets2panda/linter/test_rules/rule53.ts.strict.json +++ b/ets2panda/linter/test_rules/rule53.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule53.ts.relax.json b/ets2panda/linter/test_rules/rule53.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule53.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule54.tsx.strict.json b/ets2panda/linter/test_rules/rule54.tsx.json similarity index 96% rename from ets2panda/linter/test_rules/rule54.tsx.strict.json rename to ets2panda/linter/test_rules/rule54.tsx.json index c8561e293d5b069110d947f1dbb6a04d43b9f4ee..edc9ec750821906b64d30fb619b9b43defd0bc54 100644 --- a/ets2panda/linter/test_rules/rule54.tsx.strict.json +++ b/ets2panda/linter/test_rules/rule54.tsx.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule54.tsx.relax.json b/ets2panda/linter/test_rules/rule54.tsx.relax.json deleted file mode 100644 index 835896f99dad358b07d3f261febba426e9dfbfb7..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule54.tsx.relax.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 33, - "problem": "JsxElement" - }, - { - "line": 19, - "column": 27, - "problem": "JsxElement" - }, - { - "line": 21, - "column": 7, - "problem": "AnyType" - }, - { - "line": 22, - "column": 5, - "problem": "JsxElement" - }, - { - "line": 23, - "column": 38, - "problem": "JsxElement" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule55.ts.relax.json b/ets2panda/linter/test_rules/rule55.ts.json similarity index 97% rename from ets2panda/linter/test_rules/rule55.ts.relax.json rename to ets2panda/linter/test_rules/rule55.ts.json index 82dd3e3b9dc917c031e7e80ea83caab45ea472e2..a09fbc1d25714620f3693fcbd010c61672bb3dbd 100644 --- a/ets2panda/linter/test_rules/rule55.ts.relax.json +++ b/ets2panda/linter/test_rules/rule55.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule55.ts.strict.json b/ets2panda/linter/test_rules/rule55.ts.strict.json deleted file mode 100644 index 82dd3e3b9dc917c031e7e80ea83caab45ea472e2..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule55.ts.strict.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 9, - "problem": "UnaryArithmNotNumber", - "suggest": "", - "rule": "Unary operators \"+\", \"-\" and \"~\" work only on numbers (arkts-no-polymorphic-unops)" - }, - { - "line": 19, - "column": 9, - "problem": "UnaryArithmNotNumber", - "suggest": "", - "rule": "Unary operators \"+\", \"-\" and \"~\" work only on numbers (arkts-no-polymorphic-unops)" - }, - { - "line": 21, - "column": 9, - "problem": "UnaryArithmNotNumber", - "suggest": "", - "rule": "Unary operators \"+\", \"-\" and \"~\" work only on numbers (arkts-no-polymorphic-unops)" - }, - { - "line": 22, - "column": 9, - "problem": "UnaryArithmNotNumber", - "suggest": "", - "rule": "Unary operators \"+\", \"-\" and \"~\" work only on numbers (arkts-no-polymorphic-unops)" - }, - { - "line": 32, - "column": 9, - "problem": "UnaryArithmNotNumber", - "suggest": "", - "rule": "Unary operators \"+\", \"-\" and \"~\" work only on numbers (arkts-no-polymorphic-unops)" - }, - { - "line": 33, - "column": 9, - "problem": "UnaryArithmNotNumber", - "suggest": "", - "rule": "Unary operators \"+\", \"-\" and \"~\" work only on numbers (arkts-no-polymorphic-unops)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule59.ts.relax.json b/ets2panda/linter/test_rules/rule59.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule59.ts.relax.json rename to ets2panda/linter/test_rules/rule59.ts.json index 619c7a5b2df45b235489d5dc44ffcde5be1c27d0..1e79b2f492d74340af6a6e7c4f107fa814400b5e 100644 --- a/ets2panda/linter/test_rules/rule59.ts.relax.json +++ b/ets2panda/linter/test_rules/rule59.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule59.ts.strict.json b/ets2panda/linter/test_rules/rule59.ts.strict.json deleted file mode 100644 index 619c7a5b2df45b235489d5dc44ffcde5be1c27d0..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule59.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 1, - "problem": "DeleteOperator", - "suggest": "", - "rule": "\"delete\" operator is not supported (arkts-no-delete)" - }, - { - "line": 30, - "column": 1, - "problem": "StrictDiagnostic", - "suggest": "Type 'null' is not assignable to type 'number | undefined'.", - "rule": "Type 'null' is not assignable to type 'number | undefined'." - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule60.ts.strict.json b/ets2panda/linter/test_rules/rule60.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule60.ts.strict.json rename to ets2panda/linter/test_rules/rule60.ts.json index 1b924035788240b3bdd7533c03fb5b2d460df8cc..066d1bf16abde59c6c8bb585a98251e9dacd79ed 100644 --- a/ets2panda/linter/test_rules/rule60.ts.strict.json +++ b/ets2panda/linter/test_rules/rule60.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule60.ts.relax.json b/ets2panda/linter/test_rules/rule60.ts.relax.json deleted file mode 100644 index 1b924035788240b3bdd7533c03fb5b2d460df8cc..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule60.ts.relax.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 20, - "column": 9, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - }, - { - "line": 21, - "column": 9, - "problem": "TypeQuery", - "suggest": "", - "rule": "\"typeof\" operator is allowed only in expression contexts (arkts-no-type-query)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule65.ts.relax.json b/ets2panda/linter/test_rules/rule65.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule65.ts.relax.json rename to ets2panda/linter/test_rules/rule65.ts.json index e91066270ec76543a2325d4de464e108d7ed97bb..5135a5850e8802ab0c37b80f448588b9f93fc126 100644 --- a/ets2panda/linter/test_rules/rule65.ts.relax.json +++ b/ets2panda/linter/test_rules/rule65.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule65.ts.strict.json b/ets2panda/linter/test_rules/rule65.ts.strict.json deleted file mode 100644 index e91066270ec76543a2325d4de464e108d7ed97bb..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule65.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 23, - "column": 11, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - }, - { - "line": 24, - "column": 11, - "problem": "InstanceofUnsupported", - "suggest": "", - "rule": "\"instanceof\" operator is partially supported (arkts-instanceof-ref-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule66.ts.relax.json b/ets2panda/linter/test_rules/rule66.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule66.ts.relax.json rename to ets2panda/linter/test_rules/rule66.ts.json index 70c6adc91c7663b8adc8c2657a106f1a6db5906d..8a4fee252eef1dcc8e0e1ddc95df27463adffe14 100644 --- a/ets2panda/linter/test_rules/rule66.ts.relax.json +++ b/ets2panda/linter/test_rules/rule66.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule66.ts.strict.json b/ets2panda/linter/test_rules/rule66.ts.strict.json deleted file mode 100644 index 70c6adc91c7663b8adc8c2657a106f1a6db5906d..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule66.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 21, - "column": 16, - "problem": "InOperator", - "suggest": "", - "rule": "\"in\" operator is not supported (arkts-no-in)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule69.ts.strict.json b/ets2panda/linter/test_rules/rule69.ts.json similarity index 97% rename from ets2panda/linter/test_rules/rule69.ts.strict.json rename to ets2panda/linter/test_rules/rule69.ts.json index 9a46485db4d118e3d41fee2dc2dab7a45689a21a..0a738d38fe854e3d81413266f7c7741cca8699f9 100644 --- a/ets2panda/linter/test_rules/rule69.ts.strict.json +++ b/ets2panda/linter/test_rules/rule69.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule69.ts.relax.json b/ets2panda/linter/test_rules/rule69.ts.relax.json deleted file mode 100644 index e084b3bb8e385c23a2d14f75004545e40d418b27..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule69.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 5, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 19, - "column": 11, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 20, - "column": 8, - "problem": "SpreadOperator", - "suggest": "", - "rule": "It is possible to spread only arrays or classes derived from arrays into the rest parameter or array literals (arkts-no-spread)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule71.ts.strict.json b/ets2panda/linter/test_rules/rule71.ts.json similarity index 98% rename from ets2panda/linter/test_rules/rule71.ts.strict.json rename to ets2panda/linter/test_rules/rule71.ts.json index b25cacf904d1494f4653817c4ca0290c41f1d161..bd5e2d016b18b473e6544a87d0aec6eac0f75f19 100644 --- a/ets2panda/linter/test_rules/rule71.ts.strict.json +++ b/ets2panda/linter/test_rules/rule71.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule71.ts.relax.json b/ets2panda/linter/test_rules/rule71.ts.relax.json deleted file mode 100644 index b25cacf904d1494f4653817c4ca0290c41f1d161..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule71.ts.relax.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 22, - "column": 6, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 34, - "column": 12, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 34, - "column": 12, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 35, - "column": 12, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 35, - "column": 12, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 38, - "column": 27, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 38, - "column": 27, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 39, - "column": 15, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 39, - "column": 15, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 42, - "column": 24, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - }, - { - "line": 42, - "column": 24, - "problem": "CommaOperator", - "suggest": "", - "rule": "The comma operator \",\" is supported only in \"for\" loops (arkts-no-comma-outside-loops)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule74.ts.strict.json b/ets2panda/linter/test_rules/rule74.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule74.ts.strict.json rename to ets2panda/linter/test_rules/rule74.ts.json index 4fdf1639a4f546a81128226c0be7e3614bda11d3..02ed7592590226e20579f11944b50dcbf300710d 100644 --- a/ets2panda/linter/test_rules/rule74.ts.strict.json +++ b/ets2panda/linter/test_rules/rule74.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule74.ts.relax.json b/ets2panda/linter/test_rules/rule74.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule74.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule79.ts.autofix.json b/ets2panda/linter/test_rules/rule79.ts.autofix.json index 7fe76d4fe92fc8a22eacc5a2cb28e3926e7f8599..f80b592d2ae405735ff7c723a254b00f17ba1879 100644 --- a/ets2panda/linter/test_rules/rule79.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule79.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule79.ts.strict.json b/ets2panda/linter/test_rules/rule79.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule79.ts.strict.json rename to ets2panda/linter/test_rules/rule79.ts.json index 329eca06903e54d12e8268161f417c5e2031ae46..4886e10961f29604a520e686eb7c810558612316 100644 --- a/ets2panda/linter/test_rules/rule79.ts.strict.json +++ b/ets2panda/linter/test_rules/rule79.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule79.ts.relax.json b/ets2panda/linter/test_rules/rule79.ts.relax.json deleted file mode 100644 index 48f095ed635c9e4a16703ad16893bf86d1959727..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule79.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 19, - "column": 11, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule8.ts.strict.json b/ets2panda/linter/test_rules/rule8.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule8.ts.strict.json rename to ets2panda/linter/test_rules/rule8.ts.json index 0adf234ca3b63e0c953673a473096732a97ad38c..7b0b5d4ff5bc4e1bd2ed1783bdbaa5623b6495a0 100644 --- a/ets2panda/linter/test_rules/rule8.ts.strict.json +++ b/ets2panda/linter/test_rules/rule8.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule8.ts.relax.json b/ets2panda/linter/test_rules/rule8.ts.relax.json deleted file mode 100644 index 0adf234ca3b63e0c953673a473096732a97ad38c..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule8.ts.relax.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 14, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 21, - "column": 14, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule80.ts.relax.json b/ets2panda/linter/test_rules/rule80.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule80.ts.relax.json rename to ets2panda/linter/test_rules/rule80.ts.json index 8cd03efd43e70a1f1874bde849b6f6290660f967..34292a44b6040f58e82ebb7f1283aaa47c63c5d7 100644 --- a/ets2panda/linter/test_rules/rule80.ts.relax.json +++ b/ets2panda/linter/test_rules/rule80.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule80.ts.strict.json b/ets2panda/linter/test_rules/rule80.ts.strict.json deleted file mode 100644 index 8cd03efd43e70a1f1874bde849b6f6290660f967..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule80.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 12, - "problem": "ForInStatement", - "suggest": "", - "rule": "\"for .. in\" is not supported (arkts-no-for-in)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule83.ts.strict.json b/ets2panda/linter/test_rules/rule83.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule83.ts.strict.json rename to ets2panda/linter/test_rules/rule83.ts.json index da7e2cb6a4d8949674240e4da9cf5ecf265ebec5..7fec85dccfd0a605685004410744b09ebe7fed78 100644 --- a/ets2panda/linter/test_rules/rule83.ts.strict.json +++ b/ets2panda/linter/test_rules/rule83.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule83.ts.relax.json b/ets2panda/linter/test_rules/rule83.ts.relax.json deleted file mode 100644 index da7e2cb6a4d8949674240e4da9cf5ecf265ebec5..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule83.ts.relax.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 27, - "problem": "MappedType", - "suggest": "", - "rule": "Mapped type expression is not supported (arkts-no-mapped-types)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule84.ts.relax.json b/ets2panda/linter/test_rules/rule84.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule84.ts.relax.json rename to ets2panda/linter/test_rules/rule84.ts.json index 180291ed79e11fb94802de4163b749c855fca437..5b13f82788b17918ed96756e02aa314762b7c2ff 100644 --- a/ets2panda/linter/test_rules/rule84.ts.relax.json +++ b/ets2panda/linter/test_rules/rule84.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule84.ts.strict.json b/ets2panda/linter/test_rules/rule84.ts.strict.json deleted file mode 100644 index 180291ed79e11fb94802de4163b749c855fca437..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule84.ts.strict.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "WithStatement", - "suggest": "", - "rule": "\"with\" statement is not supported (arkts-no-with)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule87.ts.strict.json b/ets2panda/linter/test_rules/rule87.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule87.ts.strict.json rename to ets2panda/linter/test_rules/rule87.ts.json index a8ae812be807e7bb872684ec2559bbe80164ccc0..7a0c9b43d5b46251dec7b21ec3e4dbebfd2e14b4 100644 --- a/ets2panda/linter/test_rules/rule87.ts.strict.json +++ b/ets2panda/linter/test_rules/rule87.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule87.ts.relax.json b/ets2panda/linter/test_rules/rule87.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule87.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule8_1.ts.relax.json b/ets2panda/linter/test_rules/rule8_1.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule8_1.ts.relax.json rename to ets2panda/linter/test_rules/rule8_1.ts.json index 73554b9f98fb0bc4263daa0123fc52d7a0de8576..6d2f3986e3f8933de590b5e85d51aafad23330c0 100644 --- a/ets2panda/linter/test_rules/rule8_1.ts.relax.json +++ b/ets2panda/linter/test_rules/rule8_1.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule8_1.ts.strict.json b/ets2panda/linter/test_rules/rule8_1.ts.strict.json deleted file mode 100644 index 73554b9f98fb0bc4263daa0123fc52d7a0de8576..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule8_1.ts.strict.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 20, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 27, - "column": 23, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 37, - "column": 21, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule8_2.ts.strict.json b/ets2panda/linter/test_rules/rule8_2.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule8_2.ts.strict.json rename to ets2panda/linter/test_rules/rule8_2.ts.json index 6f8d50c818eb4b1b4fedef2904d6a6eeda533912..72f9728710e735c76cda893fcae864197fbcdbb0 100644 --- a/ets2panda/linter/test_rules/rule8_2.ts.strict.json +++ b/ets2panda/linter/test_rules/rule8_2.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule8_2.ts.relax.json b/ets2panda/linter/test_rules/rule8_2.ts.relax.json deleted file mode 100644 index 6f8d50c818eb4b1b4fedef2904d6a6eeda533912..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule8_2.ts.relax.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 18, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 21, - "column": 15, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule8_3.ts.strict.json b/ets2panda/linter/test_rules/rule8_3.ts.json similarity index 97% rename from ets2panda/linter/test_rules/rule8_3.ts.strict.json rename to ets2panda/linter/test_rules/rule8_3.ts.json index 16a2e5bd3f81459bc86b089c7679316c5601b089..8d8f3a84e4822ffad42451c5b970f59c6f0d19b7 100644 --- a/ets2panda/linter/test_rules/rule8_3.ts.strict.json +++ b/ets2panda/linter/test_rules/rule8_3.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule8_3.ts.relax.json b/ets2panda/linter/test_rules/rule8_3.ts.relax.json deleted file mode 100644 index 16a2e5bd3f81459bc86b089c7679316c5601b089..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule8_3.ts.relax.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 20, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 27, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 25, - "column": 16, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 32, - "column": 23, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 39, - "column": 27, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 40, - "column": 16, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 47, - "column": 21, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 54, - "column": 27, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 55, - "column": 16, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule8_4.ts.strict.json b/ets2panda/linter/test_rules/rule8_4.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule8_4.ts.strict.json rename to ets2panda/linter/test_rules/rule8_4.ts.json index 75c18f29442beb2731b02a1e62b5746374c28d93..3547d0a014a9250bf7de6552a5e52236430b3629 100644 --- a/ets2panda/linter/test_rules/rule8_4.ts.strict.json +++ b/ets2panda/linter/test_rules/rule8_4.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule8_4.ts.relax.json b/ets2panda/linter/test_rules/rule8_4.ts.relax.json deleted file mode 100644 index 75c18f29442beb2731b02a1e62b5746374c28d93..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule8_4.ts.relax.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 20, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 27, - "column": 23, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 37, - "column": 21, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule8_5.ts.relax.json b/ets2panda/linter/test_rules/rule8_5.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule8_5.ts.relax.json rename to ets2panda/linter/test_rules/rule8_5.ts.json index 9c264e4bc3b54725fdf4752e5e4ba158ae891048..3002f452e724cdfcbf0e23c957bea5ad5dab81b3 100644 --- a/ets2panda/linter/test_rules/rule8_5.ts.relax.json +++ b/ets2panda/linter/test_rules/rule8_5.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule8_5.ts.strict.json b/ets2panda/linter/test_rules/rule8_5.ts.strict.json deleted file mode 100644 index 9c264e4bc3b54725fdf4752e5e4ba158ae891048..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule8_5.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 18, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 21, - "column": 15, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule8_6.ts.relax.json b/ets2panda/linter/test_rules/rule8_6.ts.json similarity index 97% rename from ets2panda/linter/test_rules/rule8_6.ts.relax.json rename to ets2panda/linter/test_rules/rule8_6.ts.json index 7800c1e302eb94480145cdae9899de9a78508053..dcefa43f98bfa218cb01c6d866984596e9c57d8a 100644 --- a/ets2panda/linter/test_rules/rule8_6.ts.relax.json +++ b/ets2panda/linter/test_rules/rule8_6.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule8_6.ts.strict.json b/ets2panda/linter/test_rules/rule8_6.ts.strict.json deleted file mode 100644 index 7800c1e302eb94480145cdae9899de9a78508053..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule8_6.ts.strict.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 17, - "column": 20, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 24, - "column": 27, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 25, - "column": 16, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 32, - "column": 23, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 39, - "column": 27, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 40, - "column": 16, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 47, - "column": 21, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 54, - "column": 27, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 55, - "column": 16, - "problem": "UnknownType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90.ts.autofix.json b/ets2panda/linter/test_rules/rule90.ts.autofix.json index e32f9414776a7cda315a6ef25693f016535ae85d..4617884a3340ef4853fdadb3500c3c64e0915795 100644 --- a/ets2panda/linter/test_rules/rule90.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule90.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule90.ts.strict.json b/ets2panda/linter/test_rules/rule90.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule90.ts.strict.json rename to ets2panda/linter/test_rules/rule90.ts.json index b58b245e482e25d8b9c245e8569bcd5bd667295f..96b2907d4e5b8ed0dd87702cf7fe4cd5645652d2 100644 --- a/ets2panda/linter/test_rules/rule90.ts.strict.json +++ b/ets2panda/linter/test_rules/rule90.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule90.ts.relax.json b/ets2panda/linter/test_rules/rule90.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule90.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_1.ts.autofix.json b/ets2panda/linter/test_rules/rule90_1.ts.autofix.json index 13f13363f579325755e8954b4011963971667481..0f0ef2c3a3baafdd51b3e68113101abf6a360ba3 100644 --- a/ets2panda/linter/test_rules/rule90_1.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule90_1.ts.autofix.json @@ -1,3 +1,17 @@ { + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], "nodes": [] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_1.ts.json b/ets2panda/linter/test_rules/rule90_1.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..0f0ef2c3a3baafdd51b3e68113101abf6a360ba3 --- /dev/null +++ b/ets2panda/linter/test_rules/rule90_1.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_1.ts.relax.json b/ets2panda/linter/test_rules/rule90_1.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule90_1.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_1.ts.strict.json b/ets2panda/linter/test_rules/rule90_1.ts.strict.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule90_1.ts.strict.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_2.ts.autofix.json b/ets2panda/linter/test_rules/rule90_2.ts.autofix.json index 13f13363f579325755e8954b4011963971667481..0f0ef2c3a3baafdd51b3e68113101abf6a360ba3 100644 --- a/ets2panda/linter/test_rules/rule90_2.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule90_2.ts.autofix.json @@ -1,3 +1,17 @@ { + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], "nodes": [] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_2.ts.json b/ets2panda/linter/test_rules/rule90_2.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..0f0ef2c3a3baafdd51b3e68113101abf6a360ba3 --- /dev/null +++ b/ets2panda/linter/test_rules/rule90_2.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_2.ts.relax.json b/ets2panda/linter/test_rules/rule90_2.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule90_2.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_2.ts.strict.json b/ets2panda/linter/test_rules/rule90_2.ts.strict.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule90_2.ts.strict.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_3.ts.autofix.json b/ets2panda/linter/test_rules/rule90_3.ts.autofix.json index 69d9246f1d896a441e602f1e156238dc35526159..1ce242c94a9b2aa1cc4d4036c0c1f2680b2d1bc2 100644 --- a/ets2panda/linter/test_rules/rule90_3.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule90_3.ts.autofix.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule90_3.ts.strict.json b/ets2panda/linter/test_rules/rule90_3.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule90_3.ts.strict.json rename to ets2panda/linter/test_rules/rule90_3.ts.json index fae5347effcfe56d5b0c4956481a1af58aafcb3e..10c9bf79271a58a084b815a8cbb38f2cdf67d23a 100644 --- a/ets2panda/linter/test_rules/rule90_3.ts.strict.json +++ b/ets2panda/linter/test_rules/rule90_3.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule90_3.ts.relax.json b/ets2panda/linter/test_rules/rule90_3.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule90_3.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_4.ts.autofix.json b/ets2panda/linter/test_rules/rule90_4.ts.autofix.json index 13f13363f579325755e8954b4011963971667481..0f0ef2c3a3baafdd51b3e68113101abf6a360ba3 100644 --- a/ets2panda/linter/test_rules/rule90_4.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule90_4.ts.autofix.json @@ -1,3 +1,17 @@ { + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], "nodes": [] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_4.ts.json b/ets2panda/linter/test_rules/rule90_4.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..0f0ef2c3a3baafdd51b3e68113101abf6a360ba3 --- /dev/null +++ b/ets2panda/linter/test_rules/rule90_4.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_4.ts.relax.json b/ets2panda/linter/test_rules/rule90_4.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule90_4.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_4.ts.strict.json b/ets2panda/linter/test_rules/rule90_4.ts.strict.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule90_4.ts.strict.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_5.ts.autofix.json b/ets2panda/linter/test_rules/rule90_5.ts.autofix.json index 13f13363f579325755e8954b4011963971667481..0f0ef2c3a3baafdd51b3e68113101abf6a360ba3 100644 --- a/ets2panda/linter/test_rules/rule90_5.ts.autofix.json +++ b/ets2panda/linter/test_rules/rule90_5.ts.autofix.json @@ -1,3 +1,17 @@ { + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], "nodes": [] } \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_5.ts.json b/ets2panda/linter/test_rules/rule90_5.ts.json new file mode 100644 index 0000000000000000000000000000000000000000..0f0ef2c3a3baafdd51b3e68113101abf6a360ba3 --- /dev/null +++ b/ets2panda/linter/test_rules/rule90_5.ts.json @@ -0,0 +1,17 @@ +{ + "copyright": [ + "Copyright (c) 2024 Huawei Device Co., Ltd.", + "Licensed under the Apache License, Version 2.0 (the 'License');", + "you may not use this file except in compliance with the License.", + "You may obtain a copy of the License at", + "", + "http://www.apache.org/licenses/LICENSE-2.0", + "", + "Unless required by applicable law or agreed to in writing, software", + "distributed under the License is distributed on an 'AS IS' BASIS,", + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", + "See the License for the specific language governing permissions and", + "limitations under the License." + ], + "nodes": [] +} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_5.ts.relax.json b/ets2panda/linter/test_rules/rule90_5.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule90_5.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule90_5.ts.strict.json b/ets2panda/linter/test_rules/rule90_5.ts.strict.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule90_5.ts.strict.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule91.ts.relax.json b/ets2panda/linter/test_rules/rule91.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule91.ts.relax.json rename to ets2panda/linter/test_rules/rule91.ts.json index b972622ba7522e4888e8e9350be2f3ad45cccbab..427d0f6c4943ef0ec3c4c0353ad3e96581a3bd69 100644 --- a/ets2panda/linter/test_rules/rule91.ts.relax.json +++ b/ets2panda/linter/test_rules/rule91.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule91.ts.strict.json b/ets2panda/linter/test_rules/rule91.ts.strict.json deleted file mode 100644 index b972622ba7522e4888e8e9350be2f3ad45cccbab..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule91.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 19, - "problem": "DestructuringParameter", - "suggest": "", - "rule": "Destructuring parameter declarations are not supported (arkts-no-destruct-params)" - }, - { - "line": 23, - "column": 10, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule92.ts.strict.json b/ets2panda/linter/test_rules/rule92.ts.json similarity index 93% rename from ets2panda/linter/test_rules/rule92.ts.strict.json rename to ets2panda/linter/test_rules/rule92.ts.json index a4db68ca08c748e70070853e74b7760e991d7943..a12c23f16ac3f6e09af5c68be9a8e26f9c0b9ab3 100644 --- a/ets2panda/linter/test_rules/rule92.ts.strict.json +++ b/ets2panda/linter/test_rules/rule92.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule92.ts.relax.json b/ets2panda/linter/test_rules/rule92.ts.relax.json deleted file mode 100644 index 13f13363f579325755e8954b4011963971667481..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule92.ts.relax.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nodes": [] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule93.ts.relax.json b/ets2panda/linter/test_rules/rule93.ts.json similarity index 94% rename from ets2panda/linter/test_rules/rule93.ts.relax.json rename to ets2panda/linter/test_rules/rule93.ts.json index 160f413784400ddef41c946e81d5dae39a763cf9..393f44525f2c312744c1adc2aa31bc6a81c89dd2 100644 --- a/ets2panda/linter/test_rules/rule93.ts.relax.json +++ b/ets2panda/linter/test_rules/rule93.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule94.ts.relax.json b/ets2panda/linter/test_rules/rule94.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule94.ts.relax.json rename to ets2panda/linter/test_rules/rule94.ts.json index a673ba8745a8dfc60420e9f61cc8f5bf33683acb..a991166fa69e8fd6dcb14791aee623ece36ab58d 100644 --- a/ets2panda/linter/test_rules/rule94.ts.relax.json +++ b/ets2panda/linter/test_rules/rule94.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule94.ts.strict.json b/ets2panda/linter/test_rules/rule94.ts.strict.json deleted file mode 100644 index a673ba8745a8dfc60420e9f61cc8f5bf33683acb..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule94.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 16, - "column": 1, - "problem": "GeneratorFunction", - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - }, - { - "line": 18, - "column": 9, - "problem": "YieldExpression", - "suggest": "", - "rule": "Generator functions are not supported (arkts-no-generators)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule96.ts.relax.json b/ets2panda/linter/test_rules/rule96.ts.json similarity index 95% rename from ets2panda/linter/test_rules/rule96.ts.relax.json rename to ets2panda/linter/test_rules/rule96.ts.json index 88ffa6dbd612147c16b960630883a737fb7e9afd..a3753d4f5df8398d67284c43d2fd8938511a742c 100644 --- a/ets2panda/linter/test_rules/rule96.ts.relax.json +++ b/ets2panda/linter/test_rules/rule96.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule96.ts.strict.json b/ets2panda/linter/test_rules/rule96.ts.strict.json deleted file mode 100644 index 88ffa6dbd612147c16b960630883a737fb7e9afd..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule96.ts.strict.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 26, - "column": 21, - "problem": "AnyType", - "suggest": "", - "rule": "Use explicit types instead of \"any\", \"unknown\" (arkts-no-any-unknown)" - }, - { - "line": 26, - "column": 27, - "problem": "IsOperator", - "suggest": "", - "rule": "Type guarding is supported with \"instanceof\" and \"as\" (arkts-no-is)" - } - ] -} \ No newline at end of file diff --git a/ets2panda/linter/test_rules/rule99.ts.strict.json b/ets2panda/linter/test_rules/rule99.ts.json similarity index 96% rename from ets2panda/linter/test_rules/rule99.ts.strict.json rename to ets2panda/linter/test_rules/rule99.ts.json index 768fdbf301a4ccb017bfd6244a111ee1a27ae593..0b7e8b0669f1766cf3b486fa4029fa0e057b8a03 100644 --- a/ets2panda/linter/test_rules/rule99.ts.strict.json +++ b/ets2panda/linter/test_rules/rule99.ts.json @@ -1,6 +1,6 @@ { "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", + "Copyright (c) 2023-2024 Huawei Device Co., Ltd.", "Licensed under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License.", "You may obtain a copy of the License at", diff --git a/ets2panda/linter/test_rules/rule99.ts.relax.json b/ets2panda/linter/test_rules/rule99.ts.relax.json deleted file mode 100644 index 768fdbf301a4ccb017bfd6244a111ee1a27ae593..0000000000000000000000000000000000000000 --- a/ets2panda/linter/test_rules/rule99.ts.relax.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "copyright": [ - "Copyright (c) 2023-2023 Huawei Device Co., Ltd.", - "Licensed under the Apache License, Version 2.0 (the 'License');", - "you may not use this file except in compliance with the License.", - "You may obtain a copy of the License at", - "", - "http://www.apache.org/licenses/LICENSE-2.0", - "", - "Unless required by applicable law or agreed to in writing, software", - "distributed under the License is distributed on an 'AS IS' BASIS,", - "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.", - "See the License for the specific language governing permissions and", - "limitations under the License." - ], - "nodes": [ - { - "line": 21, - "column": 5, - "problem": "SpreadOperator", - "suggest": "", - "rule": "It is possible to spread only arrays or classes derived from arrays into the rest parameter or array literals (arkts-no-spread)" - }, - { - "line": 26, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 27, - "column": 15, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)" - }, - { - "line": 27, - "column": 16, - "problem": "SpreadOperator", - "suggest": "", - "rule": "It is possible to spread only arrays or classes derived from arrays into the rest parameter or array literals (arkts-no-spread)" - } - ] -} \ No newline at end of file