CHANGE @W-20084011@ Updated node dependencies - PMD Version Update from 7.17.0 to 7.18.0 - #380
Conversation
| "@salesforce/code-analyzer-engine-api": "0.31.0", | ||
| "@salesforce/code-analyzer-eslint8-engine": "0.8.0", | ||
| "@salesforce/eslint-config-lwc": "^4.0.0", | ||
| "@salesforce-ux/eslint-plugin-slds": "^1.0.6", |
There was a problem hiding this comment.
@stephen-carter-at-sf @jfeingold35 : The @salesforce-ux/eslint-plugin-slds package provides CSS linting rules, but ESLint v9 requires a separate language plugin (@eslint/css) to parse CSS files . Hence I have added Added @eslint/css dependency in the package.json ""@eslint/css": "^0.14.1"," .
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@stephen-carter-at-sf : I debugged the issue . It's a bug with SLDS plugin .
The SLDS plugin has @eslint/css as a dependency and references language: "css/css" in their config, but they never actually register the CSS plugin:
// @salesforce-ux/eslint-plugin-slds/build/index.js
var cssConfigArray = [{
language: "css/css", // ← References CSS language
plugins: {
"@salesforce-ux/slds": plugin // ← Only SLDS plugin, missing css plugin!
}
}]; // ← This causes the error: `"Could not find 'css' in plugin 'css'"`
We need to add @eslint/css as 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
| 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"; |
There was a problem hiding this comment.
Why shouldn't be needing this. Doesn't the @salesforce-ux/eslint-plugin-slds config bring this in for us?
There was a problem hiding this comment.
I have explained the issue in this thread : https://github.com/forcedotcom/code-analyzer-core/pull/380/files#r2554625943
| plugins: { | ||
| ...cssConfig.plugins, | ||
| css: eslintCss | ||
| } |
There was a problem hiding this comment.
Why are you adding in the plugin. Shouldn't the cssConfig be bringing in this plugin for us?
There was a problem hiding this comment.
I have explained the issue in this thread : https://github.com/forcedotcom/code-analyzer-core/pull/380/files#r2554625943
| "@salesforce/code-analyzer-engine-api": "0.31.0", | ||
| "@types/node": "^20.0.0", | ||
| "@salesforce/code-analyzer-engine-api": "0.32.0-SNAPSHOT", | ||
| "@types/node": "^24.10.1", |
| "@types/node": "^20.0.0", | ||
| "isbinaryfile": "^5.0.4", | ||
| "@salesforce/code-analyzer-engine-api": "0.32.0-SNAPSHOT", | ||
| "@types/node": "^24.10.1", |
PMD 7.18.0 Release notes - https://docs.pmd-code.org/pmd-doc-7.18.0/pmd_release_notes.html
All tests are passing in code-analyzer-core repo .
Ran scanner comparison tool successfully and added the results in Scanner Comparison Results Drive .