From e179ac8bafc1c76cbf126a34d6778a1da70c1071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= Date: Sat, 16 Aug 2025 21:39:16 +0300 Subject: [PATCH 1/7] Merge multiple .eslintrc.js files into one This is going to help us upgrade the eslint version to 9. --- .eslintrc.js | 63 +++++++++++++++++++++++++++++++++++++++++++ src/test/.eslintrc.js | 60 ----------------------------------------- 2 files changed, 63 insertions(+), 60 deletions(-) delete mode 100644 src/test/.eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js index ac25755980..f8e0262a3b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -144,4 +144,67 @@ module.exports = { globals: { AVAILABLE_STAGING_LOCALES: true, }, + overrides: [ + { + files: ['src/test/**/*'], + env: { + jest: true, + }, + plugins: ['jest', 'testing-library', 'jest-formatting', 'jest-dom'], + extends: [ + 'plugin:jest/recommended', + 'plugin:testing-library/react', + 'plugin:jest-dom/recommended', + ], + rules: { + 'react/jsx-no-bind': 0, + // This rule isn't useful because use Flow. + 'jest/valid-title': 0, + + // Allow require(), for example for importing JSON files. + '@typescript-eslint/no-require-imports': 'off', + + // Override the project-wide config to allow @ts-nocheck. + // We really just need this for our mocks. + '@typescript-eslint/ban-ts-comment': [ + 'error', + { + // Allow @ts-expect-error and @ts-no-check annotations with descriptions. + 'ts-expect-error': 'allow-with-description', + 'ts-nocheck': 'allow-with-description', + // Don't allow @ts-ignore because we want to be notified + // when the error goes away so we can remove the annotation - use + // @ts-expect-error instead + 'ts-ignore': true, + 'ts-check': false, + }, + ], + + // Adding more errors now + 'testing-library/no-manual-cleanup': 'error', + 'testing-library/no-wait-for-snapshot': 'error', + 'testing-library/prefer-explicit-assert': [ + 'error', + { includeFindQueries: false }, + ], + 'testing-library/prefer-presence-queries': 'error', + + // Disable some rules that are in the "recommended" part. + // This is a purely stylistic rule + 'testing-library/render-result-naming-convention': 'off', + // This disallows using `container`, but this is still useful for us sometimes + 'testing-library/no-container': 'off', + // This disallows using direct Node properties (eg: firstChild), but we have + // legitimate uses: + 'testing-library/no-node-access': 'off', + // Disable until https://github.com/testing-library/eslint-plugin-testing-library/issues/359 + // is fixed. + 'testing-library/await-async-query': 'off', + + // Individual jest-formatting rules so that we format only test and describe blocks + 'jest-formatting/padding-around-describe-blocks': 2, + 'jest-formatting/padding-around-test-blocks': 2, + }, + }, + ], }; diff --git a/src/test/.eslintrc.js b/src/test/.eslintrc.js deleted file mode 100644 index eb57c5564c..0000000000 --- a/src/test/.eslintrc.js +++ /dev/null @@ -1,60 +0,0 @@ -module.exports = { - env: { - jest: true, - }, - plugins: ['jest', 'testing-library', 'jest-formatting', 'jest-dom'], - extends: [ - 'plugin:jest/recommended', - 'plugin:testing-library/react', - 'plugin:jest-dom/recommended', - ], - rules: { - 'react/jsx-no-bind': 0, - // This rule isn't useful because use Flow. - 'jest/valid-title': 0, - - // Allow require(), for example for importing JSON files. - '@typescript-eslint/no-require-imports': 'off', - - // Override the project-wide config to allow @ts-nocheck. - // We really just need this for our mocks. - '@typescript-eslint/ban-ts-comment': [ - 'error', - { - // Allow @ts-expect-error and @ts-no-check annotations with descriptions. - 'ts-expect-error': 'allow-with-description', - 'ts-nocheck': 'allow-with-description', - // Don't allow @ts-ignore because we want to be notified - // when the error goes away so we can remove the annotation - use - // @ts-expect-error instead - 'ts-ignore': true, - 'ts-check': false, - }, - ], - - // Adding more errors now - 'testing-library/no-manual-cleanup': 'error', - 'testing-library/no-wait-for-snapshot': 'error', - 'testing-library/prefer-explicit-assert': [ - 'error', - { includeFindQueries: false }, - ], - 'testing-library/prefer-presence-queries': 'error', - - // Disable some rules that are in the "recommended" part. - // This is a purely stylistic rule - 'testing-library/render-result-naming-convention': 'off', - // This disallows using `container`, but this is still useful for us sometimes - 'testing-library/no-container': 'off', - // This disallows using direct Node properties (eg: firstChild), but we have - // legitimate uses: - 'testing-library/no-node-access': 'off', - // Disable until https://github.com/testing-library/eslint-plugin-testing-library/issues/359 - // is fixed. - 'testing-library/await-async-query': 'off', - - // Individual jest-formatting rules so that we format only test and describe blocks - 'jest-formatting/padding-around-describe-blocks': 2, - 'jest-formatting/padding-around-test-blocks': 2, - }, -}; From 5b6a2fae6d92542d6d87db1c4c652aaffb3e9a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= Date: Mon, 18 Aug 2025 00:25:26 +0300 Subject: [PATCH 2/7] Upgrade eslint to version 9 --- .eslintignore | 4 - .eslintrc.js | 210 ------------------------------ __mocks__/.eslintrc.json | 5 - eslint.config.mjs | 268 ++++++++++++++++++++++++++++++++++++++ package.json | 4 +- yarn.lock | 269 ++++++++++++++++++++++----------------- 6 files changed, 422 insertions(+), 338 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.js delete mode 100644 __mocks__/.eslintrc.json create mode 100644 eslint.config.mjs diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 8636cf776d..0000000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -src/profile-logic/import/proto -src/types/libdef/npm -docs-user -coverage diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index f8e0262a3b..0000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,210 +0,0 @@ -module.exports = { - env: { - browser: true, - es6: true, - es2020: true, - node: true, - }, - parser: '@typescript-eslint/parser', - plugins: ['@babel', '@typescript-eslint', 'react', 'import'], - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:react/recommended', - 'prettier', - ], - parserOptions: { - ecmaVersion: '2022', - ecmaFeatures: { - experimentalObjectRestSpread: true, - jsx: true, - }, - sourceType: 'module', - }, - rules: { - // Plugin rules: - 'import/no-duplicates': 'error', - 'import/no-unresolved': 'error', - 'import/named': 'error', - 'react/button-has-type': 'error', - 'react/no-access-state-in-setstate': 'error', - 'react/no-danger': 'error', - 'react/no-did-mount-set-state': 'error', - 'react/no-did-update-set-state': 'error', - 'react/no-will-update-set-state': 'error', - 'react/no-redundant-should-component-update': 'error', - 'react/no-unused-class-component-methods': 'error', - 'react/no-this-in-sfc': 'error', - 'react/no-typos': 'error', - // TypeScript provides enough coverage over the prop types. - 'react/prop-types': 'off', - 'react/jsx-curly-brace-presence': [ - 'error', - { props: 'never', children: 'never' }, - ], - // `no-unused-prop-types` is buggy when we use destructuring parameters in - // functions as it misunderstands them as functional components. - // See https://github.com/yannickcr/eslint-plugin-react/issues/1561 - // 'react/no-unused-prop-types': 'error', - 'react/no-unused-state': 'error', - 'react/jsx-no-bind': 'error', - 'react/jsx-no-leaked-render': 'error', - - // overriding recommended rules - 'no-constant-condition': ['error', { checkLoops: false }], - 'no-console': ['error', { allow: ['log', 'warn', 'error'] }], - - // possible errors - 'array-callback-return': 'error', - 'consistent-return': 'error', - curly: 'error', - 'default-case': 'error', - 'dot-notation': 'error', - eqeqeq: 'error', - 'for-direction': 'error', - 'no-alert': 'error', - 'no-caller': 'error', - 'no-eval': 'error', - 'no-extend-native': 'error', - 'no-extra-bind': 'error', - 'no-extra-label': 'error', - 'no-implied-eval': 'error', - // We use the version from the babel plugin so that `this` in a function - // class property doesn't give a false positive. - '@babel/no-invalid-this': 'error', - 'no-return-await': 'error', - 'no-self-compare': 'error', - 'no-throw-literal': 'error', - 'no-unmodified-loop-condition': 'error', - 'no-useless-call': 'error', - 'no-useless-computed-key': 'error', - 'no-useless-concat': 'error', - 'no-useless-constructor': 'error', - 'no-useless-rename': 'error', - 'no-useless-return': 'error', - 'no-var': 'error', - 'no-void': 'error', - 'no-with': 'error', - 'prefer-const': 'error', - 'prefer-promise-reject-errors': 'error', - 'prefer-rest-params': 'error', - 'prefer-spread': 'error', - 'no-else-return': 'error', - 'no-nested-ternary': 'error', - - // Use `import type` everywhere we can. - '@typescript-eslint/consistent-type-imports': 'error', - // Allow `as any` escape hatches - '@typescript-eslint/no-explicit-any': 'off', - // Disable a rule that the TypeScript FAQ disapproves of - '@typescript-eslint/no-empty-object-type': 'off', - // Should enable this soon, mostly finds `catch (e)` with unused e - '@typescript-eslint/no-unused-vars': 'off', - // TypeScript imports react-jsx into .tsx files for us - 'react/react-in-jsx-scope': 'off', - // Allow @ts-expect-error annotations with descriptions. - '@typescript-eslint/ban-ts-comment': [ - 'error', - { - // Allow @ts-expect-error annotations with descriptions. - 'ts-expect-error': 'allow-with-description', - // Don't allow @ts-ignore or @ts-nocheck because we want to be notified - // when the error goes away so we can remove the annotation - use - // @ts-expect-error instead - 'ts-ignore': true, - 'ts-nocheck': true, - 'ts-check': false, // allow even without description - }, - ], - // TODO: Re-enable for src when we update to eslint and switch to the new - // config format - '@typescript-eslint/no-require-imports': 'off', - }, - // This property is specified both here in addition to the command line in - // package.json. - // The reason is that the property only warns but the command line option - // outputs errors, but the property is useful so that we have the information - // directly in editors. - reportUnusedDisableDirectives: true, - settings: { - react: { - pragma: 'React', - version: '17.0', - }, - 'import/resolver': { - alias: { - map: [ - ['firefox-profiler', './src'], - ['firefox-profiler-res', './res'], - ], - extensions: ['.js', '.ts', '.tsx', '.jpg'], - }, - }, - }, - globals: { - AVAILABLE_STAGING_LOCALES: true, - }, - overrides: [ - { - files: ['src/test/**/*'], - env: { - jest: true, - }, - plugins: ['jest', 'testing-library', 'jest-formatting', 'jest-dom'], - extends: [ - 'plugin:jest/recommended', - 'plugin:testing-library/react', - 'plugin:jest-dom/recommended', - ], - rules: { - 'react/jsx-no-bind': 0, - // This rule isn't useful because use Flow. - 'jest/valid-title': 0, - - // Allow require(), for example for importing JSON files. - '@typescript-eslint/no-require-imports': 'off', - - // Override the project-wide config to allow @ts-nocheck. - // We really just need this for our mocks. - '@typescript-eslint/ban-ts-comment': [ - 'error', - { - // Allow @ts-expect-error and @ts-no-check annotations with descriptions. - 'ts-expect-error': 'allow-with-description', - 'ts-nocheck': 'allow-with-description', - // Don't allow @ts-ignore because we want to be notified - // when the error goes away so we can remove the annotation - use - // @ts-expect-error instead - 'ts-ignore': true, - 'ts-check': false, - }, - ], - - // Adding more errors now - 'testing-library/no-manual-cleanup': 'error', - 'testing-library/no-wait-for-snapshot': 'error', - 'testing-library/prefer-explicit-assert': [ - 'error', - { includeFindQueries: false }, - ], - 'testing-library/prefer-presence-queries': 'error', - - // Disable some rules that are in the "recommended" part. - // This is a purely stylistic rule - 'testing-library/render-result-naming-convention': 'off', - // This disallows using `container`, but this is still useful for us sometimes - 'testing-library/no-container': 'off', - // This disallows using direct Node properties (eg: firstChild), but we have - // legitimate uses: - 'testing-library/no-node-access': 'off', - // Disable until https://github.com/testing-library/eslint-plugin-testing-library/issues/359 - // is fixed. - 'testing-library/await-async-query': 'off', - - // Individual jest-formatting rules so that we format only test and describe blocks - 'jest-formatting/padding-around-describe-blocks': 2, - 'jest-formatting/padding-around-test-blocks': 2, - }, - }, - ], -}; diff --git a/__mocks__/.eslintrc.json b/__mocks__/.eslintrc.json deleted file mode 100644 index 55f121d152..0000000000 --- a/__mocks__/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "env": { - "jest": true - } -} diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000000..f17120013f --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,268 @@ +import js from '@eslint/js'; +import tsParser from '@typescript-eslint/parser'; +import tsPlugin from '@typescript-eslint/eslint-plugin'; +import babelPlugin from '@babel/eslint-plugin'; +import reactPlugin from 'eslint-plugin-react'; +import importPlugin from 'eslint-plugin-import'; +import jestPlugin from 'eslint-plugin-jest'; +import testingLibraryPlugin from 'eslint-plugin-testing-library'; +import jestFormattingPlugin from 'eslint-plugin-jest-formatting'; +import jestDomPlugin from 'eslint-plugin-jest-dom'; +import prettierConfig from 'eslint-config-prettier'; +import globals from 'globals'; + +export default [ + // Global ignores + { + ignores: [ + 'src/profile-logic/import/proto/**', + 'src/types/libdef/npm/**', + 'docs-user/**', + 'coverage/**', + ], + }, + + // Base JavaScript config + js.configs.recommended, + + // TypeScript config + ...tsPlugin.configs['flat/recommended'], + + // React config + reactPlugin.configs.flat.recommended, + + // Custom configuration for all files + { + files: ['**/*.js', '**/*.mjs', '**/*.cjs', '**/*.ts', '**/*.tsx'], + languageOptions: { + globals: { + ...globals.browser, + ...globals.es2020, + ...globals.node, + AVAILABLE_STAGING_LOCALES: true, + }, + parser: tsParser, + parserOptions: { + ecmaVersion: 2022, + sourceType: 'module', + ecmaFeatures: { + experimentalObjectRestSpread: true, + jsx: true, + }, + }, + }, + plugins: { + '@babel': babelPlugin, + import: importPlugin, + }, + settings: { + react: { + pragma: 'React', + version: '17.0', + }, + 'import/resolver': { + alias: { + map: [ + ['firefox-profiler', './src'], + ['firefox-profiler-res', './res'], + ], + extensions: ['.js', '.ts', '.tsx', '.jpg'], + }, + }, + }, + rules: { + // Plugin rules: + 'import/no-duplicates': 'error', + 'import/no-unresolved': 'error', + 'import/named': 'error', + 'react/button-has-type': 'error', + 'react/no-access-state-in-setstate': 'error', + 'react/no-danger': 'error', + 'react/no-did-mount-set-state': 'error', + 'react/no-did-update-set-state': 'error', + 'react/no-will-update-set-state': 'error', + 'react/no-redundant-should-component-update': 'error', + 'react/no-unused-class-component-methods': 'error', + 'react/no-this-in-sfc': 'error', + 'react/no-typos': 'error', + // TypeScript provides enough coverage over the prop types. + 'react/prop-types': 'off', + 'react/jsx-curly-brace-presence': [ + 'error', + { props: 'never', children: 'never' }, + ], + // `no-unused-prop-types` is buggy when we use destructuring parameters in + // functions as it misunderstands them as functional components. + // See https://github.com/yannickcr/eslint-plugin-react/issues/1561 + // 'react/no-unused-prop-types': 'error', + 'react/no-unused-state': 'error', + 'react/jsx-no-bind': 'error', + 'react/jsx-no-leaked-render': 'error', + + // overriding recommended rules + 'no-constant-condition': ['error', { checkLoops: false }], + 'no-console': ['error', { allow: ['log', 'warn', 'error'] }], + + // possible errors + 'array-callback-return': 'error', + 'consistent-return': 'error', + curly: 'error', + 'default-case': 'error', + 'dot-notation': 'error', + eqeqeq: 'error', + 'for-direction': 'error', + 'no-alert': 'error', + 'no-caller': 'error', + 'no-eval': 'error', + 'no-extend-native': 'error', + 'no-extra-bind': 'error', + 'no-extra-label': 'error', + 'no-implied-eval': 'error', + // We use the version from the babel plugin so that `this` in a function + // class property doesn't give a false positive. + '@babel/no-invalid-this': 'error', + 'no-return-await': 'error', + 'no-self-compare': 'error', + 'no-throw-literal': 'error', + 'no-unmodified-loop-condition': 'error', + 'no-useless-call': 'error', + 'no-useless-computed-key': 'error', + 'no-useless-concat': 'error', + 'no-useless-constructor': 'error', + 'no-useless-rename': 'error', + 'no-useless-return': 'error', + 'no-var': 'error', + 'no-void': 'error', + 'no-with': 'error', + 'prefer-const': 'error', + 'prefer-promise-reject-errors': 'error', + 'prefer-rest-params': 'error', + 'prefer-spread': 'error', + 'no-else-return': 'error', + 'no-nested-ternary': 'error', + + // Use `import type` everywhere we can. + '@typescript-eslint/consistent-type-imports': 'error', + // Allow `as any` escape hatches + '@typescript-eslint/no-explicit-any': 'off', + // Disable a rule that the TypeScript FAQ disapproves of + '@typescript-eslint/no-empty-object-type': 'off', + // Should enable this soon, mostly finds `catch (e)` with unused e + '@typescript-eslint/no-unused-vars': 'off', + // TypeScript imports react-jsx into .tsx files for us + 'react/react-in-jsx-scope': 'off', + // Allow @ts-expect-error annotations with descriptions. + '@typescript-eslint/ban-ts-comment': [ + 'error', + { + // Allow @ts-expect-error annotations with descriptions. + 'ts-expect-error': 'allow-with-description', + // Don't allow @ts-ignore or @ts-nocheck because we want to be notified + // when the error goes away so we can remove the annotation - use + // @ts-expect-error instead + 'ts-ignore': true, + 'ts-nocheck': true, + 'ts-check': false, // allow even without description + }, + ], + // TODO: Re-enable for src when we update to eslint and switch to the new + // config format + '@typescript-eslint/no-require-imports': 'off', + }, + linterOptions: { + // This property is specified both here in addition to the command line in + // package.json. + // The reason is that the property only warns but the command line option + // outputs errors, but the property is useful so that we have the information + // directly in editors. + reportUnusedDisableDirectives: true, + }, + }, + + // Test files override + { + files: ['src/test/**/*'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + plugins: { + jest: jestPlugin, + 'testing-library': testingLibraryPlugin, + 'jest-formatting': jestFormattingPlugin, + 'jest-dom': jestDomPlugin, + }, + rules: { + // Jest recommended rules + ...jestPlugin.configs.recommended.rules, + + // Testing Library recommended rules + ...testingLibraryPlugin.configs.react.rules, + + // Jest DOM recommended rules + ...jestDomPlugin.configs.recommended.rules, + + 'react/jsx-no-bind': 'off', + // This rule isn't useful because we use TypeScript. + 'jest/valid-title': 'off', + + // Allow require(), for example for importing JSON files. + '@typescript-eslint/no-require-imports': 'off', + + // Override the project-wide config to allow @ts-nocheck. + // We really just need this for our mocks. + '@typescript-eslint/ban-ts-comment': [ + 'error', + { + // Allow @ts-expect-error and @ts-no-check annotations with descriptions. + 'ts-expect-error': 'allow-with-description', + 'ts-nocheck': 'allow-with-description', + // Don't allow @ts-ignore because we want to be notified + // when the error goes away so we can remove the annotation - use + // @ts-expect-error instead + 'ts-ignore': true, + 'ts-check': false, + }, + ], + + // Adding more errors now + 'testing-library/no-manual-cleanup': 'error', + 'testing-library/no-wait-for-snapshot': 'error', + 'testing-library/prefer-explicit-assert': [ + 'error', + { includeFindQueries: false }, + ], + 'testing-library/prefer-presence-queries': 'error', + + // Disable some rules that are in the "recommended" part. + // This is a purely stylistic rule + 'testing-library/render-result-naming-convention': 'off', + // This disallows using `container`, but this is still useful for us sometimes + 'testing-library/no-container': 'off', + // This disallows using direct Node properties (eg: firstChild), but we have + // legitimate uses: + 'testing-library/no-node-access': 'off', + // Disable until https://github.com/testing-library/eslint-plugin-testing-library/issues/359 + // is fixed. + 'testing-library/await-async-query': 'off', + + // Individual jest-formatting rules so that we format only test and describe blocks + 'jest-formatting/padding-around-describe-blocks': 'error', + 'jest-formatting/padding-around-test-blocks': 'error', + }, + }, + + // __mocks__ directory configuration + { + files: ['__mocks__/**/*'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, + + // Prettier config (must be last to override other formatting rules) + prettierConfig, +]; diff --git a/package.json b/package.json index c9bd2a5f01..351108ef72 100644 --- a/package.json +++ b/package.json @@ -113,6 +113,7 @@ "@babel/preset-env": "^7.28.3", "@babel/preset-react": "^7.27.1", "@babel/preset-typescript": "^7.27.1", + "@eslint/js": "^9.34.0", "@fetch-mock/jest": "^0.2.16", "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^6.6.4", @@ -144,7 +145,7 @@ "css-loader": "^7.1.2", "cssnano": "^7.1.0", "devtools-license-check": "^0.9.0", - "eslint": "^8.57.1", + "eslint": "^9.34.0", "eslint-config-prettier": "^10.1.8", "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-import": "^2.32.0", @@ -157,6 +158,7 @@ "fake-indexeddb": "^6.1.0", "file-loader": "^6.2.0", "glob": "^11.0.3", + "globals": "^16.3.0", "html-webpack-plugin": "^5.6.4", "husky": "^4.3.8", "jest": "^30.0.5", diff --git a/yarn.lock b/yarn.lock index 269ae86daa..3115b9bf81 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1220,30 +1220,64 @@ dependencies: eslint-visitor-keys "^3.4.3" -"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.12.1": version "4.12.1" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== +"@eslint/config-array@^0.21.0": + version "0.21.0" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.21.0.tgz#abdbcbd16b124c638081766392a4d6b509f72636" + integrity sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ== + dependencies: + "@eslint/object-schema" "^2.1.6" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/config-helpers@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.3.1.tgz#d316e47905bd0a1a931fa50e669b9af4104d1617" + integrity sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA== + +"@eslint/core@^0.15.2": + version "0.15.2" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.15.2.tgz#59386327d7862cc3603ebc7c78159d2dcc4a868f" + integrity sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg== + dependencies: + "@types/json-schema" "^7.0.15" + +"@eslint/eslintrc@^3.3.1": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.3.1.tgz#e55f7f1dd400600dd066dbba349c4c0bac916964" + integrity sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" + espree "^10.0.1" + globals "^14.0.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.57.1": - version "8.57.1" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" - integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== +"@eslint/js@9.34.0", "@eslint/js@^9.34.0": + version "9.34.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.34.0.tgz#fc423168b9d10e08dea9088d083788ec6442996b" + integrity sha512-EoyvqQnBNsV1CWaEJ559rxXL4c8V92gxirbawSmVUOWXlsRxxQXl6LmCpdUblgxgSkDIqKnhzba2SjRTI/A5Rw== + +"@eslint/object-schema@^2.1.6": + version "2.1.6" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.6.tgz#58369ab5b5b3ca117880c0f6c0b0f32f6950f24f" + integrity sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA== + +"@eslint/plugin-kit@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz#fd8764f0ee79c8ddab4da65460c641cefee017c5" + integrity sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w== + dependencies: + "@eslint/core" "^0.15.2" + levn "^0.4.1" "@fetch-mock/jest@^0.2.16": version "0.2.16" @@ -1283,24 +1317,33 @@ resolved "https://registry.yarnpkg.com/@fluent/sequence/-/sequence-0.8.0.tgz#dd3da353a0635f1efa5f27e6d4fc59e01f162372" integrity sha512-eV5QlEEVV/wR3AFQLXO67x4yPRPQXyqke0c8yucyMSeW36B3ecZyVFlY1UprzrfFV8iPJB4TAehDy/dLGbvQ1Q== -"@humanwhocodes/config-array@^0.13.0": - version "0.13.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" - integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== +"@humanfs/core@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" + integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== + +"@humanfs/node@^0.16.6": + version "0.16.6" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e" + integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw== dependencies: - "@humanwhocodes/object-schema" "^2.0.3" - debug "^4.3.1" - minimatch "^3.0.5" + "@humanfs/core" "^0.19.1" + "@humanwhocodes/retry" "^0.3.0" "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== +"@humanwhocodes/retry@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a" + integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA== + +"@humanwhocodes/retry@^0.4.2": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.3.tgz#c2b9d2e374ee62c586d3adbea87199b1d7a7a6ba" + integrity sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ== "@isaacs/balanced-match@^4.0.1": version "4.0.1" @@ -1727,7 +1770,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": +"@nodelib/fs.walk@^1.2.3": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -2133,7 +2176,7 @@ dependencies: "@types/estree" "*" -"@types/estree@*", "@types/estree@^1.0.0", "@types/estree@^1.0.8": +"@types/estree@*", "@types/estree@^1.0.0", "@types/estree@^1.0.6", "@types/estree@^1.0.8": version "1.0.8" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== @@ -2568,7 +2611,7 @@ "@typescript-eslint/types" "8.39.0" eslint-visitor-keys "^4.2.1" -"@ungap/structured-clone@^1.2.0", "@ungap/structured-clone@^1.3.0": +"@ungap/structured-clone@^1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.3.0.tgz#d06bbb384ebcf6c505fde1c3d0ed4ddffe0aaff8" integrity sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g== @@ -2860,7 +2903,7 @@ acorn-jsx@^5.0.0, acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.0.0, acorn@^8.15.0, acorn@^8.8.2, acorn@^8.9.0: +acorn@^8.0.0, acorn@^8.15.0, acorn@^8.8.2: version "8.15.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== @@ -4066,7 +4109,7 @@ cross-env@^10.0.0: "@epic-web/invariant" "^1.0.0" cross-spawn "^7.0.6" -cross-spawn@^7.0.2, cross-spawn@^7.0.3, cross-spawn@^7.0.6: +cross-spawn@^7.0.3, cross-spawn@^7.0.6: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== @@ -4503,13 +4546,6 @@ doctrine@^2.1.0: dependencies: esutils "^2.0.2" -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - dom-accessibility-api@^0.5.9: version "0.5.10" resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.10.tgz#caa6d08f60388d0bb4539dd75fe458a9a1d0014c" @@ -5004,10 +5040,10 @@ eslint-scope@5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== +eslint-scope@^8.4.0: + version "8.4.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.4.0.tgz#88e646a207fad61436ffa39eb505147200655c82" + integrity sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -5017,7 +5053,7 @@ eslint-visitor-keys@^2.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: +eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== @@ -5027,51 +5063,48 @@ eslint-visitor-keys@^4.2.1: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1" integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ== -eslint@^8.57.1: - version "8.57.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" - integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== +eslint@^9.34.0: + version "9.34.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.34.0.tgz#0ea1f2c1b5d1671db8f01aa6b8ce722302016f7b" + integrity sha512-RNCHRX5EwdrESy3Jc9o8ie8Bog+PeYvvSR8sDGoZxNFTvZ4dlxUB3WzQ3bQMztFrSRODGrLLj8g6OFuGY/aiQg== dependencies: "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.1" - "@humanwhocodes/config-array" "^0.13.0" + "@eslint-community/regexpp" "^4.12.1" + "@eslint/config-array" "^0.21.0" + "@eslint/config-helpers" "^0.3.1" + "@eslint/core" "^0.15.2" + "@eslint/eslintrc" "^3.3.1" + "@eslint/js" "9.34.0" + "@eslint/plugin-kit" "^0.3.5" + "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" + "@humanwhocodes/retry" "^0.4.2" + "@types/estree" "^1.0.6" + "@types/json-schema" "^7.0.15" ajv "^6.12.4" chalk "^4.0.0" - cross-spawn "^7.0.2" + cross-spawn "^7.0.6" debug "^4.3.2" - doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" + eslint-scope "^8.4.0" + eslint-visitor-keys "^4.2.1" + espree "^10.4.0" + esquery "^1.5.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" + file-entry-cache "^8.0.0" find-up "^5.0.0" glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" ignore "^5.2.0" imurmurhash "^0.1.4" is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" lodash.merge "^4.6.2" minimatch "^3.1.2" natural-compare "^1.4.0" optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" -espree@^10.4.0: +espree@^10.0.1, espree@^10.4.0: version "10.4.0" resolved "https://registry.yarnpkg.com/espree/-/espree-10.4.0.tgz#d54f4949d4629005a1fa168d937c3ff1f7e2a837" integrity sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ== @@ -5080,24 +5113,15 @@ espree@^10.4.0: acorn-jsx "^5.3.2" eslint-visitor-keys "^4.2.1" -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== - dependencies: - acorn "^8.9.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" - esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== +esquery@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== dependencies: estraverse "^5.1.0" @@ -5346,12 +5370,12 @@ file-entry-cache@^10.1.3: dependencies: flat-cache "^6.1.13" -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== dependencies: - flat-cache "^3.0.4" + flat-cache "^4.0.0" file-loader@^6.2.0: version "6.2.0" @@ -5453,14 +5477,13 @@ find-yarn-workspace-root@^2.0.0: dependencies: micromatch "^4.0.2" -flat-cache@^3.0.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" - integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== dependencies: flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" + keyv "^4.5.4" flat-cache@^6.1.13: version "6.1.13" @@ -5758,12 +5781,15 @@ global-prefix@^3.0.0: kind-of "^6.0.2" which "^1.3.1" -globals@^13.19.0: - version "13.19.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.19.0.tgz#7a42de8e6ad4f7242fbcca27ea5b23aca367b5c8" - integrity sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ== - dependencies: - type-fest "^0.20.2" +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== + +globals@^16.3.0: + version "16.3.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-16.3.0.tgz#66118e765ddaf9e2d880f7e17658543f93f1f667" + integrity sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ== globalthis@^1.0.4: version "1.0.4" @@ -6641,7 +6667,7 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-path-inside@^3.0.2, is-path-inside@^3.0.3: +is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== @@ -7464,7 +7490,7 @@ keygrip@~1.1.0: dependencies: tsscmp "1.0.6" -keyv@^4.5.0, keyv@^4.5.3: +keyv@^4.5.0, keyv@^4.5.4: version "4.5.4" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== @@ -8783,7 +8809,7 @@ minimatch@^10.0.3: dependencies: "@isaacs/brace-expansion" "^5.0.0" -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -10691,13 +10717,6 @@ rimraf@^2.6.3: dependencies: glob "^7.1.3" -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - rimraf@^5.0.10: version "5.0.10" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.10.tgz#23b9843d3dc92db71f96e1a2ce92e39fd2a8221c" @@ -11301,7 +11320,16 @@ string-length@^4.0.2: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -11423,7 +11451,7 @@ stringify-object@^3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -11437,6 +11465,13 @@ strip-ansi@^0.3.0: dependencies: ansi-regex "^0.2.1" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -11742,11 +11777,6 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - through2@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.0.tgz#f41a1c31df5e129e4314446f66eca05cd6a30480" @@ -11928,11 +11958,6 @@ type-fest@^0.16.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.16.0.tgz#3240b891a78b0deae910dbeb86553e552a148860" integrity sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg== -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -12962,8 +12987,16 @@ workbox-window@7.3.0, workbox-window@^7.3.0: "@types/trusted-types" "^2.0.2" workbox-core "7.3.0" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: - name wrap-ansi-cjs +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== From 5644f8d49bbbe35f66d456b017bda89ea461f453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= Date: Mon, 18 Aug 2025 00:42:53 +0300 Subject: [PATCH 3/7] Enable no-require-imports that was waiting for us to switch to flat config file --- eslint.config.mjs | 10 ++++++++-- ...ode-worker-contents.js => node-worker-contents.mjs} | 6 +++--- src/utils/__mocks__/worker-factory.ts | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) rename src/utils/__mocks__/{node-worker-contents.js => node-worker-contents.mjs} (86%) diff --git a/eslint.config.mjs b/eslint.config.mjs index f17120013f..b6c0436cf8 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -165,8 +165,6 @@ export default [ 'ts-check': false, // allow even without description }, ], - // TODO: Re-enable for src when we update to eslint and switch to the new - // config format '@typescript-eslint/no-require-imports': 'off', }, linterOptions: { @@ -179,6 +177,14 @@ export default [ }, }, + // Source files - enable stricter TypeScript rules + { + files: ['src/**/*.ts', 'src/**/*.tsx'], + rules: { + '@typescript-eslint/no-require-imports': 'error', + }, + }, + // Test files override { files: ['src/test/**/*'], diff --git a/src/utils/__mocks__/node-worker-contents.js b/src/utils/__mocks__/node-worker-contents.mjs similarity index 86% rename from src/utils/__mocks__/node-worker-contents.js rename to src/utils/__mocks__/node-worker-contents.mjs index ef67177931..1293efd6af 100644 --- a/src/utils/__mocks__/node-worker-contents.js +++ b/src/utils/__mocks__/node-worker-contents.mjs @@ -2,9 +2,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // -const { parentPort, workerData } = require('worker_threads'); -const fs = require('fs'); -const vm = require('vm'); +import { parentPort, workerData } from 'worker_threads'; +import fs from 'fs'; +import vm from 'vm'; if (typeof workerData !== 'string') { throw new Error(`Please pass a file name using the 'workerData' property.`); diff --git a/src/utils/__mocks__/worker-factory.ts b/src/utils/__mocks__/worker-factory.ts index b0c8bdedbb..6c3517e902 100644 --- a/src/utils/__mocks__/worker-factory.ts +++ b/src/utils/__mocks__/worker-factory.ts @@ -9,7 +9,7 @@ class NodeWorker { onmessage: ((event: MessageEvent) => unknown) | null; constructor(file: string) { - const worker = new Worker(__dirname + '/node-worker-contents.js', { + const worker = new Worker(__dirname + '/node-worker-contents.mjs', { workerData: file, }); worker.on('message', this.onMessage); From 8adefd37c40716228a177cb7879d368793845e4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= Date: Mon, 25 Aug 2025 19:21:50 +0200 Subject: [PATCH 4/7] Upgrade the react version to 18 in eslint config We've been using react 18 for a while, but this setting wasn't updated. --- eslint.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index b6c0436cf8..6711028651 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -58,7 +58,7 @@ export default [ settings: { react: { pragma: 'React', - version: '17.0', + version: '18.0', }, 'import/resolver': { alias: { From 0ccf0eb20cdd173a9406b2cd7197e3c07d6ce783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= Date: Mon, 25 Aug 2025 19:23:27 +0200 Subject: [PATCH 5/7] Remove the deprecated parser option from eslint settings It looks like this has been removed a long while ago and it doesn't do anything anymore: https://github.com/eslint/eslint/issues/9990 --- eslint.config.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 6711028651..cf269add28 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -46,7 +46,6 @@ export default [ ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { - experimentalObjectRestSpread: true, jsx: true, }, }, From c57078eae07b657d800ae49a3e45915eadae9544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= Date: Mon, 25 Aug 2025 19:39:01 +0200 Subject: [PATCH 6/7] Unify globals and ecma version and upgrade it to 2024 Currently we are using node 22 which supports 2024. --- eslint.config.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index cf269add28..1ac6993c5b 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -37,13 +37,13 @@ export default [ languageOptions: { globals: { ...globals.browser, - ...globals.es2020, + ...globals.es2024, ...globals.node, AVAILABLE_STAGING_LOCALES: true, }, parser: tsParser, parserOptions: { - ecmaVersion: 2022, + ecmaVersion: 2024, sourceType: 'module', ecmaFeatures: { jsx: true, From cb32d51ec1a27a96936c7c9234ac22914dbc1e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= Date: Tue, 26 Aug 2025 15:46:00 +0200 Subject: [PATCH 7/7] Remove the unneeded @babel/no-invalid-this eslint disable rule It looks like this line was a false positive for @babel/no-invalid-this initially because here `this` comes from a parameter and it's not a global `this`. After we upgraded the eslint version, this is correctly caught and not reported as error. I double checked this rule, by specifically making this mistake in the codebase, and it looks like we catch it properly elsewhere, so it's not a case where we fail to detect this rule. This is the explanation of that rule: https://eslint.org/docs/latest/rules/no-invalid-this I explicitly tried the first incorrect example here and `yarn lint-js` catches it properly. --- src/test/components/MenuButtons.test.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/components/MenuButtons.test.tsx b/src/test/components/MenuButtons.test.tsx index 87f86a8df9..13f76e8012 100644 --- a/src/test/components/MenuButtons.test.tsx +++ b/src/test/components/MenuButtons.test.tsx @@ -437,7 +437,6 @@ describe('app/MenuButtons', function () { jest.spyOn(Date.prototype, 'toLocaleString').mockImplementation(function ( this: Date ) { - // eslint-disable-next-line @babel/no-invalid-this return 'toLocaleString ' + this.toUTCString(); });