-
Notifications
You must be signed in to change notification settings - Fork 4
NEW: @W-19053333@ Add CSS Rules #349
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
Conversation
| // 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}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| tags: [COMMON_TAGS.RECOMMENDED, SLDS, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.CSS] | ||
| }, | ||
| "@salesforce-ux/slds/no-slds-private-var": { | ||
| severity: SeverityLevel.High, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
| "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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "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" |
|
|
||
| // ================================================================================================================= | ||
| // SLDS/HTML BASE RULES - @salesforce-ux/eslint-plugin-slds | ||
| // SLDS - HTML BASE RULES - @salesforce-ux/eslint-plugin-slds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had approval to lower these all by 1 level; todo with the update to pull in the final rule updates.
ab28d2f to
d723493
Compare
This PR: