-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.mjs
75 lines (73 loc) · 2.12 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
68
69
70
71
72
73
74
75
// @ts-check
import eslint from "@eslint/js";
import next from "@next/eslint-plugin-next";
import stylistic from "@stylistic/eslint-plugin";
import _import from "eslint-plugin-import";
import tseslint from "typescript-eslint";
export default tseslint.config({
extends: [
eslint.configs.recommended,
tseslint.configs.recommendedTypeChecked,
tseslint.configs.stylisticTypeChecked
],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname
}
},
plugins: {
"@next/next": next,
"@stylistic": stylistic,
"import": _import
},
rules: {
...next.configs["recommended"].rules,
...next.configs["core-web-vitals"].rules,
"arrow-parens": ["error", "as-needed"],
"comma-dangle": ["error", "never"],
"eol-last": ["error", "never"],
"eqeqeq": ["error", "always", {
"null": "never"
}],
"import/order": ["error", {
"alphabetize": {
"order": "asc"
},
"newlines-between": "never"
}],
"indent": ["error", 2],
"linebreak-style": "off",
"max-len": ["off"],
"new-cap": ["warn"],
"no-constant-condition": ["off"],
"no-restricted-imports": "off",
"no-undef": ["off"],
"object-curly-spacing": ["error", "always"],
"operator-linebreak": ["error", "before"],
"padded-blocks": ["off"],
"quotes": ["error", "double"],
"require-jsdoc": ["off"],
"sort-imports": ["error", {
"ignoreDeclarationSort": true
}],
"@stylistic/member-delimiter-style": "error",
"@stylistic/no-extra-semi": "error",
"@stylistic/semi": "error",
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-restricted-imports": ["error", {
"patterns": [
{
"group": ["./*", "../*"],
"message": "Please use absolute import instead."
}
]
}],
"@typescript-eslint/no-unused-vars": ["error", {
"argsIgnorePattern": "^props$"
}],
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/strict-boolean-expressions": "error"
}
});