Skip to content

Commit

Permalink
refactor: Cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
d3xter666 committed Dec 6, 2024
1 parent 86a88d8 commit 3f574fc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/linter/html/transpiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ function lintBootstrapAttributes(tag: Tag, report: HtmlReporter) {
checkPreloadAttr(attr, report);
break;
case "data-sap-ui-no-duplicate-ids":
case "data-sap-ui-auto-aria-body-role":
report.addMessage(MESSAGE.REDUNDANT_BOOTSTRAP_PARAM_ERROR, {
name: attr.name.value,
}, attr.name);
break;
case "data-sap-ui-xx-no-less":
case "data-sap-ui-areas":
case "data-sap-ui-trace":
case "data-sap-ui-auto-aria-body-role":
report.addMessage(MESSAGE.ABANDONED_BOOTSTRAP_PARAM, {
name: attr.name.value,
}, attr.name);
Expand Down
4 changes: 2 additions & 2 deletions src/linter/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const MESSAGE_INFO = {

message: ({name}: {name: string}) =>
`Abandoned bootstrap parameter '${name}' should be removed`,
details: ({message}: {message?: string}) => message,
details: () => undefined,
},

[MESSAGE.COMPONENT_MISSING_ASYNC_INTERFACE]: {
Expand Down Expand Up @@ -421,7 +421,7 @@ export const MESSAGE_INFO = {

message: ({name}: {name: string}) =>
`Redundant bootstrap parameter '${name}' should be removed`,
details: ({messageDetails}: {messageDetails?: string}) => messageDetails,
details: () => undefined,
},

[MESSAGE.REDUNDANT_BOOTSTRAP_PARAM_ERROR]: {
Expand Down
8 changes: 4 additions & 4 deletions test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Generated by [AVA](https://avajs.dev).
[
{
coverageInfo: [],
errorCount: 12,
errorCount: 13,
fatalErrorCount: 0,
filePath: 'BootstrapParameters_Deprecations.html',
messages: [
Expand Down Expand Up @@ -71,9 +71,9 @@ Generated by [AVA](https://avajs.dev).
{
column: 3,
line: 18,
message: 'Abandoned bootstrap parameter \'data-sap-ui-auto-aria-body-role\' should be removed',
message: 'Redundant bootstrap parameter \'data-sap-ui-auto-aria-body-role\' should be removed',
ruleId: 'no-deprecated-api',
severity: 1,
severity: 2,
},
{
column: 3,
Expand Down Expand Up @@ -177,7 +177,7 @@ Generated by [AVA](https://avajs.dev).
severity: 1,
},
],
warningCount: 10,
warningCount: 9,
},
]

Expand Down
Binary file modified test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap
Binary file not shown.

0 comments on commit 3f574fc

Please sign in to comment.