-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
89 lines (87 loc) · 3.01 KB
/
eslint.config.js
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import { FlatCompat } from "@eslint/eslintrc";
import stylistic from "@stylistic/eslint-plugin";
import typeScriptESLint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import relative from "eslint-plugin-no-relative-import-paths";
import prettier from "eslint-plugin-prettier";
import security from "eslint-plugin-security";
import tailwindcss from "eslint-plugin-tailwindcss";
import globals from "globals";
const compat = new FlatCompat();
export default [
{
ignores: [".next", "**.js"]
},
...compat.extends("plugin:@typescript-eslint/eslint-recommended"),
{
languageOptions: {
parser: tsParser,
parserOptions: {
project: true
},
globals: {
...globals.browser,
...globals.node,
JSX: true
}
},
plugins: {
"@typescript-eslint": typeScriptESLint,
security: security,
prettier: prettier,
tailwindcss: tailwindcss,
"no-relative-import-paths": relative,
"@stylistic": stylistic
},
rules: {
"no-console": "warn",
"no-debugger": "warn",
"no-case-declarations": "off",
"prefer-template": "error",
"no-undef": "warn",
"no-prototype-builtins": "warn",
"@stylistic/no-trailing-spaces": "error",
"@stylistic/eol-last": "error",
"@stylistic/quotes": [
"error",
"double",
{
avoidEscape: true,
allowTemplateLiterals: true
}
],
"@stylistic/semi": "error",
"@stylistic/indent": [
"error",
4,
{
SwitchCase: 1
}
],
"@stylistic/padding-line-between-statements": ["error", { blankLine: "always", prev: "*", next: "export" }],
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_"
}
],
"@typescript-eslint/no-floating-promises": ["error"],
"@typescript-eslint/await-thenable": "error",
"prettier/prettier": "error",
"no-relative-import-paths/no-relative-import-paths": [
"error",
{
prefix: "@"
}
],
"tailwindcss/no-custom-classname": "warn",
"tailwindcss/enforces-shorthand": "error",
"tailwindcss/migration-from-tailwind-2": "error"
}
}
];