Skip to content

Commit 4654f62

Browse files
committed
Update eslint
I was having a bunch of dependency conflicts and eslint seemed to be the culprit so I just removed it and set it up again, since it seems things have changed quite a bit.
1 parent 8b99fe9 commit 4654f62

13 files changed

+1444
-1301
lines changed

.eslintrc.yaml

-43
This file was deleted.

eslint.config.mjs

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
import { fixupConfigRules } from "@eslint/compat";
2+
import globals from "globals";
3+
import tsParser from "@typescript-eslint/parser";
4+
import path from "node:path";
5+
import { fileURLToPath } from "node:url";
6+
import js from "@eslint/js";
7+
import { FlatCompat } from "@eslint/eslintrc";
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = path.dirname(__filename);
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all
15+
});
16+
17+
export default [...fixupConfigRules(compat.extends(
18+
"eslint:recommended",
19+
"plugin:@typescript-eslint/recommended",
20+
"plugin:import/recommended",
21+
"plugin:import/typescript",
22+
"plugin:prettier/recommended",
23+
"prettier",
24+
)), {
25+
languageOptions: {
26+
globals: {
27+
...globals.browser,
28+
...globals.jest,
29+
...globals.node,
30+
},
31+
32+
parser: tsParser,
33+
ecmaVersion: 2018,
34+
sourceType: "module",
35+
},
36+
37+
settings: {
38+
"import/resolver": {
39+
typescript: {
40+
alwaysTryTypes: true,
41+
},
42+
},
43+
},
44+
45+
rules: {
46+
"@typescript-eslint/no-unused-vars": ["error", {
47+
args: "none",
48+
}],
49+
50+
"no-dupe-class-members": "off",
51+
"@typescript-eslint/no-use-before-define": "off",
52+
"@typescript-eslint/no-non-null-assertion": "off",
53+
"@typescript-eslint/ban-types": "off",
54+
"@typescript-eslint/no-var-requires": "off",
55+
"@typescript-eslint/explicit-module-boundary-types": "off",
56+
"@typescript-eslint/no-explicit-any": "off",
57+
"@typescript-eslint/no-extra-semi": "off",
58+
"@typescript-eslint/no-require-imports": "off",
59+
"@typescript-eslint/no-unused-vars": "off", // TODO: Fix these.
60+
eqeqeq: "error",
61+
62+
"import/order": ["error", {
63+
alphabetize: {
64+
order: "asc",
65+
},
66+
67+
groups: [["builtin", "external", "internal"], "parent", "sibling"],
68+
}],
69+
70+
"no-async-promise-executor": "off",
71+
},
72+
}];

0 commit comments

Comments
 (0)