Skip to content

Commit 53d1b8e

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 53d1b8e

File tree

13 files changed

+1444
-1290
lines changed

13 files changed

+1444
-1290
lines changed

.eslintrc.yaml

-43
This file was deleted.

.github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Run prettier with actionsx/prettier
3434
uses: actionsx/prettier@v3
3535
with:
36-
args: --check --loglevel=warn .
36+
args: --check --log-level=warn .
3737

3838
doctoc:
3939
name: Doctoc markdown files

eslint.config.mjs

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
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 [
18+
...fixupConfigRules(
19+
compat.extends(
20+
"eslint:recommended",
21+
"plugin:@typescript-eslint/recommended",
22+
"plugin:import/recommended",
23+
"plugin:import/typescript",
24+
"plugin:prettier/recommended",
25+
"prettier",
26+
),
27+
),
28+
{
29+
languageOptions: {
30+
globals: {
31+
...globals.browser,
32+
...globals.jest,
33+
...globals.node,
34+
},
35+
36+
parser: tsParser,
37+
ecmaVersion: 2018,
38+
sourceType: "module",
39+
},
40+
41+
settings: {
42+
"import/resolver": {
43+
typescript: {
44+
alwaysTryTypes: true,
45+
},
46+
},
47+
},
48+
49+
rules: {
50+
"@typescript-eslint/no-unused-vars": [
51+
"error",
52+
{
53+
args: "none",
54+
},
55+
],
56+
57+
"no-dupe-class-members": "off",
58+
"@typescript-eslint/no-use-before-define": "off",
59+
"@typescript-eslint/no-non-null-assertion": "off",
60+
"@typescript-eslint/ban-types": "off",
61+
"@typescript-eslint/no-var-requires": "off",
62+
"@typescript-eslint/explicit-module-boundary-types": "off",
63+
"@typescript-eslint/no-explicit-any": "off",
64+
"@typescript-eslint/no-extra-semi": "off",
65+
"@typescript-eslint/no-require-imports": "off",
66+
"@typescript-eslint/no-unused-vars": "off", // TODO: Fix these.
67+
eqeqeq: "error",
68+
69+
"import/order": [
70+
"error",
71+
{
72+
alphabetize: {
73+
order: "asc",
74+
},
75+
76+
groups: [["builtin", "external", "internal"], "parent", "sibling"],
77+
},
78+
],
79+
80+
"no-async-promise-executor": "off",
81+
},
82+
},
83+
]

0 commit comments

Comments
 (0)