Skip to content

Commit 35fcd33

Browse files
amir-rahmaniiASafaeirad
authored andcommitted
feat(tests): add padding-around-all rule
1 parent b89530e commit 35fcd33

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/modules/tests.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import plugin from '@vitest/eslint-plugin';
12
import globals from 'globals';
23

34
import { predicate } from '../utils/conditions.mjs';
@@ -11,6 +12,7 @@ import { globs } from '../utils/globs.mjs';
1112
function tests(options = {}) {
1213
return {
1314
files: [...globs.test, ...globs.e2e],
15+
plugins: { vitest: plugin },
1416
languageOptions: {
1517
globals: { ...globals['shared-node-browser'] },
1618
},
@@ -19,6 +21,8 @@ function tests(options = {}) {
1921
'no-sparse-arrays': 'off',
2022
'no-empty-function': 'off',
2123

24+
'vitest/padding-around-all': 'warn',
25+
2226
...predicate(options.react, {
2327
'@eslint-react/no-unstable-context-value': 'off',
2428
}),

src/modules/vitest.mjs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,6 @@ function vitest() {
5959
'vitest/no-test-prefixes': 'warn',
6060
'vitest/no-test-return-statement': 'warn',
6161

62-
'vitest/padding-around-after-all-blocks': 'warn',
63-
'vitest/padding-around-after-each-blocks': 'warn',
64-
'vitest/padding-around-before-all-blocks': 'warn',
65-
'vitest/padding-around-before-each-blocks': 'warn',
66-
'vitest/padding-around-describe-blocks': 'warn',
67-
'vitest/padding-around-expect-groups': 'warn',
68-
'vitest/padding-around-test-blocks': 'warn',
69-
7062
'vitest/prefer-called-once': 'warn',
7163
'vitest/prefer-called-times': 'off',
7264
'vitest/prefer-called-with': 'warn',

0 commit comments

Comments
 (0)