-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
110 lines (108 loc) · 2.49 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
const { resolve } = require("node:path");
const project = resolve(__dirname, "tsconfig.json");
module.exports = {
extends: [
require.resolve("@vercel/style-guide/eslint/browser"),
require.resolve("@vercel/style-guide/eslint/node"),
require.resolve("@vercel/style-guide/eslint/react"),
require.resolve("@vercel/style-guide/eslint/next"),
require.resolve("@vercel/style-guide/eslint/typescript"),
"plugin:typescript-sort-keys/recommended",
"plugin:vitest/legacy-recommended",
"prettier",
],
parserOptions: {
project,
},
plugins: [
"jsx-a11y",
"vitest",
"typescript-sort-keys",
"sort-destructure-keys",
],
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/unbound-method": "off",
"import/no-default-export": "off",
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: [
"**/*.spec.ts",
"**/*.config.ts",
"**/*.spec.tsx",
"**/setupTests.ts",
"**/test-utils/*.*",
"/src/mocks/*.*",
],
packageDir: "./",
},
],
"import/order": [
"error",
{
groups: [
["builtin", "external"],
["parent", "sibling", "index"],
],
"newlines-between": "always",
},
],
"no-console": "warn",
"no-implicit-coercion": [
"error",
{
allow: ["!!"],
},
],
"no-param-reassign": [
"error",
{
ignorePropertyModificationsFor: ["immerDraft", "accu"],
props: true,
},
],
"react/function-component-definition": [
"warn",
{
namedComponents: "arrow-function",
unnamedComponents: "arrow-function",
},
],
"react/jsx-sort-props": [
"error",
{
callbacksLast: true,
ignoreCase: true,
reservedFirst: true,
},
],
"react/no-unescaped-entities": "off",
"sort-destructure-keys/sort-destructure-keys": [
2,
{
caseSensitive: false,
},
],
"sort-keys": [
"error",
"asc",
{
caseSensitive: false,
minKeys: 2,
natural: true,
},
],
"unicorn/filename-case": "off",
},
settings: {
"import/resolver": {
typescript: {
project,
},
},
},
};