From ba2649a2cacd1454fb6ffeb43b42806b1206cfb6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 23:01:35 +0000 Subject: [PATCH 1/3] [deps] Update eslint monorepo to v10 --- opencti-platform/opencti-front/package.json | 4 +- opencti-platform/opencti-front/yarn.lock | 188 ++++++++---------- opencti-platform/opencti-graphql/package.json | 4 +- opencti-platform/opencti-graphql/yarn.lock | 174 ++++++++-------- 4 files changed, 166 insertions(+), 204 deletions(-) diff --git a/opencti-platform/opencti-front/package.json b/opencti-platform/opencti-front/package.json index 609d0ca875ce..3c52e8b49b14 100644 --- a/opencti-platform/opencti-front/package.json +++ b/opencti-platform/opencti-front/package.json @@ -128,7 +128,7 @@ "yup": "1.7.1" }, "devDependencies": { - "@eslint/js": "9.39.3", + "@eslint/js": "10.0.1", "@faker-js/faker": "10.3.0", "@playwright/test": "1.58.2", "@stylistic/eslint-plugin": "5.9.0", @@ -156,7 +156,7 @@ "chokidar": "5.0.0", "compression": "1.8.1", "esbuild": "0.27.3", - "eslint": "9.39.3", + "eslint": "10.0.1", "eslint-import-resolver-typescript": "4.4.4", "eslint-plugin-custom-rules": "workspace:*", "eslint-plugin-import": "2.32.0", diff --git a/opencti-platform/opencti-front/yarn.lock b/opencti-platform/opencti-front/yarn.lock index abf58ceeefbe..77b7208f1311 100644 --- a/opencti-platform/opencti-front/yarn.lock +++ b/opencti-platform/opencti-front/yarn.lock @@ -1595,80 +1595,68 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.12.1, @eslint-community/regexpp@npm:^4.12.2": +"@eslint-community/regexpp@npm:^4.12.2": version: 4.12.2 resolution: "@eslint-community/regexpp@npm:4.12.2" checksum: 10c0/fddcbc66851b308478d04e302a4d771d6917a0b3740dc351513c0da9ca2eab8a1adf99f5e0aa7ab8b13fa0df005c81adeee7e63a92f3effd7d367a163b721c2d languageName: node linkType: hard -"@eslint/config-array@npm:^0.21.1": - version: 0.21.1 - resolution: "@eslint/config-array@npm:0.21.1" +"@eslint/config-array@npm:^0.23.2": + version: 0.23.2 + resolution: "@eslint/config-array@npm:0.23.2" dependencies: - "@eslint/object-schema": "npm:^2.1.7" + "@eslint/object-schema": "npm:^3.0.2" debug: "npm:^4.3.1" - minimatch: "npm:^3.1.2" - checksum: 10c0/2f657d4edd6ddcb920579b72e7a5b127865d4c3fb4dda24f11d5c4f445a93ca481aebdbd6bf3291c536f5d034458dbcbb298ee3b698bc6c9dd02900fe87eec3c + minimatch: "npm:^10.2.1" + checksum: 10c0/95d7506c3fcb13c9a477f0fd501d552a4f136425fdf41a57058565d4730d888c78a467f8cefee92c7ac911b2c9da72629cb90507bc943cb2e5ae7bcdcdd2b759 languageName: node linkType: hard -"@eslint/config-helpers@npm:^0.4.2": - version: 0.4.2 - resolution: "@eslint/config-helpers@npm:0.4.2" +"@eslint/config-helpers@npm:^0.5.2": + version: 0.5.2 + resolution: "@eslint/config-helpers@npm:0.5.2" dependencies: - "@eslint/core": "npm:^0.17.0" - checksum: 10c0/92efd7a527b2d17eb1a148409d71d80f9ac160b565ac73ee092252e8bf08ecd08670699f46b306b94f13d22e88ac88a612120e7847570dd7cdc72f234d50dcb4 + "@eslint/core": "npm:^1.1.0" + checksum: 10c0/0dc65bc5dd80441afbf5007cae702a5d9dd08893e95fed702a463366cf9ce2f4fd90adb09f9012cb4fcc9783d897ccb739067b1b8a5942f4c8288a6efb396d58 languageName: node linkType: hard -"@eslint/core@npm:^0.17.0": - version: 0.17.0 - resolution: "@eslint/core@npm:0.17.0" +"@eslint/core@npm:^1.1.0": + version: 1.1.0 + resolution: "@eslint/core@npm:1.1.0" dependencies: "@types/json-schema": "npm:^7.0.15" - checksum: 10c0/9a580f2246633bc752298e7440dd942ec421860d1946d0801f0423830e67887e4aeba10ab9a23d281727a978eb93d053d1922a587d502942a713607f40ed704e - languageName: node - linkType: hard - -"@eslint/eslintrc@npm:^3.3.1": - version: 3.3.3 - resolution: "@eslint/eslintrc@npm:3.3.3" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^10.0.1" - globals: "npm:^14.0.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.1" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10c0/532c7acc7ddd042724c28b1f020bd7bf148fcd4653bb44c8314168b5f772508c842ce4ee070299cac51c5c5757d2124bdcfcef5551c8c58ff9986e3e17f2260d + checksum: 10c0/0f875d6f24fbf67cc796e01c2ca82884f755488052ed84183e56377c5b90fe10b491a26e600642db4daea1d5d8ab7906ec12f2bd5cbdb5004b0ef73c802bdb57 languageName: node linkType: hard -"@eslint/js@npm:9.39.3": - version: 9.39.3 - resolution: "@eslint/js@npm:9.39.3" - checksum: 10c0/df1c70d6681c8daf4a3c86dfac159fcd98a73c4620c4fbe2be6caab1f30a34c7de0ad88ab0e81162376d2cde1a2eed1c32eff5f917ca369870930a51f8e818f1 +"@eslint/js@npm:10.0.1": + version: 10.0.1 + resolution: "@eslint/js@npm:10.0.1" + peerDependencies: + eslint: ^10.0.0 + peerDependenciesMeta: + eslint: + optional: true + checksum: 10c0/9f3fcaf71ba7fdf65d82e8faad6ecfe97e11801cc3c362b306a88ea1ed1344ae0d35330dddb0e8ad18f010f6687a70b75491b9e01c8af57acd7987cee6b3ec6c languageName: node linkType: hard -"@eslint/object-schema@npm:^2.1.7": - version: 2.1.7 - resolution: "@eslint/object-schema@npm:2.1.7" - checksum: 10c0/936b6e499853d1335803f556d526c86f5fe2259ed241bc665000e1d6353828edd913feed43120d150adb75570cae162cf000b5b0dfc9596726761c36b82f4e87 +"@eslint/object-schema@npm:^3.0.2": + version: 3.0.2 + resolution: "@eslint/object-schema@npm:3.0.2" + checksum: 10c0/5f8b2e264bbde6f7c86f6846a2f04cb6e3f52df49e3cce0659cea31d7f7410bb5ac681f6f910294f8362e427054665d2c5b5c794580cab6b0d5a1c177e131ec1 languageName: node linkType: hard -"@eslint/plugin-kit@npm:^0.4.1": - version: 0.4.1 - resolution: "@eslint/plugin-kit@npm:0.4.1" +"@eslint/plugin-kit@npm:^0.6.0": + version: 0.6.0 + resolution: "@eslint/plugin-kit@npm:0.6.0" dependencies: - "@eslint/core": "npm:^0.17.0" + "@eslint/core": "npm:^1.1.0" levn: "npm:^0.4.1" - checksum: 10c0/51600f78b798f172a9915dffb295e2ffb44840d583427bc732baf12ecb963eb841b253300e657da91d890f4b323d10a1bd12934bf293e3018d8bb66fdce5217b + checksum: 10c0/1d726338a9f4537fe2848796c44d801093ea3a99166dbc45bc6f7742fa2ad74ce0c2f114092ce4460710a9dfe5ea6e3500446f81842388bf81328c97c3a43d9d languageName: node linkType: hard @@ -4649,6 +4637,13 @@ __metadata: languageName: node linkType: hard +"@types/esrecurse@npm:^4.3.1": + version: 4.3.1 + resolution: "@types/esrecurse@npm:4.3.1" + checksum: 10c0/90dad74d5da3ad27606d8e8e757322f33171cfeaa15ad558b615cf71bb2a516492d18f55f4816384685a3eb2412142e732bbae9a4a7cd2cf3deb7572aa4ebe03 + languageName: node + linkType: hard + "@types/estree-jsx@npm:^1.0.0": version: 1.0.5 resolution: "@types/estree-jsx@npm:1.0.5" @@ -5609,7 +5604,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.11.0, acorn@npm:^8.15.0": +"acorn@npm:^8.11.0, acorn@npm:^8.15.0, acorn@npm:^8.16.0": version: 8.16.0 resolution: "acorn@npm:8.16.0" bin: @@ -6348,7 +6343,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:4.1.2, chalk@npm:^4.0.0": +"chalk@npm:4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -8198,13 +8193,15 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^8.4.0": - version: 8.4.0 - resolution: "eslint-scope@npm:8.4.0" +"eslint-scope@npm:^9.1.1": + version: 9.1.1 + resolution: "eslint-scope@npm:9.1.1" dependencies: + "@types/esrecurse": "npm:^4.3.1" + "@types/estree": "npm:^1.0.8" esrecurse: "npm:^4.3.0" estraverse: "npm:^5.2.0" - checksum: 10c0/407f6c600204d0f3705bd557f81bd0189e69cd7996f408f8971ab5779c0af733d1af2f1412066b40ee1588b085874fc37a2333986c6521669cdbdd36ca5058e0 + checksum: 10c0/58327b26cd6a78693951668ce68c466a535259173d187cbd5c9d3cbe657cfd5dfaf1c01ec3176b8f6f1cf240b48d01d01e0f76ad9300682d9dd51d5d1514d4c1 languageName: node linkType: hard @@ -8222,38 +8219,35 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^5.0.0": +"eslint-visitor-keys@npm:^5.0.0, eslint-visitor-keys@npm:^5.0.1": version: 5.0.1 resolution: "eslint-visitor-keys@npm:5.0.1" checksum: 10c0/16190bdf2cbae40a1109384c94450c526a79b0b9c3cb21e544256ed85ac48a4b84db66b74a6561d20fe6ab77447f150d711c2ad5ad74df4fcc133736bce99678 languageName: node linkType: hard -"eslint@npm:9.39.3": - version: 9.39.3 - resolution: "eslint@npm:9.39.3" +"eslint@npm:10.0.1": + version: 10.0.1 + resolution: "eslint@npm:10.0.1" dependencies: "@eslint-community/eslint-utils": "npm:^4.8.0" - "@eslint-community/regexpp": "npm:^4.12.1" - "@eslint/config-array": "npm:^0.21.1" - "@eslint/config-helpers": "npm:^0.4.2" - "@eslint/core": "npm:^0.17.0" - "@eslint/eslintrc": "npm:^3.3.1" - "@eslint/js": "npm:9.39.3" - "@eslint/plugin-kit": "npm:^0.4.1" + "@eslint-community/regexpp": "npm:^4.12.2" + "@eslint/config-array": "npm:^0.23.2" + "@eslint/config-helpers": "npm:^0.5.2" + "@eslint/core": "npm:^1.1.0" + "@eslint/plugin-kit": "npm:^0.6.0" "@humanfs/node": "npm:^0.16.6" "@humanwhocodes/module-importer": "npm:^1.0.1" "@humanwhocodes/retry": "npm:^0.4.2" "@types/estree": "npm:^1.0.6" ajv: "npm:^6.12.4" - chalk: "npm:^4.0.0" cross-spawn: "npm:^7.0.6" debug: "npm:^4.3.2" escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^8.4.0" - eslint-visitor-keys: "npm:^4.2.1" - espree: "npm:^10.4.0" - esquery: "npm:^1.5.0" + eslint-scope: "npm:^9.1.1" + eslint-visitor-keys: "npm:^5.0.1" + espree: "npm:^11.1.1" + esquery: "npm:^1.7.0" esutils: "npm:^2.0.2" fast-deep-equal: "npm:^3.1.3" file-entry-cache: "npm:^8.0.0" @@ -8263,8 +8257,7 @@ __metadata: imurmurhash: "npm:^0.1.4" is-glob: "npm:^4.0.0" json-stable-stringify-without-jsonify: "npm:^1.0.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" + minimatch: "npm:^10.2.1" natural-compare: "npm:^1.4.0" optionator: "npm:^0.9.3" peerDependencies: @@ -8274,11 +8267,11 @@ __metadata: optional: true bin: eslint: bin/eslint.js - checksum: 10c0/5e5dbf84d4f604f5d2d7a58c5c3fcdde30a01b8973ff3caeca8b2bacc16066717cedb4385ce52db1a2746d0b621770d4d4227cc7f44982b0b03818be2c31538d + checksum: 10c0/760de87b6ed9cd7a9b13eb68872ff057eb6d88e63ec818e297decdb2814ba80879ad0dfabb943dabaf486b5eaf6f15d446bf42116adeb88364337202db11c449 languageName: node linkType: hard -"espree@npm:^10.0.1, espree@npm:^10.4.0": +"espree@npm:^10.4.0": version: 10.4.0 resolution: "espree@npm:10.4.0" dependencies: @@ -8289,6 +8282,17 @@ __metadata: languageName: node linkType: hard +"espree@npm:^11.1.1": + version: 11.1.1 + resolution: "espree@npm:11.1.1" + dependencies: + acorn: "npm:^8.16.0" + acorn-jsx: "npm:^5.3.2" + eslint-visitor-keys: "npm:^5.0.1" + checksum: 10c0/2feae74efdfb037b9e9fcb30506799845cf20900de5e441ed03e5c51aaa249f85ea5818ff177682acc0c9bfb4ac97e1965c238ee44ac7c305aab8747177bab69 + languageName: node + linkType: hard + "esprima@npm:^4.0.0": version: 4.0.1 resolution: "esprima@npm:4.0.1" @@ -8299,7 +8303,7 @@ __metadata: languageName: node linkType: hard -"esquery@npm:^1.5.0": +"esquery@npm:^1.7.0": version: 1.7.0 resolution: "esquery@npm:1.7.0" dependencies: @@ -9096,13 +9100,6 @@ __metadata: languageName: node linkType: hard -"globals@npm:^14.0.0": - version: 14.0.0 - resolution: "globals@npm:14.0.0" - checksum: 10c0/b96ff42620c9231ad468d4c58ff42afee7777ee1c963013ff8aabe095a451d0ceeb8dcd8ef4cbd64d2538cef45f787a78ba3a9574f4a634438963e334471302d - languageName: node - linkType: hard - "globalthis@npm:^1.0.4": version: 1.0.4 resolution: "globalthis@npm:1.0.4" @@ -10321,17 +10318,6 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:^4.1.1": - version: 4.1.1 - resolution: "js-yaml@npm:4.1.1" - dependencies: - argparse: "npm:^2.0.1" - bin: - js-yaml: bin/js-yaml.js - checksum: 10c0/561c7d7088c40a9bb53cc75becbfb1df6ae49b34b5e6e5a81744b14ae8667ec564ad2527709d1a6e7d5e5fa6d483aa0f373a50ad98d42fde368ec4a190d4fae7 - languageName: node - linkType: hard - "jsdom@npm:28.1.0": version: 28.1.0 resolution: "jsdom@npm:28.1.0" @@ -10776,13 +10762,6 @@ __metadata: languageName: node linkType: hard -"lodash.merge@npm:^4.6.2": - version: 4.6.2 - resolution: "lodash.merge@npm:4.6.2" - checksum: 10c0/402fa16a1edd7538de5b5903a90228aa48eb5533986ba7fa26606a49db2572bf414ff73a2c9f5d5fd36b31c46a5d5c7e1527749c07cbcf965ccff5fbdf32c506 - languageName: node - linkType: hard - "lodash@npm:4.17.23, lodash@npm:^4.0.1, lodash@npm:^4.17.15, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4": version: 4.17.23 resolution: "lodash@npm:4.17.23" @@ -11669,7 +11648,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^10.0.3, minimatch@npm:^10.2.2": +"minimatch@npm:^10.0.3, minimatch@npm:^10.2.1, minimatch@npm:^10.2.2": version: 10.2.2 resolution: "minimatch@npm:10.2.2" dependencies: @@ -12246,7 +12225,7 @@ __metadata: "@analytics/google-analytics": "npm:1.1.0" "@cfworker/json-schema": "npm:4.1.1" "@ckeditor/ckeditor5-react": "npm:9.5.0" - "@eslint/js": "npm:9.39.3" + "@eslint/js": "npm:10.0.1" "@faker-js/faker": "npm:10.3.0" "@filigran/chatbot": "npm:1.1.2" "@fontsource/geologica": "npm:5.2.8" @@ -12302,7 +12281,7 @@ __metadata: date-fns: "npm:4.1.0" dompurify: "npm:3.3.1" esbuild: "npm:0.27.3" - eslint: "npm:9.39.3" + eslint: "npm:10.0.1" eslint-import-resolver-typescript: "npm:4.4.4" eslint-plugin-custom-rules: "workspace:*" eslint-plugin-import: "npm:2.32.0" @@ -14738,13 +14717,6 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:^3.1.1": - version: 3.1.1 - resolution: "strip-json-comments@npm:3.1.1" - checksum: 10c0/9681a6257b925a7fa0f285851c0e613cc934a50661fa7bb41ca9cbbff89686bb4a0ee366e6ecedc4daafd01e83eee0720111ab294366fe7c185e935475ebcecd - languageName: node - linkType: hard - "strtok3@npm:^10.3.4": version: 10.3.4 resolution: "strtok3@npm:10.3.4" diff --git a/opencti-platform/opencti-graphql/package.json b/opencti-platform/opencti-graphql/package.json index 34345887394e..08aa2e16b252 100644 --- a/opencti-platform/opencti-graphql/package.json +++ b/opencti-platform/opencti-graphql/package.json @@ -179,7 +179,7 @@ "zod": "4.3.6" }, "devDependencies": { - "@eslint/js": "9.39.3", + "@eslint/js": "10.0.1", "@graphql-codegen/cli": "6.1.1", "@graphql-codegen/introspection": "5.0.0", "@graphql-codegen/typescript-resolvers": "5.1.6", @@ -206,7 +206,7 @@ "esbuild": "0.27.3", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-import-glob": "0.1.1", - "eslint": "9.39.3", + "eslint": "10.0.1", "eslint-import-resolver-typescript": "4.4.4", "eslint-plugin-import": "2.32.0", "eslint-plugin-import-newlines": "2.0.0", diff --git a/opencti-platform/opencti-graphql/yarn.lock b/opencti-platform/opencti-graphql/yarn.lock index 69526c49b4b6..45d55e1b83c1 100644 --- a/opencti-platform/opencti-graphql/yarn.lock +++ b/opencti-platform/opencti-graphql/yarn.lock @@ -1660,80 +1660,68 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.12.1, @eslint-community/regexpp@npm:^4.12.2": +"@eslint-community/regexpp@npm:^4.12.2": version: 4.12.2 resolution: "@eslint-community/regexpp@npm:4.12.2" checksum: 10c0/fddcbc66851b308478d04e302a4d771d6917a0b3740dc351513c0da9ca2eab8a1adf99f5e0aa7ab8b13fa0df005c81adeee7e63a92f3effd7d367a163b721c2d languageName: node linkType: hard -"@eslint/config-array@npm:^0.21.1": - version: 0.21.1 - resolution: "@eslint/config-array@npm:0.21.1" +"@eslint/config-array@npm:^0.23.2": + version: 0.23.2 + resolution: "@eslint/config-array@npm:0.23.2" dependencies: - "@eslint/object-schema": "npm:^2.1.7" + "@eslint/object-schema": "npm:^3.0.2" debug: "npm:^4.3.1" - minimatch: "npm:^3.1.2" - checksum: 10c0/2f657d4edd6ddcb920579b72e7a5b127865d4c3fb4dda24f11d5c4f445a93ca481aebdbd6bf3291c536f5d034458dbcbb298ee3b698bc6c9dd02900fe87eec3c + minimatch: "npm:^10.2.1" + checksum: 10c0/95d7506c3fcb13c9a477f0fd501d552a4f136425fdf41a57058565d4730d888c78a467f8cefee92c7ac911b2c9da72629cb90507bc943cb2e5ae7bcdcdd2b759 languageName: node linkType: hard -"@eslint/config-helpers@npm:^0.4.2": - version: 0.4.2 - resolution: "@eslint/config-helpers@npm:0.4.2" +"@eslint/config-helpers@npm:^0.5.2": + version: 0.5.2 + resolution: "@eslint/config-helpers@npm:0.5.2" dependencies: - "@eslint/core": "npm:^0.17.0" - checksum: 10c0/92efd7a527b2d17eb1a148409d71d80f9ac160b565ac73ee092252e8bf08ecd08670699f46b306b94f13d22e88ac88a612120e7847570dd7cdc72f234d50dcb4 + "@eslint/core": "npm:^1.1.0" + checksum: 10c0/0dc65bc5dd80441afbf5007cae702a5d9dd08893e95fed702a463366cf9ce2f4fd90adb09f9012cb4fcc9783d897ccb739067b1b8a5942f4c8288a6efb396d58 languageName: node linkType: hard -"@eslint/core@npm:^0.17.0": - version: 0.17.0 - resolution: "@eslint/core@npm:0.17.0" +"@eslint/core@npm:^1.1.0": + version: 1.1.0 + resolution: "@eslint/core@npm:1.1.0" dependencies: "@types/json-schema": "npm:^7.0.15" - checksum: 10c0/9a580f2246633bc752298e7440dd942ec421860d1946d0801f0423830e67887e4aeba10ab9a23d281727a978eb93d053d1922a587d502942a713607f40ed704e - languageName: node - linkType: hard - -"@eslint/eslintrc@npm:^3.3.1": - version: 3.3.3 - resolution: "@eslint/eslintrc@npm:3.3.3" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^10.0.1" - globals: "npm:^14.0.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.1" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10c0/532c7acc7ddd042724c28b1f020bd7bf148fcd4653bb44c8314168b5f772508c842ce4ee070299cac51c5c5757d2124bdcfcef5551c8c58ff9986e3e17f2260d + checksum: 10c0/0f875d6f24fbf67cc796e01c2ca82884f755488052ed84183e56377c5b90fe10b491a26e600642db4daea1d5d8ab7906ec12f2bd5cbdb5004b0ef73c802bdb57 languageName: node linkType: hard -"@eslint/js@npm:9.39.3": - version: 9.39.3 - resolution: "@eslint/js@npm:9.39.3" - checksum: 10c0/df1c70d6681c8daf4a3c86dfac159fcd98a73c4620c4fbe2be6caab1f30a34c7de0ad88ab0e81162376d2cde1a2eed1c32eff5f917ca369870930a51f8e818f1 +"@eslint/js@npm:10.0.1": + version: 10.0.1 + resolution: "@eslint/js@npm:10.0.1" + peerDependencies: + eslint: ^10.0.0 + peerDependenciesMeta: + eslint: + optional: true + checksum: 10c0/9f3fcaf71ba7fdf65d82e8faad6ecfe97e11801cc3c362b306a88ea1ed1344ae0d35330dddb0e8ad18f010f6687a70b75491b9e01c8af57acd7987cee6b3ec6c languageName: node linkType: hard -"@eslint/object-schema@npm:^2.1.7": - version: 2.1.7 - resolution: "@eslint/object-schema@npm:2.1.7" - checksum: 10c0/936b6e499853d1335803f556d526c86f5fe2259ed241bc665000e1d6353828edd913feed43120d150adb75570cae162cf000b5b0dfc9596726761c36b82f4e87 +"@eslint/object-schema@npm:^3.0.2": + version: 3.0.2 + resolution: "@eslint/object-schema@npm:3.0.2" + checksum: 10c0/5f8b2e264bbde6f7c86f6846a2f04cb6e3f52df49e3cce0659cea31d7f7410bb5ac681f6f910294f8362e427054665d2c5b5c794580cab6b0d5a1c177e131ec1 languageName: node linkType: hard -"@eslint/plugin-kit@npm:^0.4.1": - version: 0.4.1 - resolution: "@eslint/plugin-kit@npm:0.4.1" +"@eslint/plugin-kit@npm:^0.6.0": + version: 0.6.0 + resolution: "@eslint/plugin-kit@npm:0.6.0" dependencies: - "@eslint/core": "npm:^0.17.0" + "@eslint/core": "npm:^1.1.0" levn: "npm:^0.4.1" - checksum: 10c0/51600f78b798f172a9915dffb295e2ffb44840d583427bc732baf12ecb963eb841b253300e657da91d890f4b323d10a1bd12934bf293e3018d8bb66fdce5217b + checksum: 10c0/1d726338a9f4537fe2848796c44d801093ea3a99166dbc45bc6f7742fa2ad74ce0c2f114092ce4460710a9dfe5ea6e3500446f81842388bf81328c97c3a43d9d languageName: node linkType: hard @@ -4619,7 +4607,14 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:1.0.8, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.6": +"@types/esrecurse@npm:^4.3.1": + version: 4.3.1 + resolution: "@types/esrecurse@npm:4.3.1" + checksum: 10c0/90dad74d5da3ad27606d8e8e757322f33171cfeaa15ad558b615cf71bb2a516492d18f55f4816384685a3eb2412142e732bbae9a4a7cd2cf3deb7572aa4ebe03 + languageName: node + linkType: hard + +"@types/estree@npm:1.0.8, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.6, @types/estree@npm:^1.0.8": version: 1.0.8 resolution: "@types/estree@npm:1.0.8" checksum: 10c0/39d34d1afaa338ab9763f37ad6066e3f349444f9052b9676a7cc0252ef9485a41c6d81c9c4e0d26e9077993354edf25efc853f3224dd4b447175ef62bdcc86a5 @@ -5505,7 +5500,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.15.0": +"acorn@npm:^8.15.0, acorn@npm:^8.16.0": version: 8.16.0 resolution: "acorn@npm:8.16.0" bin: @@ -7522,13 +7517,15 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^8.4.0": - version: 8.4.0 - resolution: "eslint-scope@npm:8.4.0" +"eslint-scope@npm:^9.1.1": + version: 9.1.1 + resolution: "eslint-scope@npm:9.1.1" dependencies: + "@types/esrecurse": "npm:^4.3.1" + "@types/estree": "npm:^1.0.8" esrecurse: "npm:^4.3.0" estraverse: "npm:^5.2.0" - checksum: 10c0/407f6c600204d0f3705bd557f81bd0189e69cd7996f408f8971ab5779c0af733d1af2f1412066b40ee1588b085874fc37a2333986c6521669cdbdd36ca5058e0 + checksum: 10c0/58327b26cd6a78693951668ce68c466a535259173d187cbd5c9d3cbe657cfd5dfaf1c01ec3176b8f6f1cf240b48d01d01e0f76ad9300682d9dd51d5d1514d4c1 languageName: node linkType: hard @@ -7546,38 +7543,35 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^5.0.0": +"eslint-visitor-keys@npm:^5.0.0, eslint-visitor-keys@npm:^5.0.1": version: 5.0.1 resolution: "eslint-visitor-keys@npm:5.0.1" checksum: 10c0/16190bdf2cbae40a1109384c94450c526a79b0b9c3cb21e544256ed85ac48a4b84db66b74a6561d20fe6ab77447f150d711c2ad5ad74df4fcc133736bce99678 languageName: node linkType: hard -"eslint@npm:9.39.3": - version: 9.39.3 - resolution: "eslint@npm:9.39.3" +"eslint@npm:10.0.1": + version: 10.0.1 + resolution: "eslint@npm:10.0.1" dependencies: "@eslint-community/eslint-utils": "npm:^4.8.0" - "@eslint-community/regexpp": "npm:^4.12.1" - "@eslint/config-array": "npm:^0.21.1" - "@eslint/config-helpers": "npm:^0.4.2" - "@eslint/core": "npm:^0.17.0" - "@eslint/eslintrc": "npm:^3.3.1" - "@eslint/js": "npm:9.39.3" - "@eslint/plugin-kit": "npm:^0.4.1" + "@eslint-community/regexpp": "npm:^4.12.2" + "@eslint/config-array": "npm:^0.23.2" + "@eslint/config-helpers": "npm:^0.5.2" + "@eslint/core": "npm:^1.1.0" + "@eslint/plugin-kit": "npm:^0.6.0" "@humanfs/node": "npm:^0.16.6" "@humanwhocodes/module-importer": "npm:^1.0.1" "@humanwhocodes/retry": "npm:^0.4.2" "@types/estree": "npm:^1.0.6" ajv: "npm:^6.12.4" - chalk: "npm:^4.0.0" cross-spawn: "npm:^7.0.6" debug: "npm:^4.3.2" escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^8.4.0" - eslint-visitor-keys: "npm:^4.2.1" - espree: "npm:^10.4.0" - esquery: "npm:^1.5.0" + eslint-scope: "npm:^9.1.1" + eslint-visitor-keys: "npm:^5.0.1" + espree: "npm:^11.1.1" + esquery: "npm:^1.7.0" esutils: "npm:^2.0.2" fast-deep-equal: "npm:^3.1.3" file-entry-cache: "npm:^8.0.0" @@ -7587,8 +7581,7 @@ __metadata: imurmurhash: "npm:^0.1.4" is-glob: "npm:^4.0.0" json-stable-stringify-without-jsonify: "npm:^1.0.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" + minimatch: "npm:^10.2.1" natural-compare: "npm:^1.4.0" optionator: "npm:^0.9.3" peerDependencies: @@ -7598,7 +7591,7 @@ __metadata: optional: true bin: eslint: bin/eslint.js - checksum: 10c0/5e5dbf84d4f604f5d2d7a58c5c3fcdde30a01b8973ff3caeca8b2bacc16066717cedb4385ce52db1a2746d0b621770d4d4227cc7f44982b0b03818be2c31538d + checksum: 10c0/760de87b6ed9cd7a9b13eb68872ff057eb6d88e63ec818e297decdb2814ba80879ad0dfabb943dabaf486b5eaf6f15d446bf42116adeb88364337202db11c449 languageName: node linkType: hard @@ -7614,7 +7607,7 @@ __metadata: languageName: node linkType: hard -"espree@npm:^10.0.1, espree@npm:^10.4.0": +"espree@npm:^10.4.0": version: 10.4.0 resolution: "espree@npm:10.4.0" dependencies: @@ -7625,7 +7618,18 @@ __metadata: languageName: node linkType: hard -"esquery@npm:^1.5.0": +"espree@npm:^11.1.1": + version: 11.1.1 + resolution: "espree@npm:11.1.1" + dependencies: + acorn: "npm:^8.16.0" + acorn-jsx: "npm:^5.3.2" + eslint-visitor-keys: "npm:^5.0.1" + checksum: 10c0/2feae74efdfb037b9e9fcb30506799845cf20900de5e441ed03e5c51aaa249f85ea5818ff177682acc0c9bfb4ac97e1965c238ee44ac7c305aab8747177bab69 + languageName: node + linkType: hard + +"esquery@npm:^1.7.0": version: 1.7.0 resolution: "esquery@npm:1.7.0" dependencies: @@ -8401,13 +8405,6 @@ __metadata: languageName: node linkType: hard -"globals@npm:^14.0.0": - version: 14.0.0 - resolution: "globals@npm:14.0.0" - checksum: 10c0/b96ff42620c9231ad468d4c58ff42afee7777ee1c963013ff8aabe095a451d0ceeb8dcd8ef4cbd64d2538cef45f787a78ba3a9574f4a634438963e334471302d - languageName: node - linkType: hard - "globalthis@npm:^1.0.4": version: 1.0.4 resolution: "globalthis@npm:1.0.4" @@ -8815,7 +8812,7 @@ __metadata: languageName: node linkType: hard -"import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.0": +"import-fresh@npm:^3.3.0": version: 3.3.1 resolution: "import-fresh@npm:3.3.1" dependencies: @@ -9444,7 +9441,7 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:^4.1.0, js-yaml@npm:^4.1.1": +"js-yaml@npm:^4.1.0": version: 4.1.1 resolution: "js-yaml@npm:4.1.1" dependencies: @@ -10114,7 +10111,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^10.2.2": +"minimatch@npm:^10.2.1, minimatch@npm:^10.2.2": version: 10.2.2 resolution: "minimatch@npm:10.2.2" dependencies: @@ -10749,7 +10746,7 @@ __metadata: "@datadog/pprof": "npm:5.13.3" "@elastic/elasticsearch": "npm:8.19.1" "@escape.tech/graphql-armor": "npm:3.2.0" - "@eslint/js": "npm:9.39.3" + "@eslint/js": "npm:10.0.1" "@graphql-codegen/cli": "npm:6.1.1" "@graphql-codegen/introspection": "npm:5.0.0" "@graphql-codegen/typescript-resolvers": "npm:5.1.6" @@ -10827,7 +10824,7 @@ __metadata: esbuild: "npm:0.27.3" esbuild-plugin-copy: "npm:2.1.1" esbuild-plugin-import-glob: "npm:0.1.1" - eslint: "npm:9.39.3" + eslint: "npm:10.0.1" eslint-import-resolver-typescript: "npm:4.4.4" eslint-plugin-import: "npm:2.32.0" eslint-plugin-import-newlines: "npm:2.0.0" @@ -12639,13 +12636,6 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:^3.1.1": - version: 3.1.1 - resolution: "strip-json-comments@npm:3.1.1" - checksum: 10c0/9681a6257b925a7fa0f285851c0e613cc934a50661fa7bb41ca9cbbff89686bb4a0ee366e6ecedc4daafd01e83eee0720111ab294366fe7c185e935475ebcecd - languageName: node - linkType: hard - "strip-literal@npm:^3.0.0": version: 3.1.0 resolution: "strip-literal@npm:3.1.0" From dbe2b392ecc966cba1e8fae124c0fd79a6513586 Mon Sep 17 00:00:00 2001 From: Xavier Fournet <461943+xfournet@users.noreply.github.com> Date: Thu, 26 Feb 2026 19:10:56 +0100 Subject: [PATCH 2/3] [deps] Update eslint monorepo to v10 - Fix breaking changes in backend sources --- .../opencti-graphql/src/database/file-storage.ts | 2 +- .../opencti-graphql/src/modules/ai/ai-domain.ts | 2 +- .../modules/disseminationList/disseminationList-domain.ts | 2 +- .../src/modules/internal/csvMapper/csvMapper-utils.ts | 2 +- .../src/modules/internal/jsonMapper/jsonMapper-utils.ts | 2 +- .../opencti-graphql/src/utils/filtering/filtering-utils.ts | 4 ++-- .../opencti-graphql/src/utils/safeEjs.client.ts | 4 ++-- .../opencti-graphql/src/utils/vulnerabilities.ts | 6 +++--- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/opencti-platform/opencti-graphql/src/database/file-storage.ts b/opencti-platform/opencti-graphql/src/database/file-storage.ts index 748c9aef5bab..9f05dca5d091 100644 --- a/opencti-platform/opencti-graphql/src/database/file-storage.ts +++ b/opencti-platform/opencti-graphql/src/database/file-storage.ts @@ -712,7 +712,7 @@ export const ALL_MERGEABLE_FOLDERS = [IMPORT_STORAGE_PATH, EXPORT_STORAGE_PATH, */ export const deleteAllObjectFiles = async (context: AuthContext, user: AuthUser, element: BasicStoreObject) => { logApp.debug(`[FILE STORAGE] deleting all storage files for ${element.internal_id}`); - let ids = []; + let ids: string[]; if (element.entity_type === ENTITY_TYPE_SUPPORT_PACKAGE) { const supportPath = `${SUPPORT_STORAGE_PATH}/${element.internal_id}`; const supportFiles = await allFilesForPaths(context, user, [supportPath]); diff --git a/opencti-platform/opencti-graphql/src/modules/ai/ai-domain.ts b/opencti-platform/opencti-graphql/src/modules/ai/ai-domain.ts index 8997efd1c3da..13b3a330dc67 100644 --- a/opencti-platform/opencti-graphql/src/modules/ai/ai-domain.ts +++ b/opencti-platform/opencti-graphql/src/modules/ai/ai-domain.ts @@ -181,7 +181,7 @@ export const generateContainerReport = async (context: AuthContext, user: AuthUs const container = await storeLoadById(context, user, containerId, ENTITY_TYPE_CONTAINER) as BasicStoreEntity; const { relationshipsSentences, entitiesInvolved } = await getContainerKnowledge(context, user, containerId); // Meaningful type - let meaningfulType = ''; + let meaningfulType: string; if (container.entity_type === ENTITY_TYPE_CONTAINER_REPORT) { meaningfulType = `cyber threat intelligence report published on ${container.published}`; } else if (container.entity_type === ENTITY_TYPE_CONTAINER_CASE_INCIDENT) { diff --git a/opencti-platform/opencti-graphql/src/modules/disseminationList/disseminationList-domain.ts b/opencti-platform/opencti-graphql/src/modules/disseminationList/disseminationList-domain.ts index 542741c0e84d..e835d6979757 100644 --- a/opencti-platform/opencti-graphql/src/modules/disseminationList/disseminationList-domain.ts +++ b/opencti-platform/opencti-graphql/src/modules/disseminationList/disseminationList-domain.ts @@ -74,7 +74,7 @@ export const sendDisseminationEmail = async ( const settings = await getEntityFromCache(context, user, ENTITY_TYPE_SETTINGS); const sentFiles = []; const attachmentListForSendMail = []; - let generatedEmailBody = ''; + let generatedEmailBody: string; const allowedTypesInAttachment = ['application/pdf', 'text/html']; const allowedTypesInBody = ['text/html']; const emailTemplate = opts.useOctiTemplate ? OCTI_EMAIL_TEMPLATE : BASIC_EMAIL_TEMPLATE; diff --git a/opencti-platform/opencti-graphql/src/modules/internal/csvMapper/csvMapper-utils.ts b/opencti-platform/opencti-graphql/src/modules/internal/csvMapper/csvMapper-utils.ts index bf858d633686..f8743bce52c6 100644 --- a/opencti-platform/opencti-graphql/src/modules/internal/csvMapper/csvMapper-utils.ts +++ b/opencti-platform/opencti-graphql/src/modules/internal/csvMapper/csvMapper-utils.ts @@ -53,7 +53,7 @@ export const isCsvValidRepresentationType = (representation: CsvMapperRepresenta }; export const parseCsvMapper = (mapper: any): CsvMapperParsed => { - let representations: CsvMapperRepresentation[] = []; + let representations: CsvMapperRepresentation[]; if (typeof mapper?.representations === 'string') { try { representations = JSON.parse(mapper.representations); diff --git a/opencti-platform/opencti-graphql/src/modules/internal/jsonMapper/jsonMapper-utils.ts b/opencti-platform/opencti-graphql/src/modules/internal/jsonMapper/jsonMapper-utils.ts index ec9453871ba8..f6f3ea4998ba 100644 --- a/opencti-platform/opencti-graphql/src/modules/internal/jsonMapper/jsonMapper-utils.ts +++ b/opencti-platform/opencti-graphql/src/modules/internal/jsonMapper/jsonMapper-utils.ts @@ -36,7 +36,7 @@ import { isStixRelationshipExceptRef } from '../../../schema/stixRelationship'; import { isStixObject } from '../../../schema/stixCoreObject'; export const parseJsonMapper = (mapper: any): JsonMapperParsed => { - let representations: JsonMapperRepresentation[] = []; + let representations: JsonMapperRepresentation[]; if (typeof mapper?.representations === 'string') { try { representations = JSON.parse(mapper.representations); diff --git a/opencti-platform/opencti-graphql/src/utils/filtering/filtering-utils.ts b/opencti-platform/opencti-graphql/src/utils/filtering/filtering-utils.ts index ee861b051f17..5be83a9e90ca 100644 --- a/opencti-platform/opencti-graphql/src/utils/filtering/filtering-utils.ts +++ b/opencti-platform/opencti-graphql/src/utils/filtering/filtering-utils.ts @@ -169,7 +169,7 @@ export const extractFilterGroupValues = ( pushAll(keysToKeep, [INSTANCE_DYNAMIC_REGARDING_OF, RELATION_DYNAMIC_TO_FILTER, RELATION_DYNAMIC_FROM_FILTER]); } const { filters = [], filterGroups = [] } = inputFilters; - let filteredFilters = []; + let filteredFilters: Filter[]; if (key) { filteredFilters = reverse // we prefer to handle single key and multi keys here, but theoretically it should be arrays every time @@ -216,7 +216,7 @@ export const extractFilterGroupValues = ( export const extractDynamicFilterGroupValues = (inputFilters: FilterGroup, key: string | string[] | null = null, reverse = false): FilterGroup[] => { const keysToKeep = Array.isArray(key) ? key : [key]; const { filters = [], filterGroups = [] } = inputFilters; - let filteredFilters = []; + let filteredFilters: Filter[]; if (key) { filteredFilters = reverse // we prefer to handle single key and multi keys here, but theoretically it should be arrays every time diff --git a/opencti-platform/opencti-graphql/src/utils/safeEjs.client.ts b/opencti-platform/opencti-graphql/src/utils/safeEjs.client.ts index ef4de3a50add..eb4a2e7a2c99 100644 --- a/opencti-platform/opencti-graphql/src/utils/safeEjs.client.ts +++ b/opencti-platform/opencti-graphql/src/utils/safeEjs.client.ts @@ -99,10 +99,10 @@ export const safeRender = async (template: string, data: Data, options?: SafeRen } catch (error) { // Enhance error messages if (!(error instanceof Error)) { - throw new Error('Unknown rendering error'); + throw new Error('Unknown rendering error', { cause: error }); } if (error.message.includes('Worker terminated')) { - throw new Error('Rendering exceeded memory limits'); + throw new Error('Rendering exceeded memory limits', { cause: error }); } throw error; } finally { diff --git a/opencti-platform/opencti-graphql/src/utils/vulnerabilities.ts b/opencti-platform/opencti-graphql/src/utils/vulnerabilities.ts index 360924f15d76..53be1dc7aef9 100644 --- a/opencti-platform/opencti-graphql/src/utils/vulnerabilities.ts +++ b/opencti-platform/opencti-graphql/src/utils/vulnerabilities.ts @@ -394,7 +394,7 @@ export const parseCvssVector = ( const { codeToOpencti } = config; if (isEmptyField(vector)) { const nullFields: CvssFieldUpdate[] = Object.values(codeToOpencti).map((key) => ({ key, value: [null] })); - let result: CvssFieldUpdate[] = []; + let result: CvssFieldUpdate[]; if (version === 'cvss2') { result = [ { key: config.baseVectorKey, value: [null] }, @@ -438,7 +438,7 @@ export const parseCvssVector = ( } else if (version === 'cvss4') { scores = new Cvss4P0(vector!).calculateScores(); } - let result: CvssFieldUpdate[] = []; + let result: CvssFieldUpdate[]; if (version === 'cvss2') { if (isEmptyField(initialScore)) { result = [ @@ -517,7 +517,7 @@ export const updateCvssVector = ( } else if (version === 'cvss4') { scores = new Cvss4P0(updatedVector).calculateScores(); } - let result: CvssFieldUpdate[] = []; + let result: CvssFieldUpdate[]; if (version === 'cvss2') { if (isEmptyField(initialScore)) { result = [ From 4d58a483aa247957a412062a2bdae1fa92961ebb Mon Sep 17 00:00:00 2001 From: Xavier Fournet <461943+xfournet@users.noreply.github.com> Date: Thu, 26 Feb 2026 20:08:27 +0100 Subject: [PATCH 3/3] [deps] Update eslint monorepo to v10 - Fix breaking changes in frontend sources --- opencti-platform/opencti-front/eslint.config.mjs | 3 ++- .../opencti-front/src/components/ItemPriority.tsx | 2 +- .../opencti-front/src/components/ItemSeverity.tsx | 2 +- .../src/components/graph/components/EntityDetails.tsx | 2 +- .../opencti-front/src/private/components/analyses/Root.jsx | 2 +- .../StixCoreObjectExternalReferencesLines.tsx | 2 +- .../StixCoreRelationshipExternalReferencesLines.jsx | 2 +- .../StixSightingRelationshipExternalReferencesLines.jsx | 2 +- .../common/files/workbench/WorkbenchFileContent.jsx | 2 +- .../src/private/components/data/tasks/TasksList.jsx | 4 ++-- .../opencti-front/src/private/components/events/Root.jsx | 2 +- .../components/profile/api_tokens/TokenCreationForm.tsx | 2 +- .../components/settings/users/UserTokenCreationForm.tsx | 2 +- .../opencti-front/src/utils/hooks/useLocalStorage.ts | 4 ++-- .../engine/stix_core_objects/useBuildListOutcome.tsx | 2 +- 15 files changed, 18 insertions(+), 17 deletions(-) diff --git a/opencti-platform/opencti-front/eslint.config.mjs b/opencti-platform/opencti-front/eslint.config.mjs index 3a5ab2bc14dc..d8885f6a4466 100644 --- a/opencti-platform/opencti-front/eslint.config.mjs +++ b/opencti-platform/opencti-front/eslint.config.mjs @@ -43,7 +43,8 @@ export default defineConfig([ }, settings: { react: { - version: 'detect', + // temporary workaround for https://github.com/jsx-eslint/eslint-plugin-react/issues/3977 + version: '19.2', }, }, }, diff --git a/opencti-platform/opencti-front/src/components/ItemPriority.tsx b/opencti-platform/opencti-front/src/components/ItemPriority.tsx index 1fa5757d8023..cc599ae027fe 100644 --- a/opencti-platform/opencti-front/src/components/ItemPriority.tsx +++ b/opencti-platform/opencti-front/src/components/ItemPriority.tsx @@ -18,7 +18,7 @@ const ItemPriority: FunctionComponent = ({ return <>-; } - let priorityColor = theme.palette.severity.info; + let priorityColor: string; switch (priority) { case 'P4': priorityColor = theme.palette.severity.low; diff --git a/opencti-platform/opencti-front/src/components/ItemSeverity.tsx b/opencti-platform/opencti-front/src/components/ItemSeverity.tsx index 2d5a49896657..f283ba2f1c4c 100644 --- a/opencti-platform/opencti-front/src/components/ItemSeverity.tsx +++ b/opencti-platform/opencti-front/src/components/ItemSeverity.tsx @@ -18,7 +18,7 @@ const ItemSeverity: FunctionComponent = ({ return <>-; } - let severityColor = theme.palette.severity.default; + let severityColor: string; switch (severity?.toLowerCase()) { case 'low': severityColor = theme.palette.severity.low; diff --git a/opencti-platform/opencti-front/src/components/graph/components/EntityDetails.tsx b/opencti-platform/opencti-front/src/components/graph/components/EntityDetails.tsx index b8c67478280f..0c1fd5693704 100644 --- a/opencti-platform/opencti-front/src/components/graph/components/EntityDetails.tsx +++ b/opencti-platform/opencti-front/src/components/graph/components/EntityDetails.tsx @@ -482,7 +482,7 @@ const EntityDetailsComponent: FunctionComponent< const externalReferenceId = externalReference.node.external_id ? `(${externalReference.node.external_id})` : ''; - let externalReferenceSecondary = ''; + let externalReferenceSecondary: string; if ( externalReference.node.url && externalReference.node.url.length > 0 diff --git a/opencti-platform/opencti-front/src/private/components/analyses/Root.jsx b/opencti-platform/opencti-front/src/private/components/analyses/Root.jsx index 3c23d2600674..bf4256350ee9 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/Root.jsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/Root.jsx @@ -20,7 +20,7 @@ const ExternalReferences = lazy(() => import('./ExternalReferences')); const RootExternalReference = lazy(() => import('./external_references/Root')); const Root = () => { - let redirect = null; + let redirect; if (!useIsHiddenEntity('Report')) { redirect = 'reports'; } else if (!useIsHiddenEntity('Grouping')) { diff --git a/opencti-platform/opencti-front/src/private/components/analyses/external_references/StixCoreObjectExternalReferencesLines.tsx b/opencti-platform/opencti-front/src/private/components/analyses/external_references/StixCoreObjectExternalReferencesLines.tsx index b0be69803881..733371eb3b3c 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/external_references/StixCoreObjectExternalReferencesLines.tsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/external_references/StixCoreObjectExternalReferencesLines.tsx @@ -274,7 +274,7 @@ const StixCoreObjectExternalReferencesLinesContainer: FunctionComponent< const externalReferenceId = externalReference.external_id ? `(${externalReference.external_id})` : ''; - let externalReferenceSecondary = ''; + let externalReferenceSecondary: string; if (externalReference.url && externalReference.url.length > 0) { externalReferenceSecondary = externalReference.url; } else if ( diff --git a/opencti-platform/opencti-front/src/private/components/analyses/external_references/StixCoreRelationshipExternalReferencesLines.jsx b/opencti-platform/opencti-front/src/private/components/analyses/external_references/StixCoreRelationshipExternalReferencesLines.jsx index 5687bf61d23b..d287b7fef2ec 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/external_references/StixCoreRelationshipExternalReferencesLines.jsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/external_references/StixCoreRelationshipExternalReferencesLines.jsx @@ -198,7 +198,7 @@ class StixCoreRelationshipExternalReferencesLinesContainer extends Component { const externalReferenceId = externalReference.external_id ? `(${externalReference.external_id})` : ''; - let externalReferenceSecondary = ''; + let externalReferenceSecondary; if ( externalReference.url && externalReference.url.length > 0 diff --git a/opencti-platform/opencti-front/src/private/components/analyses/external_references/StixSightingRelationshipExternalReferencesLines.jsx b/opencti-platform/opencti-front/src/private/components/analyses/external_references/StixSightingRelationshipExternalReferencesLines.jsx index e633b7aaf066..22553b50a8a4 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/external_references/StixSightingRelationshipExternalReferencesLines.jsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/external_references/StixSightingRelationshipExternalReferencesLines.jsx @@ -193,7 +193,7 @@ class StixSightingRelationshipExternalReferencesLinesContainer extends Component const externalReferenceId = externalReference.external_id ? `(${externalReference.external_id})` : ''; - let externalReferenceSecondary = ''; + let externalReferenceSecondary; if ( externalReference.url && externalReference.url.length > 0 diff --git a/opencti-platform/opencti-front/src/private/components/common/files/workbench/WorkbenchFileContent.jsx b/opencti-platform/opencti-front/src/private/components/common/files/workbench/WorkbenchFileContent.jsx index 2144f03aaa3b..7b2e28c7062c 100644 --- a/opencti-platform/opencti-front/src/private/components/common/files/workbench/WorkbenchFileContent.jsx +++ b/opencti-platform/opencti-front/src/private/components/common/files/workbench/WorkbenchFileContent.jsx @@ -1575,7 +1575,7 @@ const WorkbenchFileContentComponent = ({ ...R.indexBy(R.prop('id'), stixCoreRelationships), ...R.indexBy(R.prop('id'), stixSightings), }; - let containerElementsIds = []; + let containerElementsIds; if (containerSelectAll) { containerElementsIds = R.uniq( R.values(indexedStixObjects) diff --git a/opencti-platform/opencti-front/src/private/components/data/tasks/TasksList.jsx b/opencti-platform/opencti-front/src/private/components/data/tasks/TasksList.jsx index 59c48c529a00..7467b12b1e4c 100644 --- a/opencti-platform/opencti-front/src/private/components/data/tasks/TasksList.jsx +++ b/opencti-platform/opencti-front/src/private/components/data/tasks/TasksList.jsx @@ -222,7 +222,7 @@ const TasksList = ({ data, options }) => { {tasks.map((taskEdge) => { const task = taskEdge.node; - let status = ''; + let status; if (task.completed) { status = 'complete'; } else if (task.task_processed_number > 0) { @@ -252,7 +252,7 @@ const TasksList = ({ data, options }) => { ? ` (Provisioning: ${task.task_processed_number}/${task.task_expected_number})` : ''; const progressFullText = `${t_i18n('Progress')}${progressNumberDisplay}${provisioningNumberDisplay}`; - let progressValue = 0; + let progressValue; if (task.work) { if (task.work.status === 'complete') { progressValue = 100; diff --git a/opencti-platform/opencti-front/src/private/components/events/Root.jsx b/opencti-platform/opencti-front/src/private/components/events/Root.jsx index e4e7b55f3aae..683314e13082 100644 --- a/opencti-platform/opencti-front/src/private/components/events/Root.jsx +++ b/opencti-platform/opencti-front/src/private/components/events/Root.jsx @@ -12,7 +12,7 @@ const StixSightingRelationships = lazy(() => import('./StixSightingRelationships const StixSightingRelationship = lazy(() => import('./stix_sighting_relationships/StixSightingRelationship')); const Root = () => { - let redirect = null; + let redirect; if (!useIsHiddenEntity('Incident')) { redirect = 'incidents'; } else if (!useIsHiddenEntity('stix-sighting-relationship')) { diff --git a/opencti-platform/opencti-front/src/private/components/profile/api_tokens/TokenCreationForm.tsx b/opencti-platform/opencti-front/src/private/components/profile/api_tokens/TokenCreationForm.tsx index e0030b67021e..e28b1319c4ba 100644 --- a/opencti-platform/opencti-front/src/private/components/profile/api_tokens/TokenCreationForm.tsx +++ b/opencti-platform/opencti-front/src/private/components/profile/api_tokens/TokenCreationForm.tsx @@ -48,7 +48,7 @@ const TokenCreationForm: FunctionComponent = ({ }); const onSubmit = (values: typeof initialValues, { setSubmitting }: FormikHelpers) => { - let durationInput = 'UNLIMITED'; + let durationInput; switch (values.duration) { case '30': durationInput = 'DAYS_30'; diff --git a/opencti-platform/opencti-front/src/private/components/settings/users/UserTokenCreationForm.tsx b/opencti-platform/opencti-front/src/private/components/settings/users/UserTokenCreationForm.tsx index b5da5c5c413f..6ecae442d6ef 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/users/UserTokenCreationForm.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/users/UserTokenCreationForm.tsx @@ -48,7 +48,7 @@ const UserTokenCreationForm: FunctionComponent = ({ }); const onSubmit = (values: typeof initialValues, { setSubmitting }: FormikHelpers) => { - let durationInput = 'UNLIMITED'; + let durationInput: string; switch (values.duration) { case '30': durationInput = 'DAYS_30'; diff --git a/opencti-platform/opencti-front/src/utils/hooks/useLocalStorage.ts b/opencti-platform/opencti-front/src/utils/hooks/useLocalStorage.ts index 3fe87cbd9642..927dce97e2a1 100644 --- a/opencti-platform/opencti-front/src/utils/hooks/useLocalStorage.ts +++ b/opencti-platform/opencti-front/src/utils/hooks/useLocalStorage.ts @@ -204,7 +204,7 @@ const useLocalStorage = ( return initialState; } return value; - } catch (_error) { + } catch { // If error also return initialValue throw Error('Error while initializing values in local storage'); } @@ -234,7 +234,7 @@ const useLocalStorage = ( setStoredValueToHistory(initialValue, valueToStore); } } - } catch (_error) { + } catch { // A more advanced implementation would handle the error case throw Error('Error while setting values in local storage'); } diff --git a/opencti-platform/opencti-front/src/utils/outcome_template/engine/stix_core_objects/useBuildListOutcome.tsx b/opencti-platform/opencti-front/src/utils/outcome_template/engine/stix_core_objects/useBuildListOutcome.tsx index 68303c655b3e..7cf15e5545fd 100644 --- a/opencti-platform/opencti-front/src/utils/outcome_template/engine/stix_core_objects/useBuildListOutcome.tsx +++ b/opencti-platform/opencti-front/src/utils/outcome_template/engine/stix_core_objects/useBuildListOutcome.tsx @@ -28,7 +28,7 @@ const useBuildListOutcome = () => { filters: dataSelection.filters, }; - let nodes: ListItem[] = []; + let nodes: ListItem[]; if (widgetPerspective === 'entities') { const types = ['Stix-Core-Object']; const data = await fetchQuery(stixCoreObjectsListQuery, { ...variables, types }).toPromise() as StixCoreObjectsListQuery$data;