NEW: @W-19053333@ Add CSS Rules - #349
Closed
randi274 wants to merge 2 commits into
Closed
Conversation
randi274
marked this pull request as draft
September 10, 2025 19:22
| // Add CSS config if CSS files are configured | ||
| if (this.engineConfig.file_extensions.css.length > 0) { | ||
| const cssConfig = sldsEslintPlugin.configs['flat/recommended'].find(conf => | ||
| conf.files && conf.files.includes('**/*.{css,scss}') |
Contributor
There was a problem hiding this comment.
As discussed in person. If the other team can separate their config so that we didn't need to do these lookups our code would dramatically simplify and be more robust against future changes. So propose to them that they do something like:
Object.assign(plugin.configs, {
// Flat config for ESLint v9+
"flat/recommended-css": cssConfigArray,
"flat/recommended-html": htmlConfigArray,
"flat/recommended": [... cssConfigArray, ... htmlConfigArray]
...
on their end.
stephen-carter-at-sf
requested changes
Sep 10, 2025
| tags: [COMMON_TAGS.RECOMMENDED, SLDS, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.CSS] | ||
| }, | ||
| "@salesforce-ux/slds/no-slds-private-var": { | ||
| severity: SeverityLevel.High, |
Contributor
There was a problem hiding this comment.
I thought we reduced all these severity levels down one notch. See https://salesforce-internal.slack.com/archives/C082R6T1NAE/p1756472072701789?thread_ts=1756306603.812739&cid=C082R6T1NAE
randi274
commented
Sep 11, 2025
| "description": "Replace static values with SLDS 2 styling hooks. For more information, look up design tokens on lightningdesignsystem.com.", | ||
| "name": "@salesforce-ux/slds/no-hardcoded-values-slds2", | ||
| "resourceUrls": [ | ||
| "https://developer.salesforce.com/docs/platform/slds-linter/guide/reference-rules.html#no-hardcoded-value" |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| "https://developer.salesforce.com/docs/platform/slds-linter/guide/reference-rules.html#no-hardcoded-value" | |
| "https://developer.salesforce.com/docs/platform/slds-linter/guide/reference-rules.html#no-hardcoded-values-slds2" |
randi274
commented
Sep 11, 2025
|
|
||
| // ================================================================================================================= | ||
| // SLDS/HTML BASE RULES - @salesforce-ux/eslint-plugin-slds | ||
| // SLDS - HTML BASE RULES - @salesforce-ux/eslint-plugin-slds |
Contributor
Author
There was a problem hiding this comment.
We had approval to lower these all by 1 level; todo with the update to pull in the final rule updates.
stephen-carter-at-sf
force-pushed
the
dev
branch
from
September 19, 2025 18:26
ab28d2f to
d723493
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR: