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
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

25 changes: 0 additions & 25 deletions .eslintrc.json

This file was deleted.

36 changes: 36 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { FlatCompat } from "@eslint/eslintrc";
import { fixupConfigRules } from "@eslint/compat";
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

const compat = new FlatCompat({
baseDirectory: import.meta.dirname
});

export default [
...tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname
}
}
},
{
rules: {
"@typescript-eslint/no-unused-vars": ["error", {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"}],
"@typescript-eslint/unbound-method": ["error", {"ignoreStatic": true}]
}
}
),
...fixupConfigRules(compat.extends("plugin:sf-plugin/recommended")),
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.

This is essentially how we keep using the sf-plugin rules even though they haven't migrated to support flat config yet.

{
ignores: ["lib/**", "node_modules/**", "github-actions/**"]
}
];
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,42 @@
"author": "Salesforce Code Analyzer Team",
"bugs": "https://github.com/forcedotcom/sfdx-scanner/issues",
"dependencies": {
"@oclif/core": "^3.3.2",
"@oclif/core": "3.27.0",
"@salesforce/code-analyzer-core": "0.22.0",
"@salesforce/code-analyzer-engine-api": "0.17.0",
"@salesforce/code-analyzer-eslint-engine": "0.19.0",
"@salesforce/code-analyzer-flowtest-engine": "0.17.0",
"@salesforce/code-analyzer-pmd-engine": "0.19.0",
"@salesforce/code-analyzer-regex-engine": "0.17.0",
"@salesforce/code-analyzer-retirejs-engine": "0.17.0",
"@salesforce/core": "^5",
"@salesforce/sf-plugins-core": "^5.0.4",
"@salesforce/core": "6.7.6",
"@salesforce/sf-plugins-core": "5.0.13",
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.

Note that since we will be updating these modules regularly now… since JSON doesn’t allow you to add comments, I am basically just removing the ^ prefix for any version that we shouldn’t be updating for whatever reason. This will help us know that there is some issue that we need to look into before attempting to update again. I'll keep notes on the work items... so we can always just look back at them.

"@salesforce/ts-types": "^2.0.12",
"@types/js-yaml": "^4.0.9",
"@types/node": "^22.10.9",
"ansis": "^3.9.0",
"@types/node": "^22.12.0",
"ansis": "^3.10.0",
"fast-glob": "^3.3.3",
"js-yaml": "^4.1.0",
"ts-node": "^10",
"tslib": "^2"
},
"devDependencies": {
"@eslint/js": "^8.57.1",
"@oclif/plugin-help": "^6.2.22",
"@eslint/compat": "^1.2.5",
"@eslint/eslintrc": "^3.2.0",
Comment on lines +28 to +29
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.

These are needed to maintain the use of the sf-plugin rules which do not support flat config yet... so we need compatibility wrappers.

"@eslint/js": "^9.19.0",
"@oclif/plugin-help": "^6.2.23",
"@salesforce/cli-plugins-testkit": "^5.3.39",
"@types/jest": "^29.5.14",
"@types/tmp": "^0.2.6",
"@typescript-eslint/eslint-plugin": "^8.21.0",
"@typescript-eslint/parser": "^8.21.0",
"eslint": "^8.57.1",
"eslint": "^9.19.0",
"eslint-plugin-sf-plugin": "^1.20.14",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"oclif": "^4.17.17",
"oclif": "^4.17.20",
"tmp": "^0.2.3",
"ts-jest": "^29.2.5",
"typescript": "^5.7.3"
"typescript": "^5.7.3",
"typescript-eslint": "^8.22.0"
},
"engines": {
"node": ">=20.0.0"
Expand Down
Loading