Skip to content

Commit 39d166b

Browse files
committed
oxlint: bump, rules of hooks + other react rules
1 parent 4004826 commit 39d166b

File tree

4 files changed

+46
-42
lines changed

4 files changed

+46
-42
lines changed

.oxlintrc.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
{
22
"$schema": "./node_modules/oxlint/configuration_schema.json",
3-
"plugins": ["react", "react-hooks", "unicorn", "typescript", "oxc"],
43
"rules": {
5-
"react-hooks/exhaustive-deps": "error",
64
// only worry about console.log
75
"no-console": ["error", { "allow": ["warn", "error", "info", "table"] }],
8-
// turning this off because it's more sensitive than eslint currently
9-
// "react-hooks/rules-of-hooks": "error",
106
"no-unused-vars": [
117
"error",
128
{
139
"argsIgnorePattern": "^_",
1410
"varsIgnorePattern": "^_",
1511
"caughtErrorsIgnorePattern": "^_"
1612
}
17-
]
13+
],
14+
15+
"react/button-has-type": "error",
16+
"react/jsx-boolean-value": "error",
17+
18+
"react-hooks/exhaustive-deps": "error",
19+
"react-hooks/rules-of-hooks": "error"
1820
},
1921
"ignorePatterns": ["dist/", "node_modules/"]
2022
}

app/api/__tests__/hooks.spec.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ describe('useApiQuery', () => {
116116

117117
function BadApiCall() {
118118
try {
119+
// this disable is for for oxlint
120+
// eslint-disable-next-line react-hooks/rules-of-hooks
119121
useApiQuery('projectView', { path: { project: 'nonexistent' } })
120122
} catch (e) {
121123
onError(e)

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
"ip-num": "^1.5.1",
111111
"jsdom": "^25.0.1",
112112
"msw": "^2.7.0",
113-
"oxlint": "^0.15.8",
113+
"oxlint": "^0.15.10",
114114
"patch-package": "^8.0.0",
115115
"postcss": "^8.4.49",
116116
"postcss-import": "^16.1.0",

0 commit comments

Comments
 (0)