-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.json
More file actions
105 lines (104 loc) · 2.62 KB
/
Copy path.eslintrc.json
File metadata and controls
105 lines (104 loc) · 2.62 KB
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
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@next/next/recommended",
"airbnb",
"prettier",
"next"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "import", "jsx-a11y"],
"rules": {
"react/require-default-props": "off",
"react/jsx-fragments": "off",
"react/display-name": "off",
"react/jsx-props-no-spreading": "off",
"react/function-component-definition": "off",
"react/jsx-no-useless-fragment": "off",
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
"react-hooks/exhaustive-deps": "off",
"lines-between-class-members": "off",
"no-unused-vars": "off",
"no-unused-expressions": "off",
"no-shadow": "off",
"no-alert": "off",
"no-use-before-define": "off",
"no-unsafe-optional-chaining": "off",
"no-nested-ternary": "off",
"import/no-cycle": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
],
"import/no-anonymous-default-export": "warn",
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
["parent", "sibling"],
"object",
"type",
"index"
],
"newlines-between": "always",
"pathGroupsExcludedImportTypes": ["builtin"],
"alphabetize": { "order": "asc", "caseInsensitive": true },
"pathGroups": [
// ここに書いた順序で間に1行空行をあけつつ整頓される
{ "pattern": "@/libs/**", "group": "internal", "position": "before" },
{
"pattern": "@/generated/**",
"group": "internal",
"position": "before"
},
// ... 省略
{
"pattern": "@/components/ui/**",
"group": "internal",
"position": "before"
},
// styles
// 最後尾にしたいのでgroupをindex扱いにする
{
"pattern": "./**.module.css",
"group": "index",
"position": "before"
}
]
}
],
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
"jsx-a11y/alt-text": [
"warn",
{
"elements": ["img"],
"img": ["Image"]
}
]
},
"settings": {
"react": {
"version": "latest"
}
}
}