Skip to content

Commit c3423dd

Browse files
authored
CHANGE: @W-19348414@ Finalize new SLDS rule tags (#329)
1 parent a084f4b commit c3423dd

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

packages/code-analyzer-eslint-engine/src/rule-mappings.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import {COMMON_TAGS, SeverityLevel} from "@salesforce/code-analyzer-engine-api";
22

3-
// Convenience tag to apply to the LWC rules
3+
// Convenience tag to apply to framework specific rules
44
const LWC = "LWC";
5+
const SLDS = "SLDS";
56

67
/**
78
* The following is a list of the base rules that we have reviewed where we have designated the rule tags and
@@ -1601,15 +1602,15 @@ export const RULE_MAPPINGS: Record<string, {severity: SeverityLevel, tags: strin
16011602
// SLDS/HTML BASE RULES - @salesforce-ux/eslint-plugin-slds
16021603
// =================================================================================================================
16031604
"@salesforce-ux/slds/enforce-bem-usage": {
1604-
severity: SeverityLevel.Low,
1605-
tags: [COMMON_TAGS.RECOMMENDED, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.HTML]
1605+
severity: SeverityLevel.Moderate,
1606+
tags: [COMMON_TAGS.RECOMMENDED, SLDS, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.HTML]
16061607
},
16071608
"@salesforce-ux/slds/modal-close-button-issue": {
1608-
severity: SeverityLevel.Moderate,
1609-
tags: [COMMON_TAGS.RECOMMENDED, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.HTML]
1609+
severity: SeverityLevel.High,
1610+
tags: [COMMON_TAGS.RECOMMENDED, SLDS, COMMON_TAGS.CATEGORIES.ERROR_PRONE, COMMON_TAGS.LANGUAGES.HTML]
16101611
},
16111612
"@salesforce-ux/slds/no-deprecated-classes-slds2": {
16121613
severity: SeverityLevel.High,
1613-
tags: [COMMON_TAGS.RECOMMENDED, COMMON_TAGS.CATEGORIES.ERROR_PRONE, COMMON_TAGS.LANGUAGES.HTML]
1614+
tags: [COMMON_TAGS.RECOMMENDED, SLDS, COMMON_TAGS.CATEGORIES.ERROR_PRONE, COMMON_TAGS.LANGUAGES.HTML]
16141615
}
16151616
}

packages/code-analyzer-eslint-engine/test/test-data/rules_OnlySldsBaseConfig.goldfile.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
"resourceUrls": [
66
"https://developer.salesforce.com/docs/platform/slds-linter/guide/reference-rules.html#enforce-bem-usage"
77
],
8-
"severityLevel": 4,
8+
"severityLevel": 3,
99
"tags": [
1010
"Recommended",
11+
"SLDS",
1112
"BestPractices",
1213
"HTML"
1314
]
@@ -18,10 +19,11 @@
1819
"resourceUrls": [
1920
"https://developer.salesforce.com/docs/platform/slds-linter/guide/reference-rules.html#modal-close-button-issue"
2021
],
21-
"severityLevel": 3,
22+
"severityLevel": 2,
2223
"tags": [
2324
"Recommended",
24-
"BestPractices",
25+
"SLDS",
26+
"ErrorProne",
2527
"HTML"
2628
]
2729
},
@@ -34,6 +36,7 @@
3436
"severityLevel": 2,
3537
"tags": [
3638
"Recommended",
39+
"SLDS",
3740
"ErrorProne",
3841
"HTML"
3942
]

0 commit comments

Comments
 (0)