From 4e4c4c5e6ad4cc13c7a448eeb24559f2579f8d14 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 30 Jan 2026 15:27:21 +0000 Subject: [PATCH 1/7] Initial plan From 6e62ea4359f9b126b8aac8d481d88dc10b2bc882 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 30 Jan 2026 15:33:02 +0000 Subject: [PATCH 2/7] Migrate to ESLint 9 with flat config Co-authored-by: jmfrancois <19857479+jmfrancois@users.noreply.github.com> --- fork/module-to-cdn/package.json | 2 +- fork/react-bootstrap/package.json | 2 +- package.json | 2 +- packages/a11y/package.json | 2 +- packages/assets-api/package.json | 2 +- packages/cmf-cqrs/package.json | 2 +- packages/cmf-router/package.json | 2 +- packages/cmf/package.json | 2 +- packages/components/package.json | 2 +- packages/containers/package.json | 2 +- packages/dataviz/package.json | 2 +- packages/design-docs/package.json | 2 +- packages/design-system/package.json | 2 +- packages/design-tokens/package.json | 2 +- .../faceted-search-query-client/package.json | 2 +- packages/faceted-search/package.json | 2 +- packages/flow-designer/package.json | 2 +- packages/forms/package.json | 2 +- packages/http/package.json | 2 +- .../local-libs-webpack-plugin/package.json | 2 +- packages/playground-vite/package.json | 2 +- packages/playground/package.json | 2 +- packages/router-bridge/package.json | 2 +- packages/sagas/package.json | 2 +- packages/stepper/package.json | 2 +- packages/storybook-cmf/package.json | 2 +- packages/storybook-docs/package.json | 2 +- packages/storybook-one/package.json | 2 +- packages/theme/package.json | 2 +- packages/utils/package.json | 2 +- tools/babel-plugin-import-d3/package.json | 2 +- .../babel-plugin-import-from-lib/package.json | 2 +- tools/cmf-webpack-plugin/package.json | 2 +- tools/cypress-api-mock-plugin/package.json | 2 +- tools/eslint-plugin/package.json | 2 +- tools/scripts-cmf/package.json | 2 +- tools/scripts-config-babel/package.json | 2 +- tools/scripts-config-cdn/package.json | 2 +- tools/scripts-config-eslint/eslint.config.js | 194 ++++++++++++++++++ tools/scripts-config-eslint/index.js | 65 +----- tools/scripts-config-eslint/package.json | 23 ++- tools/scripts-config-jest/package.json | 2 +- tools/scripts-config-prettier/package.json | 2 +- .../scripts-config-react-webpack/package.json | 2 +- .../scripts-config-storybook-lib/package.json | 2 +- tools/scripts-config-stylelint/package.json | 2 +- tools/scripts-config-typescript/package.json | 2 +- tools/scripts-core/package.json | 2 +- tools/scripts-core/src/index.js | 6 +- tools/scripts-locales/package.json | 2 +- tools/scripts-publish-local/package.json | 2 +- tools/scripts-utils/package.json | 2 +- tools/scripts-yarn-workspace/package.json | 2 +- tools/upgrade-deps/package.json | 2 +- 54 files changed, 263 insertions(+), 125 deletions(-) create mode 100644 tools/scripts-config-eslint/eslint.config.js diff --git a/fork/module-to-cdn/package.json b/fork/module-to-cdn/package.json index a7ade1cdf3e..96d9e98e70a 100644 --- a/fork/module-to-cdn/package.json +++ b/fork/module-to-cdn/package.json @@ -20,7 +20,7 @@ "scripts": { "test": "jest index.test.js", "test:cron": "jest modules.test.js", - "lint": "eslint ./" + "lint": "eslint ." }, "files": [ "index.js", diff --git a/fork/react-bootstrap/package.json b/fork/react-bootstrap/package.json index 0ba488d4930..4f1c1eaa6fa 100644 --- a/fork/react-bootstrap/package.json +++ b/fork/react-bootstrap/package.json @@ -19,7 +19,7 @@ "scripts": { "build:lib:esm": "talend-scripts build --esm", "build:lib": "talend-scripts build", - "lint": "talend-scripts lint", + "lint": "eslint .", "test": "talend-scripts test", "storybook": "start-storybook -p 6006", "build-storybook": "build-storybook" diff --git a/package.json b/package.json index 8a599d8547a..4629017d089 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "baseline-browser-mapping": "^2.9.19", "cross-env": "^7.0.3", "cross-spawn": "^7.0.6", - "eslint": "^9.39.2", + "eslint": "^9.17.0", "husky": "^8.0.3", "i18next-scanner": "^4.6.0", "lint-staged": "^15.5.2", diff --git a/packages/a11y/package.json b/packages/a11y/package.json index 40427ab7d50..25a9361194b 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -16,7 +16,7 @@ "build:lib": "talend-scripts build", "build:lib:esm": "talend-scripts build --esm", "test": "talend-scripts test", - "lint": "talend-scripts lint" + "lint": "eslint ." }, "keywords": [ "react", diff --git a/packages/assets-api/package.json b/packages/assets-api/package.json index 425159ecb73..dd00f4b6d85 100644 --- a/packages/assets-api/package.json +++ b/packages/assets-api/package.json @@ -18,7 +18,7 @@ "test": "talend-scripts test", "test:watch": "talend-scripts test --watch", "test:cov": "talend-scripts test --coverage", - "lint": "talend-scripts lint" + "lint": "eslint ." }, "keywords": [ "talend" diff --git a/packages/cmf-cqrs/package.json b/packages/cmf-cqrs/package.json index b9a7bd5964d..f47091ff1d9 100644 --- a/packages/cmf-cqrs/package.json +++ b/packages/cmf-cqrs/package.json @@ -21,7 +21,7 @@ "test": "talend-scripts test", "test:watch": "talend-scripts test --watch", "test:cov": "talend-scripts test --coverage", - "lint": "talend-scripts lint" + "lint": "eslint ." }, "repository": { "type": "git", diff --git a/packages/cmf-router/package.json b/packages/cmf-router/package.json index e8ddad71ea3..b3fd2b578d2 100644 --- a/packages/cmf-router/package.json +++ b/packages/cmf-router/package.json @@ -23,7 +23,7 @@ "test": "talend-scripts test", "test:watch": "talend-scripts test --watch", "test:cov": "talend-scripts test --coverage", - "lint": "talend-scripts lint" + "lint": "eslint ." }, "dependencies": { "@talend/react-cmf": "^12.0.0", diff --git a/packages/cmf/package.json b/packages/cmf/package.json index 872df5383e4..2e53ff2bf59 100644 --- a/packages/cmf/package.json +++ b/packages/cmf/package.json @@ -25,7 +25,7 @@ "test:watch": "talend-scripts test --watch", "test:cov": "talend-scripts test --coverage", "test:demo": "yarn jsdoc -c ./docs.json", - "lint": "talend-scripts lint" + "lint": "eslint ." }, "keywords": [ "react", diff --git a/packages/components/package.json b/packages/components/package.json index f043b3309dc..0211ff687cf 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -24,7 +24,7 @@ "test:update": "cross-env TZ=UTC talend-scripts test -u", "test:watch": "cross-env TZ=UTC talend-scripts test --watch", "test:cov": "cross-env TZ=UTC talend-scripts test --coverage", - "lint": "talend-scripts lint", + "lint": "eslint .", "start": "storybook dev", "extract-i18n": "i18next-scanner --config i18next-scanner.config.js" }, diff --git a/packages/containers/package.json b/packages/containers/package.json index 47d119a4451..47d369fcb52 100644 --- a/packages/containers/package.json +++ b/packages/containers/package.json @@ -23,7 +23,7 @@ "test:watch": "talend-scripts test --watch", "test:cov": "talend-scripts test --coverage", "test:demo": "storybook build", - "lint": "talend-scripts lint", + "lint": "eslint .", "extract-i18n": "i18next-scanner --config i18next-scanner.config.js" }, "keywords": [ diff --git a/packages/dataviz/package.json b/packages/dataviz/package.json index 857005d6f70..df41d3b35cf 100644 --- a/packages/dataviz/package.json +++ b/packages/dataviz/package.json @@ -17,7 +17,7 @@ "build:lib:esm": "talend-scripts build --esm", "build-storybook": "storybook build", "extract-i18n": "i18next-scanner --config i18next-scanner.config.js", - "lint": "talend-scripts lint", + "lint": "eslint .", "start": "storybook dev -p 6006", "test": "cross-env TZ=UTC talend-scripts test", "test:watch": "cross-env TZ=UTC talend-scripts test --watch", diff --git a/packages/design-docs/package.json b/packages/design-docs/package.json index 109f35be8f3..aa200d14142 100644 --- a/packages/design-docs/package.json +++ b/packages/design-docs/package.json @@ -7,7 +7,7 @@ "scripts": { "build-storybook": "storybook build --docs", "start-storybook": "storybook dev -p 6006 --docs", - "lint": "talend-scripts lint", + "lint": "eslint .", "start": "storybook dev -p 6006 --docs", "test:demo": "storybook build --docs" }, diff --git a/packages/design-system/package.json b/packages/design-system/package.json index 8cea1cb0171..6e7faee9c08 100644 --- a/packages/design-system/package.json +++ b/packages/design-system/package.json @@ -21,7 +21,7 @@ "watch:esm": "talend-scripts build --watch --esm", "test": "talend-scripts test", "extract-i18n": "i18next-scanner --config i18next-scanner.config.js", - "lint": "talend-scripts lint", + "lint": "eslint .", "start": "storybook dev" }, "repository": { diff --git a/packages/design-tokens/package.json b/packages/design-tokens/package.json index ad742dc60dc..a4f3545fe19 100644 --- a/packages/design-tokens/package.json +++ b/packages/design-tokens/package.json @@ -33,7 +33,7 @@ "build:css": "sass src/index.scss dist/TalendDesignTokens.css --no-source-map --style=compressed", "test": "echo no test for @talend/design-tokens", "test:cov": "echo no test for @talend/design-tokens", - "lint": "talend-scripts lint" + "lint": "eslint ." }, "keywords": [ "talend", diff --git a/packages/faceted-search-query-client/package.json b/packages/faceted-search-query-client/package.json index c563a80bcc9..31cd7162453 100644 --- a/packages/faceted-search-query-client/package.json +++ b/packages/faceted-search-query-client/package.json @@ -21,7 +21,7 @@ "test": "cross-env TZ=UTC talend-scripts test", "test:watch": "cross-env TZ=UTC talend-scripts test --watch", "test:cov": "cross-env TZ=UTC talend-scripts test --coverage", - "lint": "talend-scripts lint ./src/**/*.js ./stories/**/*.js ./.storybook/**/*.js", + "lint": "eslint .", "extract-i18n": "i18next-scanner --config i18next-scanner.config.js" }, "keywords": [ diff --git a/packages/faceted-search/package.json b/packages/faceted-search/package.json index c6eb5ffed9e..0b0a22df811 100644 --- a/packages/faceted-search/package.json +++ b/packages/faceted-search/package.json @@ -22,7 +22,7 @@ "test:watch": "cross-env TZ=UTC talend-scripts test --watch", "test:cov": "cross-env TZ=UTC talend-scripts test --coverage", "test:demo": "storybook build --docs", - "lint": "talend-scripts lint ./src/**/*.js ./stories/**/*.js ./.storybook/**/*.js", + "lint": "eslint .", "start": "storybook dev -p 6006", "extract-i18n": "i18next-scanner --config i18next-scanner.config.js" }, diff --git a/packages/flow-designer/package.json b/packages/flow-designer/package.json index 4f87a30db8d..26afa59adf6 100644 --- a/packages/flow-designer/package.json +++ b/packages/flow-designer/package.json @@ -18,7 +18,7 @@ "scripts": { "build:lib": "talend-scripts build", "build:lib:esm": "talend-scripts build --esm", - "lint": "talend-scripts lint", + "lint": "eslint .", "test": "talend-scripts test" }, "repository": { diff --git a/packages/forms/package.json b/packages/forms/package.json index 8be8b250054..0994eb1d763 100644 --- a/packages/forms/package.json +++ b/packages/forms/package.json @@ -22,7 +22,7 @@ "test": "cross-env TZ=UTC talend-scripts test", "test:watch": "talend-scripts test --watch", "test:cov": "talend-scripts test --coverage", - "lint": "talend-scripts lint", + "lint": "eslint .", "start": "talend-scripts start-storybook -p 6008", "extract-i18n": "i18next-scanner --config i18next-scanner.config.js" }, diff --git a/packages/http/package.json b/packages/http/package.json index 80ebc589ea4..05a5c522788 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -32,7 +32,7 @@ "build:lib:esm": "talend-scripts build --esm", "start": "echo nothing to start", "test": "talend-scripts test", - "lint": "talend-scripts lint" + "lint": "eslint ." }, "devDependencies": { "@talend/eslint-config": "^14.0.0", diff --git a/packages/local-libs-webpack-plugin/package.json b/packages/local-libs-webpack-plugin/package.json index c75af72dd93..821a741f75e 100644 --- a/packages/local-libs-webpack-plugin/package.json +++ b/packages/local-libs-webpack-plugin/package.json @@ -6,7 +6,7 @@ "license": "Apache-2.0", "scripts": { "test": "jest", - "lint": "talend-scripts lint lib/**/*.js" + "lint": "eslint .", }, "keywords": [ "webpack", diff --git a/packages/playground-vite/package.json b/packages/playground-vite/package.json index 7c1eb1c9ba4..aea52f73037 100644 --- a/packages/playground-vite/package.json +++ b/packages/playground-vite/package.json @@ -11,7 +11,7 @@ "test:demo:umd": "cross-env BASENAME='/playground/' INITIATOR_URL='/playground/inject.js' talend-scripts build --prod", "start": "vite dev", "start-dist": "talend-scripts build && node serve-dist", - "lint": "talend-scripts lint" + "lint": "eslint ." }, "repository": { "type": "git", diff --git a/packages/playground/package.json b/packages/playground/package.json index e1c0d96138b..0762d54e197 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -9,7 +9,7 @@ "test": "echo nothing to test in playground", "start": "cross-env BASENAME='/' INITIATOR_URL='/inject.js' talend-scripts start --open http://localhost:3000", "start-dist": "talend-scripts build && node serve-dist", - "lint": "talend-scripts lint" + "lint": "eslint ." }, "repository": { "type": "git", diff --git a/packages/router-bridge/package.json b/packages/router-bridge/package.json index 85cd218e4b4..54a4e9540f4 100644 --- a/packages/router-bridge/package.json +++ b/packages/router-bridge/package.json @@ -17,7 +17,7 @@ "build:lib": "talend-scripts build", "build:lib:esm": "talend-scripts build --esm", "build": "talend-scripts build", - "lint": "talend-scripts lint", + "lint": "eslint .", "test": "talend-scripts test" }, "repository": { diff --git a/packages/sagas/package.json b/packages/sagas/package.json index 12bafc5aa91..9a626623e70 100644 --- a/packages/sagas/package.json +++ b/packages/sagas/package.json @@ -21,7 +21,7 @@ "test": "talend-scripts test", "test:watch": "talend-scripts test --watch", "test:cov": "talend-scripts test --coverage", - "lint": "talend-scripts lint" + "lint": "eslint ." }, "keywords": [ "react", diff --git a/packages/stepper/package.json b/packages/stepper/package.json index a64f467e7b4..3f6a82173bf 100644 --- a/packages/stepper/package.json +++ b/packages/stepper/package.json @@ -23,7 +23,7 @@ "test:noisy": "cross-env TZ=UTC talend-scripts test", "test:watch": "cross-env TZ=UTC talend-scripts test --watch", "test:cov": "cross-env TZ=UTC talend-scripts test --coverage", - "lint": "talend-scripts lint", + "lint": "eslint .", "start": "talend-scripts start-storybook -p 6006" }, "keywords": [ diff --git a/packages/storybook-cmf/package.json b/packages/storybook-cmf/package.json index 5f4f82bf8b9..242f4ba6adf 100644 --- a/packages/storybook-cmf/package.json +++ b/packages/storybook-cmf/package.json @@ -20,7 +20,7 @@ "build:lib": "talend-scripts build", "build:lib:esm": "talend-scripts build --esm", "test": "talend-scripts test", - "lint": "talend-scripts lint" + "lint": "eslint ." }, "main": "lib/index.js", "mainSrc": "src/index.js", diff --git a/packages/storybook-docs/package.json b/packages/storybook-docs/package.json index 07bce54f567..418fd8d616b 100644 --- a/packages/storybook-docs/package.json +++ b/packages/storybook-docs/package.json @@ -10,7 +10,7 @@ "build:lib": "talend-scripts build && npm run build:styles", "build:lib:esm": "talend-scripts build --esm", "start": "npm run storybook", - "lint": "talend-scripts lint", + "lint": "eslint .", "test": "echo no test", "storybook": "storybook dev -p 6106", "build-storybook": "storybook build --docs" diff --git a/packages/storybook-one/package.json b/packages/storybook-one/package.json index dc0616f4085..86e051ed590 100644 --- a/packages/storybook-one/package.json +++ b/packages/storybook-one/package.json @@ -8,7 +8,7 @@ "test:demo": "storybook build", "build-storybook": "storybook build", "start-storybook": "storybook dev", - "lint": "talend-scripts lint", + "lint": "eslint .", "start": "storybook dev" }, "repository": { diff --git a/packages/theme/package.json b/packages/theme/package.json index 73a652e3735..94ed9189094 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -9,7 +9,7 @@ "start": "webpack serve --mode=development", "test": "echo no test for @talend/bootstrap-theme", "test:cov": "echo no test for @talend/bootstrap-theme", - "lint": "talend-scripts lint" + "lint": "eslint ." }, "keywords": [ "talend", diff --git a/packages/utils/package.json b/packages/utils/package.json index 316e971cd8e..f24fa6413d7 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -24,7 +24,7 @@ "scripts": { "build:lib": "talend-scripts build --tsc", "build:lib:esm": "talend-scripts build --esm", - "lint": "talend-scripts lint", + "lint": "eslint .", "test": "cross-env TZ=UTC talend-scripts test", "test:cov": "cross-env TZ=UTC talend-scripts test --coverage --silent", "test:noisy": "cross-env TZ=UTC talend-scripts test", diff --git a/tools/babel-plugin-import-d3/package.json b/tools/babel-plugin-import-d3/package.json index 43876b82f23..d0b10248815 100644 --- a/tools/babel-plugin-import-d3/package.json +++ b/tools/babel-plugin-import-d3/package.json @@ -14,7 +14,7 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "talend-scripts lint", + "lint": "eslint .", "test": "jest" }, "devDependencies": { diff --git a/tools/babel-plugin-import-from-lib/package.json b/tools/babel-plugin-import-from-lib/package.json index 1ec7a3b88c9..71f0ab17a56 100644 --- a/tools/babel-plugin-import-from-lib/package.json +++ b/tools/babel-plugin-import-from-lib/package.json @@ -4,7 +4,7 @@ "description": "This plugin transform imports of lib using /lib path", "main": "index.js", "scripts": { - "lint": "talend-scripts lint ./", + "lint": "eslint .", "test": "jest" }, "repository": { diff --git a/tools/cmf-webpack-plugin/package.json b/tools/cmf-webpack-plugin/package.json index 446fbb75a7a..8d37f36a2fe 100644 --- a/tools/cmf-webpack-plugin/package.json +++ b/tools/cmf-webpack-plugin/package.json @@ -4,7 +4,7 @@ "main": "src/index.js", "mainSrc": "src/index.js", "scripts": { - "lint": "eslint ./", + "lint": "eslint .", "test": "echo nothing to test yet in @talend/react-cmf-webpack-plugin" }, "repository": { diff --git a/tools/cypress-api-mock-plugin/package.json b/tools/cypress-api-mock-plugin/package.json index 1d83c43e486..192b39d3dae 100644 --- a/tools/cypress-api-mock-plugin/package.json +++ b/tools/cypress-api-mock-plugin/package.json @@ -16,7 +16,7 @@ "api" ], "scripts": { - "lint": "talend-scripts lint ./", + "lint": "eslint .", "test": "echo \"Nothing to test\"" }, "publishConfig": { diff --git a/tools/eslint-plugin/package.json b/tools/eslint-plugin/package.json index f94f42def0f..c105e4a0f1c 100644 --- a/tools/eslint-plugin/package.json +++ b/tools/eslint-plugin/package.json @@ -14,7 +14,7 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "eslint ./", + "lint": "eslint .", "test": "jest" }, "dependencies": { diff --git a/tools/scripts-cmf/package.json b/tools/scripts-cmf/package.json index 05ff4770efc..8017a912fc2 100644 --- a/tools/scripts-cmf/package.json +++ b/tools/scripts-cmf/package.json @@ -10,7 +10,7 @@ "cmf-settings": "./cmf-settings.js" }, "scripts": { - "lint": "eslint ./" + "lint": "eslint ." }, "dependencies": { "commander": "^6.2.1", diff --git a/tools/scripts-config-babel/package.json b/tools/scripts-config-babel/package.json index c1b2fcc9eae..5be3b31ec16 100644 --- a/tools/scripts-config-babel/package.json +++ b/tools/scripts-config-babel/package.json @@ -14,7 +14,7 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "eslint ./", + "lint": "eslint .", "test": "jest" }, "dependencies": { diff --git a/tools/scripts-config-cdn/package.json b/tools/scripts-config-cdn/package.json index f451b95352d..f75e6100e41 100644 --- a/tools/scripts-config-cdn/package.json +++ b/tools/scripts-config-cdn/package.json @@ -8,7 +8,7 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "eslint ./", + "lint": "eslint .", "test": "echo \"Nothing to test\"" }, "author": "Talend Frontend (http://www.talend.com)", diff --git a/tools/scripts-config-eslint/eslint.config.js b/tools/scripts-config-eslint/eslint.config.js new file mode 100644 index 00000000000..549abbd2e7c --- /dev/null +++ b/tools/scripts-config-eslint/eslint.config.js @@ -0,0 +1,194 @@ +const js = require('@eslint/js'); +const globals = require('globals'); +const babelParser = require('@babel/eslint-parser'); +const typescriptEslint = require('typescript-eslint'); +const pluginImport = require('eslint-plugin-import'); +const pluginReact = require('eslint-plugin-react'); +const pluginReactHooks = require('eslint-plugin-react-hooks'); +const pluginJsxA11y = require('eslint-plugin-jsx-a11y'); +const pluginPrettier = require('eslint-plugin-prettier'); +const pluginJestDom = require('eslint-plugin-jest-dom'); +const pluginTestingLibrary = require('eslint-plugin-testing-library'); +const pluginMdx = require('eslint-plugin-mdx'); +const pluginStorybook = require('eslint-plugin-storybook'); +const pluginAngular = require('eslint-plugin-angular'); +const pluginTalend = require('@talend/eslint-plugin'); +const prettierConfig = require('eslint-config-prettier'); + +const fs = require('fs'); +const path = require('path'); + +function tsConfig() { + const appDirectory = fs.realpathSync(process.cwd()); + const resolveApp = relativePath => path.resolve(appDirectory, relativePath); + return fs.existsSync(resolveApp('tsconfig.json')); +} + +const isTS = tsConfig(); + +// Base configuration for JavaScript files +const baseConfig = { + languageOptions: { + ecmaVersion: 6, + sourceType: 'module', + parser: babelParser, + parserOptions: { + requireConfigFile: false, + ecmaFeatures: { + jsx: true, + }, + }, + globals: { + ...globals.browser, + ...globals.es6, + ...globals.jasmine, + ...globals.jest, + jsdom: true, + TALEND_APP_INFO: true, + }, + }, + plugins: { + '@talend': pluginTalend, + angular: pluginAngular, + import: pluginImport, + 'jest-dom': pluginJestDom, + 'jsx-a11y': pluginJsxA11y, + prettier: pluginPrettier, + react: pluginReact, + 'react-hooks': pluginReactHooks, + storybook: pluginStorybook, + 'testing-library': pluginTestingLibrary, + }, + settings: { + react: { + version: 'detect', + }, + }, + rules: { + ...js.configs.recommended.rules, + ...pluginReact.configs.recommended.rules, + ...pluginReact.configs['jsx-runtime'].rules, + ...pluginJsxA11y.configs.recommended.rules, + ...pluginJestDom.configs.recommended.rules, + ...pluginTestingLibrary.configs.react.rules, + ...pluginStorybook.configs.recommended.rules, + ...prettierConfig.rules, + '@talend/import-depth': 'error', + '@talend/use-bootstrap-class': 'warn', + 'arrow-parens': ['error', 'as-needed'], + 'comma-dangle': ['error', 'only-multiline'], + 'function-paren-newline': 'off', + 'implicit-arrow-linebreak': 'off', + 'import/prefer-default-export': 'off', + 'import/extensions': 'off', + 'import/no-named-as-default': 'off', + indent: 'off', + 'jsx-a11y/label-has-associated-control': 'error', + 'jsx-a11y/label-has-for': 'off', + 'max-classes-per-file': 'off', + 'new-cap': ['error', { capIsNewExceptions: ['List', 'Map'] }], + 'no-console': ['error', { allow: ['warn', 'error'] }], + 'no-else-return': ['error', { allowElseIf: true }], + 'no-mixed-operators': 'off', + 'no-restricted-globals': 'off', + 'no-restricted-properties': 'off', + 'no-tabs': 'off', + 'object-curly-newline': 'off', + 'operator-linebreak': 'off', + 'prefer-destructuring': 'off', + 'angular/controller-name': ['error', '/[A-Z].*Ctrl/'], + 'angular/di': 'off', + 'angular/json-functions': 'off', + 'react/button-has-type': 'off', + 'react/destructuring-assignment': 'off', + 'react/forbid-foreign-prop-types': 'off', + 'react/forbid-prop-types': 'off', + 'react-hooks/rules-of-hooks': 'error', + 'react-hooks/exhaustive-deps': 'warn', + 'react/jsx-curly-newline': 'off', + 'react/jsx-filename-extension': ['warn', { extensions: ['.jsx', '.tsx'] }], + 'react/jsx-fragments': 'off', + 'react/jsx-indent': 'off', + 'react/jsx-indent-props': 'off', + 'react/jsx-one-expression-per-line': 'off', + 'react/jsx-props-no-spreading': 'off', + 'react/jsx-wrap-multilines': 'off', + 'react/no-array-index-key': 'off', + 'react/no-this-in-sfc': 'off', + 'react/no-unescaped-entities': 'off', + 'react/no-unused-prop-types': ['error', { skipShapeProps: true }], + 'react/prefer-es6-class': 'off', + 'react/require-default-props': 'off', + 'react/state-in-constructor': 'off', + 'react/static-property-placement': 'off', + 'testing-library/utils-module': 'off', + 'testing-library/custom-renders': 'off', + 'testing-library/custom-queries': 'off', + 'testing-library/no-node-access': 'off', + 'testing-library/render-result-naming-convention': 'off', + }, +}; + +// TypeScript configuration +const tsConfigs = isTS + ? [ + ...typescriptEslint.configs.recommended, + { + files: ['**/*.ts', '**/*.tsx'], + languageOptions: { + parser: typescriptEslint.parser, + parserOptions: { + project: true, + tsconfigRootDir: process.cwd(), + }, + }, + plugins: { + '@typescript-eslint': typescriptEslint.plugin, + }, + rules: { + '@typescript-eslint/indent': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/no-explicit-any': 'warn', + }, + }, + { + // Disable TS rules for JS files + files: ['**/*.js'], + rules: { + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/restrict-template-expressions': 'off', + '@typescript-eslint/restrict-plus-operands': 'off', + }, + }, + ] + : []; + +// Test files configuration +const testConfig = { + files: ['**/*.test.js', '**/*.test.ts', '**/*.test.tsx', '**/*.stories.js', '**/*.stories.ts', '**/*.stories.tsx'], + rules: { + 'import/no-extraneous-dependencies': 'off', + }, +}; + +// MDX configuration +const mdxConfig = { + ...pluginMdx.flat, + processor: pluginMdx.createRemarkProcessor({ + lintCodeBlocks: true, + }), +}; + +module.exports = [ + { + ignores: ['**/node_modules/**', '**/dist/**', '**/lib/**', '**/lib-esm/**', '**/build/**', 'index.js', '.eslintrc.js'], + }, + baseConfig, + ...tsConfigs, + testConfig, + mdxConfig, +]; diff --git a/tools/scripts-config-eslint/index.js b/tools/scripts-config-eslint/index.js index abe905bc25d..56f8e3e2886 100644 --- a/tools/scripts-config-eslint/index.js +++ b/tools/scripts-config-eslint/index.js @@ -1,62 +1,3 @@ -const fs = require('fs'); -const path = require('path'); - -function tsConfig() { - const appDirectory = fs.realpathSync(process.cwd()); - const resolveApp = relativePath => path.resolve(appDirectory, relativePath); - - return fs.existsSync(resolveApp('tsconfig.json')); -} - -const cwd = process.cwd(); -const isTS = tsConfig(); -const commentsRegex = /\/\/.*/g; -const content = fs - .readFileSync(path.join(__dirname, '.eslintrc.json')) - .toString() - .replace(commentsRegex, ''); -const config = JSON.parse(content); - -if (isTS) { - delete config.parserOptions; - const TO_REMOVE = ['airbnb-base', 'plugin:import/recommended']; - Object.assign(config, { - parser: '@typescript-eslint/parser', - extends: config.extends - .concat([ - 'airbnb-typescript', - 'plugin:import/typescript', - 'plugin:@typescript-eslint/recommended', - ]) - .filter(i => !TO_REMOVE.includes(i)), - plugins: config.plugins.concat(['@typescript-eslint']), - parserOptions: { - project: true, - tsconfigRootDir: cwd, - }, - rules: { - ...config.rules, - '@typescript-eslint/indent': 0, - '@typescript-eslint/no-var-requires': 0, // we have a lot of CJS files to lint, - '@typescript-eslint/no-explicit-any': 1, - }, - overrides: [ - ...(config.overrides || []), - { - // Disable TS rules for JS files if project uses plugin:@typescript-eslint/recommended-requiring-type-checking - files: ['*.js'], - rules: { - '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-unsafe-argument': 'off', - '@typescript-eslint/restrict-template-expressions': 'off', - '@typescript-eslint/restrict-plus-operands': 'off', - }, - }, - ], - }); -} - -module.exports = config; +// ESLint 9 Flat Config +// This module exports a flat config factory for use with ESLint 9 +module.exports = require('./eslint.config.js'); diff --git a/tools/scripts-config-eslint/package.json b/tools/scripts-config-eslint/package.json index 14500c8b28c..11f3c7b615d 100644 --- a/tools/scripts-config-eslint/package.json +++ b/tools/scripts-config-eslint/package.json @@ -3,7 +3,7 @@ "description": "Eslint configuration for @talend/scripts-core", "version": "14.0.0", "license": "Apache-2.0", - "main": "index.js", + "main": "eslint.config.js", "author": "Talend Frontend ", "homepage": "https://github.com/Talend/ui/tree/master/packages/ui#readme", "bugs": { @@ -14,7 +14,7 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "eslint index.js __tests__", + "lint": "eslint .", "test": "jest" }, "devDependencies": { @@ -22,24 +22,25 @@ }, "dependencies": { "@babel/eslint-parser": "^7.28.6", + "@eslint/js": "^9.17.0", "@talend/eslint-plugin": "^1.7.0", "@testing-library/dom": "^9.3.4", - "@typescript-eslint/parser": "^6.21.0", - "@typescript-eslint/eslint-plugin": "^6.21.0", - "eslint": "^8.57.1", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-airbnb-typescript": "^17.1.0", + "@typescript-eslint/parser": "^8.19.1", + "@typescript-eslint/eslint-plugin": "^8.19.1", + "eslint": "^9.17.0", "eslint-config-prettier": "^9.1.2", "eslint-plugin-angular": "^4.1.0", "eslint-plugin-import": "^2.32.0", "eslint-plugin-jest-dom": "^5.5.0", "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-mdx": "^2.3.4", + "eslint-plugin-mdx": "^3.1.5", "eslint-plugin-prettier": "^5.5.5", "eslint-plugin-react": "^7.37.5", - "eslint-plugin-react-hooks": "^4.6.2", - "eslint-plugin-storybook": "^0.6.15", - "eslint-plugin-testing-library": "^6.5.0" + "eslint-plugin-react-hooks": "^5.1.0", + "eslint-plugin-storybook": "^0.12.2", + "eslint-plugin-testing-library": "^7.1.2", + "globals": "^15.14.0", + "typescript-eslint": "^8.19.1" }, "publishConfig": { "access": "public" diff --git a/tools/scripts-config-jest/package.json b/tools/scripts-config-jest/package.json index 4f9348b41e4..0f4bb1546df 100644 --- a/tools/scripts-config-jest/package.json +++ b/tools/scripts-config-jest/package.json @@ -14,7 +14,7 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "eslint ./", + "lint": "eslint .", "test": "jest" }, "dependencies": { diff --git a/tools/scripts-config-prettier/package.json b/tools/scripts-config-prettier/package.json index e98f4a0ed2d..19025a589ab 100644 --- a/tools/scripts-config-prettier/package.json +++ b/tools/scripts-config-prettier/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "eslint ./", + "lint": "eslint .", "test": "echo \"Nothing to test\"" }, "license": "Apache-2.0", diff --git a/tools/scripts-config-react-webpack/package.json b/tools/scripts-config-react-webpack/package.json index 1989c4b2591..6b06386b511 100644 --- a/tools/scripts-config-react-webpack/package.json +++ b/tools/scripts-config-react-webpack/package.json @@ -14,7 +14,7 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "eslint ./", + "lint": "eslint .", "test": "echo \"Nothing to test\"" }, "peerDependencies": { diff --git a/tools/scripts-config-storybook-lib/package.json b/tools/scripts-config-storybook-lib/package.json index 179f9762ccd..ace9d5d3a21 100644 --- a/tools/scripts-config-storybook-lib/package.json +++ b/tools/scripts-config-storybook-lib/package.json @@ -28,7 +28,7 @@ "scripts": { "build:lib": "tsc", "build:watch": "tsc --watch", - "lint": "talend-scripts lint", + "lint": "eslint .", "update:msw": "npx msw init public/msw --save" }, "files": [ diff --git a/tools/scripts-config-stylelint/package.json b/tools/scripts-config-stylelint/package.json index bf433530c14..8bbdf6f37ea 100644 --- a/tools/scripts-config-stylelint/package.json +++ b/tools/scripts-config-stylelint/package.json @@ -10,7 +10,7 @@ "url": "https://github.com/Talend/ui/issues" }, "scripts": { - "lint": "eslint ./", + "lint": "eslint .", "test": "echo \"Nothing to test\"" }, "repository": { diff --git a/tools/scripts-config-typescript/package.json b/tools/scripts-config-typescript/package.json index b4e2c24174b..93ec896075b 100644 --- a/tools/scripts-config-typescript/package.json +++ b/tools/scripts-config-typescript/package.json @@ -10,7 +10,7 @@ "url": "https://github.com/Talend/ui/issues" }, "scripts": { - "lint": "eslint ./", + "lint": "eslint .", "test": "echo \"Nothing to test\"" }, "repository": { diff --git a/tools/scripts-core/package.json b/tools/scripts-core/package.json index 7ae07b55217..cc44441bdb8 100644 --- a/tools/scripts-core/package.json +++ b/tools/scripts-core/package.json @@ -18,7 +18,7 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "node ./src/index.js lint", + "lint": "eslint .", "test": "node ./src/index.js test ./__tests__" }, "peerDependencies": { diff --git a/tools/scripts-core/src/index.js b/tools/scripts-core/src/index.js index 4b0e29d77f9..01dfe025177 100755 --- a/tools/scripts-core/src/index.js +++ b/tools/scripts-core/src/index.js @@ -13,7 +13,6 @@ if (command === '--help' || command === '-h' || command === 'help') { console.log(`Please use one of the following commands: * start * build -* lint * lint-merge-report * test * extends @@ -78,7 +77,6 @@ async function runScript() { switch (command) { case 'build': - case 'lint': case 'start': case 'test': runScript(command, options); @@ -86,6 +84,10 @@ switch (command) { case 'lint-merge-report': mergeReport(options); break; + case 'lint': + console.log('The "lint" command has been removed. Please use "eslint ." directly with @talend/eslint-config'); + process.exit(-1); + break; case 'build:lib': case 'build:lib:umd': console.log('This command do not exists anymore, please use just "build" command'); diff --git a/tools/scripts-locales/package.json b/tools/scripts-locales/package.json index c7349ce6d05..af88fddba6e 100644 --- a/tools/scripts-locales/package.json +++ b/tools/scripts-locales/package.json @@ -11,7 +11,7 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "talend-scripts lint" + "lint": "eslint ." }, "dependencies": { "@talend/scripts-utils": "^2.7.0", diff --git a/tools/scripts-publish-local/package.json b/tools/scripts-publish-local/package.json index ad50f21aef8..953d9b231bd 100644 --- a/tools/scripts-publish-local/package.json +++ b/tools/scripts-publish-local/package.json @@ -11,7 +11,7 @@ }, "main": "src/index.js", "scripts": { - "lint": "talend-scripts lint ./", + "lint": "eslint .", "test": "echo nothing to test" }, "dependencies": { diff --git a/tools/scripts-utils/package.json b/tools/scripts-utils/package.json index 197ae4fd78d..5e926eaa8f2 100644 --- a/tools/scripts-utils/package.json +++ b/tools/scripts-utils/package.json @@ -4,7 +4,7 @@ "description": "", "main": "src/index.js", "scripts": { - "lint": "eslint ./", + "lint": "eslint .", "test": "jest .test.js" }, "dependencies": { diff --git a/tools/scripts-yarn-workspace/package.json b/tools/scripts-yarn-workspace/package.json index 46b3ee1c9f8..1c7668ecd29 100644 --- a/tools/scripts-yarn-workspace/package.json +++ b/tools/scripts-yarn-workspace/package.json @@ -7,7 +7,7 @@ "talend-yarn-workspace": "./src/index.js" }, "scripts": { - "lint": "talend-scripts lint" + "lint": "eslint ." }, "author": "frontend@talend.com", "devDependencies": { diff --git a/tools/upgrade-deps/package.json b/tools/upgrade-deps/package.json index f26f14a54b6..dc600cbcec5 100644 --- a/tools/upgrade-deps/package.json +++ b/tools/upgrade-deps/package.json @@ -28,7 +28,7 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "talend-scripts lint ./", + "lint": "eslint .", "test:cron": "talend-scripts test" }, "publishConfig": { From b10fcfacdcbc2b1d32dd9384903b7ab85e14616e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 30 Jan 2026 15:33:57 +0000 Subject: [PATCH 3/7] Add eslint.config.js files to all packages Co-authored-by: jmfrancois <19857479+jmfrancois@users.noreply.github.com> --- fork/module-to-cdn/eslint.config.js | 1 + fork/react-bootstrap/eslint.config.js | 1 + packages/a11y/eslint.config.js | 1 + packages/assets-api/eslint.config.js | 1 + packages/cmf-cqrs/eslint.config.js | 1 + packages/cmf-router/eslint.config.js | 1 + packages/cmf/eslint.config.js | 1 + packages/components/eslint.config.js | 1 + packages/containers/eslint.config.js | 1 + packages/dataviz/eslint.config.js | 1 + packages/design-docs/eslint.config.js | 1 + packages/design-system/eslint.config.js | 1 + packages/design-tokens/eslint.config.js | 1 + packages/faceted-search-query-client/eslint.config.js | 1 + packages/faceted-search/eslint.config.js | 1 + packages/flow-designer/eslint.config.js | 1 + packages/forms/eslint.config.js | 1 + packages/http/eslint.config.js | 1 + packages/local-libs-webpack-plugin/eslint.config.js | 1 + packages/playground-vite/eslint.config.js | 1 + packages/playground/eslint.config.js | 1 + packages/router-bridge/eslint.config.js | 1 + packages/sagas/eslint.config.js | 1 + packages/stepper/eslint.config.js | 1 + packages/storybook-cmf/eslint.config.js | 1 + packages/storybook-docs/eslint.config.js | 1 + packages/storybook-one/eslint.config.js | 1 + packages/theme/eslint.config.js | 1 + packages/utils/eslint.config.js | 1 + tools/babel-plugin-assets-api/eslint.config.js | 1 + tools/babel-plugin-import-d3/eslint.config.js | 1 + tools/babel-plugin-import-from-index/eslint.config.js | 1 + tools/babel-plugin-import-from-lib/eslint.config.js | 1 + tools/cmf-webpack-plugin/eslint.config.js | 1 + tools/cypress-api-mock-plugin/eslint.config.js | 1 + tools/eslint-plugin/eslint.config.js | 1 + tools/scripts-cmf/eslint.config.js | 1 + tools/scripts-config-babel/eslint.config.js | 1 + tools/scripts-config-cdn/eslint.config.js | 1 + tools/scripts-config-jest/eslint.config.js | 1 + tools/scripts-config-prettier/eslint.config.js | 1 + tools/scripts-config-react-webpack/eslint.config.js | 1 + tools/scripts-config-storybook-lib/eslint.config.js | 1 + tools/scripts-config-stylelint/eslint.config.js | 1 + tools/scripts-config-typescript/eslint.config.js | 1 + tools/scripts-core/eslint.config.js | 1 + tools/scripts-locales/eslint.config.js | 1 + tools/scripts-publish-local/eslint.config.js | 1 + tools/scripts-utils/eslint.config.js | 1 + tools/scripts-yarn-workspace/eslint.config.js | 1 + tools/upgrade-deps/eslint.config.js | 1 + 51 files changed, 51 insertions(+) create mode 100644 fork/module-to-cdn/eslint.config.js create mode 100644 fork/react-bootstrap/eslint.config.js create mode 100644 packages/a11y/eslint.config.js create mode 100644 packages/assets-api/eslint.config.js create mode 100644 packages/cmf-cqrs/eslint.config.js create mode 100644 packages/cmf-router/eslint.config.js create mode 100644 packages/cmf/eslint.config.js create mode 100644 packages/components/eslint.config.js create mode 100644 packages/containers/eslint.config.js create mode 100644 packages/dataviz/eslint.config.js create mode 100644 packages/design-docs/eslint.config.js create mode 100644 packages/design-system/eslint.config.js create mode 100644 packages/design-tokens/eslint.config.js create mode 100644 packages/faceted-search-query-client/eslint.config.js create mode 100644 packages/faceted-search/eslint.config.js create mode 100644 packages/flow-designer/eslint.config.js create mode 100644 packages/forms/eslint.config.js create mode 100644 packages/http/eslint.config.js create mode 100644 packages/local-libs-webpack-plugin/eslint.config.js create mode 100644 packages/playground-vite/eslint.config.js create mode 100644 packages/playground/eslint.config.js create mode 100644 packages/router-bridge/eslint.config.js create mode 100644 packages/sagas/eslint.config.js create mode 100644 packages/stepper/eslint.config.js create mode 100644 packages/storybook-cmf/eslint.config.js create mode 100644 packages/storybook-docs/eslint.config.js create mode 100644 packages/storybook-one/eslint.config.js create mode 100644 packages/theme/eslint.config.js create mode 100644 packages/utils/eslint.config.js create mode 100644 tools/babel-plugin-assets-api/eslint.config.js create mode 100644 tools/babel-plugin-import-d3/eslint.config.js create mode 100644 tools/babel-plugin-import-from-index/eslint.config.js create mode 100644 tools/babel-plugin-import-from-lib/eslint.config.js create mode 100644 tools/cmf-webpack-plugin/eslint.config.js create mode 100644 tools/cypress-api-mock-plugin/eslint.config.js create mode 100644 tools/eslint-plugin/eslint.config.js create mode 100644 tools/scripts-cmf/eslint.config.js create mode 100644 tools/scripts-config-babel/eslint.config.js create mode 100644 tools/scripts-config-cdn/eslint.config.js create mode 100644 tools/scripts-config-jest/eslint.config.js create mode 100644 tools/scripts-config-prettier/eslint.config.js create mode 100644 tools/scripts-config-react-webpack/eslint.config.js create mode 100644 tools/scripts-config-storybook-lib/eslint.config.js create mode 100644 tools/scripts-config-stylelint/eslint.config.js create mode 100644 tools/scripts-config-typescript/eslint.config.js create mode 100644 tools/scripts-core/eslint.config.js create mode 100644 tools/scripts-locales/eslint.config.js create mode 100644 tools/scripts-publish-local/eslint.config.js create mode 100644 tools/scripts-utils/eslint.config.js create mode 100644 tools/scripts-yarn-workspace/eslint.config.js create mode 100644 tools/upgrade-deps/eslint.config.js diff --git a/fork/module-to-cdn/eslint.config.js b/fork/module-to-cdn/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/fork/module-to-cdn/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/fork/react-bootstrap/eslint.config.js b/fork/react-bootstrap/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/fork/react-bootstrap/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/a11y/eslint.config.js b/packages/a11y/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/a11y/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/assets-api/eslint.config.js b/packages/assets-api/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/assets-api/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/cmf-cqrs/eslint.config.js b/packages/cmf-cqrs/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/cmf-cqrs/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/cmf-router/eslint.config.js b/packages/cmf-router/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/cmf-router/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/cmf/eslint.config.js b/packages/cmf/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/cmf/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/components/eslint.config.js b/packages/components/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/components/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/containers/eslint.config.js b/packages/containers/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/containers/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/dataviz/eslint.config.js b/packages/dataviz/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/dataviz/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/design-docs/eslint.config.js b/packages/design-docs/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/design-docs/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/design-system/eslint.config.js b/packages/design-system/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/design-system/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/design-tokens/eslint.config.js b/packages/design-tokens/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/design-tokens/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/faceted-search-query-client/eslint.config.js b/packages/faceted-search-query-client/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/faceted-search-query-client/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/faceted-search/eslint.config.js b/packages/faceted-search/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/faceted-search/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/flow-designer/eslint.config.js b/packages/flow-designer/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/flow-designer/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/forms/eslint.config.js b/packages/forms/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/forms/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/http/eslint.config.js b/packages/http/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/http/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/local-libs-webpack-plugin/eslint.config.js b/packages/local-libs-webpack-plugin/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/local-libs-webpack-plugin/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/playground-vite/eslint.config.js b/packages/playground-vite/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/playground-vite/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/playground/eslint.config.js b/packages/playground/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/playground/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/router-bridge/eslint.config.js b/packages/router-bridge/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/router-bridge/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/sagas/eslint.config.js b/packages/sagas/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/sagas/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/stepper/eslint.config.js b/packages/stepper/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/stepper/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/storybook-cmf/eslint.config.js b/packages/storybook-cmf/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/storybook-cmf/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/storybook-docs/eslint.config.js b/packages/storybook-docs/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/storybook-docs/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/storybook-one/eslint.config.js b/packages/storybook-one/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/storybook-one/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/theme/eslint.config.js b/packages/theme/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/theme/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/packages/utils/eslint.config.js b/packages/utils/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/packages/utils/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/babel-plugin-assets-api/eslint.config.js b/tools/babel-plugin-assets-api/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/babel-plugin-assets-api/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/babel-plugin-import-d3/eslint.config.js b/tools/babel-plugin-import-d3/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/babel-plugin-import-d3/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/babel-plugin-import-from-index/eslint.config.js b/tools/babel-plugin-import-from-index/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/babel-plugin-import-from-index/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/babel-plugin-import-from-lib/eslint.config.js b/tools/babel-plugin-import-from-lib/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/babel-plugin-import-from-lib/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/cmf-webpack-plugin/eslint.config.js b/tools/cmf-webpack-plugin/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/cmf-webpack-plugin/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/cypress-api-mock-plugin/eslint.config.js b/tools/cypress-api-mock-plugin/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/cypress-api-mock-plugin/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/eslint-plugin/eslint.config.js b/tools/eslint-plugin/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/eslint-plugin/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-cmf/eslint.config.js b/tools/scripts-cmf/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/scripts-cmf/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-config-babel/eslint.config.js b/tools/scripts-config-babel/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/scripts-config-babel/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-config-cdn/eslint.config.js b/tools/scripts-config-cdn/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/scripts-config-cdn/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-config-jest/eslint.config.js b/tools/scripts-config-jest/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/scripts-config-jest/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-config-prettier/eslint.config.js b/tools/scripts-config-prettier/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/scripts-config-prettier/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-config-react-webpack/eslint.config.js b/tools/scripts-config-react-webpack/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/scripts-config-react-webpack/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-config-storybook-lib/eslint.config.js b/tools/scripts-config-storybook-lib/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/scripts-config-storybook-lib/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-config-stylelint/eslint.config.js b/tools/scripts-config-stylelint/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/scripts-config-stylelint/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-config-typescript/eslint.config.js b/tools/scripts-config-typescript/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/scripts-config-typescript/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-core/eslint.config.js b/tools/scripts-core/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/scripts-core/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-locales/eslint.config.js b/tools/scripts-locales/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/scripts-locales/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-publish-local/eslint.config.js b/tools/scripts-publish-local/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/scripts-publish-local/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-utils/eslint.config.js b/tools/scripts-utils/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/scripts-utils/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-yarn-workspace/eslint.config.js b/tools/scripts-yarn-workspace/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/scripts-yarn-workspace/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); diff --git a/tools/upgrade-deps/eslint.config.js b/tools/upgrade-deps/eslint.config.js new file mode 100644 index 00000000000..02a799084ae --- /dev/null +++ b/tools/upgrade-deps/eslint.config.js @@ -0,0 +1 @@ +module.exports = require('@talend/eslint-config'); From 20a6dbdabd2d9eef6dd78a5fa64a7a6b746f5fa4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 30 Jan 2026 15:35:05 +0000 Subject: [PATCH 4/7] Improve ESLint flat config and add root config Co-authored-by: jmfrancois <19857479+jmfrancois@users.noreply.github.com> --- eslint.config.js | 3 + tools/scripts-config-eslint/eslint.config.js | 104 ++++++++----------- tools/scripts-config-eslint/package.json | 6 -- 3 files changed, 49 insertions(+), 64 deletions(-) create mode 100644 eslint.config.js diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000000..85b564442a6 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,3 @@ +// Root ESLint 9 Flat Config +// This configuration is used for linting the root-level files +module.exports = require('@talend/eslint-config'); diff --git a/tools/scripts-config-eslint/eslint.config.js b/tools/scripts-config-eslint/eslint.config.js index 549abbd2e7c..4215ac37bae 100644 --- a/tools/scripts-config-eslint/eslint.config.js +++ b/tools/scripts-config-eslint/eslint.config.js @@ -1,19 +1,7 @@ const js = require('@eslint/js'); const globals = require('globals'); const babelParser = require('@babel/eslint-parser'); -const typescriptEslint = require('typescript-eslint'); -const pluginImport = require('eslint-plugin-import'); -const pluginReact = require('eslint-plugin-react'); -const pluginReactHooks = require('eslint-plugin-react-hooks'); -const pluginJsxA11y = require('eslint-plugin-jsx-a11y'); -const pluginPrettier = require('eslint-plugin-prettier'); -const pluginJestDom = require('eslint-plugin-jest-dom'); -const pluginTestingLibrary = require('eslint-plugin-testing-library'); -const pluginMdx = require('eslint-plugin-mdx'); -const pluginStorybook = require('eslint-plugin-storybook'); -const pluginAngular = require('eslint-plugin-angular'); -const pluginTalend = require('@talend/eslint-plugin'); -const prettierConfig = require('eslint-config-prettier'); +const tseslint = require('typescript-eslint'); const fs = require('fs'); const path = require('path'); @@ -26,10 +14,19 @@ function tsConfig() { const isTS = tsConfig(); -// Base configuration for JavaScript files +// Import plugins using legacy format where needed +const reactPlugin = require('eslint-plugin-react'); +const reactHooksPlugin = require('eslint-plugin-react-hooks'); +const jsxA11yPlugin = require('eslint-plugin-jsx-a11y'); +const importPlugin = require('eslint-plugin-import'); +const prettierPlugin = require('eslint-plugin-prettier'); +const prettierConfig = require('eslint-config-prettier'); +const talendPlugin = require('@talend/eslint-plugin'); + +// Base configuration for all files const baseConfig = { languageOptions: { - ecmaVersion: 6, + ecmaVersion: 2022, sourceType: 'module', parser: babelParser, parserOptions: { @@ -40,7 +37,8 @@ const baseConfig = { }, globals: { ...globals.browser, - ...globals.es6, + ...globals.es2021, + ...globals.node, ...globals.jasmine, ...globals.jest, jsdom: true, @@ -48,16 +46,12 @@ const baseConfig = { }, }, plugins: { - '@talend': pluginTalend, - angular: pluginAngular, - import: pluginImport, - 'jest-dom': pluginJestDom, - 'jsx-a11y': pluginJsxA11y, - prettier: pluginPrettier, - react: pluginReact, - 'react-hooks': pluginReactHooks, - storybook: pluginStorybook, - 'testing-library': pluginTestingLibrary, + '@talend': talendPlugin, + react: reactPlugin, + 'react-hooks': reactHooksPlugin, + 'jsx-a11y': jsxA11yPlugin, + import: importPlugin, + prettier: prettierPlugin, }, settings: { react: { @@ -66,12 +60,8 @@ const baseConfig = { }, rules: { ...js.configs.recommended.rules, - ...pluginReact.configs.recommended.rules, - ...pluginReact.configs['jsx-runtime'].rules, - ...pluginJsxA11y.configs.recommended.rules, - ...pluginJestDom.configs.recommended.rules, - ...pluginTestingLibrary.configs.react.rules, - ...pluginStorybook.configs.recommended.rules, + ...reactPlugin.configs.recommended.rules, + ...reactPlugin.configs['jsx-runtime'].rules, ...prettierConfig.rules, '@talend/import-depth': 'error', '@talend/use-bootstrap-class': 'warn', @@ -96,9 +86,6 @@ const baseConfig = { 'object-curly-newline': 'off', 'operator-linebreak': 'off', 'prefer-destructuring': 'off', - 'angular/controller-name': ['error', '/[A-Z].*Ctrl/'], - 'angular/di': 'off', - 'angular/json-functions': 'off', 'react/button-has-type': 'off', 'react/destructuring-assignment': 'off', 'react/forbid-foreign-prop-types': 'off', @@ -121,30 +108,22 @@ const baseConfig = { 'react/require-default-props': 'off', 'react/state-in-constructor': 'off', 'react/static-property-placement': 'off', - 'testing-library/utils-module': 'off', - 'testing-library/custom-renders': 'off', - 'testing-library/custom-queries': 'off', - 'testing-library/no-node-access': 'off', - 'testing-library/render-result-naming-convention': 'off', }, }; // TypeScript configuration const tsConfigs = isTS - ? [ - ...typescriptEslint.configs.recommended, + ? tseslint.config( + ...tseslint.configs.recommended, { files: ['**/*.ts', '**/*.tsx'], languageOptions: { - parser: typescriptEslint.parser, + parser: tseslint.parser, parserOptions: { project: true, tsconfigRootDir: process.cwd(), }, }, - plugins: { - '@typescript-eslint': typescriptEslint.plugin, - }, rules: { '@typescript-eslint/indent': 'off', '@typescript-eslint/no-var-requires': 'off', @@ -164,31 +143,40 @@ const tsConfigs = isTS '@typescript-eslint/restrict-plus-operands': 'off', }, }, - ] + ) : []; // Test files configuration const testConfig = { - files: ['**/*.test.js', '**/*.test.ts', '**/*.test.tsx', '**/*.stories.js', '**/*.stories.ts', '**/*.stories.tsx'], + files: [ + '**/*.test.js', + '**/*.test.ts', + '**/*.test.tsx', + '**/*.stories.js', + '**/*.stories.ts', + '**/*.stories.tsx', + ], rules: { 'import/no-extraneous-dependencies': 'off', }, }; -// MDX configuration -const mdxConfig = { - ...pluginMdx.flat, - processor: pluginMdx.createRemarkProcessor({ - lintCodeBlocks: true, - }), -}; - module.exports = [ { - ignores: ['**/node_modules/**', '**/dist/**', '**/lib/**', '**/lib-esm/**', '**/build/**', 'index.js', '.eslintrc.js'], + ignores: [ + '**/node_modules/**', + '**/dist/**', + '**/lib/**', + '**/lib-esm/**', + '**/build/**', + '**/coverage/**', + '**/.storybook/public/**', + 'index.js', + '.eslintrc.js', + ], }, baseConfig, ...tsConfigs, testConfig, - mdxConfig, ]; + diff --git a/tools/scripts-config-eslint/package.json b/tools/scripts-config-eslint/package.json index 11f3c7b615d..194ebdef374 100644 --- a/tools/scripts-config-eslint/package.json +++ b/tools/scripts-config-eslint/package.json @@ -24,21 +24,15 @@ "@babel/eslint-parser": "^7.28.6", "@eslint/js": "^9.17.0", "@talend/eslint-plugin": "^1.7.0", - "@testing-library/dom": "^9.3.4", "@typescript-eslint/parser": "^8.19.1", "@typescript-eslint/eslint-plugin": "^8.19.1", "eslint": "^9.17.0", "eslint-config-prettier": "^9.1.2", - "eslint-plugin-angular": "^4.1.0", "eslint-plugin-import": "^2.32.0", - "eslint-plugin-jest-dom": "^5.5.0", "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-mdx": "^3.1.5", "eslint-plugin-prettier": "^5.5.5", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^5.1.0", - "eslint-plugin-storybook": "^0.12.2", - "eslint-plugin-testing-library": "^7.1.2", "globals": "^15.14.0", "typescript-eslint": "^8.19.1" }, From 5b3485572e59584a3ad504cd6bb10e6f3e5e8c16 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 30 Jan 2026 15:35:34 +0000 Subject: [PATCH 5/7] Update README with ESLint 9 migration documentation Co-authored-by: jmfrancois <19857479+jmfrancois@users.noreply.github.com> --- tools/scripts-config-eslint/README.md | 101 ++++++++++++++++++++++++-- 1 file changed, 94 insertions(+), 7 deletions(-) diff --git a/tools/scripts-config-eslint/README.md b/tools/scripts-config-eslint/README.md index f06a880bfc5..c6969f389e2 100644 --- a/tools/scripts-config-eslint/README.md +++ b/tools/scripts-config-eslint/README.md @@ -1,15 +1,102 @@ -# Eslint config customisation +# ESLint Configuration (ESLint 9) -To use the eslint configuration in your IDE, or to add custom rules +This package provides the shared ESLint 9 configuration using the new flat config format for Talend UI projects. -1. Create an `.eslintrc` at your project root folder -2. Make it extend the one from talend preset +## Migration from ESLint 8 + +This package has been migrated to ESLint 9 and uses the new flat config format (`eslint.config.js`). The old `.eslintrc` formats are no longer supported. + +## Usage + +### In Your Project + +1. Create an `eslint.config.js` file at your project root: + +```javascript +module.exports = require('@talend/eslint-config'); +``` + +2. Add a lint script to your `package.json`: + +```json +{ + "scripts": { + "lint": "eslint ." + } +} +``` + +3. Run linting: + +```bash +npm run lint +# or +yarn lint +``` + +### Customizing Rules + +To add custom rules or override existing ones, you can extend the base config: + +```javascript +const baseConfig = require('@talend/eslint-config'); + +module.exports = [ + ...baseConfig, + { + rules: { + // Your custom rules here + 'no-console': 'warn', + }, + }, +]; +``` + +## Features + +- **ESLint 9** with flat config format +- **TypeScript support** with automatic detection +- **React** and **JSX** support +- **Prettier** integration +- **Import** plugin for managing imports +- Automatic detection of TypeScript projects + +## Configuration Details + +The configuration automatically: + +- Detects if your project uses TypeScript (checks for `tsconfig.json`) +- Applies TypeScript-specific rules when detected +- Configures React settings +- Sets up appropriate globals for browser, Node.js, Jest, and Jasmine + +## IDE Configuration + +### VS Code + +Install the ESLint extension and ensure it's configured to use flat config. Add to your `.vscode/settings.json`: ```json { - "extends": "@talend", - "rules": {} + "eslint.experimental.useFlatConfig": true } ``` -3. Configure your IDE plugin to enable eslint with your root eslintrc configuration. +### Other IDEs + +Ensure your IDE's ESLint plugin is updated to support ESLint 9 and flat config format. + +## Breaking Changes from v13.x + +- Requires ESLint 9.x (was 8.x) +- Uses flat config format instead of `.eslintrc` format +- Removed support for old ESLint 8 configurations +- Updated plugin dependencies to ESLint 9 compatible versions +- `talend-scripts lint` command has been removed - use `eslint .` directly + +## Compatibility + +- Node.js: 18.x or higher +- ESLint: 9.17.0 or higher +- TypeScript: 5.x (optional) + From d38640f15f68093d1a7d5ac8322ac217ce4a7728 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 30 Jan 2026 15:38:55 +0000 Subject: [PATCH 6/7] Address code review feedback - fix exit codes, ignore patterns, docs, and JSON syntax Co-authored-by: jmfrancois <19857479+jmfrancois@users.noreply.github.com> --- package.json | 2 +- packages/local-libs-webpack-plugin/package.json | 2 +- tools/scripts-config-eslint/README.md | 6 ++++-- tools/scripts-config-eslint/eslint.config.js | 4 ++-- tools/scripts-config-eslint/package.json | 4 ++-- tools/scripts-core/src/index.js | 14 +++++++------- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 4629017d089..8a599d8547a 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "baseline-browser-mapping": "^2.9.19", "cross-env": "^7.0.3", "cross-spawn": "^7.0.6", - "eslint": "^9.17.0", + "eslint": "^9.39.2", "husky": "^8.0.3", "i18next-scanner": "^4.6.0", "lint-staged": "^15.5.2", diff --git a/packages/local-libs-webpack-plugin/package.json b/packages/local-libs-webpack-plugin/package.json index 821a741f75e..bff13e6f50b 100644 --- a/packages/local-libs-webpack-plugin/package.json +++ b/packages/local-libs-webpack-plugin/package.json @@ -6,7 +6,7 @@ "license": "Apache-2.0", "scripts": { "test": "jest", - "lint": "eslint .", + "lint": "eslint ." }, "keywords": [ "webpack", diff --git a/tools/scripts-config-eslint/README.md b/tools/scripts-config-eslint/README.md index c6969f389e2..73eb2099aeb 100644 --- a/tools/scripts-config-eslint/README.md +++ b/tools/scripts-config-eslint/README.md @@ -74,11 +74,13 @@ The configuration automatically: ### VS Code -Install the ESLint extension and ensure it's configured to use flat config. Add to your `.vscode/settings.json`: +Install the ESLint extension. Modern versions of the VS Code ESLint extension (v3.0.0+) automatically detect and use flat config when available. No additional configuration is needed. + +If you're using an older version of the extension, you may need to update it or add to your `.vscode/settings.json`: ```json { - "eslint.experimental.useFlatConfig": true + "eslint.useFlatConfig": true } ``` diff --git a/tools/scripts-config-eslint/eslint.config.js b/tools/scripts-config-eslint/eslint.config.js index 4215ac37bae..5bb9330c09a 100644 --- a/tools/scripts-config-eslint/eslint.config.js +++ b/tools/scripts-config-eslint/eslint.config.js @@ -171,8 +171,8 @@ module.exports = [ '**/build/**', '**/coverage/**', '**/.storybook/public/**', - 'index.js', - '.eslintrc.js', + './index.js', + './.eslintrc.js', ], }, baseConfig, diff --git a/tools/scripts-config-eslint/package.json b/tools/scripts-config-eslint/package.json index 194ebdef374..9c233f8b2f7 100644 --- a/tools/scripts-config-eslint/package.json +++ b/tools/scripts-config-eslint/package.json @@ -3,7 +3,7 @@ "description": "Eslint configuration for @talend/scripts-core", "version": "14.0.0", "license": "Apache-2.0", - "main": "eslint.config.js", + "main": "index.js", "author": "Talend Frontend ", "homepage": "https://github.com/Talend/ui/tree/master/packages/ui#readme", "bugs": { @@ -26,7 +26,7 @@ "@talend/eslint-plugin": "^1.7.0", "@typescript-eslint/parser": "^8.19.1", "@typescript-eslint/eslint-plugin": "^8.19.1", - "eslint": "^9.17.0", + "eslint": "^9.39.2", "eslint-config-prettier": "^9.1.2", "eslint-plugin-import": "^2.32.0", "eslint-plugin-jsx-a11y": "^6.10.2", diff --git a/tools/scripts-core/src/index.js b/tools/scripts-core/src/index.js index 01dfe025177..9e99a70732c 100755 --- a/tools/scripts-core/src/index.js +++ b/tools/scripts-core/src/index.js @@ -86,37 +86,37 @@ switch (command) { break; case 'lint': console.log('The "lint" command has been removed. Please use "eslint ." directly with @talend/eslint-config'); - process.exit(-1); + process.exit(1); break; case 'build:lib': case 'build:lib:umd': console.log('This command do not exists anymore, please use just "build" command'); - process.exit(-1); + process.exit(1); break; case 'lint:es': case 'lint:style': console.log('This command do not exists anymore, please use just "lint" command'); - process.exit(-1); + process.exit(1); break; case 'test:ng': console.log('This command do not exists anymore, please use just "test" command'); - process.exit(-1); + process.exit(1); break; case 'upgrade:deps': console.log( 'This command do not exists anymore, please use just "talend-upgrade-deps" binary from "@talend/upgrade-deps" package', ); - process.exit(-1); + process.exit(1); break; case 'publish:local': console.log( 'This command do not exists anymore, please use just "talend-publish-local" bin from "@talend/scripts-publish-local" package', ); - process.exit(-1); + process.exit(1); break; default: console.log(`Command ${command} not found.`); - process.exit(-1); + process.exit(1); } /* eslint-disable global-require,no-console */ From 32445e77497a081112cd44637f7b0cad3700f580 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 13:52:40 +0000 Subject: [PATCH 7/7] Restore specific file patterns for lint scripts in packages with custom paths Co-authored-by: jmfrancois <19857479+jmfrancois@users.noreply.github.com> --- packages/faceted-search-query-client/package.json | 2 +- packages/faceted-search/package.json | 2 +- packages/local-libs-webpack-plugin/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/faceted-search-query-client/package.json b/packages/faceted-search-query-client/package.json index 31cd7162453..ced5621967a 100644 --- a/packages/faceted-search-query-client/package.json +++ b/packages/faceted-search-query-client/package.json @@ -21,7 +21,7 @@ "test": "cross-env TZ=UTC talend-scripts test", "test:watch": "cross-env TZ=UTC talend-scripts test --watch", "test:cov": "cross-env TZ=UTC talend-scripts test --coverage", - "lint": "eslint .", + "lint": "eslint ./src/**/*.js ./stories/**/*.js ./.storybook/**/*.js", "extract-i18n": "i18next-scanner --config i18next-scanner.config.js" }, "keywords": [ diff --git a/packages/faceted-search/package.json b/packages/faceted-search/package.json index 0b0a22df811..cd609699d72 100644 --- a/packages/faceted-search/package.json +++ b/packages/faceted-search/package.json @@ -22,7 +22,7 @@ "test:watch": "cross-env TZ=UTC talend-scripts test --watch", "test:cov": "cross-env TZ=UTC talend-scripts test --coverage", "test:demo": "storybook build --docs", - "lint": "eslint .", + "lint": "eslint ./src/**/*.js ./stories/**/*.js ./.storybook/**/*.js", "start": "storybook dev -p 6006", "extract-i18n": "i18next-scanner --config i18next-scanner.config.js" }, diff --git a/packages/local-libs-webpack-plugin/package.json b/packages/local-libs-webpack-plugin/package.json index bff13e6f50b..235f432ec44 100644 --- a/packages/local-libs-webpack-plugin/package.json +++ b/packages/local-libs-webpack-plugin/package.json @@ -6,7 +6,7 @@ "license": "Apache-2.0", "scripts": { "test": "jest", - "lint": "eslint ." + "lint": "eslint lib/**/*.js" }, "keywords": [ "webpack",