-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
92 lines (91 loc) · 2.19 KB
/
.eslintrc.cjs
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
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
"plugin:react/recommended",
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"plugin:storybook/recommended",
"prettier",
],
overrides: [],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: "latest",
sourceType: "module",
project: "tsconfig.json",
tsconfigRootDir: __dirname,
},
plugins: ["react", "import", "unused-imports", "ja"],
ignorePatterns: ["build"],
rules: {
"max-classes-per-file": "off",
"class-methods-use-this": "off",
"no-console": "off",
"react/jsx-props-no-spreading": "off",
"react/destructuring-assignment": "off",
"func-names": "off",
// セミコロン自動補完
semi: ["error", "always"],
"semi-spacing": [
"error",
{
after: true,
before: false,
},
],
"import/no-extraneous-dependencies": "off",
"semi-style": ["error", "last"],
"no-extra-semi": "error",
"no-unexpected-multiline": "error",
"no-unreachable": "error",
"import/extensions": "off",
"import/prefer-default-export": "off",
"react/require-default-props": "off",
"react/jsx-filename-extension": [
"error",
{
extensions: [".jsx", ".tsx"],
},
],
"react/react-in-jsx-scope": "off",
"no-void": [
"error",
{
allowAsStatement: true,
},
],
"react/jsx-no-bind": "off",
"import/order": [
"warn",
{
groups: ["builtin", "external", "parent", "sibling", "index", "object", "type"],
pathGroups: [
{
pattern: "{react,react-dom/**,react-router-dom}",
group: "builtin",
position: "before",
},
{
pattern: "@src/**",
group: "parent",
position: "before",
},
],
pathGroupsExcludedImportTypes: ["builtin"],
alphabetize: {
order: "asc",
},
"newlines-between": "always",
},
],
"@typescript-eslint/consistent-type-imports": ["error", { prefer: "type-imports" }],
// その他のルール
},
};