Skip to content

Commit 56de2ed

Browse files
authored
chore: migrate to ESLint Flat Config (#521)
1 parent 22c58fc commit 56de2ed

File tree

6 files changed

+125
-144
lines changed

6 files changed

+125
-144
lines changed

.eslintignore

-4
This file was deleted.

.eslintrc.js

-12
This file was deleted.

.vscode/settings.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"**/.yarn": true,
55
"**/.pnp.*": true
66
},
7+
"eslint.experimental.useFlatConfig": true,
78
"eslint.nodePath": ".yarn/sdks",
89
"typescript.enablePromptUseWorkspaceTsdk": true,
910
"editor.codeActionsOnSave": {

eslint.config.mjs

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import yarnpkg from '@yarnpkg/eslint-config';
2+
3+
// eslint-disable-next-line arca/no-default-export
4+
export default [
5+
{
6+
ignores: [
7+
`.yarn`,
8+
`dist`,
9+
`shims`,
10+
`.pnp.*`,
11+
],
12+
},
13+
...yarnpkg,
14+
{
15+
rules: {
16+
// eslint-disable-next-line @typescript-eslint/naming-convention
17+
'no-restricted-globals': [`error`, {
18+
name: `fetch`,
19+
message: `Use fetch from sources/httpUtils.ts`,
20+
}],
21+
},
22+
},
23+
];

package.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,15 @@
2929
"@types/semver": "^7.1.0",
3030
"@types/tar": "^6.0.0",
3131
"@types/which": "^3.0.0",
32-
"@typescript-eslint/eslint-plugin": "^6.8.0",
33-
"@typescript-eslint/parser": "^6.8.0",
34-
"@yarnpkg/eslint-config": "^1.0.0",
32+
"@yarnpkg/eslint-config": "^2.0.0",
3533
"@yarnpkg/fslib": "^3.0.0-rc.48",
3634
"@zkochan/cmd-shim": "^6.0.0",
3735
"babel-plugin-dynamic-import-node": "^2.3.3",
3836
"better-sqlite3": "^9.4.1",
3937
"clipanion": "^3.0.1",
4038
"debug": "^4.1.1",
4139
"esbuild": "0.19.5",
42-
"eslint": "^8.0.0",
43-
"eslint-plugin-arca": "^0.16.0",
40+
"eslint": "^8.57.0",
4441
"jest": "^29.0.0",
4542
"proxy-from-env": "^1.1.0",
4643
"semver": "^7.5.2",

0 commit comments

Comments
 (0)