This is an automated email from the ASF dual-hosted git repository.

hainenber pushed a commit to branch chore/re-enable-jest-lint-in-oxlint
in repository https://gitbox.apache.org/repos/asf/superset.git

commit ecade7159c3fee4d46f9cf328242b2f5b8c936b3
Author: hainenber <[email protected]>
AuthorDate: Sun Feb 8 12:46:25 2026 +0700

    chore(lint): migrate Jest lint rules from eslint to oxlint
    
    Signed-off-by: hainenber <[email protected]>
---
 superset-frontend/.eslintrc.js       | 18 ++--------------
 superset-frontend/oxlint.json        | 21 ++++++++----------
 superset-frontend/package-lock.json  | 42 ++----------------------------------
 superset-frontend/package.json       |  2 --
 superset-frontend/src/.eslintrc.json | 11 ----------
 5 files changed, 13 insertions(+), 81 deletions(-)

diff --git a/superset-frontend/.eslintrc.js b/superset-frontend/.eslintrc.js
index 7a38fb54fd0..5f4b50ff9d2 100644
--- a/superset-frontend/.eslintrc.js
+++ b/superset-frontend/.eslintrc.js
@@ -446,27 +446,13 @@ module.exports = {
         '**/spec/**/*',
       ],
       excludedFiles: 'cypress-base/cypress/**/*',
-      plugins: ['jest', 'jest-dom', 'no-only-tests', 'testing-library'],
-      env: {
-        'jest/globals': true,
-      },
-      settings: {
-        jest: {
-          version: 'detect',
-        },
-      },
-      extends: [
-        'plugin:jest/recommended',
-        'plugin:jest-dom/recommended',
-        'plugin:testing-library/react',
-      ],
+      plugins: ['jest-dom', 'no-only-tests', 'testing-library'],
+      extends: ['plugin:jest-dom/recommended', 'plugin:testing-library/react'],
       rules: {
         'import/no-extraneous-dependencies': [
           'error',
           { devDependencies: true },
         ],
-        'jest/consistent-test-it': 'error',
-        'no-only-tests/no-only-tests': 'error',
         'prefer-promise-reject-errors': 0,
         'max-classes-per-file': 0,
 
diff --git a/superset-frontend/oxlint.json b/superset-frontend/oxlint.json
index 78e680df214..81b7523dce5 100644
--- a/superset-frontend/oxlint.json
+++ b/superset-frontend/oxlint.json
@@ -1,10 +1,11 @@
 {
   "$schema": "./node_modules/oxlint/configuration_schema.json",
-  "plugins": ["import", "react", "jsx-a11y", "typescript", "unicorn"],
+  "plugins": ["import", "react", "jest", "jsx-a11y", "typescript", "unicorn"],
   "env": {
     "browser": true,
     "node": true,
-    "es2020": true
+    "es2020": true,
+    "jest": true
   },
   "globals": {
     "__webpack_public_path__": "writable",
@@ -256,18 +257,14 @@
     "unicorn/no-array-for-each": "off",
     "unicorn/prefer-module": "off",
     "unicorn/prefer-node-protocol": "off",
-    "unicorn/no-useless-undefined": "off"
+    "unicorn/no-useless-undefined": "off",
+
+    // === Jest rules ===
+    "jest/consistent-test-it": ["error", { "fn": "test" }],
+    "jest/no-focused-tests": "error",
+    "jest/no-disabled-tests": "error"
   },
   "ignorePatterns": [
-    "*.test.{js,ts,jsx,tsx}",
-    "*.spec.{js,ts,jsx,tsx}",
-    "**/__tests__/**",
-    "**/__mocks__/**",
-    "**/test/**",
-    "**/tests/**",
-    "**/spec/**",
-    "plugins/**/test/**/*",
-    "packages/**/test/**/*",
     "packages/generator-superset/**/*",
     "cypress-base/**",
     "node_modules/**",
diff --git a/superset-frontend/package-lock.json 
b/superset-frontend/package-lock.json
index c890f3bbce0..a8cf8192ce7 100644
--- a/superset-frontend/package-lock.json
+++ b/superset-frontend/package-lock.json
@@ -239,11 +239,9 @@
         "eslint-plugin-file-progress": "^1.5.0",
         "eslint-plugin-icons": "file:eslint-rules/eslint-plugin-icons",
         "eslint-plugin-import": "^2.32.0",
-        "eslint-plugin-jest": "^27.8.0",
         "eslint-plugin-jest-dom": "^5.5.0",
         "eslint-plugin-jsx-a11y": "^6.4.1",
         "eslint-plugin-lodash": "^7.4.0",
-        "eslint-plugin-no-only-tests": "^3.3.0",
         "eslint-plugin-prettier": "^5.5.5",
         "eslint-plugin-react": "^7.37.5",
         "eslint-plugin-react-hooks": "^7.0.1",
@@ -30745,32 +30743,6 @@
         "strip-bom": "^3.0.0"
       }
     },
-    "node_modules/eslint-plugin-jest": {
-      "version": "27.9.0",
-      "resolved": 
"https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz";,
-      "integrity": 
"sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "@typescript-eslint/utils": "^5.10.0"
-      },
-      "engines": {
-        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
-      },
-      "peerDependencies": {
-        "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0",
-        "eslint": "^7.0.0 || ^8.0.0",
-        "jest": "*"
-      },
-      "peerDependenciesMeta": {
-        "@typescript-eslint/eslint-plugin": {
-          "optional": true
-        },
-        "jest": {
-          "optional": true
-        }
-      }
-    },
     "node_modules/eslint-plugin-jest-dom": {
       "version": "5.5.0",
       "resolved": 
"https://registry.npmjs.org/eslint-plugin-jest-dom/-/eslint-plugin-jest-dom-5.5.0.tgz";,
@@ -30852,16 +30824,6 @@
         "eslint": ">=2"
       }
     },
