Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,356 changes: 452 additions & 904 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions packages/ENGINE-TEMPLATE/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
"types": "dist/index.d.ts",
"dependencies": {
"@types/node": "^20.0.0",
"@salesforce/code-analyzer-engine-api": "0.31.0"
"@salesforce/code-analyzer-engine-api": "0.32.0-SNAPSHOT"
},
"devDependencies": {
"@eslint/js": "^9.38.0",
"@eslint/js": "^9.39.1",
"@types/jest": "^30.0.0",
"eslint": "^9.38.0",
"eslint": "^9.39.1",
"jest": "^30.2.0",
"rimraf": "^6.0.1",
"rimraf": "^6.1.2",
"ts-jest": "^29.4.5",
"typescript": "^5.9.3",
"typescript-eslint": "^8.46.2"
"typescript-eslint": "^8.47.0"
},
"engines": {
"node": ">=20.0.0"
Expand Down
12 changes: 6 additions & 6 deletions packages/code-analyzer-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@
},
"types": "dist/index.d.ts",
"dependencies": {
"@salesforce/code-analyzer-engine-api": "0.31.0",
"@salesforce/code-analyzer-engine-api": "0.32.0-SNAPSHOT",
"@types/node": "^20.0.0",
"csv-stringify": "^6.6.0",
"js-yaml": "^4.1.0",
"js-yaml": "^4.1.1",
"semver": "^7.7.3",
"xmlbuilder": "^15.1.1"
},
"devDependencies": {
"@eslint/js": "^9.38.0",
"@eslint/js": "^9.39.1",
"@types/js-yaml": "^4.0.9",
"@types/jest": "^30.0.0",
"@types/sarif": "^2.1.7",
"@types/semver": "^7.7.1",
"cross-env": "^10.1.0",
"eslint": "^9.38.0",
"eslint": "^9.39.1",
"jest": "^30.2.0",
"rimraf": "^6.0.1",
"rimraf": "^6.1.2",
"ts-jest": "^29.4.5",
"typescript": "^5.9.3",
"typescript-eslint": "^8.46.2"
"typescript-eslint": "^8.47.0"
},
"engines": {
"node": ">=20.0.0"
Expand Down
10 changes: 5 additions & 5 deletions packages/code-analyzer-engine-api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@salesforce/code-analyzer-engine-api",
"description": "Engine API Package for the Salesforce Code Analyzer",
"version": "0.31.0",
"version": "0.32.0-SNAPSHOT",
"author": "The Salesforce Code Analyzer Team",
"license": "BSD-3-Clause",
"homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview",
Expand All @@ -19,14 +19,14 @@
"@types/node": "^20.0.0"
},
"devDependencies": {
"@eslint/js": "^9.38.0",
"@eslint/js": "^9.39.1",
"@types/jest": "^30.0.0",
"eslint": "^9.38.0",
"eslint": "^9.39.1",
"jest": "^30.2.0",
"rimraf": "^6.0.1",
"rimraf": "^6.1.2",
"ts-jest": "^29.4.5",
"typescript": "^5.9.3",
"typescript-eslint": "^8.46.2"
"typescript-eslint": "^8.47.0"
},
"engines": {
"node": ">=20.0.0"
Expand Down
29 changes: 15 additions & 14 deletions packages/code-analyzer-eslint-engine/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@salesforce/code-analyzer-eslint-engine",
"description": "Plugin package that adds 'eslint' as an engine into Salesforce Code Analyzer",
"version": "0.36.0",
"version": "0.37.0-SNAPSHOT",
"author": "The Salesforce Code Analyzer Team",
"license": "BSD-3-Clause",
"homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview",
Expand All @@ -13,24 +13,25 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"dependencies": {
"@eslint/js": "^9.38.0",
"@lwc/eslint-plugin-lwc": "^3.2.0",
"@eslint/css": "^0.14.1",
"@eslint/js": "^9.39.1",
"@lwc/eslint-plugin-lwc": "^3.3.0",
"@lwc/eslint-plugin-lwc-platform": "^6.3.0",
"@salesforce-ux/eslint-plugin-slds": "^1.0.2",
"@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",

Copy link
Copy Markdown
Contributor Author

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-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"," .

@stephen-carter-at-sf stephen-carter-at-sf Nov 21, 2025

Copy link
Copy Markdown
Contributor

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.

@emypaulson-1993 emypaulson-1993 Nov 24, 2025

Copy link
Copy Markdown
Contributor Author

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/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

"@salesforce/code-analyzer-engine-api": "0.32.0-SNAPSHOT",
"@salesforce/code-analyzer-eslint8-engine": "0.9.0-SNAPSHOT",
"@salesforce/eslint-config-lwc": "^4.1.1",
"@salesforce/eslint-plugin-lightning": "^2.0.0",
"@types/node": "^20.0.0",
"@typescript-eslint/eslint-plugin": "^8.44.0",
"@typescript-eslint/parser": "^8.44.0",
"eslint": "^9.38.0",
"@typescript-eslint/eslint-plugin": "^8.47.0",
"@typescript-eslint/parser": "^8.47.0",
"eslint": "^9.39.1",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-jest": "^29.0.1",
"globals": "^16.4.0",
"eslint-plugin-jest": "^29.2.0",
"globals": "^16.5.0",
"semver": "^7.7.3",
"typescript": "^5.9.3",
"typescript-eslint": "^8.46.2"
"typescript-eslint": "^8.47.0"
},
"devDependencies": {
"@types/jest": "^30.0.0",
Expand Down Expand Up @@ -76,4 +77,4 @@
"!src/index.ts"
]
}
}
}
11 changes: 10 additions & 1 deletion packages/code-analyzer-eslint-engine/src/base-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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?

@emypaulson-1993 emypaulson-1993 Nov 24, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import {ESLintEngineConfig} from "./config";
import globals from "globals";

Expand Down Expand Up @@ -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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

};
});
}
Expand Down
8 changes: 8 additions & 0 deletions packages/code-analyzer-eslint-engine/src/rule-mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,10 @@ export const RULE_MAPPINGS: Record<string, {severity: SeverityLevel, tags: strin
severity: SeverityLevel.Moderate,
tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
},
"@lwc/lwc/newer-version-available": {
severity: SeverityLevel.Moderate,
tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
},
"@lwc/lwc/no-async-operation": {
severity: SeverityLevel.Moderate,
tags: [COMMON_TAGS.RECOMMENDED, LWC, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.JAVASCRIPT]
Expand Down Expand Up @@ -1456,6 +1460,10 @@ export const RULE_MAPPINGS: Record<string, {severity: SeverityLevel, tags: strin
severity: SeverityLevel.Moderate,
tags: [COMMON_TAGS.RECOMMENDED, COMMON_TAGS.CATEGORIES.BEST_PRACTICES, COMMON_TAGS.LANGUAGES.TYPESCRIPT]
},
"@typescript-eslint/no-unused-private-class-members": {
severity: SeverityLevel.High,
tags: [COMMON_TAGS.CATEGORIES.ERROR_PRONE, COMMON_TAGS.LANGUAGES.TYPESCRIPT]
},
"@typescript-eslint/no-unused-vars": {
severity: SeverityLevel.High,
tags: [COMMON_TAGS.RECOMMENDED, COMMON_TAGS.CATEGORIES.ERROR_PRONE, COMMON_TAGS.LANGUAGES.TYPESCRIPT]
Expand Down
Loading