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

build: move several linting rules to biome (#64911)

Yagiz Nizipli 1 год назад
Родитель
Сommit
291fabef45
2 измененных файлов с 45 добавлено и 0 удалено
  1. 30 0
      .eslintrc.js
  2. 15 0
      biome.json

+ 30 - 0
.eslintrc.js

@@ -34,6 +34,21 @@ module.exports = {
 
     // TODO(@anonrig): Remove these rules from eslint-sentry-config.
     'import/no-nodejs-modules': 'off',
+    semi: 'off',
+    'use-isnan': 'off',
+    curly: 'off',
+    eqeqeq: 'off',
+    'no-extra-semi': 'off',
+    'no-eq-null': 'off',
+    'comma-dangle': 'off',
+    'react/jsx-no-target-blank': 'off',
+    'react/jsx-no-duplicate-props': 'off',
+    'react-hooks/rules-of-hooks': 'off',
+    'no-duplicate-case': 'off',
+    'no-dupe-keys': 'off',
+    'no-redeclare': 'off',
+    'no-debugger': 'off',
+    'no-unreachable': 'off',
   },
   // JSON file formatting is handled by Biome. ESLint should not be linting
   // and formatting these files.
@@ -45,6 +60,21 @@ module.exports = {
       rules: {
         // TODO(@anonrig): Remove these rules from eslint-sentry-config.
         'import/no-nodejs-modules': 'off',
+        semi: 'off',
+        'use-isnan': 'off',
+        curly: 'off',
+        eqeqeq: 'off',
+        'no-extra-semi': 'off',
+        'no-eq-null': 'off',
+        'comma-dangle': 'off',
+        'react/jsx-no-target-blank': 'off',
+        'react/jsx-no-duplicate-props': 'off',
+        'react-hooks/rules-of-hooks': 'off',
+        'no-duplicate-case': 'off',
+        'no-dupe-keys': 'off',
+        'no-redeclare': 'off',
+        'no-debugger': 'off',
+        'no-unreachable': 'off',
       },
     },
     {

+ 15 - 0
biome.json

@@ -13,6 +13,14 @@
     "enabled": true,
     "rules": {
       "recommended": false,
+      "a11y": {
+        "noBlankTarget": "error"
+      },
+      "correctness": {
+        "noUnreachable": "error",
+        "useHookAtTopLevel": "error",
+        "useIsNan": "error"
+      },
       "complexity": {
         "useFlatMap": "error"
       },
@@ -23,6 +31,13 @@
         "useImportType": "error"
       },
       "suspicious": {
+        "noDebugger": "error",
+        "noDoubleEquals": "error",
+        "noDuplicateJsxProps": "error",
+        "noDuplicateObjectKeys": "error",
+        "noDuplicateParameters": "error",
+        "noDuplicateCase": "error",
+        "noRedeclare": "error",
         "useIsArray": "error"
       }
     }