Skip to content

Commit 7671233

Browse files
committed
chore(eslint): migrate eslint to avoid pnpm dep hoisting issue
mikavilpas/yazi.nvim#747
1 parent 743d2f4 commit 7671233

File tree

3 files changed

+279
-116
lines changed

3 files changed

+279
-116
lines changed

integration-tests/eslint.config.mjs

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
import { FlatCompat } from "@eslint/eslintrc"
2-
import js from "@eslint/js"
1+
import eslintConfigPrettier from "eslint-config-prettier"
32
import noOnlyTests from "eslint-plugin-no-only-tests"
4-
import path from "node:path"
5-
import { fileURLToPath } from "node:url"
63

7-
const __filename = fileURLToPath(import.meta.url)
8-
const __dirname = path.dirname(__filename)
9-
const compat = new FlatCompat({
10-
baseDirectory: __dirname,
11-
recommendedConfig: js.configs.recommended,
12-
allConfig: js.configs.all,
13-
})
4+
import eslint from "@eslint/js"
5+
import tseslint from "typescript-eslint"
146

15-
export default [
7+
export default tseslint.config(
168
{
179
ignores: [
1810
"**/vite.config.js",
@@ -23,11 +15,11 @@ export default [
2315
"cypress/support/tui-sandbox.ts",
2416
],
2517
},
26-
...compat.extends(
27-
"plugin:@typescript-eslint/recommended",
28-
"plugin:@typescript-eslint/strict-type-checked",
29-
"prettier",
30-
),
18+
19+
eslint.configs.recommended,
20+
tseslint.configs.recommended,
21+
tseslint.configs.strictTypeChecked,
22+
3123
{
3224
plugins: {
3325
"no-only-tests": noOnlyTests,
@@ -96,4 +88,7 @@ export default [
9688
"@typescript-eslint/no-unused-vars": "off",
9789
},
9890
},
99-
]
91+
92+
// should be the last item
93+
eslintConfigPrettier,
94+
)

integration-tests/package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,21 @@
1717
"zod": "3.24.1"
1818
},
1919
"devDependencies": {
20+
"@eslint/js": "9.20.0",
2021
"@tui-sandbox/library": "9.0.1",
21-
"@types/node": "22.10.3",
22+
"@types/node": "22.13.1",
2223
"@types/tinycolor2": "1.4.6",
2324
"@typescript-eslint/eslint-plugin": "8.19.0",
2425
"@typescript-eslint/parser": "8.19.0",
2526
"concurrently": "9.1.2",
26-
"eslint": "9.17.0",
27-
"eslint-config-prettier": "9.1.0",
27+
"eslint": "9.20.0",
28+
"eslint-config-prettier": "10.0.1",
2829
"eslint-plugin-no-only-tests": "3.3.0",
2930
"prettier-plugin-organize-imports": "4.1.0",
3031
"prettier-plugin-packagejson": "2.5.6",
3132
"tinycolor2": "1.6.0",
32-
"type-fest": "4.31.0",
33-
"typescript": "5.7.2"
33+
"type-fest": "4.33.0",
34+
"typescript": "5.7.3",
35+
"typescript-eslint": "8.23.0"
3436
}
3537
}

0 commit comments

Comments
 (0)