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 bbce54664f03611e04845b5e6ae2ca140baad609
Author: hainenber <[email protected]>
AuthorDate: Sat Jan 17 23:01:48 2026 +0700

    chore(lint): migrate Jest lint rules from `eslint` to `oxlint`
    
    Signed-off-by: hainenber <[email protected]>
---
 superset-frontend/.eslintrc.js       | 17 ++---------------
 superset-frontend/oxlint.json        | 19 +++++++------------
 superset-frontend/package-lock.json  | 27 ---------------------------
 superset-frontend/package.json       |  1 -
 superset-frontend/src/.eslintrc.json | 11 -----------
 5 files changed, 9 insertions(+), 66 deletions(-)

diff --git a/superset-frontend/.eslintrc.js b/superset-frontend/.eslintrc.js
index 1630d89917..5a1e4b322d 100644
--- a/superset-frontend/.eslintrc.js
+++ b/superset-frontend/.eslintrc.js
@@ -399,26 +399,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 8652a37d50..cad7093699 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,12 @@
     "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"],
   },
   "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 6299a03685..65d4090724 100644
--- a/superset-frontend/package-lock.json
+++ b/superset-frontend/package-lock.json
@@ -226,7 +226,6 @@
         "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",
@@ -29990,32 +29989,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";,
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index 711c142095..78e01ed2d7 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -307,7 +307,6 @@
     "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",
diff --git a/superset-frontend/src/.eslintrc.json 
b/superset-frontend/src/.eslintrc.json
deleted file mode 100644
index 97bb09e4da..0000000000
--- 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