Просмотр исходного кода

deps(ui): Upgrade eslint, biome (#86630)

Scott Cooper 3 дней назад
Родитель
Сommit
3578a21e53
4 измененных файлов с 352 добавлено и 342 удалено
  1. 26 29
      eslint.config.mjs
  2. 13 13
      package.json
  3. 1 1
      static/app/utils/theme/theme.chonk.tsx
  4. 312 299
      yarn.lock

+ 26 - 29
eslint.config.mjs

@@ -11,13 +11,13 @@
  */
 import * as emotion from '@emotion/eslint-plugin';
 import eslint from '@eslint/js';
+import {globalIgnores} from 'eslint/config';
 import prettier from 'eslint-config-prettier';
 // @ts-expect-error TS(7016): Could not find a declaration file
 import importPlugin from 'eslint-plugin-import';
 import jest from 'eslint-plugin-jest';
 import jestDom from 'eslint-plugin-jest-dom';
 import react from 'eslint-plugin-react';
-// @ts-expect-error TS(7016): Could not find a declaration file
 import reactHooks from 'eslint-plugin-react-hooks';
 // @ts-expect-error TS(7016): Could not find a declaration file
 import sentry from 'eslint-plugin-sentry';
@@ -174,34 +174,31 @@ export default typescript.config([
     // https://eslint.org/docs/latest/use/configure/configuration-files#specifying-files-and-ignores
     files: ['**/*.js', '**/*.mjs', '**/*.ts', '**/*.jsx', '**/*.tsx'],
   },
-  {
-    name: 'eslint/global/ignores',
-    // Global ignores
-    // https://eslint.org/docs/latest/use/configure/configuration-files#globally-ignoring-files-with-ignores
-    ignores: [
-      '.devenv/**/*',
-      '.github/**/*',
-      '.mypy_cache/**/*',
-      '.pytest_cache/**/*',
-      '.venv/**/*',
-      '**/*.benchmark.ts',
-      '**/*.d.ts',
-      '**/dist/**/*',
-      '**/tests/**/fixtures/**/*',
-      '**/vendor/**/*',
-      'build-utils/**/*',
-      'config/chartcuterie/config.js', // TODO: see if this file exists
-      'fixtures/artifact_bundle/**/*',
-      'fixtures/artifact_bundle_debug_ids/**/*',
-      'fixtures/artifact_bundle_duplicated_debug_ids/**/*',
-      'fixtures/profiles/embedded.js',
-      'jest.config.ts',
-      'api-docs/**/*',
-      'src/sentry/static/sentry/js/**/*',
-      'src/sentry/templates/sentry/**/*',
-      'stylelint.config.js',
-    ],
-  },
+  // Global ignores
+  // https://eslint.org/docs/latest/use/configure/configuration-files#globally-ignoring-files-with-ignores
+  globalIgnores([
+    '.devenv/**/*',
+    '.github/**/*',
+    '.mypy_cache/**/*',
+    '.pytest_cache/**/*',
+    '.venv/**/*',
+    '**/*.benchmark.ts',
+    '**/*.d.ts',
+    '**/dist/**/*',
+    '**/tests/**/fixtures/**/*',
+    '**/vendor/**/*',
+    'build-utils/**/*',
+    'config/chartcuterie/config.js',
+    'fixtures/artifact_bundle/**/*',
+    'fixtures/artifact_bundle_debug_ids/**/*',
+    'fixtures/artifact_bundle_duplicated_debug_ids/**/*',
+    'fixtures/profiles/embedded.js',
+    'jest.config.ts',
+    'api-docs/**/*',
+    'src/sentry/static/sentry/js/**/*',
+    'src/sentry/templates/sentry/**/*',
+    'stylelint.config.js',
+  ]),
   /**
    * Rules are grouped by plugin. If you want to override a specific rule inside
    * the recommended set, then it's recommended to spread the new rule on top

+ 13 - 13
package.json

@@ -175,12 +175,12 @@
     "zxcvbn": "^4.4.2"
   },
   "devDependencies": {
-    "@biomejs/biome": "^1.9.1",
+    "@biomejs/biome": "^1.9.4",
     "@codecov/webpack-plugin": "^1.8.0",
     "@emotion/eslint-plugin": "^11.12.0",
-    "@eslint/compat": "^1.2.4",
-    "@eslint/eslintrc": "^3.2.0",
-    "@eslint/js": "^9.17.0",
+    "@eslint/compat": "^1.2.7",
+    "@eslint/eslintrc": "^3.3.0",
+    "@eslint/js": "^9.22.0",
     "@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
     "@sentry/jest-environment": "6.0.0",
     "@sentry/profiling-node": "9.6.0-alpha.0",
@@ -194,19 +194,19 @@
     "babel-gettext-extractor": "^4.1.3",
     "babel-jest": "29.7.0",
     "benchmark": "^2.1.4",
-    "eslint": "^9.17.0",
-    "eslint-config-prettier": "^9.1.0",
-    "eslint-import-resolver-typescript": "^3.7.0",
+    "eslint": "^9.22.0",
+    "eslint-config-prettier": "^10.1.1",
+    "eslint-import-resolver-typescript": "^3.8.3",
     "eslint-plugin-import": "^2.31.0",
-    "eslint-plugin-jest": "^28.10.0",
+    "eslint-plugin-jest": "^28.11.0",
     "eslint-plugin-jest-dom": "^5.5.0",
-    "eslint-plugin-react": "^7.37.3",
-    "eslint-plugin-react-hooks": "5.0.0",
+    "eslint-plugin-react": "^7.37.4",
+    "eslint-plugin-react-hooks": "5.2.0",
     "eslint-plugin-sentry": "^2.10.0",
     "eslint-plugin-simple-import-sort": "^12.1.1",
     "eslint-plugin-testing-library": "^7.1.1",
     "eslint-plugin-typescript-sort-keys": "^3.3.0",
-    "eslint-plugin-unicorn": "^56.0.1",
+    "eslint-plugin-unicorn": "^57.0.0",
     "globals": "^15.14.0",
     "html-webpack-plugin": "^5.6.0",
     "jest": "29.7.0",
@@ -220,7 +220,7 @@
     "stylelint-config-recommended": "^14.0.1",
     "terser": "5.31.6",
     "tsconfig-paths": "^4.2.0",
-    "typescript-eslint": "^8.18.2",
+    "typescript-eslint": "^8.26.0",
     "webpack-dev-server": "5.2.0"
   },
   "resolutions": {
@@ -256,7 +256,7 @@
     "diff-docs": "yarn install-api-docs && ts-node api-docs/openapi-diff.ts",
     "deref-api-docs": "ts-node api-docs/index.ts tests/apidocs/openapi-spectacular.json tests/apidocs/openapi-derefed.json",
     "build-chartcuterie-config": "NODE_ENV=production webpack --config=config/webpack.chartcuterie.config.ts",
-    "build-acceptance": "IS_ACCEPTANCE_TEST=1 NODE_ENV=production webpack",
+    "build-acceptance": "CODECOV_ENABLE_BA=false IS_ACCEPTANCE_TEST=1 NODE_ENV=production webpack",
     "build-production": "NODE_ENV=production webpack --mode production",
     "build": "NODE_OPTIONS=--max-old-space-size=4096 webpack",
     "build-js-loader": "ts-node scripts/build-js-loader.ts",

+ 1 - 1
static/app/utils/theme/theme.chonk.tsx

@@ -888,7 +888,7 @@ export const DO_NOT_USE_darkChonkTheme: ChonkTheme = {
 
 declare module '@emotion/react' {
   // @TODO(jonasbadalic): interface extending a type might be prone to some issues.
-  // eslint-disable-next-line @typescript-eslint/naming-convention
+  // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-shadow
   export interface DO_NOT_USE_ChonkTheme extends ChonkTheme {
     isChonk: true;
   }

Разница между файлами не показана из-за своего большого размера
+ 312 - 299
yarn.lock


Некоторые файлы не были показаны из-за большого количества измененных файлов