Skip to content

Commit 3a824a5

Browse files
authored
update react and vitest eslint plugins (#4006)
1 parent b809663 commit 3a824a5

3 files changed

Lines changed: 23 additions & 6 deletions

File tree

eslint.config.js

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,24 @@ copy(
917917
'@eslint-react/no-create-ref': 0,
918918

919919
// https://github.com/vitest-dev/eslint-plugin-vitest#rules
920+
/*
921+
// copy all the rules from the rules table for easy pasting
922+
copy(
923+
Iterator.from(
924+
document
925+
// select rules table
926+
.querySelector('.markdown-heading:has(> a[href="#rules"]) ~ markdown-accessiblity-table')
927+
// select all rows with a rule
928+
.querySelectorAll('tr:has(a)')
929+
)
930+
// filter out deprecated rules
931+
.filter((row) => row.lastElementChild.textContent === '')
932+
// map row to rule declaration
933+
.map((row) => `'vitest/${row.firstElementChild.textContent}': 1,`)
934+
.toArray()
935+
.join('\n')
936+
);
937+
*/
920938
'vitest/consistent-each-for': 1,
921939
'vitest/consistent-test-filename': 0,
922940
'vitest/consistent-test-it': 1,
@@ -931,7 +949,6 @@ copy(
931949
'vitest/no-conditional-in-test': 0,
932950
'vitest/no-conditional-tests': 1,
933951
'vitest/no-disabled-tests': 0,
934-
'vitest/no-done-callback': 1,
935952
'vitest/no-duplicate-hooks': 1,
936953
'vitest/no-focused-tests': [1, { fixable: false }],
937954
'vitest/no-hooks': 0,
@@ -979,7 +996,7 @@ copy(
979996
'vitest/prefer-strict-equal': 1,
980997
'vitest/prefer-to-be': 1,
981998
'vitest/prefer-to-be-falsy': 0,
982-
'vitest/prefer-to-be-object': 0,
999+
'vitest/prefer-to-be-object': 1,
9831000
'vitest/prefer-to-be-truthy': 0,
9841001
'vitest/prefer-to-contain': 1,
9851002
'vitest/prefer-to-have-been-called-times': 1,
@@ -990,7 +1007,8 @@ copy(
9901007
'vitest/require-hook': 0,
9911008
'vitest/require-local-test-context-for-concurrent-snapshots': 0,
9921009
'vitest/require-mock-type-parameters': 0,
993-
'vitest/require-to-throw-message': 0,
1010+
'vitest/require-test-timeout': 0,
1011+
'vitest/require-to-throw-message': 1,
9941012
'vitest/require-top-level-describe': 0,
9951013
'vitest/valid-describe-callback': 1,
9961014
'vitest/valid-expect': [1, { alwaysAwait: true }],

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"typecheck": "tsc --build"
4848
},
4949
"devDependencies": {
50-
"@eslint-react/eslint-plugin": "3.0.0-rc.0",
50+
"@eslint-react/eslint-plugin": "^3.0.0",
5151
"@eslint/markdown": "^7.5.1",
5252
"@faker-js/faker": "^10.3.0",
5353
"@tanstack/react-router": "^1.166.7",
@@ -58,7 +58,7 @@
5858
"@vitejs/plugin-react": "^6.0.1",
5959
"@vitest/browser-playwright": "^4.1.0",
6060
"@vitest/coverage-istanbul": "^4.1.0",
61-
"@vitest/eslint-plugin": "^1.6.11",
61+
"@vitest/eslint-plugin": "^1.6.12",
6262
"clsx": "^2.1.1",
6363
"ecij": "^0.4.1",
6464
"eslint": "^10.0.3",

test/browser/column/key.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ test('key is escaped in query selectors', async () => {
99
}
1010
];
1111

12-
// eslint-disable-next-line vitest/no-alias-methods
1312
await expect(setup({ columns, rows: [] })).resolves.not.toThrow();
1413
});

0 commit comments

Comments
 (0)