Skip to content

Commit b09be51

Browse files
committed
調整
1 parent e043e33 commit b09be51

File tree

6 files changed

+132
-124
lines changed

6 files changed

+132
-124
lines changed

.oxlintrc.json

Lines changed: 127 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,135 @@
11
{
22
"$schema": "./node_modules/oxlint/configuration_schema.json",
3-
"plugins": null,
4-
"categories": {},
5-
"rules": {},
6-
"settings": {
7-
"jsx-a11y": {
8-
"polymorphicPropName": null,
9-
"components": {},
10-
"attributes": {}
3+
"plugins": [],
4+
"categories": {
5+
"correctness": "off"
6+
},
7+
"env": {
8+
"builtin": true
9+
},
10+
"ignorePatterns": ["dist"],
11+
"overrides": [
12+
{
13+
"files": ["**/*.{ts,tsx}"],
14+
"rules": {
15+
"constructor-super": "error",
16+
"for-direction": "error",
17+
"no-async-promise-executor": "error",
18+
"no-case-declarations": "error",
19+
"no-class-assign": "error",
20+
"no-compare-neg-zero": "error",
21+
"no-cond-assign": "error",
22+
"no-const-assign": "error",
23+
"no-constant-binary-expression": "error",
24+
"no-constant-condition": "error",
25+
"no-control-regex": "error",
26+
"no-debugger": "error",
27+
"no-delete-var": "error",
28+
"no-dupe-class-members": "error",
29+
"no-dupe-else-if": "error",
30+
"no-dupe-keys": "error",
31+
"no-duplicate-case": "error",
32+
"no-empty": "error",
33+
"no-empty-character-class": "error",
34+
"no-empty-pattern": "error",
35+
"no-empty-static-block": "error",
36+
"no-ex-assign": "error",
37+
"no-extra-boolean-cast": "error",
38+
"no-fallthrough": "error",
39+
"no-func-assign": "error",
40+
"no-global-assign": "error",
41+
"no-import-assign": "error",
42+
"no-invalid-regexp": "error",
43+
"no-irregular-whitespace": "error",
44+
"no-loss-of-precision": "error",
45+
"no-new-native-nonconstructor": "error",
46+
"no-nonoctal-decimal-escape": "error",
47+
"no-obj-calls": "error",
48+
"no-prototype-builtins": "error",
49+
"no-redeclare": "error",
50+
"no-regex-spaces": "error",
51+
"no-self-assign": "error",
52+
"no-setter-return": "error",
53+
"no-shadow-restricted-names": "error",
54+
"no-sparse-arrays": "error",
55+
"no-this-before-super": "error",
56+
"no-unexpected-multiline": "error",
57+
"no-unsafe-finally": "error",
58+
"no-unsafe-negation": "error",
59+
"no-unsafe-optional-chaining": "error",
60+
"no-unused-labels": "error",
61+
"no-unused-private-class-members": "error",
62+
"no-unused-vars": "error",
63+
"no-useless-backreference": "error",
64+
"no-useless-catch": "error",
65+
"no-useless-escape": "error",
66+
"no-with": "error",
67+
"require-yield": "error",
68+
"use-isnan": "error",
69+
"valid-typeof": "error"
70+
}
1171
},
12-
"next": {
13-
"rootDir": []
72+
{
73+
"files": ["**/*.{ts,tsx}"],
74+
"rules": {
75+
"@typescript-eslint/ban-ts-comment": "error",
76+
"no-array-constructor": "error",
77+
"@typescript-eslint/no-duplicate-enum-values": "error",
78+
"@typescript-eslint/no-empty-object-type": "error",
79+
"@typescript-eslint/no-explicit-any": "error",
80+
"@typescript-eslint/no-extra-non-null-assertion": "error",
81+
"@typescript-eslint/no-misused-new": "error",
82+
"@typescript-eslint/no-namespace": "error",
83+
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
84+
"@typescript-eslint/no-require-imports": "error",
85+
"@typescript-eslint/no-this-alias": "error",
86+
"@typescript-eslint/no-unnecessary-type-constraint": "error",
87+
"@typescript-eslint/no-unsafe-declaration-merging": "error",
88+
"@typescript-eslint/no-unsafe-function-type": "error",
89+
"no-unused-expressions": "error",
90+
"no-unused-vars": "error",
91+
"@typescript-eslint/no-wrapper-object-types": "error",
92+
"@typescript-eslint/prefer-as-const": "error",
93+
"@typescript-eslint/prefer-namespace-keyword": "error",
94+
"@typescript-eslint/triple-slash-reference": "error"
95+
},
96+
"plugins": ["typescript"]
1497
},
15-
"react": {
16-
"formComponents": [],
17-
"linkComponents": [],
18-
"version": null,
19-
"componentWrapperFunctions": []
98+
{
99+
"files": ["**/*.{ts,tsx}"],
100+
"rules": {
101+
"react-hooks/rules-of-hooks": "error",
102+
"react-hooks/exhaustive-deps": "warn"
103+
},
104+
"plugins": ["react"]
20105
},
21-
"jsdoc": {
22-
"ignorePrivate": false,
23-
"ignoreInternal": false,
24-
"ignoreReplacesDocs": true,
25-
"overrideReplacesDocs": true,
26-
"augmentsExtendsReplacesDocs": false,
27-
"implementsReplacesDocs": false,
28-
"exemptDestructuredRootsFromChecks": false,
29-
"tagNamePreference": {}
106+
{
107+
"files": ["**/*.{ts,tsx}"],
108+
"rules": {
109+
"react/only-export-components": [
110+
"error",
111+
{
112+
"allowConstantExport": true
113+
}
114+
]
115+
},
116+
"plugins": ["react"]
30117
},
31-
"vitest": {
32-
"typecheck": false
118+
{
119+
"files": ["**/*.{ts,tsx}"],
120+
"globals": {
121+
"AudioWorkletGlobalScope": "readonly",
122+
"AudioWorkletProcessor": "readonly",
123+
"currentFrame": "readonly",
124+
"currentTime": "readonly",
125+
"registerProcessor": "readonly",
126+
"sampleRate": "readonly",
127+
"WorkletGlobalScope": "readonly"
128+
},
129+
"env": {
130+
"es2020": true,
131+
"browser": true
132+
}
33133
}
34-
},
35-
"env": {
36-
"builtin": true
37-
},
38-
"globals": {},
39-
"ignorePatterns": []
134+
]
40135
}

eslint.config.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"dev": "vite",
88
"build": "tsc -b && vite build",
9-
"lint": "eslint .",
9+
"lint": "oxlint .",
1010
"preview": "vite preview",
1111
"lint:fix": "oxlint --fix",
1212
"format": "oxfmt",
@@ -22,9 +22,6 @@
2222
"@types/react": "19.2.5",
2323
"@types/react-dom": "19.2.3",
2424
"@vitejs/plugin-react": "5.1.1",
25-
"eslint": "9.39.1",
26-
"eslint-plugin-react-hooks": "7.0.1",
27-
"eslint-plugin-react-refresh": "0.4.24",
2825
"globals": "16.5.0",
2926
"oxfmt": "0.27.0",
3027
"oxlint": "1.42.0",

pnpm-lock.yaml

Lines changed: 0 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/style.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616

1717
body {
1818
font-family:
19-
"Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
19+
"Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
20+
sans-serif;
2021
background-color: #fff;
2122
}
2223

@@ -381,9 +382,8 @@ nav li {
381382
border: 1px solid var(--color-border);
382383
position-anchor: --anchor-0;
383384
top: anchor(bottom);
384-
left: anchor(right);
385+
left: anchor(left);
385386
margin-top: 8px;
386-
margin-left: 8px;
387387
width: 322px;
388388
background-color: #fff;
389389
border-radius: 8px;

src/cart/Cart.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const Cart = () => {
5353
return () => {
5454
cartElement.removeEventListener("command", handleCommand);
5555
};
56+
// eslint-disable-next-line react-hooks/exhaustive-deps
5657
}, []);
5758

5859
const totalItems = cartItems.reduce((sum, item) => sum + item.count, 0);

0 commit comments

Comments
 (0)