-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
96 lines (96 loc) · 2.12 KB
/
.eslintrc.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
90
91
92
93
94
95
96
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: [
require.resolve("@vercel/style-guide/eslint/node"),
require.resolve("@vercel/style-guide/eslint/typescript")
],
parserOptions: {
tsconfigRootDir: __dirname,
project: true
},
overrides: [
/**
* Config files (ex: jest.config.js, prettier.config.js, tailwind.config.js)
*/
{
files: ["*.config.js"],
env: {
node: true
},
rules: {
"@typescript-eslint/no-var-requires": "off"
}
},
/**
* Jest Configuration
*/
{
files: ["**/__tests__/**/*.{ts,tsx}", "**/*.test.{ts,tsx}"],
env: {
jest: true
},
extends: [
require.resolve("@vercel/style-guide/eslint/jest"),
"plugin:jest/style"
],
plugins: ["jest"],
rules: {
/**
* Allow non-null assertions in tests
*/
"@typescript-eslint/no-non-null-assertion": "off",
"eslint-comments/require-description": "off"
}
}
],
rules: {
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/consistent-type-imports": [
"error",
{ prefer: "type-imports", fixStyle: "inline-type-imports" }
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
checksVoidReturn: {
arguments: false,
attributes: false
}
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
caughtErrors: "none",
varsIgnorePattern: "^_"
}
],
"import/order": [
"error",
{
"newlines-between": "always",
groups: [
["builtin", "external"],
"internal",
["sibling", "parent"],
"index",
"object",
"type"
],
alphabetize: {
order: "asc"
}
}
],
"no-console": "off",
"sort-imports": [
"error",
{
ignoreDeclarationSort: true
}
]
}
}