Skip to content

Commit ef66607

Browse files
committed
CHANGE: @W-19348414@ Finalize new SLDS rule tags
1 parent a084f4b commit ef66607

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

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

Lines changed: 9 additions & 7 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
@@ -932,7 +933,8 @@ export const RULE_MAPPINGS: Record<string, {severity: SeverityLevel, tags: strin
932933
// TODO: Turn it back on when the rule has been fixed:
933934
// "@lwc/lwc-platform/valid-offline-wire": {
934935
// severity: SeverityLevel.Moderate,
935-
// tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.ERROR_PRONE, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
936+
// tags: [COMMON_TAGS.RECOMMENDED,
937+
LWC, COMMON_TAGS.CATEGORIES.ERROR_PRONE, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
936938
// },
937939

938940
"@lwc/lwc/no-api-reassignments": {
@@ -1601,15 +1603,15 @@ export const RULE_MAPPINGS: Record<string, {severity: SeverityLevel, tags: strin
16011603
// SLDS/HTML BASE RULES - @salesforce-ux/eslint-plugin-slds
16021604
// =================================================================================================================
16031605
"@salesforce-ux/slds/enforce-bem-usage": {
1604-
severity: SeverityLevel.Low,
1605-
tags: [COMMON_TAGS.RECOMMENDED, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.HTML]
1606+
severity: SeverityLevel.Moderate,
1607+
tags: [COMMON_TAGS.RECOMMENDED, SLDS, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.HTML]
16061608
},
16071609
"@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]
1610+
severity: SeverityLevel.High,
1611+
tags: [COMMON_TAGS.RECOMMENDED, SLDS, COMMON_TAGS.CATEGORIES.ERROR_PRONE, COMMON_TAGS.LANGUAGES.HTML]
16101612
},
16111613
"@salesforce-ux/slds/no-deprecated-classes-slds2": {
16121614
severity: SeverityLevel.High,
1613-
tags: [COMMON_TAGS.RECOMMENDED, COMMON_TAGS.CATEGORIES.ERROR_PRONE, COMMON_TAGS.LANGUAGES.HTML]
1615+
tags: [COMMON_TAGS.RECOMMENDED, SLDS, COMMON_TAGS.CATEGORIES.ERROR_PRONE, COMMON_TAGS.LANGUAGES.HTML]
16141616
}
16151617
}

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)