@yoshinani/style-guide 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/eslint/base.mjs +0 -11
- package/eslint/react-internal.mjs +8 -0
- package/package.json +3 -1
package/eslint/base.mjs
CHANGED
|
@@ -22,10 +22,6 @@ export default tseslint.config(
|
|
|
22
22
|
functional,
|
|
23
23
|
"@eslint-community/eslint-comments": comments,
|
|
24
24
|
},
|
|
25
|
-
extends: [
|
|
26
|
-
functional.configs.externalTypeScriptRecommended,
|
|
27
|
-
functional.configs.stylistic,
|
|
28
|
-
],
|
|
29
25
|
languageOptions: {
|
|
30
26
|
parserOptions: {
|
|
31
27
|
projectService: true,
|
|
@@ -51,7 +47,6 @@ export default tseslint.config(
|
|
|
51
47
|
ignoreArrowShorthand: true,
|
|
52
48
|
},
|
|
53
49
|
],
|
|
54
|
-
|
|
55
50
|
// [awaitつけ忘れ防止](https://www.notion.so/yoshinani-note/await-1dff5577f58381e5ab40f29d8d3f0be4)
|
|
56
51
|
"@typescript-eslint/no-floating-promises": "error",
|
|
57
52
|
"@typescript-eslint/no-shadow": "off",
|
|
@@ -64,10 +59,8 @@ export default tseslint.config(
|
|
|
64
59
|
},
|
|
65
60
|
},
|
|
66
61
|
],
|
|
67
|
-
|
|
68
62
|
// [不要なオプショナルチェーン禁止](https://www.notion.so/yoshinani-note/1dff5577f583816e8b5eec9963add23d)
|
|
69
63
|
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
70
|
-
|
|
71
64
|
// [nullなどをそのまま文字列にするのを禁止](https://www.notion.so/yoshinani-note/null-1dff5577f5838104b3b9db6eee64f106)
|
|
72
65
|
"@typescript-eslint/restrict-template-expressions": [
|
|
73
66
|
"error",
|
|
@@ -79,7 +72,6 @@ export default tseslint.config(
|
|
|
79
72
|
allowNever: false,
|
|
80
73
|
},
|
|
81
74
|
],
|
|
82
|
-
|
|
83
75
|
// [ルール無効化の際に理由を添える](https://www.notion.so/yoshinani-note/1dff5577f583818b913fec991d5e8b46)
|
|
84
76
|
"@eslint-community/eslint-comments/require-description": [
|
|
85
77
|
"error",
|
|
@@ -169,7 +161,6 @@ export default tseslint.config(
|
|
|
169
161
|
"app/**/{page,layout,not-found,*error,opengraph-image,apple-icon}.tsx",
|
|
170
162
|
"app/**/{sitemap,robots}.ts",
|
|
171
163
|
],
|
|
172
|
-
|
|
173
164
|
rules: {
|
|
174
165
|
"import/no-default-export": "off",
|
|
175
166
|
|
|
@@ -183,7 +174,6 @@ export default tseslint.config(
|
|
|
183
174
|
},
|
|
184
175
|
{
|
|
185
176
|
files: ["**/env.ts"],
|
|
186
|
-
|
|
187
177
|
rules: {
|
|
188
178
|
"@typescript-eslint/dot-notation": "off",
|
|
189
179
|
"no-process-env": "off",
|
|
@@ -191,7 +181,6 @@ export default tseslint.config(
|
|
|
191
181
|
},
|
|
192
182
|
{
|
|
193
183
|
files: ["**/*.ts", "**/*.tsx"],
|
|
194
|
-
|
|
195
184
|
rules: {
|
|
196
185
|
"func-names": "off",
|
|
197
186
|
},
|
|
@@ -2,17 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
import base from "./base.mjs";
|
|
4
4
|
import globals from "globals";
|
|
5
|
+
import react from "eslint-plugin-react";
|
|
6
|
+
import reactHooks from "eslint-plugin-react-hooks";
|
|
5
7
|
|
|
6
8
|
const eslintConfig = [
|
|
7
9
|
...base,
|
|
8
10
|
{
|
|
9
11
|
languageOptions: {
|
|
10
12
|
globals: {
|
|
13
|
+
...globals.serviceworker,
|
|
11
14
|
...globals.browser,
|
|
12
15
|
},
|
|
13
16
|
},
|
|
14
17
|
ignores: ["node_modules/", "dist/", "*.js"],
|
|
15
18
|
},
|
|
19
|
+
{
|
|
20
|
+
files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
|
|
21
|
+
...react.configs.flat.recommended,
|
|
22
|
+
...reactHooks.configs["recommended-latest"],
|
|
23
|
+
},
|
|
16
24
|
];
|
|
17
25
|
|
|
18
26
|
export default eslintConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoshinani/style-guide",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Yoshinani's Style Guide",
|
|
5
5
|
"homepage": "https://github.com/yoshinani-dev/style-guide#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
"eslint-config-prettier": "^10.1.2",
|
|
28
28
|
"eslint-plugin-functional": "^9.0.1",
|
|
29
29
|
"eslint-plugin-import": "^2.31.0",
|
|
30
|
+
"eslint-plugin-react": "^7.37.5",
|
|
31
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
30
32
|
"eslint-plugin-tailwindcss": "^3.18.0",
|
|
31
33
|
"globals": "^16.0.0",
|
|
32
34
|
"typescript": "^5.8.3",
|