Skip to content

Commit c4a7dec

Browse files
authored
fix: warning and error were swapped in rule severity normalization. (#242)
* fix: warning and error were swapped in rule severity normalization. Fixes #241. * chore: Update tsgolint.
1 parent f384bbc commit c4a7dec

File tree

7 files changed

+159
-154
lines changed

7 files changed

+159
-154
lines changed

integration_test/__snapshots__/next-eslint-config-project.spec.ts.snap

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,19 +1166,19 @@ exports[`next-eslint-config-project > next-eslint-config-project 1`] = `
11661166
"jsx-a11y/role-supports-aria-props": "warn",
11671167
"react-hooks/exhaustive-deps": "warn",
11681168
"react-hooks/rules-of-hooks": "error",
1169-
"react/jsx-key": "warn",
1170-
"react/jsx-no-comment-textnodes": "warn",
1171-
"react/jsx-no-duplicate-props": "warn",
1169+
"react/jsx-key": "error",
1170+
"react/jsx-no-comment-textnodes": "error",
1171+
"react/jsx-no-duplicate-props": "error",
11721172
"react/jsx-no-target-blank": "off",
1173-
"react/jsx-no-undef": "warn",
1174-
"react/no-children-prop": "warn",
1175-
"react/no-danger-with-children": "warn",
1176-
"react/no-direct-mutation-state": "warn",
1177-
"react/no-find-dom-node": "warn",
1178-
"react/no-is-mounted": "warn",
1179-
"react/no-render-return-value": "warn",
1180-
"react/no-string-refs": "warn",
1181-
"react/no-unescaped-entities": "warn",
1173+
"react/jsx-no-undef": "error",
1174+
"react/no-children-prop": "error",
1175+
"react/no-danger-with-children": "error",
1176+
"react/no-direct-mutation-state": "error",
1177+
"react/no-find-dom-node": "error",
1178+
"react/no-is-mounted": "error",
1179+
"react/no-render-return-value": "error",
1180+
"react/no-string-refs": "error",
1181+
"react/no-unescaped-entities": "error",
11821182
"react/no-unknown-property": "off",
11831183
"react/react-in-jsx-scope": "off",
11841184
},
@@ -2380,19 +2380,19 @@ exports[`next-eslint-config-project --js-plugins > next-eslint-config-project--j
23802380
"jsx-a11y/role-supports-aria-props": "warn",
23812381
"react-hooks/exhaustive-deps": "warn",
23822382
"react-hooks/rules-of-hooks": "error",
2383-
"react/jsx-key": "warn",
2384-
"react/jsx-no-comment-textnodes": "warn",
2385-
"react/jsx-no-duplicate-props": "warn",
2383+
"react/jsx-key": "error",
2384+
"react/jsx-no-comment-textnodes": "error",
2385+
"react/jsx-no-duplicate-props": "error",
23862386
"react/jsx-no-target-blank": "off",
2387-
"react/jsx-no-undef": "warn",
2388-
"react/no-children-prop": "warn",
2389-
"react/no-danger-with-children": "warn",
2390-
"react/no-direct-mutation-state": "warn",
2391-
"react/no-find-dom-node": "warn",
2392-
"react/no-is-mounted": "warn",
2393-
"react/no-render-return-value": "warn",
2394-
"react/no-string-refs": "warn",
2395-
"react/no-unescaped-entities": "warn",
2387+
"react/jsx-no-undef": "error",
2388+
"react/no-children-prop": "error",
2389+
"react/no-danger-with-children": "error",
2390+
"react/no-direct-mutation-state": "error",
2391+
"react/no-find-dom-node": "error",
2392+
"react/no-is-mounted": "error",
2393+
"react/no-render-return-value": "error",
2394+
"react/no-string-refs": "error",
2395+
"react/no-unescaped-entities": "error",
23962396
"react/no-unknown-property": "off",
23972397
"react/react-in-jsx-scope": "off",
23982398
},
@@ -3594,19 +3594,19 @@ exports[`next-eslint-config-project --type-aware > next-eslint-config-project--t
35943594
"jsx-a11y/role-supports-aria-props": "warn",
35953595
"react-hooks/exhaustive-deps": "warn",
35963596
"react-hooks/rules-of-hooks": "error",
3597-
"react/jsx-key": "warn",
3598-
"react/jsx-no-comment-textnodes": "warn",
3599-
"react/jsx-no-duplicate-props": "warn",
3597+
"react/jsx-key": "error",
3598+
"react/jsx-no-comment-textnodes": "error",
3599+
"react/jsx-no-duplicate-props": "error",
36003600
"react/jsx-no-target-blank": "off",
3601-
"react/jsx-no-undef": "warn",
3602-
"react/no-children-prop": "warn",
3603-
"react/no-danger-with-children": "warn",
3604-
"react/no-direct-mutation-state": "warn",
3605-
"react/no-find-dom-node": "warn",
3606-
"react/no-is-mounted": "warn",
3607-
"react/no-render-return-value": "warn",
3608-
"react/no-string-refs": "warn",
3609-
"react/no-unescaped-entities": "warn",
3601+
"react/jsx-no-undef": "error",
3602+
"react/no-children-prop": "error",
3603+
"react/no-danger-with-children": "error",
3604+
"react/no-direct-mutation-state": "error",
3605+
"react/no-find-dom-node": "error",
3606+
"react/no-is-mounted": "error",
3607+
"react/no-render-return-value": "error",
3608+
"react/no-string-refs": "error",
3609+
"react/no-unescaped-entities": "error",
36103610
"react/no-unknown-property": "off",
36113611
"react/react-in-jsx-scope": "off",
36123612
},
@@ -4809,19 +4809,19 @@ exports[`next-eslint-config-project merge > next-eslint-config-project--merge 1`
48094809
"jsx-a11y/role-supports-aria-props": "warn",
48104810
"react-hooks/exhaustive-deps": "warn",
48114811
"react-hooks/rules-of-hooks": "error",
4812-
"react/jsx-key": "warn",
4813-
"react/jsx-no-comment-textnodes": "warn",
4814-
"react/jsx-no-duplicate-props": "warn",
4812+
"react/jsx-key": "error",
4813+
"react/jsx-no-comment-textnodes": "error",
4814+
"react/jsx-no-duplicate-props": "error",
48154815
"react/jsx-no-target-blank": "off",
4816-
"react/jsx-no-undef": "warn",
4817-
"react/no-children-prop": "warn",
4818-
"react/no-danger-with-children": "warn",
4819-
"react/no-direct-mutation-state": "warn",
4820-
"react/no-find-dom-node": "warn",
4821-
"react/no-is-mounted": "warn",
4822-
"react/no-render-return-value": "warn",
4823-
"react/no-string-refs": "warn",
4824-
"react/no-unescaped-entities": "warn",
4816+
"react/jsx-no-undef": "error",
4817+
"react/no-children-prop": "error",
4818+
"react/no-danger-with-children": "error",
4819+
"react/no-direct-mutation-state": "error",
4820+
"react/no-find-dom-node": "error",
4821+
"react/no-is-mounted": "error",
4822+
"react/no-render-return-value": "error",
4823+
"react/no-string-refs": "error",
4824+
"react/no-unescaped-entities": "error",
48254825
"react/no-unknown-property": "off",
48264826
"react/react-in-jsx-scope": "off",
48274827
},

integration_test/__snapshots__/react-project.spec.ts.snap

Lines changed: 56 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ exports[`react-project > react-project 1`] = `
1717
"rules": {
1818
"react-hooks/exhaustive-deps": "warn",
1919
"react-hooks/rules-of-hooks": "error",
20-
"react-perf/jsx-no-new-array-as-prop": "warn",
21-
"react-perf/jsx-no-new-function-as-prop": "warn",
22-
"react-perf/jsx-no-new-object-as-prop": "warn",
23-
"react/jsx-key": "warn",
24-
"react/jsx-no-comment-textnodes": "warn",
25-
"react/jsx-no-duplicate-props": "warn",
26-
"react/jsx-no-target-blank": "warn",
27-
"react/jsx-no-undef": "warn",
28-
"react/no-children-prop": "warn",
29-
"react/no-danger-with-children": "warn",
30-
"react/no-direct-mutation-state": "warn",
31-
"react/no-find-dom-node": "warn",
32-
"react/no-is-mounted": "warn",
33-
"react/no-render-return-value": "warn",
34-
"react/no-string-refs": "warn",
35-
"react/no-unescaped-entities": "warn",
36-
"react/no-unknown-property": "warn",
20+
"react-perf/jsx-no-new-array-as-prop": "error",
21+
"react-perf/jsx-no-new-function-as-prop": "error",
22+
"react-perf/jsx-no-new-object-as-prop": "error",
23+
"react/jsx-key": "error",
24+
"react/jsx-no-comment-textnodes": "error",
25+
"react/jsx-no-duplicate-props": "error",
26+
"react/jsx-no-target-blank": "error",
27+
"react/jsx-no-undef": "error",
28+
"react/no-children-prop": "error",
29+
"react/no-danger-with-children": "error",
30+
"react/no-direct-mutation-state": "error",
31+
"react/no-find-dom-node": "error",
32+
"react/no-is-mounted": "error",
33+
"react/no-render-return-value": "error",
34+
"react/no-string-refs": "error",
35+
"react/no-unescaped-entities": "error",
36+
"react/no-unknown-property": "error",
3737
},
3838
},
3939
"warnings": [
@@ -80,23 +80,23 @@ exports[`react-project --js-plugins > react-project--js-plugins 1`] = `
8080
"rules": {
8181
"react-hooks/exhaustive-deps": "warn",
8282
"react-hooks/rules-of-hooks": "error",
83-
"react-perf/jsx-no-new-array-as-prop": "warn",
84-
"react-perf/jsx-no-new-function-as-prop": "warn",
85-
"react-perf/jsx-no-new-object-as-prop": "warn",
86-
"react/jsx-key": "warn",
87-
"react/jsx-no-comment-textnodes": "warn",
88-
"react/jsx-no-duplicate-props": "warn",
89-
"react/jsx-no-target-blank": "warn",
90-
"react/jsx-no-undef": "warn",
91-
"react/no-children-prop": "warn",
92-
"react/no-danger-with-children": "warn",
93-
"react/no-direct-mutation-state": "warn",
94-
"react/no-find-dom-node": "warn",
95-
"react/no-is-mounted": "warn",
96-
"react/no-render-return-value": "warn",
97-
"react/no-string-refs": "warn",
98-
"react/no-unescaped-entities": "warn",
99-
"react/no-unknown-property": "warn",
83+
"react-perf/jsx-no-new-array-as-prop": "error",
84+
"react-perf/jsx-no-new-function-as-prop": "error",
85+
"react-perf/jsx-no-new-object-as-prop": "error",
86+
"react/jsx-key": "error",
87+
"react/jsx-no-comment-textnodes": "error",
88+
"react/jsx-no-duplicate-props": "error",
89+
"react/jsx-no-target-blank": "error",
90+
"react/jsx-no-undef": "error",
91+
"react/no-children-prop": "error",
92+
"react/no-danger-with-children": "error",
93+
"react/no-direct-mutation-state": "error",
94+
"react/no-find-dom-node": "error",
95+
"react/no-is-mounted": "error",
96+
"react/no-render-return-value": "error",
97+
"react/no-string-refs": "error",
98+
"react/no-unescaped-entities": "error",
99+
"react/no-unknown-property": "error",
100100
},
101101
},
102102
"warnings": [
@@ -143,23 +143,23 @@ exports[`react-project --type-aware > react-project--type-aware 1`] = `
143143
"rules": {
144144
"react-hooks/exhaustive-deps": "warn",
145145
"react-hooks/rules-of-hooks": "error",
146-
"react-perf/jsx-no-new-array-as-prop": "warn",
147-
"react-perf/jsx-no-new-function-as-prop": "warn",
148-
"react-perf/jsx-no-new-object-as-prop": "warn",
149-
"react/jsx-key": "warn",
150-
"react/jsx-no-comment-textnodes": "warn",
151-
"react/jsx-no-duplicate-props": "warn",
152-
"react/jsx-no-target-blank": "warn",
153-
"react/jsx-no-undef": "warn",
154-
"react/no-children-prop": "warn",
155-
"react/no-danger-with-children": "warn",
156-
"react/no-direct-mutation-state": "warn",
157-
"react/no-find-dom-node": "warn",
158-
"react/no-is-mounted": "warn",
159-
"react/no-render-return-value": "warn",
160-
"react/no-string-refs": "warn",
161-
"react/no-unescaped-entities": "warn",
162-
"react/no-unknown-property": "warn",
146+
"react-perf/jsx-no-new-array-as-prop": "error",
147+
"react-perf/jsx-no-new-function-as-prop": "error",
148+
"react-perf/jsx-no-new-object-as-prop": "error",
149+
"react/jsx-key": "error",
150+
"react/jsx-no-comment-textnodes": "error",
151+
"react/jsx-no-duplicate-props": "error",
152+
"react/jsx-no-target-blank": "error",
153+
"react/jsx-no-undef": "error",
154+
"react/no-children-prop": "error",
155+
"react/no-danger-with-children": "error",
156+
"react/no-direct-mutation-state": "error",
157+
"react/no-find-dom-node": "error",
158+
"react/no-is-mounted": "error",
159+
"react/no-render-return-value": "error",
160+
"react/no-string-refs": "error",
161+
"react/no-unescaped-entities": "error",
162+
"react/no-unknown-property": "error",
163163
},
164164
},
165165
"warnings": [
@@ -207,24 +207,11 @@ exports[`react-project merge > react-project--merge 1`] = `
207207
"rules": {
208208
"react-hooks/exhaustive-deps": "warn",
209209
"react-hooks/rules-of-hooks": "error",
210-
"react-perf/jsx-no-new-array-as-prop": "warn",
211-
"react-perf/jsx-no-new-function-as-prop": "warn",
212-
"react-perf/jsx-no-new-object-as-prop": "warn",
213-
"react/jsx-key": "warn",
214-
"react/jsx-no-comment-textnodes": "warn",
215-
"react/jsx-no-duplicate-props": "warn",
216-
"react/jsx-no-target-blank": "warn",
217-
"react/jsx-no-undef": "warn",
218-
"react/no-children-prop": "warn",
219-
"react/no-danger-with-children": "warn",
220-
"react/no-direct-mutation-state": "warn",
221-
"react/no-find-dom-node": "warn",
222-
"react/no-is-mounted": "warn",
223-
"react/no-render-return-value": "warn",
224-
"react/no-string-refs": "warn",
225-
"react/no-unescaped-entities": "warn",
226-
"react/no-unknown-property": "warn",
227-
"react/react-in-jsx-scope": "warn",
210+
"react/jsx-no-comment-textnodes": "error",
211+
"react/jsx-no-target-blank": "error",
212+
"react/no-unescaped-entities": "error",
213+
"react/no-unknown-property": "error",
214+
"react/react-in-jsx-scope": "error",
228215
},
229216
},
230217
"warnings": [

integration_test/__snapshots__/vscode.spec.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ exports[`vscode --js-plugins > vscode--js-plugins 1`] = `
623623
"curly": "warn",
624624
"eqeqeq": "warn",
625625
"header/header": [
626-
"warn",
626+
"error",
627627
"block",
628628
[
629629
"---------------------------------------------------------------------------------------------",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"lint-staged": "^16.1.2",
7171
"next": "^16.0.0",
7272
"oxlint": "^1.28.0",
73-
"oxlint-tsgolint": "^0.2.0",
73+
"oxlint-tsgolint": "^0.5.1",
7474
"prettier": "^3.6.1",
7575
"typescript": "^5.8.3",
7676
"typescript-eslint": "^8.35.0",

0 commit comments

Comments
 (0)