Skip to content

Commit

Permalink
chore: migrate to ESLint Flat Config (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj authored Jul 12, 2024
1 parent 22c58fc commit 56de2ed
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 144 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

12 changes: 0 additions & 12 deletions .eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"**/.yarn": true,
"**/.pnp.*": true
},
"eslint.experimental.useFlatConfig": true,
"eslint.nodePath": ".yarn/sdks",
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.codeActionsOnSave": {
Expand Down
23 changes: 23 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import yarnpkg from '@yarnpkg/eslint-config';

// eslint-disable-next-line arca/no-default-export
export default [
{
ignores: [
`.yarn`,
`dist`,
`shims`,
`.pnp.*`,
],
},
...yarnpkg,
{
rules: {
// eslint-disable-next-line @typescript-eslint/naming-convention
'no-restricted-globals': [`error`, {
name: `fetch`,
message: `Use fetch from sources/httpUtils.ts`,
}],
},
},
];
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,15 @@
"@types/semver": "^7.1.0",
"@types/tar": "^6.0.0",
"@types/which": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"@yarnpkg/eslint-config": "^1.0.0",
"@yarnpkg/eslint-config": "^2.0.0",
"@yarnpkg/fslib": "^3.0.0-rc.48",
"@zkochan/cmd-shim": "^6.0.0",
"babel-plugin-dynamic-import-node": "^2.3.3",
"better-sqlite3": "^9.4.1",
"clipanion": "^3.0.1",
"debug": "^4.1.1",
"esbuild": "0.19.5",
"eslint": "^8.0.0",
"eslint-plugin-arca": "^0.16.0",
"eslint": "^8.57.0",
"jest": "^29.0.0",
"proxy-from-env": "^1.1.0",
"semver": "^7.5.2",
Expand Down
Loading

0 comments on commit 56de2ed

Please sign in to comment.