-
Notifications
You must be signed in to change notification settings - Fork 6
CHANGE @W-20084011@ Updated node dependencies - PMD Version Update from 7.17.0 to 7.18.0 #380
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
Changes from all commits
43ff627
abb7cb0
fe32f58
2cb8581
d29670f
968f141
a7f6b13
907bebc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ import eslintTs from "typescript-eslint"; | |
| import lwcEslintPluginLwcPlatform from "@lwc/eslint-plugin-lwc-platform"; | ||
| import salesforceEslintConfigLwc from "@salesforce/eslint-config-lwc"; | ||
| import sldsEslintPlugin from "@salesforce-ux/eslint-plugin-slds"; | ||
| import eslintCss from "@eslint/css"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why shouldn't be needing this. Doesn't the @salesforce-ux/eslint-plugin-slds config bring this in for us?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have explained the issue in this thread : https://github.com/forcedotcom/code-analyzer-core/pull/380/files#r2554625943 |
||
| import {ESLintEngineConfig} from "./config"; | ||
| import globals from "globals"; | ||
|
|
||
|
|
@@ -132,7 +133,15 @@ export class BaseConfigFactory { | |
| return sldsEslintPlugin.configs['flat/recommended-css'].map((cssConfig: Linter.Config) => { | ||
| return { | ||
| ...cssConfig, | ||
| files: this.engineConfig.file_extensions.css.map(ext => `**/*${ext}`) | ||
| files: this.engineConfig.file_extensions.css.map(ext => `**/*${ext}`), | ||
| // TODO: Remove this workaround once @salesforce-ux/eslint-plugin-slds v1.0.7+ is released. | ||
| // The SLDS plugin's CSS config references `language: "css/css"` but doesn't register the | ||
| // CSS language plugin in their plugins object. We must add it ourselves to avoid the error: | ||
| // "Could not find 'css' in plugin 'css'". See: https://github.com/salesforce-ux/slds-linter/issues/314 | ||
| plugins: { | ||
| ...cssConfig.plugins, | ||
| css: eslintCss | ||
| } | ||
|
Comment on lines
+141
to
+144
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you adding in the plugin. Shouldn't the cssConfig be bringing in this plugin for us?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have explained the issue in this thread : https://github.com/forcedotcom/code-analyzer-core/pull/380/files#r2554625943 |
||
| }; | ||
| }); | ||
| } | ||
|
|
||
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.
@stephen-carter-at-sf @jfeingold35 : The
@salesforce-ux/eslint-plugin-sldspackage provides CSS linting rules, but ESLint v9 requires a separate language plugin (@eslint/css) to parse CSS files . Hence I have added Added@eslint/cssdependency in the package.json ""@eslint/css": "^0.14.1"," .Uh oh!
There was an error while loading. Please reload this page.
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.
The @salesforce-ux/eslint-plugin-slds package already has a dependency on @eslint/css because they directly depend on it. Unless we directly depend on @eslint/css within our engine package, it shouldn't be in our package.json. We should be relying on pulling in config objects (which pull in plugins) - not plugins directly.
Uh oh!
There was an error while loading. Please reload this page.
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.
@stephen-carter-at-sf : I debugged the issue . It's a bug with SLDS plugin .
The SLDS plugin has
@eslint/cssas a dependency and referenceslanguage: "css/css"in their config, but they never actually register the CSS plugin:We need to add
@eslint/cssas a direct dependency and manually register it when consuming their config to fix this issue.I have logged a bug on SLDS team : salesforce-ux/slds-linter#314