diff --git a/src/linter/linterReporting.ts b/src/linter/linterReporting.ts index 4e1abb27f..ffefa7820 100644 --- a/src/linter/linterReporting.ts +++ b/src/linter/linterReporting.ts @@ -1,39 +1,23 @@ -export const MESSAGES = { - SHORT__NO_DIRECT_DATATYPE_ACCESS: "Deprecated access to DataType pseudo module '{0}'", - DETAILS__NO_DIRECT_DATATYPE_ACCESS: - "{@link topic:00737d6c1b864dc3ab72ef56611491c4 Migrating Access to Pseudo Modules}", - - SHORT__DEPRECATED_ACCESS_ENUM: "Deprecated access to enum pseudo module '{0}'", - DETAILS__DEPRECATED_ACCESS_ENUM: - "{@link topic:00737d6c1b864dc3ab72ef56611491c4 Migrating Access to Pseudo Modules}", - - SHORT__DEPRECATED_PROP_OF_CLASS: "Use of deprecated property '{0}' of class '{1}'", +import type {MESSAGE_INFO} from "./messages.js"; +export const MESSAGES = { + // Used by ManifestLinter SHORT__DEPRECATED_PROP: "Use of deprecated property {0}", - SHORT__DEPRECATED_FUNCTION_ACCESS: "Call to deprecated function {0}", - - SHORT__DEPRECATED_API_ACCESS: "Use of deprecated API '{0}'", - - SHORT__DEPRECATED_PROP_ACCESS: "Access of deprecated property '{0}'", - - SHORT__DEPRECATED_MODULE_IMPORT: "Import of deprecated module '{0}'", - + // Used by ManifestLinter SHORT__DEPRECATED_COMPONENT: "Use of deprecated component '{0}'", - SHORT__GLOBAL_VAR_ACCESS: "Access of global variable '{0}' ({1})", - - SHORT__LIB_INIT_2: "Call to {0}() must be declared with property {apiVersion: 2}", - DETAILS__LIB_INIT_2: "{@link sap.ui.core.Lib.init Lib.init}", - + // Used by DotLibraryLinter, ManifestLinter, YamlLinter SHORT__DEPRECATED_LIBRARY: "Use of deprecated library '{0}'", + // Used by ManifestLinter SHORT__DEPRECATED_MODEL_TYPE: "Use of deprecated model type '{0}'", }; // TODO: Migrate to enum instead of Object/Map // Currently, it's done this way to avoid pollution of the test snapshots export const RULES = { + "ui5-linter-async-component-flags": "ui5-linter-async-component-flags", "ui5-linter-no-deprecated-api": "ui5-linter-no-deprecated-api", "ui5-linter-no-partially-deprecated-api": "ui5-linter-no-partially-deprecated-api", "ui5-linter-no-deprecated-property": "ui5-linter-no-deprecated-property", @@ -51,3 +35,15 @@ export function formatMessage(message: string, ...params: string[]) { return message; } + +export type MessageInfo = typeof MESSAGE_INFO[keyof typeof MESSAGE_INFO] & {fatal?: boolean}; + +type ExtractArgs = F extends (args: infer P) => unknown ? P : never; +type CombineArgs = M & D extends object ? M & D : never; + +export type MessageArgs = { + [K in keyof typeof MESSAGE_INFO]: + CombineArgs< + ExtractArgs, ExtractArgs + >; +}; diff --git a/src/linter/messages.ts b/src/linter/messages.ts new file mode 100644 index 000000000..d0e99e2de --- /dev/null +++ b/src/linter/messages.ts @@ -0,0 +1,148 @@ +import {LintMessageSeverity} from "./LinterContext.js"; +import {RULES} from "./linterReporting.js"; + +export enum MESSAGE { + COMPONENT_MISSING_ASYNC_INTERFACE, + COMPONENT_MISSING_MANIFEST_DECLARATION, + COMPONENT_REDUNDANT_ASYNC_FLAG, + DEPRECATED_API_ACCESS, + DEPRECATED_FUNCTION_CALL, + DEPRECATED_LIBRARY, + DEPRECATED_MODULE_IMPORT, + DEPRECATED_PROPERTY_OF_CLASS, + DEPRECATED_PROPERTY, + LIB_INIT_API_VERSION, + NO_DIRECT_DATATYPE_ACCESS, + NO_DIRECT_ENUM_ACCESS, + NO_GLOBALS, +} +export const MESSAGE_INFO = { + + [MESSAGE.COMPONENT_MISSING_ASYNC_INTERFACE]: { + severity: LintMessageSeverity.Error, + ruleId: RULES["ui5-linter-async-component-flags"], + + message: () => + `Component is not configured for asynchronous loading.`, + details: ({componentFileName, asyncFlagMissingIn}: {componentFileName: string; asyncFlagMissingIn: string}) => + `{@link topic:676b636446c94eada183b1218a824717 Use Asynchronous Loading}. ` + + `Implement sap.ui.core.IAsyncContentCreation interface in ${componentFileName}. ` + + `Alternatively, set the "async" flag to "true" in ${asyncFlagMissingIn} in the component manifest.`, + }, + + [MESSAGE.COMPONENT_MISSING_MANIFEST_DECLARATION]: { + severity: LintMessageSeverity.Warning, + ruleId: RULES["ui5-linter-async-component-flags"], + + message: () => + `Component does not specify that it uses the descriptor via the manifest.json file`, + details: () => + `A manifest.json has been found in the same directory as the component. Although it will be used at ` + + `runtime automatically, this should still be expressed in the ` + + `{@link topic:0187ea5e2eff4166b0453b9dcc8fc64f metadata of the component class}.`, + }, + + [MESSAGE.COMPONENT_REDUNDANT_ASYNC_FLAG]: { + severity: LintMessageSeverity.Warning, + ruleId: RULES["ui5-linter-async-component-flags"], + + message: ({asyncFlagLocation}: {asyncFlagLocation: string}) => + `Component implements the sap.ui.core.IAsyncContentCreation interface. ` + + `The redundant "async" flag at "${asyncFlagLocation}" should be removed from the component manifest`, + details: () => + `{@link sap.ui.core.IAsyncContentCreation sap.ui.core.IAsyncContentCreation}`, + }, + + [MESSAGE.DEPRECATED_API_ACCESS]: { + severity: LintMessageSeverity.Error, + ruleId: RULES["ui5-linter-no-deprecated-api"], + + message: ({apiName}: {apiName: string}) => + `Use of deprecated API '${apiName}'`, + details: ({details}: {details: string}) => details, + }, + + [MESSAGE.DEPRECATED_FUNCTION_CALL]: { + severity: LintMessageSeverity.Error, + ruleId: RULES["ui5-linter-no-deprecated-api"], + + message: ({functionName, additionalMessage}: {functionName: string; additionalMessage: string}) => + `Call to deprecated function '${functionName}'${additionalMessage ? ` ${additionalMessage}` : ""}`, + details: ({details}: {details: string}) => details, + }, + + [MESSAGE.DEPRECATED_LIBRARY]: { + severity: LintMessageSeverity.Error, + ruleId: RULES["ui5-linter-no-deprecated-library"], + + message: ({libraryName}: {libraryName: string}) => + `Use of deprecated library '${libraryName}'`, + details: () => undefined, + }, + + [MESSAGE.DEPRECATED_MODULE_IMPORT]: { + severity: LintMessageSeverity.Error, + ruleId: RULES["ui5-linter-no-deprecated-api"], + + message: ({moduleName}: {moduleName: string}) => + `Import of deprecated module '${moduleName}'`, + details: ({details}: {details: string}) => details, + }, + + [MESSAGE.DEPRECATED_PROPERTY_OF_CLASS]: { + severity: LintMessageSeverity.Error, + ruleId: RULES["ui5-linter-no-deprecated-api"], + + message: ({propertyName, className}: {propertyName: string; className: string}) => + `Use of deprecated property '${propertyName}' of class '${className}'`, + details: ({details}: {details: string}) => details, + }, + + [MESSAGE.DEPRECATED_PROPERTY]: { + severity: LintMessageSeverity.Error, + ruleId: RULES["ui5-linter-no-deprecated-property"], + + message: ({propertyName}: {propertyName: string}) => + `Use of deprecated property '${propertyName}'`, + details: ({details}: {details: string}) => details, + }, + + [MESSAGE.LIB_INIT_API_VERSION]: { + severity: LintMessageSeverity.Error, + ruleId: RULES["ui5-linter-no-partially-deprecated-api"], + + message: ({libInitFunction}: {libInitFunction: string}) => + `Call to ${libInitFunction}() must be declared with property {apiVersion: 2}`, + details: () => `{@link sap.ui.core.Lib.init Lib.init}`, + }, + + [MESSAGE.NO_DIRECT_DATATYPE_ACCESS]: { + severity: LintMessageSeverity.Error, + ruleId: RULES["ui5-linter-no-pseudo-modules"], + + message: ({moduleName}: {moduleName: string}) => + `Deprecated access to DataType pseudo module '${moduleName}'`, + details: () => + "{@link topic:00737d6c1b864dc3ab72ef56611491c4 Migrating Access to Pseudo Modules}", + }, + + [MESSAGE.NO_DIRECT_ENUM_ACCESS]: { + severity: LintMessageSeverity.Error, + ruleId: RULES["ui5-linter-no-pseudo-modules"], + + message: ({moduleName}: {moduleName: string}) => + `Deprecated access to enum pseudo module '${moduleName}'`, + details: () => + "{@link topic:00737d6c1b864dc3ab72ef56611491c4 Migrating Access to Pseudo Modules}", + }, + + [MESSAGE.NO_GLOBALS]: { + severity: LintMessageSeverity.Error, + ruleId: RULES["ui5-linter-no-globals-js"], + + message: ({variableName, namespace}: {variableName: string; namespace: string}) => + `Access of global variable '${variableName}' (${namespace})`, + details: () => undefined, + }, + +} as const; diff --git a/src/linter/ui5Types/SourceFileLinter.ts b/src/linter/ui5Types/SourceFileLinter.ts index 75b0cba9e..ca5675965 100644 --- a/src/linter/ui5Types/SourceFileLinter.ts +++ b/src/linter/ui5Types/SourceFileLinter.ts @@ -2,13 +2,14 @@ import ts, {Identifier} from "typescript"; import path from "node:path/posix"; import SourceFileReporter from "./SourceFileReporter.js"; import LinterContext, {ResourcePath, CoverageCategory, LintMessageSeverity} from "../LinterContext.js"; -import {RULES, MESSAGES, formatMessage} from "../linterReporting.js"; +import {MESSAGE} from "../messages.js"; +import {RULES} from "../linterReporting.js"; import analyzeComponentJson from "./asyncComponentFlags.js"; import {deprecatedLibraries} from "../../utils/deprecations.js"; interface DeprecationInfo { symbol: ts.Symbol; - messageDetails?: string; + messageDetails: string; } function isSourceFileOfUi5Type(sourceFile: ts.SourceFile) { @@ -51,7 +52,7 @@ export default class SourceFileLinter { this.#sourceFile = sourceFile; this.#checker = checker; this.#context = context; - this.#reporter = new SourceFileReporter(context, resourcePath, sourceFile, sourceMap); + this.#reporter = new SourceFileReporter(context, resourcePath, sourceFile, sourceMap, messageDetails); this.#boundVisitNode = this.visitNode.bind(this); this.#reportCoverage = reportCoverage; this.#messageDetails = messageDetails; @@ -130,13 +131,10 @@ export default class SourceFileLinter { } const deprecationInfo = this.getDeprecationInfo(type.symbol); if (deprecationInfo) { - this.#reporter.addMessage({ - node, - severity: LintMessageSeverity.Error, - ruleId: RULES["ui5-linter-no-deprecated-api"], - message: formatMessage(MESSAGES.SHORT__DEPRECATED_API_ACCESS, node.text), - messageDetails: deprecationInfo.messageDetails, - }); + this.#reporter.addMessage(MESSAGE.DEPRECATED_API_ACCESS, { + apiName: node.text, + details: deprecationInfo.messageDetails, + }, node); } } @@ -147,13 +145,10 @@ export default class SourceFileLinter { } const deprecationInfo = this.getDeprecationInfo(type.symbol); if (deprecationInfo) { - this.#reporter.addMessage({ - node, - severity: LintMessageSeverity.Error, - ruleId: RULES["ui5-linter-no-deprecated-api"], - message: formatMessage(MESSAGES.SHORT__DEPRECATED_API_ACCESS, node.getText()), - messageDetails: deprecationInfo.messageDetails, - }); + this.#reporter.addMessage(MESSAGE.DEPRECATED_API_ACCESS, { + apiName: node.getText(), + details: deprecationInfo.messageDetails, + }, node); } } @@ -204,14 +199,14 @@ export default class SourceFileLinter { if (propertySymbol) { const deprecationInfo = this.getDeprecationInfo(propertySymbol); if (deprecationInfo) { - this.#reporter.addMessage({ - node: prop, - severity: LintMessageSeverity.Error, - ruleId: RULES["ui5-linter-no-deprecated-api"], - message: formatMessage(MESSAGES.SHORT__DEPRECATED_PROP_OF_CLASS, - propertySymbol.escapedName as string, this.#checker.typeToString(nodeType)), - messageDetails: deprecationInfo.messageDetails, - }); + this.#reporter.addMessage(MESSAGE.DEPRECATED_PROPERTY_OF_CLASS, + { + propertyName: propertySymbol.escapedName as string, + className: this.#checker.typeToString(nodeType), + details: deprecationInfo.messageDetails, + }, + prop + ); } } } @@ -251,7 +246,7 @@ export default class SourceFileLinter { const deprecatedTag = jsdocTags.find((tag) => tag.name === "deprecated"); if (deprecatedTag) { const deprecationInfo: DeprecationInfo = { - symbol, + symbol, messageDetails: "", }; if (this.#messageDetails) { deprecationInfo.messageDetails = this.getDeprecationText(deprecatedTag); @@ -313,14 +308,14 @@ export default class SourceFileLinter { const lhsExprType = this.#checker.getTypeAtLocation(lhsExpr); if (lhsExprType.isClassOrInterface()) { // left-hand-side is an instance of a class, e.g. "instance.deprecatedMethod()" - additionalMessage = ` of class '${this.#checker.typeToString(lhsExprType)}'`; + additionalMessage = `of class '${this.#checker.typeToString(lhsExprType)}'`; } else if (ts.isCallExpression(lhsExpr)) { // left-hand-side is a function call, e.g. "function().deprecatedMethod()" // Use the (return) type of that function call - additionalMessage = ` of module '${this.#checker.typeToString(lhsExprType)}'`; + additionalMessage = `of module '${this.#checker.typeToString(lhsExprType)}'`; } else if (ts.isPropertyAccessExpression(exprNode)) { // left-hand-side is a module or namespace, e.g. "module.deprecatedMethod()" - additionalMessage = ` (${this.extractNamespace(exprNode)})`; + additionalMessage = `(${this.extractNamespace(exprNode)})`; } } @@ -331,14 +326,11 @@ export default class SourceFileLinter { reportNodeText = reportNode.getText(); } - this.#reporter.addMessage({ - node: reportNode, - severity: LintMessageSeverity.Error, - ruleId: RULES["ui5-linter-no-deprecated-api"], - message: formatMessage(MESSAGES.SHORT__DEPRECATED_FUNCTION_ACCESS, - `'${reportNodeText}'${additionalMessage}`), - messageDetails: deprecationInfo.messageDetails, - }); + this.#reporter.addMessage(MESSAGE.DEPRECATED_FUNCTION_CALL, { + functionName: reportNodeText, + additionalMessage, + details: deprecationInfo.messageDetails, + }, reportNode); } getPropertyName(node: ts.PropertyName): string { @@ -406,13 +398,9 @@ export default class SourceFileLinter { importedVarName = nodeExp.expression.getText() + ".init"; } - this.#reporter.addMessage({ - node: nodeToHighlight, - severity: LintMessageSeverity.Error, - ruleId: RULES["ui5-linter-no-partially-deprecated-api"], - message: formatMessage(MESSAGES.SHORT__LIB_INIT_2, importedVarName), - messageDetails: this.#messageDetails ? formatMessage(MESSAGES.DETAILS__LIB_INIT_2) : undefined, - }); + this.#reporter.addMessage(MESSAGE.LIB_INIT_API_VERSION, { + libInitFunction: importedVarName, + }, nodeToHighlight); } if (initArg) { @@ -443,12 +431,9 @@ export default class SourceFileLinter { const curLibName = dependency.text; if (deprecatedLibraries.includes(curLibName)) { - this.#reporter.addMessage({ - ruleId: RULES["ui5-linter-no-deprecated-library"], - severity: LintMessageSeverity.Error, - node: dependency, - message: formatMessage(MESSAGES.SHORT__DEPRECATED_LIBRARY, curLibName), - }); + this.#reporter.addMessage(MESSAGE.DEPRECATED_LIBRARY, { + libraryName: curLibName, + }, dependency); } }); } @@ -476,22 +461,15 @@ export default class SourceFileLinter { if (ts.isPropertyAccessExpression(node)) { namespace = this.extractNamespace(node); } - this.#reporter.addMessage({ - node, - severity: LintMessageSeverity.Error, - ruleId: RULES["ui5-linter-no-deprecated-api"], - message: formatMessage(MESSAGES.SHORT__DEPRECATED_API_ACCESS, namespace ?? "jQuery.sap"), - messageDetails: deprecationInfo.messageDetails, - }); + this.#reporter.addMessage(MESSAGE.DEPRECATED_API_ACCESS, { + apiName: namespace ?? "jQuery.sap", + details: deprecationInfo.messageDetails, + }, node); } else { - this.#reporter.addMessage({ - node, - severity: LintMessageSeverity.Error, - ruleId: RULES["ui5-linter-no-deprecated-property"], - message: formatMessage(MESSAGES.SHORT__DEPRECATED_PROP_ACCESS, - deprecationInfo.symbol.escapedName as string), - messageDetails: deprecationInfo.messageDetails, - }); + this.#reporter.addMessage(MESSAGE.DEPRECATED_PROPERTY, { + propertyName: deprecationInfo.symbol.escapedName as string, + details: deprecationInfo.messageDetails, + }, node); } } } @@ -552,13 +530,10 @@ export default class SourceFileLinter { // In case it is, ensure it is not one of the allowed PropertyAccessExpressions, such as "sap.ui.require" if (symbol && this.isSymbolOfUi5OrThirdPartyType(symbol) && !(ts.isPropertyAccessExpression(node) && this.isAllowedPropertyAccess(node))) { - this.#reporter.addMessage({ - node, - severity: LintMessageSeverity.Error, - ruleId: RULES["ui5-linter-no-globals-js"], - message: formatMessage(MESSAGES.SHORT__GLOBAL_VAR_ACCESS, - symbol.getName(), this.extractNamespace((node as ts.PropertyAccessExpression))), - }); + this.#reporter.addMessage(MESSAGE.NO_GLOBALS, { + variableName: symbol.getName(), + namespace: this.extractNamespace((node as ts.PropertyAccessExpression)), + }, node); } } } @@ -604,35 +579,27 @@ export default class SourceFileLinter { const defaultExportSymbol = symbol.exports?.get("default" as ts.__String); const deprecationInfo = this.getDeprecationInfo(defaultExportSymbol); if (deprecationInfo) { - this.#reporter.addMessage({ - node: moduleSpecifierNode, - severity: LintMessageSeverity.Error, - ruleId: RULES["ui5-linter-no-deprecated-api"], - message: formatMessage(MESSAGES.SHORT__DEPRECATED_MODULE_IMPORT, - moduleSpecifierNode.text), - messageDetails: deprecationInfo.messageDetails, - }); + this.#reporter.addMessage(MESSAGE.DEPRECATED_MODULE_IMPORT, { + moduleName: moduleSpecifierNode.text, + details: deprecationInfo.messageDetails, + }, moduleSpecifierNode); } if (this.isSymbolOfPseudoModuleType(symbol)) { const moduleNamespaceName = moduleSpecifierNode.text.replaceAll("/", "."); const isDataType = !!this.#dataTypes[moduleNamespaceName]; if (isDataType) { - this.#reporter.addMessage({ - node: moduleSpecifierNode, - severity: LintMessageSeverity.Error, - ruleId: RULES["ui5-linter-no-pseudo-modules"], - message: formatMessage(MESSAGES.SHORT__NO_DIRECT_DATATYPE_ACCESS, moduleSpecifierNode.text), - messageDetails: formatMessage(MESSAGES.DETAILS__NO_DIRECT_DATATYPE_ACCESS, moduleNamespaceName), - }); + this.#reporter.addMessage( + MESSAGE.NO_DIRECT_DATATYPE_ACCESS, + {moduleName: moduleSpecifierNode.text}, + moduleSpecifierNode + ); } else { // Enum - this.#reporter.addMessage({ - node: moduleSpecifierNode, - severity: LintMessageSeverity.Error, - ruleId: RULES["ui5-linter-no-pseudo-modules"], - message: formatMessage(MESSAGES.SHORT__DEPRECATED_ACCESS_ENUM, moduleSpecifierNode.text), - messageDetails: formatMessage(MESSAGES.DETAILS__DEPRECATED_ACCESS_ENUM), - }); + this.#reporter.addMessage( + MESSAGE.NO_DIRECT_ENUM_ACCESS, + {moduleName: moduleSpecifierNode.text}, + moduleSpecifierNode + ); } } } diff --git a/src/linter/ui5Types/SourceFileReporter.ts b/src/linter/ui5Types/SourceFileReporter.ts index f509906cd..0ba87e588 100644 --- a/src/linter/ui5Types/SourceFileReporter.ts +++ b/src/linter/ui5Types/SourceFileReporter.ts @@ -12,13 +12,15 @@ import LinterContext, { LintMessage, CoverageInfo, LintMessageSeverity, PositionInfo, PositionRange, ResourcePath, } from "../LinterContext.js"; +import {MESSAGE, MESSAGE_INFO} from "../messages.js"; +import {MessageArgs} from "../linterReporting.js"; -interface ReporterMessage extends LintMessage { +interface ReporterCoverageInfo extends CoverageInfo { node: ts.Node; } -interface ReporterCoverageInfo extends CoverageInfo { - node: ts.Node; +function isTsNode(node: ts.Node | MessageArgs[M] | undefined): node is ts.Node { + return !!node && "getSourceFile" in node && typeof node.getSourceFile === "function"; } export default class SourceFileReporter { @@ -29,14 +31,17 @@ export default class SourceFileReporter { #traceMap: TraceMap | undefined; #messages: LintMessage[] = []; #coverageInfo: CoverageInfo[] = []; + #messageDetails: boolean; constructor( context: LinterContext, resourcePath: ResourcePath, - sourceFile: ts.SourceFile, sourceMap: string | undefined + sourceFile: ts.SourceFile, sourceMap: string | undefined, + messageDetails: boolean ) { this.#context = context; this.#resourcePath = resourcePath; this.#sourceFile = sourceFile; + this.#messageDetails = messageDetails; if (sourceMap) { this.#traceMap = new TraceMap(sourceMap); } @@ -46,9 +51,27 @@ export default class SourceFileReporter { this.#coverageInfo = context.getCoverageInfo(this.#originalResourcePath); } - addMessage({node, message, messageDetails, severity, ruleId, fatal = undefined}: ReporterMessage) { - if (fatal && severity !== LintMessageSeverity.Error) { - throw new Error(`Reports flagged as "fatal" must be of severity "Error"`); + addMessage(id: M, args: MessageArgs[M], node: ts.Node): void; + addMessage(id: M, node: ts.Node): void; + addMessage( + id: M, argsOrNode?: MessageArgs[M] | ts.Node, node?: ts.Node + ) { + if (!argsOrNode) { + throw new Error("Invalid arguments: Missing second argument"); + } + let args: MessageArgs[M]; + if (isTsNode(argsOrNode)) { + node = argsOrNode; + args = null as unknown as MessageArgs[M]; + } else if (!node) { + throw new Error("Invalid arguments: Missing 'node'"); + } else { + args = argsOrNode; + } + + const messageInfo = MESSAGE_INFO[id]; + if (!messageInfo) { + throw new Error(`Invalid message id '${id}'`); } let line = 1, column = 1; @@ -61,17 +84,30 @@ export default class SourceFileReporter { // endColumn = end.column + 1; } + const messageFunc = messageInfo.message as (args: MessageArgs[M]) => string; + const msg: LintMessage = { - ruleId, - severity, - fatal, + ruleId: messageInfo.ruleId, + severity: messageInfo.severity, line, column, - message, + message: messageFunc(args), }; - if (messageDetails) { - msg.messageDetails = resolveLinks(messageDetails); + if (this.#messageDetails) { + const detailsFunc = messageInfo.details as (args: MessageArgs[M]) => string | undefined; + const details = detailsFunc(args); + if (details) { + msg.messageDetails = resolveLinks(details); + } + } + + if ("fatal" in messageInfo && typeof messageInfo.fatal === "boolean") { + msg.fatal = messageInfo.fatal; + } + + if (msg.fatal && msg.severity !== LintMessageSeverity.Error) { + throw new Error(`Reports flagged as "fatal" must be of severity "Error"`); } this.#messages.push(msg); diff --git a/src/linter/ui5Types/asyncComponentFlags.ts b/src/linter/ui5Types/asyncComponentFlags.ts index a265bacd3..9bdfd3233 100644 --- a/src/linter/ui5Types/asyncComponentFlags.ts +++ b/src/linter/ui5Types/asyncComponentFlags.ts @@ -2,9 +2,10 @@ import ts from "typescript"; import path from "node:path/posix"; import SourceFileReporter from "./SourceFileReporter.js"; import type {JSONSchemaForSAPUI5Namespace, SAPJSONSchemaForWebApplicationManifestFile} from "../../manifest.js"; -import LinterContext, {LintMessage, LintMessageSeverity} from "../LinterContext.js"; +import LinterContext, {LintMessageSeverity} from "../LinterContext.js"; import jsonMap from "json-source-map"; import type {jsonSourceMapType} from "../manifestJson/ManifestLinter.js"; +import {MESSAGE} from "../messages.js"; type propsRecordValueType = string | boolean | undefined | null | number | propsRecord; type propsRecord = Record(manifestContent ?? "{}"); - const report = (pointerKey: string, message: LintMessage) => { + const report = (pointerKey: string) => { if (manifestContent) { // If the manifest.json is present, then we need to redirect the message pointers to it const {key: posInfo} = pointers[pointerKey]; context.addLintingMessage( - resourcePath.replace(fileName, "manifest.json"), {...message, ...posInfo}); + resourcePath.replace(componentFileName, "manifest.json"), { + severity: LintMessageSeverity.Warning, + ruleId: "ui5-linter-async-component-flags", + message: `Component implements the sap.ui.core.IAsyncContentCreation interface. ` + + `The redundant "async" flag at "${pointerKey}" should be removed from the component manifest`, + messageDetails: `{@link sap.ui.core.IAsyncContentCreation sap.ui.core.IAsyncContentCreation}`, + ...posInfo, + }); } else { - reporter.addMessage({...message, ...{node: classDesc}}); + reporter.addMessage(MESSAGE.COMPONENT_REDUNDANT_ASYNC_FLAG, { + asyncFlagLocation: pointerKey, + }, classDesc); } }; if (rootViewAsyncFlag === AsyncPropertyStatus.true) { - report("/sap.ui5/rootView/async", { - severity: LintMessageSeverity.Warning, - ruleId: "ui5-linter-async-component-flags", - message: `Component implements the sap.ui.core.IAsyncContentCreation interface. ` + - `The redundant "async" flag for "sap.ui5/rootView" should be removed from the component manifest`, - messageDetails: `{@link sap.ui.core.IAsyncContentCreation sap.ui.core.IAsyncContentCreation}`, - }); + report("/sap.ui5/rootView/async"); } if (routingAsyncFlag === AsyncPropertyStatus.true) { - report("/sap.ui5/routing/config/async", { - severity: LintMessageSeverity.Warning, - ruleId: "ui5-linter-async-component-flags", - message: `Component implements the sap.ui.core.IAsyncContentCreation interface. ` + - `The redundant "async" flag for "sap.ui5/routing/config" should be removed from the component manifest`, - messageDetails: `{@link sap.ui.core.IAsyncContentCreation sap.ui.core.IAsyncContentCreation}`, - }); + report("/sap.ui5/routing/config/async"); } } } diff --git a/test/fixtures/linter/rules/NoDeprecatedApi/library_negative.js b/test/fixtures/linter/rules/NoDeprecatedApi/library_negative.js index 017c58201..137403d46 100644 --- a/test/fixtures/linter/rules/NoDeprecatedApi/library_negative.js +++ b/test/fixtures/linter/rules/NoDeprecatedApi/library_negative.js @@ -54,8 +54,8 @@ sap.ui.define([ ] }); - const {init: intRenames} = Library; - intRenames({ + const {init: initRenames} = Library; + initRenames({ apiVersion: 2, dependencies: [ "sap.ui.core", diff --git a/test/lib/linter/amdTranspiler/snapshots/transpiler.ts.md b/test/lib/linter/amdTranspiler/snapshots/transpiler.ts.md index 7cd40337f..cf253776b 100644 --- a/test/lib/linter/amdTranspiler/snapshots/transpiler.ts.md +++ b/test/lib/linter/amdTranspiler/snapshots/transpiler.ts.md @@ -1404,33 +1404,6 @@ Generated by [AVA](https://avajs.dev). version: 3, } -## Transpile Dependencies_NotProvided.js - -> Snapshot 1 - - `export default {␊ - add: function (x, y) {␊ - return x + y;␊ - }␊ - };␊ - ` - -> Snapshot 2 - - { - file: 'UNKNOWN', - mappings: ';EACCA,KAAK,UAAUC,GAAGC;WACVD,IAAIC', - names: [ - 'add', - 'x', - 'y', - ], - sources: [ - 'UNKNOWN', - ], - version: 3, - } - ## Transpile sapUiTestGenericUtils.js > Snapshot 1 diff --git a/test/lib/linter/amdTranspiler/snapshots/transpiler.ts.snap b/test/lib/linter/amdTranspiler/snapshots/transpiler.ts.snap index 4f6efcfc8..ede2e42fb 100644 Binary files a/test/lib/linter/amdTranspiler/snapshots/transpiler.ts.snap and b/test/lib/linter/amdTranspiler/snapshots/transpiler.ts.snap differ diff --git a/test/lib/linter/rules/snapshots/AsyncComponentFlags.ts.md b/test/lib/linter/rules/snapshots/AsyncComponentFlags.ts.md index d82e185d1..1de022153 100644 --- a/test/lib/linter/rules/snapshots/AsyncComponentFlags.ts.md +++ b/test/lib/linter/rules/snapshots/AsyncComponentFlags.ts.md @@ -167,10 +167,9 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 9, - fatal: undefined, line: 6, - message: 'Component Root View and Routing are not configured to load their modules asynchronously.', - messageDetails: 'Use Asynchronous Loading (https://ui5.sap.com/#/topic/676b636446c94eada183b1218a824717). Implement sap.ui.core.IAsyncContentCreation interface in Component.js or set the "async" flags for "sap.ui5/routing/config" and "sap.ui5/rootView" in the component manifest.', + message: 'Component is not configured for asynchronous loading.', + messageDetails: 'Use Asynchronous Loading (https://ui5.sap.com/#/topic/676b636446c94eada183b1218a824717). Implement sap.ui.core.IAsyncContentCreation interface in Component.js. Alternatively, set the "async" flag to "true" in "sap.ui5/routing/config" and "sap.ui5/rootView" in the component manifest.', ruleId: 'ui5-linter-async-component-flags', severity: 2, }, @@ -193,7 +192,7 @@ Generated by [AVA](https://avajs.dev). { column: 12, line: 18, - message: 'Component implements the sap.ui.core.IAsyncContentCreation interface. The redundant "async" flag for "sap.ui5/rootView" should be removed from the component manifest', + message: 'Component implements the sap.ui.core.IAsyncContentCreation interface. The redundant "async" flag at "/sap.ui5/rootView/async" should be removed from the component manifest', messageDetails: 'sap.ui.core.IAsyncContentCreation (https://ui5.sap.com/1.120/#/api/sap.ui.core.IAsyncContentCreation)', pos: 325, ruleId: 'ui5-linter-async-component-flags', @@ -202,7 +201,7 @@ Generated by [AVA](https://avajs.dev). { column: 16, line: 29, - message: 'Component implements the sap.ui.core.IAsyncContentCreation interface. The redundant "async" flag for "sap.ui5/routing/config" should be removed from the component manifest', + message: 'Component implements the sap.ui.core.IAsyncContentCreation interface. The redundant "async" flag at "/sap.ui5/routing/config/async" should be removed from the component manifest', messageDetails: 'sap.ui.core.IAsyncContentCreation (https://ui5.sap.com/1.120/#/api/sap.ui.core.IAsyncContentCreation)', pos: 551, ruleId: 'ui5-linter-async-component-flags', @@ -234,10 +233,9 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 9, - fatal: undefined, line: 6, - message: 'Component Root View and Routing are not configured to load their modules asynchronously.', - messageDetails: 'Use Asynchronous Loading (https://ui5.sap.com/#/topic/676b636446c94eada183b1218a824717). Implement sap.ui.core.IAsyncContentCreation interface in Component.js or set the "async" flags for "sap.ui5/routing/config" and "sap.ui5/rootView" in the component manifest.', + message: 'Component is not configured for asynchronous loading.', + messageDetails: 'Use Asynchronous Loading (https://ui5.sap.com/#/topic/676b636446c94eada183b1218a824717). Implement sap.ui.core.IAsyncContentCreation interface in Component.js. Alternatively, set the "async" flag to "true" in "sap.ui5/routing/config" and "sap.ui5/rootView" in the component manifest.', ruleId: 'ui5-linter-async-component-flags', severity: 2, }, @@ -259,18 +257,16 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 9, - fatal: undefined, line: 6, - message: 'Component implements the sap.ui.core.IAsyncContentCreation interface. The redundant "async" flag for "sap.ui5/rootView" should be removed from the component manifest', + message: 'Component implements the sap.ui.core.IAsyncContentCreation interface. The redundant "async" flag at "/sap.ui5/rootView/async" should be removed from the component manifest', messageDetails: 'sap.ui.core.IAsyncContentCreation (https://ui5.sap.com/1.120/#/api/sap.ui.core.IAsyncContentCreation)', ruleId: 'ui5-linter-async-component-flags', severity: 1, }, { column: 9, - fatal: undefined, line: 6, - message: 'Component implements the sap.ui.core.IAsyncContentCreation interface. The redundant "async" flag for "sap.ui5/routing/config" should be removed from the component manifest', + message: 'Component implements the sap.ui.core.IAsyncContentCreation interface. The redundant "async" flag at "/sap.ui5/routing/config/async" should be removed from the component manifest', messageDetails: 'sap.ui.core.IAsyncContentCreation (https://ui5.sap.com/1.120/#/api/sap.ui.core.IAsyncContentCreation)', ruleId: 'ui5-linter-async-component-flags', severity: 1, @@ -293,9 +289,8 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 9, - fatal: undefined, line: 6, - message: 'Component implements the sap.ui.core.IAsyncContentCreation interface. The redundant "async" flag for "sap.ui5/rootView" should be removed from the component manifest', + message: 'Component implements the sap.ui.core.IAsyncContentCreation interface. The redundant "async" flag at "/sap.ui5/rootView/async" should be removed from the component manifest', messageDetails: 'sap.ui.core.IAsyncContentCreation (https://ui5.sap.com/1.120/#/api/sap.ui.core.IAsyncContentCreation)', ruleId: 'ui5-linter-async-component-flags', severity: 1, @@ -319,7 +314,7 @@ Generated by [AVA](https://avajs.dev). { column: 12, line: 19, - message: 'Component implements the sap.ui.core.IAsyncContentCreation interface. The redundant "async" flag for "sap.ui5/rootView" should be removed from the component manifest', + message: 'Component implements the sap.ui.core.IAsyncContentCreation interface. The redundant "async" flag at "/sap.ui5/rootView/async" should be removed from the component manifest', messageDetails: 'sap.ui.core.IAsyncContentCreation (https://ui5.sap.com/1.120/#/api/sap.ui.core.IAsyncContentCreation)', pos: 341, ruleId: 'ui5-linter-async-component-flags', @@ -336,7 +331,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 9, - fatal: undefined, line: 7, message: 'Component does not specify that it uses the descriptor via the manifest.json file', messageDetails: 'A manifest.json has been found in the same directory as the component. Although it will be used at runtime automatically, this should still be expressed in the metadata of the component class (https://ui5.sap.com/#/topic/0187ea5e2eff4166b0453b9dcc8fc64f).', @@ -361,10 +355,9 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 9, - fatal: undefined, line: 6, - message: 'Component Root View is not configured to load its views asynchronously.', - messageDetails: 'Use Asynchronous Loading (https://ui5.sap.com/#/topic/676b636446c94eada183b1218a824717). Implement sap.ui.core.IAsyncContentCreation interface in Component.js or set the "async" flag for "sap.ui5/rootView" in the component manifest.', + message: 'Component is not configured for asynchronous loading.', + messageDetails: 'Use Asynchronous Loading (https://ui5.sap.com/#/topic/676b636446c94eada183b1218a824717). Implement sap.ui.core.IAsyncContentCreation interface in Component.js. Alternatively, set the "async" flag to "true" in "sap.ui5/rootView" in the component manifest.', ruleId: 'ui5-linter-async-component-flags', severity: 2, }, @@ -386,10 +379,9 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 9, - fatal: undefined, line: 6, - message: 'Component Routing is not configured to load its targets asynchronously.', - messageDetails: 'Use Asynchronous Loading (https://ui5.sap.com/#/topic/676b636446c94eada183b1218a824717). Implement sap.ui.core.IAsyncContentCreation interface in Component.js or set the "async" flag for "sap.ui5/routing/config" in the component manifest.', + message: 'Component is not configured for asynchronous loading.', + messageDetails: 'Use Asynchronous Loading (https://ui5.sap.com/#/topic/676b636446c94eada183b1218a824717). Implement sap.ui.core.IAsyncContentCreation interface in Component.js. Alternatively, set the "async" flag to "true" in "sap.ui5/routing/config" in the component manifest.', ruleId: 'ui5-linter-async-component-flags', severity: 2, }, @@ -411,10 +403,9 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 9, - fatal: undefined, line: 6, - message: 'Component Root View and Routing are not configured to load their modules asynchronously.', - messageDetails: 'Use Asynchronous Loading (https://ui5.sap.com/#/topic/676b636446c94eada183b1218a824717). Implement sap.ui.core.IAsyncContentCreation interface in Component.js or set the "async" flags for "sap.ui5/routing/config" and "sap.ui5/rootView" in the component manifest.', + message: 'Component is not configured for asynchronous loading.', + messageDetails: 'Use Asynchronous Loading (https://ui5.sap.com/#/topic/676b636446c94eada183b1218a824717). Implement sap.ui.core.IAsyncContentCreation interface in Component.js. Alternatively, set the "async" flag to "true" in "sap.ui5/routing/config" and "sap.ui5/rootView" in the component manifest.', ruleId: 'ui5-linter-async-component-flags', severity: 2, }, @@ -436,10 +427,9 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 9, - fatal: undefined, line: 5, - message: 'Component Root View and Routing are not configured to load their modules asynchronously.', - messageDetails: 'Use Asynchronous Loading (https://ui5.sap.com/#/topic/676b636446c94eada183b1218a824717). Implement sap.ui.core.IAsyncContentCreation interface in Component.js or set the "async" flags for "sap.ui5/routing/config" and "sap.ui5/rootView" in the component manifest.', + message: 'Component is not configured for asynchronous loading.', + messageDetails: 'Use Asynchronous Loading (https://ui5.sap.com/#/topic/676b636446c94eada183b1218a824717). Implement sap.ui.core.IAsyncContentCreation interface in Component.js. Alternatively, set the "async" flag to "true" in "sap.ui5/routing/config" and "sap.ui5/rootView" in the component manifest.', ruleId: 'ui5-linter-async-component-flags', severity: 2, }, @@ -461,7 +451,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 1, - fatal: undefined, line: 5, message: 'Component does not specify that it uses the descriptor via the manifest.json file', messageDetails: 'A manifest.json has been found in the same directory as the component. Although it will be used at runtime automatically, this should still be expressed in the metadata of the component class (https://ui5.sap.com/#/topic/0187ea5e2eff4166b0453b9dcc8fc64f).', @@ -470,10 +459,9 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - fatal: undefined, line: 5, - message: 'Component Root View and Routing are not configured to load their modules asynchronously.', - messageDetails: 'Use Asynchronous Loading (https://ui5.sap.com/#/topic/676b636446c94eada183b1218a824717). Implement sap.ui.core.IAsyncContentCreation interface in Component.ts or set the "async" flags for "sap.ui5/routing/config" and "sap.ui5/rootView" in the component manifest.', + message: 'Component is not configured for asynchronous loading.', + messageDetails: 'Use Asynchronous Loading (https://ui5.sap.com/#/topic/676b636446c94eada183b1218a824717). Implement sap.ui.core.IAsyncContentCreation interface in Component.ts. Alternatively, set the "async" flag to "true" in "sap.ui5/routing/config" and "sap.ui5/rootView" in the component manifest.', ruleId: 'ui5-linter-async-component-flags', severity: 2, }, diff --git a/test/lib/linter/rules/snapshots/AsyncComponentFlags.ts.snap b/test/lib/linter/rules/snapshots/AsyncComponentFlags.ts.snap index ca20a835d..953ee1b9f 100644 Binary files a/test/lib/linter/rules/snapshots/AsyncComponentFlags.ts.snap and b/test/lib/linter/rules/snapshots/AsyncComponentFlags.ts.snap differ diff --git a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md index eae18e579..aeaa82754 100644 --- a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md +++ b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md @@ -17,7 +17,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 11, - fatal: undefined, line: 3, message: 'Call to deprecated function \'control\' of module \'jQuery\'', messageDetails: 'Deprecated test message', @@ -26,7 +25,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 11, - fatal: undefined, line: 4, message: 'Call to deprecated function \'control\' of module \'jQuery\'', messageDetails: 'Deprecated test message', @@ -51,7 +49,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 16, - fatal: undefined, line: 1, message: 'Import of deprecated module \'sap/ui/model/odata/ODataModel\'', messageDetails: 'Deprecated test message', @@ -76,7 +73,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 18, - fatal: undefined, line: 2, message: 'Import of deprecated module \'sap/m/DateTimeInput\'', messageDetails: 'Deprecated test message', @@ -85,7 +81,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 41, - fatal: undefined, line: 2, message: 'Import of deprecated module \'sap/base/util/includes\'', messageDetails: 'Deprecated test message', @@ -94,7 +89,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 107, - fatal: undefined, line: 2, message: 'Import of deprecated module \'sap/ui/generic/app/navigation/service/NavigationHandler\'', messageDetails: 'Deprecated test message', @@ -103,7 +97,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 69, - fatal: undefined, line: 3, message: 'Import of deprecated module \'sap/ui/core/Configuration\'', messageDetails: 'Deprecated test message', @@ -112,7 +105,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - fatal: undefined, line: 9, message: 'Use of deprecated property \'blocked\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -121,7 +113,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - fatal: undefined, line: 10, message: 'Use of deprecated property \'tap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -130,7 +121,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 6, - fatal: undefined, line: 13, message: 'Call to deprecated function \'attachTap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -139,7 +129,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - fatal: undefined, line: 18, message: 'Use of deprecated property \'plugins\' of class \'Table\'', messageDetails: 'Deprecated test message', @@ -148,7 +137,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - fatal: undefined, line: 21, message: 'Use of deprecated property \'groupBy\' of class \'Table\'', messageDetails: 'Deprecated test message', @@ -157,7 +145,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - fatal: undefined, line: 24, message: 'Call to deprecated function \'includes\'', messageDetails: 'Deprecated test message', @@ -166,7 +153,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - fatal: undefined, line: 27, message: 'Call to deprecated function \'getIncludesFunction()\'', messageDetails: 'Deprecated test message', @@ -175,7 +161,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 16, - fatal: undefined, line: 29, message: 'Call to deprecated function \'getCompatibilityVersion\' of class \'Configuration\'', messageDetails: 'Deprecated test message', @@ -184,7 +169,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 16, - fatal: undefined, line: 30, message: 'Call to deprecated function \'getCompatibilityVersion\' of class \'Configuration\'', messageDetails: 'Deprecated test message', @@ -193,43 +177,38 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - fatal: undefined, line: 32, - message: 'Access of deprecated property \'webview\'', + message: 'Use of deprecated property \'webview\'', messageDetails: 'Deprecated test message', ruleId: 'ui5-linter-no-deprecated-property', severity: 2, }, { column: 2, - fatal: undefined, line: 33, - message: 'Access of deprecated property \'webview\'', + message: 'Use of deprecated property \'webview\'', messageDetails: 'Deprecated test message', ruleId: 'ui5-linter-no-deprecated-property', severity: 2, }, { column: 2, - fatal: undefined, line: 35, - message: 'Access of deprecated property \'AnimationMode\'', + message: 'Use of deprecated property \'AnimationMode\'', messageDetails: 'Deprecated test message', ruleId: 'ui5-linter-no-deprecated-property', severity: 2, }, { column: 2, - fatal: undefined, line: 37, - message: 'Access of deprecated property \'MessageType\'', + message: 'Use of deprecated property \'MessageType\'', messageDetails: 'Deprecated test message', ruleId: 'ui5-linter-no-deprecated-property', severity: 2, }, { column: 17, - fatal: undefined, line: 39, message: 'Use of deprecated API \'MessageType\'', messageDetails: 'Deprecated test message', @@ -238,7 +217,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 40, message: 'Use of deprecated API \'MessageType\'', messageDetails: 'Deprecated test message', @@ -247,7 +225,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 30, - fatal: undefined, line: 43, message: 'Use of deprecated API \'mt\'', messageDetails: 'Deprecated test message', @@ -256,7 +233,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 14, - fatal: undefined, line: 44, message: 'Use of deprecated API \'MessageType\'', messageDetails: 'Deprecated test message', @@ -265,16 +241,14 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - fatal: undefined, line: 47, - message: 'Access of deprecated property \'Date\'', + message: 'Use of deprecated property \'Date\'', messageDetails: 'Deprecated test message', ruleId: 'ui5-linter-no-deprecated-property', severity: 2, }, { column: 20, - fatal: undefined, line: 50, message: 'Call to deprecated function \'storeInnerAppState\' of class \'NavigationHandler\'', messageDetails: 'Deprecated test message', @@ -299,7 +273,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 27, - fatal: undefined, line: 2, message: 'Import of deprecated module \'sap/m/DateTimeInput\'', messageDetails: 'Deprecated test message', @@ -308,7 +281,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 22, - fatal: undefined, line: 3, message: 'Import of deprecated module \'sap/base/util/includes\'', messageDetails: 'Deprecated test message', @@ -317,7 +289,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 9, - fatal: undefined, line: 5, message: 'Use of deprecated API \'MessageType\'', messageDetails: 'Deprecated test message', @@ -326,7 +297,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 31, - fatal: undefined, line: 6, message: 'Import of deprecated module \'sap/ui/generic/app/navigation/service/NavigationHandler\'', messageDetails: 'Deprecated test message', @@ -335,7 +305,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 27, - fatal: undefined, line: 9, message: 'Import of deprecated module \'sap/ui/core/Configuration\'', messageDetails: 'Deprecated test message', @@ -344,7 +313,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 5, - fatal: undefined, line: 15, message: 'Use of deprecated property \'blocked\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -353,7 +321,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 5, - fatal: undefined, line: 16, message: 'Use of deprecated property \'tap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -362,7 +329,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 5, - fatal: undefined, line: 19, message: 'Call to deprecated function \'attachTap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -371,7 +337,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 5, - fatal: undefined, line: 24, message: 'Use of deprecated property \'plugins\' of class \'Table\'', messageDetails: 'Deprecated test message', @@ -380,7 +345,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 5, - fatal: undefined, line: 27, message: 'Use of deprecated property \'groupBy\' of class \'Table\'', messageDetails: 'Deprecated test message', @@ -389,7 +353,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - fatal: undefined, line: 30, message: 'Call to deprecated function \'includes\'', messageDetails: 'Deprecated test message', @@ -398,7 +361,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - fatal: undefined, line: 32, message: 'Call to deprecated function \'getCompatibilityVersion\' of class \'Configuration\'', messageDetails: 'Deprecated test message', @@ -407,7 +369,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - fatal: undefined, line: 33, message: 'Call to deprecated function \'getCompatibilityVersion\' of class \'Configuration\'', messageDetails: 'Deprecated test message', @@ -416,43 +377,38 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - fatal: undefined, line: 35, - message: 'Access of deprecated property \'webview\'', + message: 'Use of deprecated property \'webview\'', messageDetails: 'Deprecated test message', ruleId: 'ui5-linter-no-deprecated-property', severity: 2, }, { column: 1, - fatal: undefined, line: 36, - message: 'Access of deprecated property \'webview\'', + message: 'Use of deprecated property \'webview\'', messageDetails: 'Deprecated test message', ruleId: 'ui5-linter-no-deprecated-property', severity: 2, }, { column: 1, - fatal: undefined, line: 38, - message: 'Access of deprecated property \'AnimationMode\'', + message: 'Use of deprecated property \'AnimationMode\'', messageDetails: 'Deprecated test message', ruleId: 'ui5-linter-no-deprecated-property', severity: 2, }, { column: 1, - fatal: undefined, line: 42, - message: 'Access of deprecated property \'Date\'', + message: 'Use of deprecated property \'Date\'', messageDetails: 'Deprecated test message', ruleId: 'ui5-linter-no-deprecated-property', severity: 2, }, { column: 19, - fatal: undefined, line: 45, message: 'Call to deprecated function \'storeInnerAppState\' of class \'NavigationHandler\'', messageDetails: 'Deprecated test message', @@ -507,7 +463,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 22, - fatal: undefined, line: 10, message: 'Call to deprecated function \'setVisibleRowCount\' of class \'Table\'', messageDetails: 'Deprecated test message', @@ -532,7 +487,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 2, - fatal: undefined, line: 6, message: 'Import of deprecated module \'sap/m/DateTimeInput\'', messageDetails: 'Deprecated test message', @@ -541,7 +495,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 10, - fatal: undefined, line: 8, message: 'Use of deprecated property \'blocked\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -550,7 +503,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - fatal: undefined, line: 10, message: 'Use of deprecated property \'groupBy\' of class \'Table\'', messageDetails: 'Deprecated test message', @@ -559,7 +511,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 11, message: 'Use of deprecated property \'plugins\' of class \'Table\'', messageDetails: 'Deprecated test message', @@ -568,7 +519,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 11, - fatal: undefined, line: 17, message: 'Use of deprecated property \'tap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -577,7 +527,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - fatal: undefined, line: 17, message: 'Use of deprecated property \'buttons\' of class \'SegmentedButton\'', messageDetails: 'Deprecated test message', @@ -602,7 +551,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 2, - fatal: undefined, line: 7, message: 'Import of deprecated module \'sap/m/DateTimeInput\'', messageDetails: 'Deprecated test message', @@ -611,7 +559,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 10, - fatal: undefined, line: 9, message: 'Use of deprecated property \'blocked\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -620,7 +567,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - fatal: undefined, line: 11, message: 'Use of deprecated property \'groupBy\' of class \'Table\'', messageDetails: 'Deprecated test message', @@ -629,7 +575,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 12, message: 'Use of deprecated property \'plugins\' of class \'Table\'', messageDetails: 'Deprecated test message', @@ -638,7 +583,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 11, - fatal: undefined, line: 18, message: 'Use of deprecated property \'tap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -647,7 +591,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - fatal: undefined, line: 18, message: 'Use of deprecated property \'buttons\' of class \'SegmentedButton\'', messageDetails: 'Deprecated test message', @@ -717,7 +660,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 2, - fatal: undefined, line: 4, message: 'Import of deprecated module \'sap/ui/core/Message\'', messageDetails: 'Deprecated test message', @@ -742,7 +684,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 2, - fatal: undefined, line: 6, message: 'Import of deprecated module \'sap/ui/core/Message\'', messageDetails: 'Deprecated test message', @@ -751,7 +692,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 8, - fatal: undefined, line: 9, message: 'Import of deprecated module \'sap/ui/model/odata/ODataModel\'', messageDetails: 'Deprecated test message', @@ -776,7 +716,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 2, - fatal: undefined, line: 7, message: 'Import of deprecated module \'sap/m/DateTimeInput\'', messageDetails: 'Deprecated test message', @@ -785,7 +724,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 10, - fatal: undefined, line: 9, message: 'Use of deprecated property \'blocked\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -794,7 +732,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 15, - fatal: undefined, line: 11, message: 'Use of deprecated property \'groupBy\' of class \'Table\'', messageDetails: 'Deprecated test message', @@ -803,7 +740,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 12, message: 'Use of deprecated property \'plugins\' of class \'Table\'', messageDetails: 'Deprecated test message', @@ -812,7 +748,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 11, - fatal: undefined, line: 18, message: 'Use of deprecated property \'tap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -821,7 +756,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - fatal: undefined, line: 18, message: 'Use of deprecated property \'buttons\' of class \'SegmentedButton\'', messageDetails: 'Deprecated test message', @@ -846,27 +780,24 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 15, - fatal: undefined, line: 2, - message: 'Access of deprecated property \'device\'', + message: 'Use of deprecated property \'device\'', messageDetails: 'Deprecated test message', ruleId: 'ui5-linter-no-deprecated-property', severity: 2, }, { column: 11, - fatal: undefined, line: 3, - message: 'Access of deprecated property \'os\'', + message: 'Use of deprecated property \'os\'', messageDetails: 'Deprecated test message', ruleId: 'ui5-linter-no-deprecated-property', severity: 2, }, { column: 18, - fatal: undefined, line: 4, - message: 'Access of deprecated property \'os\'', + message: 'Use of deprecated property \'os\'', messageDetails: 'Deprecated test message', ruleId: 'ui5-linter-no-deprecated-property', severity: 2, @@ -908,7 +839,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 34, - fatal: undefined, line: 2, message: 'Call to deprecated function \'control\' of module \'JQuery\'', messageDetails: 'Deprecated test message', @@ -988,7 +918,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 21, - fatal: undefined, line: 4, message: 'Use of deprecated API \'jQuery.sap.properties\'', messageDetails: 'Deprecated test message', @@ -997,7 +926,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - fatal: undefined, line: 5, message: 'Use of deprecated API \'jQuery.sap\'', messageDetails: 'Deprecated test message', @@ -1006,7 +934,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - fatal: undefined, line: 6, message: 'Use of deprecated API \'jQuery.sap\'', messageDetails: 'Deprecated test message', @@ -1015,7 +942,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - fatal: undefined, line: 9, message: 'Use of deprecated API \'importedJQuery.sap.properties\'', messageDetails: 'Deprecated test message', @@ -1024,7 +950,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - fatal: undefined, line: 10, message: 'Use of deprecated API \'jQuery.sap\'', messageDetails: 'Deprecated test message', @@ -1033,7 +958,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - fatal: undefined, line: 11, message: 'Use of deprecated API \'jQuery.sap\'', messageDetails: 'Deprecated test message', @@ -1042,7 +966,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - fatal: undefined, line: 14, message: 'Use of deprecated API \'importedJQuerySapProperties.sap.properties\'', messageDetails: 'Deprecated test message', @@ -1051,7 +974,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - fatal: undefined, line: 15, message: 'Use of deprecated API \'jQuery.sap\'', messageDetails: 'Deprecated test message', @@ -1060,7 +982,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 21, - fatal: undefined, line: 16, message: 'Use of deprecated API \'jQuery.sap\'', messageDetails: 'Deprecated test message', @@ -1085,7 +1006,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 2, - fatal: undefined, line: 9, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', @@ -1094,7 +1014,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - fatal: undefined, line: 10, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', @@ -1103,7 +1022,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - fatal: undefined, line: 11, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', @@ -1112,7 +1030,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - fatal: undefined, line: 14, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', @@ -1121,7 +1038,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 17, message: 'Use of deprecated library \'sap.ui.commons\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1129,7 +1045,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 18, message: 'Use of deprecated library \'sap.ui.suite\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1137,7 +1052,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 19, message: 'Use of deprecated library \'sap.ui.ux3\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1145,7 +1059,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 20, message: 'Use of deprecated library \'sap.ui.vtm\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1153,7 +1066,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 21, message: 'Use of deprecated library \'sap.uiext.inbox\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1161,7 +1073,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 22, message: 'Use of deprecated library \'sap.webanalytics.core\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1169,7 +1080,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 23, message: 'Use of deprecated library \'sap.zen.commons\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1177,7 +1087,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 24, message: 'Use of deprecated library \'sap.zen.crosstab\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1185,7 +1094,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - fatal: undefined, line: 28, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', @@ -1194,7 +1102,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - fatal: undefined, line: 31, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', @@ -1203,7 +1110,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - fatal: undefined, line: 34, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', @@ -1212,7 +1118,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - fatal: undefined, line: 37, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', @@ -1221,7 +1126,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 39, message: 'Use of deprecated library \'sap.ui.commons\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1229,7 +1133,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 40, message: 'Use of deprecated library \'sap.ui.suite\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1237,7 +1140,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 41, message: 'Use of deprecated library \'sap.ui.ux3\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1245,7 +1147,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 42, message: 'Use of deprecated library \'sap.ui.vtm\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1253,7 +1154,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 43, message: 'Use of deprecated library \'sap.uiext.inbox\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1261,7 +1161,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 44, message: 'Use of deprecated library \'sap.webanalytics.core\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1269,7 +1168,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 45, message: 'Use of deprecated library \'sap.zen.commons\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1277,7 +1175,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 46, message: 'Use of deprecated library \'sap.zen.crosstab\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1285,7 +1182,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - fatal: undefined, line: 52, message: 'Call to LibInit() must be declared with property {apiVersion: 2}', messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', @@ -1294,7 +1190,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 54, message: 'Use of deprecated library \'sap.ui.commons\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1302,7 +1197,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 55, message: 'Use of deprecated library \'sap.ui.suite\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1310,7 +1204,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 56, message: 'Use of deprecated library \'sap.ui.ux3\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1318,7 +1211,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 57, message: 'Use of deprecated library \'sap.ui.vtm\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1326,7 +1218,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 58, message: 'Use of deprecated library \'sap.uiext.inbox\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1334,7 +1225,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 59, message: 'Use of deprecated library \'sap.webanalytics.core\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1342,7 +1232,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 60, message: 'Use of deprecated library \'sap.zen.commons\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1350,7 +1239,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 61, message: 'Use of deprecated library \'sap.zen.crosstab\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1358,7 +1246,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - fatal: undefined, line: 67, message: 'Call to init() must be declared with property {apiVersion: 2}', messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', @@ -1367,7 +1254,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 69, message: 'Use of deprecated library \'sap.ui.commons\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1375,7 +1261,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 70, message: 'Use of deprecated library \'sap.ui.suite\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1383,7 +1268,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 71, message: 'Use of deprecated library \'sap.ui.ux3\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1391,7 +1275,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 72, message: 'Use of deprecated library \'sap.ui.vtm\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1399,7 +1282,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 73, message: 'Use of deprecated library \'sap.uiext.inbox\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1407,7 +1289,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 74, message: 'Use of deprecated library \'sap.webanalytics.core\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1415,7 +1296,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 75, message: 'Use of deprecated library \'sap.zen.commons\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1423,7 +1303,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 76, message: 'Use of deprecated library \'sap.zen.crosstab\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1431,7 +1310,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 3, - fatal: undefined, line: 82, message: 'Call to intRenames() must be declared with property {apiVersion: 2}', messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', @@ -1440,7 +1318,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 84, message: 'Use of deprecated library \'sap.ui.commons\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1448,7 +1325,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 85, message: 'Use of deprecated library \'sap.ui.suite\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1456,7 +1332,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 86, message: 'Use of deprecated library \'sap.ui.ux3\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1464,7 +1339,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 87, message: 'Use of deprecated library \'sap.ui.vtm\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1472,7 +1346,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 88, message: 'Use of deprecated library \'sap.uiext.inbox\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1480,7 +1353,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 89, message: 'Use of deprecated library \'sap.webanalytics.core\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1488,7 +1360,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 90, message: 'Use of deprecated library \'sap.zen.commons\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1496,7 +1367,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 91, message: 'Use of deprecated library \'sap.zen.crosstab\'', ruleId: 'ui5-linter-no-deprecated-library', @@ -1747,7 +1617,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 8, - fatal: undefined, line: 1, message: 'Call to deprecated function \'jsview\' (sap.ui.jsview)', messageDetails: 'Deprecated test message', @@ -1756,7 +1625,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - fatal: undefined, line: 1, message: 'Access of global variable \'sap\' (sap.ui.jsview)', ruleId: 'ui5-linter-no-globals-js', @@ -1780,7 +1648,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 6, - fatal: undefined, line: 6, message: 'Use of deprecated property \'tap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -1805,7 +1672,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 3, - fatal: undefined, line: 3, message: 'Use of deprecated property \'tap\' of class \'Button\'', messageDetails: 'Deprecated test message', diff --git a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap index 0ca445545..b46b6090a 100644 Binary files a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap and b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap differ diff --git a/test/lib/linter/rules/snapshots/NoGlobals.ts.md b/test/lib/linter/rules/snapshots/NoGlobals.ts.md index 3081ee794..879ae561f 100644 --- a/test/lib/linter/rules/snapshots/NoGlobals.ts.md +++ b/test/lib/linter/rules/snapshots/NoGlobals.ts.md @@ -108,7 +108,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 8, - fatal: undefined, line: 8, message: 'Access of global variable \'sap\' (sap.m.Button)', ruleId: 'ui5-linter-no-globals-js', @@ -116,7 +115,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 19, - fatal: undefined, line: 11, message: 'Access of global variable \'sap\' (sap.m)', ruleId: 'ui5-linter-no-globals-js', @@ -124,7 +122,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 14, message: 'Access of global variable \'sap\' (sap.ui.requireSync)', ruleId: 'ui5-linter-no-globals-js', @@ -132,7 +129,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 15, message: 'Access of global variable \'sap\' (window)', ruleId: 'ui5-linter-no-globals-js', @@ -140,7 +136,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 16, message: 'Access of global variable \'sap\' (window.sap.ui.requireSync)', ruleId: 'ui5-linter-no-globals-js', @@ -148,7 +143,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 17, message: 'Access of global variable \'sap\' (globalThis.sap.ui.requireSync)', ruleId: 'ui5-linter-no-globals-js', @@ -156,7 +150,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 20, message: 'Access of global variable \'sap\' (self.sap.ui.requireSync)', ruleId: 'ui5-linter-no-globals-js', @@ -164,7 +157,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 22, message: 'Access of global variable \'sap\' (that.sap.ui.requireSync)', ruleId: 'ui5-linter-no-globals-js', @@ -172,7 +164,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 27, message: 'Access of global variable \'sap\' (window)', ruleId: 'ui5-linter-no-globals-js', @@ -180,7 +171,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 29, message: 'Access of global variable \'jQuery\' (jQuery.ajax)', ruleId: 'ui5-linter-no-globals-js', @@ -188,7 +178,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 30, message: 'Access of global variable \'jQuery\' (jQuery)', ruleId: 'ui5-linter-no-globals-js', @@ -196,7 +185,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 31, message: 'Use of deprecated API \'jQuery.sap.require\'', messageDetails: 'Deprecated test message', diff --git a/test/lib/linter/rules/snapshots/NoGlobals.ts.snap b/test/lib/linter/rules/snapshots/NoGlobals.ts.snap index 809d2cf00..bea5c4ead 100644 Binary files a/test/lib/linter/rules/snapshots/NoGlobals.ts.snap and b/test/lib/linter/rules/snapshots/NoGlobals.ts.snap differ diff --git a/test/lib/linter/rules/snapshots/NoPseudoModules.ts.md b/test/lib/linter/rules/snapshots/NoPseudoModules.ts.md index b7fe17a34..6e3670ef2 100644 --- a/test/lib/linter/rules/snapshots/NoPseudoModules.ts.md +++ b/test/lib/linter/rules/snapshots/NoPseudoModules.ts.md @@ -17,7 +17,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 2, - fatal: undefined, line: 2, message: 'Deprecated access to enum pseudo module \'sap/ui/core/BarColor\'', messageDetails: 'Migrating Access to Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)', @@ -26,7 +25,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - fatal: undefined, line: 3, message: 'Deprecated access to enum pseudo module \'sap/m/ListSeparators\'', messageDetails: 'Migrating Access to Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)', @@ -35,7 +33,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - fatal: undefined, line: 4, message: 'Deprecated access to DataType pseudo module \'sap/ui/core/CSSSize\'', messageDetails: 'Migrating Access to Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)', diff --git a/test/lib/linter/rules/snapshots/NoPseudoModules.ts.snap b/test/lib/linter/rules/snapshots/NoPseudoModules.ts.snap index b749d56bb..154e9d1ae 100644 Binary files a/test/lib/linter/rules/snapshots/NoPseudoModules.ts.snap and b/test/lib/linter/rules/snapshots/NoPseudoModules.ts.snap differ diff --git a/test/lib/linter/snapshots/linter.ts.md b/test/lib/linter/snapshots/linter.ts.md index 240ac9b05..f595d0d8d 100644 --- a/test/lib/linter/snapshots/linter.ts.md +++ b/test/lib/linter/snapshots/linter.ts.md @@ -135,7 +135,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 5, - fatal: undefined, line: 15, message: 'Use of deprecated property \'blocked\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -144,7 +143,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 8, - fatal: undefined, line: 17, message: 'Call to deprecated function \'attachTap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -169,7 +167,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 7, - fatal: undefined, line: 6, message: 'Call to deprecated function \'attachTap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -178,7 +175,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 23, - fatal: undefined, line: 12, message: 'Call to deprecated function \'attachTap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -187,7 +183,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 4, - fatal: undefined, line: 18, message: 'Use of deprecated property \'blocked\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -212,7 +207,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 5, - fatal: undefined, line: 9, message: 'Use of deprecated property \'blocked\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -221,7 +215,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 8, - fatal: undefined, line: 11, message: 'Call to deprecated function \'attachTap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -246,7 +239,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 5, - fatal: undefined, line: 11, message: 'Use of deprecated property \'blocked\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -255,7 +247,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 8, - fatal: undefined, line: 13, message: 'Call to deprecated function \'attachTap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -280,7 +271,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 5, - fatal: undefined, line: 14, message: 'Use of deprecated property \'blocked\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -289,7 +279,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 8, - fatal: undefined, line: 16, message: 'Call to deprecated function \'attachTap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -370,7 +359,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 36, - fatal: undefined, line: 1, message: 'Deprecated access to enum pseudo module \'sap/m/BackgroundDesign\'', messageDetails: 'Migrating Access to Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)', @@ -379,7 +367,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 24, - fatal: undefined, line: 10, message: 'Call to deprecated function \'attachTap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -410,7 +397,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 5, - fatal: undefined, line: 9, message: 'Use of deprecated property \'blocked\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -419,7 +405,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 8, - fatal: undefined, line: 11, message: 'Call to deprecated function \'attachTap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -659,7 +644,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 18, - fatal: undefined, line: 4, message: 'Call to deprecated function \'attachInit\' of class \'Core\'', messageDetails: 'Deprecated test message', @@ -668,7 +652,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 8, - fatal: undefined, line: 4, message: 'Call to deprecated function \'getCore\' (sap.ui.getCore)', messageDetails: 'Deprecated test message', @@ -677,7 +660,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - fatal: undefined, line: 4, message: 'Access of global variable \'sap\' (sap.ui.getCore)', ruleId: 'ui5-linter-no-globals-js', @@ -782,7 +764,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 18, - fatal: undefined, line: 6, message: 'Call to deprecated function \'attachInit\' of class \'Core\'', messageDetails: 'Deprecated test message', @@ -791,7 +772,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 8, - fatal: undefined, line: 6, message: 'Call to deprecated function \'getCore\' (sap.ui.getCore)', messageDetails: 'Deprecated test message', @@ -800,7 +780,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 1, - fatal: undefined, line: 6, message: 'Access of global variable \'sap\' (sap.ui.getCore)', ruleId: 'ui5-linter-no-globals-js', @@ -825,7 +804,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 2, - fatal: undefined, line: 11, message: 'Import of deprecated module \'sap/m/MessagePage\'', messageDetails: 'Deprecated test message', @@ -834,7 +812,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 5, - fatal: undefined, line: 22, message: 'Use of deprecated property \'blocked\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -859,16 +836,13 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 36, - fatal: undefined, line: 1, message: 'Deprecated access to enum pseudo module \'sap/m/BackgroundDesign\'', - messageDetails: 'Migrating Access to Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)', ruleId: 'ui5-linter-no-pseudo-modules', severity: 2, }, { column: 24, - fatal: undefined, line: 10, message: 'Call to deprecated function \'attachTap\' of class \'Button\'', ruleId: 'ui5-linter-no-deprecated-api', @@ -885,7 +859,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 5, - fatal: undefined, line: 9, message: 'Use of deprecated property \'blocked\' of class \'Button\'', ruleId: 'ui5-linter-no-deprecated-api', @@ -893,7 +866,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 8, - fatal: undefined, line: 11, message: 'Call to deprecated function \'attachTap\' of class \'Button\'', ruleId: 'ui5-linter-no-deprecated-api', @@ -1028,7 +1000,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 19, - fatal: undefined, line: 27, message: 'Call to deprecated function \'getLibraryResourceBundle\' of class \'Core\'', messageDetails: 'Deprecated test message', @@ -1046,7 +1017,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 19, - fatal: undefined, line: 15, message: 'Call to deprecated function \'initLibrary\' of class \'Core\'', messageDetails: 'Deprecated test message', @@ -1055,7 +1025,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 9, - fatal: undefined, line: 15, message: 'Call to deprecated function \'getCore\' (sap.ui.getCore)', messageDetails: 'Deprecated test message', @@ -1064,7 +1033,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - fatal: undefined, line: 15, message: 'Access of global variable \'sap\' (sap.ui.getCore)', ruleId: 'ui5-linter-no-globals-js', @@ -1081,7 +1049,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 31, - fatal: undefined, line: 4, message: 'Call to deprecated function \'attachTap\' of class \'Button\'', messageDetails: 'Deprecated test message', @@ -1118,7 +1085,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 90, - fatal: undefined, line: 1, message: 'Import of deprecated module \'sap/ui/model/odata/ODataModel\'', messageDetails: 'Deprecated test message', @@ -1168,7 +1134,6 @@ Generated by [AVA](https://avajs.dev). messages: [ { column: 2, - fatal: undefined, line: 4, message: 'Import of deprecated module \'sap/f/Avatar\'', messageDetails: 'Deprecated test message', @@ -1177,7 +1142,6 @@ Generated by [AVA](https://avajs.dev). }, { column: 2, - fatal: undefined, line: 5, message: 'Import of deprecated module \'sap/m/DateTimeInput\'', messageDetails: 'Deprecated test message', diff --git a/test/lib/linter/snapshots/linter.ts.snap b/test/lib/linter/snapshots/linter.ts.snap index fddba8dfa..4136ec1b7 100644 Binary files a/test/lib/linter/snapshots/linter.ts.snap and b/test/lib/linter/snapshots/linter.ts.snap differ