-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.mjs
67 lines (64 loc) · 1.56 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// @ts-check
// eslint config < 9.0.0
// export default {
// root: true,
// parser: "@typescript-eslint/parser",
// plugins: ["@typescript-eslint"],
// extends: [
// "next/core-web-vitals",
// "eslint:recommended",
// "plugin:@typescript-eslint/recommended",
// "plugin:prettier/recommended",
// "prettier",
// ],
// rules: {
// "@typescript-eslint/ban-ts-comment": "warn",
// "@typescript-eslint/no-var-requires": "warn",
// "@typescript-eslint/no-unused-vars": "warn",
// },
// parserOptions: {
// ecmaFeatures: {
// jsx: true,
// },
// sourceType: "module",
// ecmaVersion: "esnext",
// },
// env: {
// es6: true,
// browser: true,
// jest: true,
// node: true,
// },
// }
// eslint flat config >= 9.0.0
import eslint from "@eslint/js"
import tseslint from "typescript-eslint"
// import next from "@next/eslint-plugin-next"
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
{
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
},
// plugins: {
// "@next/next": next,
// },
// rules: {
// ...next.configs.recommended.rules,
// },
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
ecmaFeatures: {
jsx: true,
},
sourceType: "module",
ecmaVersion: "latest",
},
},
}
)