Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Improve naming and classification of linter rules #436

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/linter/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const RULES = {
"no-deprecated-theme": "no-deprecated-theme",
"no-globals": "no-globals",
"no-pseudo-modules": "no-pseudo-modules",
"no-redundancy": "no-redundancy",
"parsing-error": "parsing-error",
"ui5-class-declaration": "ui5-class-declaration",
} as const;
Expand Down Expand Up @@ -283,7 +284,7 @@ export const MESSAGE_INFO = {

[MESSAGE.DUPLICATE_BOOTSTRAP_PARAM]: {
severity: LintMessageSeverity.Warning,
ruleId: RULES["no-deprecated-api"],
ruleId: RULES["no-redundancy"],

message: ({name, value}: {name: string; value: string}) =>
`Duplicate bootstrap parameter '${name}' with value '${value}'`,
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 @@ -322,7 +322,7 @@ Generated by [AVA](https://avajs.dev).
column: 3,
line: 15,
message: 'Duplicate bootstrap parameter \'data-sap-ui-on-init\' with value \'data-sap-ui-onInit\'',
ruleId: 'no-deprecated-api',
ruleId: 'no-redundancy',
severity: 1,
},
{
Expand Down Expand Up @@ -351,7 +351,7 @@ Generated by [AVA](https://avajs.dev).
column: 3,
line: 19,
message: 'Duplicate bootstrap parameter \'data-sap-ui-binding-syntax\' with value \'data-sap-ui-xx-bindingsyntax\'',
ruleId: 'no-deprecated-api',
ruleId: 'no-redundancy',
severity: 1,
},
{
Expand All @@ -365,7 +365,7 @@ Generated by [AVA](https://avajs.dev).
column: 3,
line: 20,
message: 'Duplicate bootstrap parameter \'data-sap-ui-binding-syntax\' with value \'data-sap-ui-xx-binding-syntax\'',
ruleId: 'no-deprecated-api',
ruleId: 'no-redundancy',
severity: 1,
},
{
Expand All @@ -386,7 +386,7 @@ Generated by [AVA](https://avajs.dev).
column: 3,
line: 22,
message: 'Duplicate bootstrap parameter \'data-sap-ui-preload\' with value \'data-sap-ui-xx-preload\'',
ruleId: 'no-deprecated-api',
ruleId: 'no-redundancy',
severity: 1,
},
{
Expand Down
Binary file modified test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap
Binary file not shown.
Loading