Skip to content

Commit d2edf6e

Browse files
Strum355claude
andauthored
build(deps): bump dependencies and migrate to ESLint 10 flat config (#544)
Bump all safe dependencies to latest major versions: - @cyclonedx/cyclonedx-library 6→10, https-proxy-agent 7→9, p-limit 4→7 - chai 4→6, mocha 10→11, sinon 15→22, sinon-chai 3→4 - eslint 8→10, typescript 5→6, which 5→7, @types/node 20→25 Migrate ESLint configuration: - Convert .eslintrc.json to eslint.config.js (flat config, required by ESLint 10) - Replace eslint-plugin-import with eslint-plugin-import-x (ESLint 10 support) - Replace eslint-plugin-editorconfig with equivalent built-in ESLint rules (plugin uses removed context.getFilename API incompatible with ESLint 10) Fix Mocha 11 breaking change: - Convert all suite().beforeAll().afterAll() chains to use suiteSetup()/suiteTeardown() inside suite callbacks (chaining API removed) Add dependabot ignore for packageurl-js (blocked on upstream purl spec issue for '+' encoding in versions, see package-url/packageurl-js#90). Closes #542 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e660b02 commit d2edf6e

16 files changed

Lines changed: 2371 additions & 6095 deletions

.eslintrc.json

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ updates:
99
exclude-paths:
1010
- "test/providers/tst_manifests/**"
1111
- "test/providers/provider_manifests/**"
12+
ignore:
13+
# Blocked on upstream purl spec issue for '+' encoding in versions.
14+
# See: https://github.com/package-url/packageurl-js/pull/90
15+
- dependency-name: "packageurl-js"
1216
groups:
1317
npm-dependencies:
1418
patterns:

eslint.config.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import js from "@eslint/js";
2+
import importPlugin from "eslint-plugin-import-x";
3+
import globals from "globals";
4+
5+
export default [
6+
js.configs.recommended,
7+
{
8+
plugins: {
9+
"import-x": importPlugin,
10+
},
11+
languageOptions: {
12+
ecmaVersion: 2022,
13+
sourceType: "module",
14+
globals: {
15+
...globals.node,
16+
...globals.mocha,
17+
...globals.es2021,
18+
},
19+
},
20+
rules: {
21+
...importPlugin.configs.recommended.rules,
22+
"no-unused-vars": ["error", { "caughtErrors": "none" }],
23+
"preserve-caught-error": "off",
24+
// editorconfig enforcement (replaces eslint-plugin-editorconfig)
25+
"eol-last": ["error", "always"],
26+
"indent": ["error", "tab"],
27+
"linebreak-style": ["error", "unix"],
28+
"no-trailing-spaces": "error",
29+
"unicode-bom": ["error", "never"],
30+
"curly": "warn",
31+
"eqeqeq": ["warn", "always", {"null": "never"}],
32+
"no-throw-literal": "warn",
33+
"import-x/order": ["warn", {
34+
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
35+
"newlines-between": "always",
36+
"alphabetize": {
37+
"order": "asc",
38+
"caseInsensitive": true,
39+
},
40+
}],
41+
},
42+
settings: {
43+
"typescript": {},
44+
"import-x/resolver": {
45+
"typescript": {
46+
"extensions": [".js"],
47+
},
48+
},
49+
},
50+
},
51+
{
52+
ignores: ["index.js", "dist/**"],
53+
},
54+
];

0 commit comments

Comments
 (0)