From 22597d449a1232e0f03bec8f02030a056c551bce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 9 Aug 2025 12:21:21 +0000 Subject: [PATCH 1/2] Initial plan From c6c7f8d4f6cafcd7ba22d61a1d592a2cd912ab6a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 9 Aug 2025 12:30:39 +0000 Subject: [PATCH 2/2] Successfully migrate from ESLint to OXLint with @eggjs/oxlint-config Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com> --- .eslintignore | 2 -- .eslintrc | 6 ------ .oxlintrc.json | 19 +++++++++++++++++++ package.json | 6 +++--- 4 files changed, 22 insertions(+), 11 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc create mode 100644 .oxlintrc.json diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index a24e501..0000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -test/fixtures -coverage diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 9bcdb46..0000000 --- a/.eslintrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": [ - "eslint-config-egg/typescript", - "eslint-config-egg/lib/rules/enforce-node-prefix" - ] -} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..943d8ae --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,19 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "env": { + "node": true, + "mocha": true + }, + "extends": [ + "./node_modules/@eggjs/oxlint-config/.oxlintrc.json" + ], + "rules": { + "func-names": "allow", + "typescript/no-explicit-any": "allow", + "unicorn/prefer-string-raw": "allow", + "unicorn/prefer-string-replace-all": "allow", + "unicorn/prefer-string-slice": "allow", + "no-useless-escape": "allow", + "typescript/prefer-ts-expect-error": "allow" + } +} \ No newline at end of file diff --git a/package.json b/package.json index dd93c19..b14973d 100644 --- a/package.json +++ b/package.json @@ -29,15 +29,15 @@ "@types/node": "22", "@types/mocha": "10", "@eggjs/bin": "7", - "eslint": "8", - "eslint-config-egg": "14", + "@eggjs/oxlint-config": "1", + "oxlint": "1", "rimraf": "6", "tshy": "3", "tshy-after": "1", "typescript": "5" }, "scripts": { - "lint": "eslint --cache src test --ext .ts", + "lint": "oxlint src test", "pretest": "npm run clean && npm run lint -- --fix", "test": "egg-bin test", "preci": "npm run clean && npm run lint",