-    "node_modules/eslint-plugin-no-only-tests": {
-      "version": "3.3.0",
-      "resolved": 
"https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.3.0.tgz";,
-      "integrity": 
"sha512-brcKcxGnISN2CcVhXJ/kEQlNa0MEfGRtwKtWA16SkqXHKitaKIMrfemJKLKX1YqDU5C/5JY3PvZXd5jEW04e0Q==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=5.0.0"
-      }
-    },
     "node_modules/eslint-plugin-prettier": {
       "version": "5.5.5",
       "resolved": 
"https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.5.tgz";,
@@ -65903,8 +65865,8 @@
         "@luma.gl/constants": "~9.2.5",
         "@luma.gl/core": "~9.2.5",
         "@luma.gl/engine": "~9.2.5",
-        "@luma.gl/shadertools": "~9.2.5",
-        "@luma.gl/webgl": "~9.2.5",
+        "@luma.gl/shadertools": "~9.2.6",
+        "@luma.gl/webgl": "~9.2.6",
         "@mapbox/geojson-extent": "^1.0.1",
         "@mapbox/tiny-sdf": "^2.0.7",
         "@math.gl/web-mercator": "^4.1.0",
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index 641693300d2..9c7d28e8590 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -321,11 +321,9 @@
     "eslint-plugin-file-progress": "^1.5.0",
     "eslint-plugin-icons": "file:eslint-rules/eslint-plugin-icons",
     "eslint-plugin-import": "^2.32.0",
-    "eslint-plugin-jest": "^27.8.0",
     "eslint-plugin-jest-dom": "^5.5.0",
     "eslint-plugin-jsx-a11y": "^6.4.1",
     "eslint-plugin-lodash": "^7.4.0",
-    "eslint-plugin-no-only-tests": "^3.3.0",
     "eslint-plugin-prettier": "^5.5.5",
     "eslint-plugin-react": "^7.37.5",
     "eslint-plugin-react-hooks": "^7.0.1",
diff --git a/superset-frontend/src/.eslintrc.json 
b/superset-frontend/src/.eslintrc.json
deleted file mode 100644
index 97bb09e4dab..00000000000
--- a/superset-frontend/src/.eslintrc.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-  "overrides": [
-    {
-      "files": ["*.test.ts", "*.test.tsx", "*.test.js", "*.test.jsx"],
-      "rules": {
-        "jest/consistent-test-it": ["error", { "fn": "test" }],
-        "no-restricted-globals": ["error", "describe", "it"]
-      }
-    }
-  ]
-}

Reply via email to