@wistia/eslint-config 1.6.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/package.json +25 -25
- package/src/configs/vitest.mjs +1 -1
- package/src/rules/vitest.mjs +53 -53
- package/test/__snapshots__/javascript.mjs.snap +266 -5
- package/test/__snapshots__/jest.mjs.snap +2 -2
- package/test/__snapshots__/node.mjs.snap +2 -2
- package/test/__snapshots__/playwright.mjs.snap +1 -1
- package/test/__snapshots__/react-ssr-compatibility.mjs.snap +1 -1
- package/test/__snapshots__/react.mjs.snap +7 -1
- package/test/__snapshots__/storybook.mjs.snap +1 -1
- package/test/__snapshots__/styled-components.mjs.snap +1 -1
- package/test/__snapshots__/testing-library.mjs.snap +2 -2
- package/test/__snapshots__/typescript.mjs.snap +266 -5
- package/test/__snapshots__/vitest.mjs.snap +65 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @wistia/eslint-config
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#435](https://github.com/wistia/eslint-config/pull/435) [`40f6fb3`](https://github.com/wistia/eslint-config/commit/40f6fb3473a990c7f8ce7ab153d5a33c1fa092c3) Thanks [@okize](https://github.com/okize)! - feat!: upgrade to eslint v10
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- [#433](https://github.com/wistia/eslint-config/pull/433) [`2d98694`](https://github.com/wistia/eslint-config/commit/2d9869488b18d007f386e12754db7a0e71a7d5d8) Thanks [@okize](https://github.com/okize)! - feat: switch to the official vitest plugin
|
|
12
|
+
|
|
3
13
|
## 1.6.2
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wistia/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Wistia's ESLint configurations",
|
|
5
5
|
"packageManager": "yarn@4.12.0",
|
|
6
6
|
"type": "module",
|
|
@@ -39,24 +39,25 @@
|
|
|
39
39
|
"test:export": "check-export-map"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@eslint/compat": "^2.0.
|
|
43
|
-
"@eslint/js": "^
|
|
44
|
-
"@stylistic/eslint-plugin": "^5.
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
46
|
-
"@typescript-eslint/parser": "^8.
|
|
42
|
+
"@eslint/compat": "^2.0.3",
|
|
43
|
+
"@eslint/js": "^10.0.1",
|
|
44
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^8.57.1",
|
|
46
|
+
"@typescript-eslint/parser": "^8.57.1",
|
|
47
|
+
"@vitest/eslint-plugin": "^1.6.13",
|
|
47
48
|
"confusing-browser-globals": "^1.0.11",
|
|
48
49
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
49
50
|
"eslint-plugin-barrel-files": "^3.0.1",
|
|
50
51
|
"eslint-plugin-filenames": "^1.3.2",
|
|
51
52
|
"eslint-plugin-import": "^2.32.0",
|
|
52
|
-
"eslint-plugin-jest": "^29.
|
|
53
|
+
"eslint-plugin-jest": "^29.15.0",
|
|
53
54
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
54
55
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
55
56
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
56
|
-
"eslint-plugin-n": "^17.
|
|
57
|
+
"eslint-plugin-n": "^17.24.0",
|
|
57
58
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
58
59
|
"eslint-plugin-no-typeof-window-undefined": "^0.0.2",
|
|
59
|
-
"eslint-plugin-playwright": "^2.
|
|
60
|
+
"eslint-plugin-playwright": "^2.10.1",
|
|
60
61
|
"eslint-plugin-prettier": "^5.5.5",
|
|
61
62
|
"eslint-plugin-promise": "^7.2.1",
|
|
62
63
|
"eslint-plugin-react": "^7.37.5",
|
|
@@ -64,30 +65,29 @@
|
|
|
64
65
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
65
66
|
"eslint-plugin-react-hooks-ssr": "^0.1.5",
|
|
66
67
|
"eslint-plugin-ssr-friendly": "^1.3.0",
|
|
67
|
-
"eslint-plugin-storybook": "^10.2
|
|
68
|
+
"eslint-plugin-storybook": "^10.3.2",
|
|
68
69
|
"eslint-plugin-styled-components-a11y": "^2.2.1",
|
|
69
|
-
"eslint-plugin-testing-library": "^7.
|
|
70
|
-
"
|
|
71
|
-
"globals": "^
|
|
72
|
-
"globals-vitest": "^4.0.15"
|
|
70
|
+
"eslint-plugin-testing-library": "^7.16.1",
|
|
71
|
+
"globals": "^17.4.0",
|
|
72
|
+
"globals-vitest": "^4.1.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@changesets/changelog-github": "^0.
|
|
76
|
-
"@changesets/cli": "^2.
|
|
77
|
-
"@commitlint/cli": "^20.
|
|
78
|
-
"@commitlint/config-conventional": "^20.
|
|
75
|
+
"@changesets/changelog-github": "^0.6.0",
|
|
76
|
+
"@changesets/cli": "^2.30.0",
|
|
77
|
+
"@commitlint/cli": "^20.5.0",
|
|
78
|
+
"@commitlint/config-conventional": "^20.5.0",
|
|
79
79
|
"check-export-map": "^1.3.1",
|
|
80
|
-
"eslint": "^
|
|
81
|
-
"glob": "^13.0.
|
|
80
|
+
"eslint": "^10.1.0",
|
|
81
|
+
"glob": "^13.0.6",
|
|
82
82
|
"husky": "^9.1.7",
|
|
83
|
-
"prettier": "^3.8.
|
|
84
|
-
"storybook": "^10.2
|
|
83
|
+
"prettier": "^3.8.1",
|
|
84
|
+
"storybook": "^10.3.2",
|
|
85
85
|
"typescript": "^5.9.3",
|
|
86
|
-
"vitest": "^4.0
|
|
86
|
+
"vitest": "^4.1.0"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"eslint": ">=
|
|
90
|
-
"storybook": ">=
|
|
89
|
+
"eslint": ">= 10",
|
|
90
|
+
"storybook": ">= 9",
|
|
91
91
|
"typescript": ">= 5"
|
|
92
92
|
},
|
|
93
93
|
"peerDependenciesMeta": {
|
package/src/configs/vitest.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import globalsVitest from 'globals-vitest';
|
|
2
|
-
import vitestPlugin from 'eslint-plugin
|
|
2
|
+
import vitestPlugin from '@vitest/eslint-plugin';
|
|
3
3
|
import jestFormattingPlugin from 'eslint-plugin-jest-formatting';
|
|
4
4
|
import noOnlyTestsPlugin from 'eslint-plugin-no-only-tests';
|
|
5
5
|
import vitestRules from '../rules/vitest.mjs';
|
package/src/rules/vitest.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// only add vitest rules
|
|
2
|
-
// see: https://github.com/
|
|
2
|
+
// see: https://github.com/vitest-dev/eslint-plugin-vitest?tab=readme-ov-file#rules
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
// Prevent focused tests (.only)
|
|
@@ -7,19 +7,19 @@ export default {
|
|
|
7
7
|
'no-only-tests/no-only-tests': 'error',
|
|
8
8
|
|
|
9
9
|
// Require .test test file pattern
|
|
10
|
-
// https://github.com/
|
|
10
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
|
|
11
11
|
'vitest/consistent-test-filename': 'error',
|
|
12
12
|
|
|
13
13
|
// Prefer test or it but not both
|
|
14
|
-
// https://github.com/
|
|
14
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-it.md
|
|
15
15
|
'vitest/consistent-test-it': 'error',
|
|
16
16
|
|
|
17
17
|
// Enforce having expectation in test body
|
|
18
|
-
// https://github.com/
|
|
18
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
|
|
19
19
|
'vitest/expect-expect': 'error',
|
|
20
20
|
|
|
21
21
|
// Enforce a maximum number of expect per test
|
|
22
|
-
// https://github.com/
|
|
22
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
|
|
23
23
|
'vitest/max-expects': [
|
|
24
24
|
'error',
|
|
25
25
|
{
|
|
@@ -28,198 +28,198 @@ export default {
|
|
|
28
28
|
],
|
|
29
29
|
|
|
30
30
|
// Nested describe block should be less than set max value or default value
|
|
31
|
-
// https://github.com/
|
|
31
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-nested-describe.md
|
|
32
32
|
'vitest/max-nested-describe': 'error',
|
|
33
33
|
|
|
34
34
|
// Disallow alias methods
|
|
35
|
-
// https://github.com/
|
|
35
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-alias-methods.md
|
|
36
36
|
'vitest/no-alias-methods': 'error',
|
|
37
37
|
|
|
38
38
|
// Disallow commented out tests
|
|
39
|
-
// https://github.com/
|
|
39
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-commented-out-tests.md
|
|
40
40
|
'vitest/no-commented-out-tests': 'error',
|
|
41
41
|
|
|
42
42
|
// Disallow conditional expects
|
|
43
|
-
// https://github.com/
|
|
43
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md
|
|
44
44
|
'vitest/no-conditional-expect': 'error',
|
|
45
45
|
|
|
46
46
|
// Disallow conditional tests
|
|
47
|
-
// https://github.com/
|
|
47
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-in-test.md
|
|
48
48
|
'vitest/no-conditional-in-test': 'error',
|
|
49
49
|
|
|
50
50
|
// Disallow conditional tests
|
|
51
|
-
// https://github.com/
|
|
51
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-tests.md
|
|
52
52
|
'vitest/no-conditional-tests': 'error',
|
|
53
53
|
|
|
54
54
|
// Disallow disabled tests
|
|
55
|
-
// https://github.com/
|
|
55
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-disabled-tests.md
|
|
56
56
|
// decision: it is often useful to be allowed to add a .skip
|
|
57
57
|
'vitest/no-disabled-tests': 'off',
|
|
58
58
|
|
|
59
59
|
// Disallow using a callback in asynchronous tests and hooks
|
|
60
|
-
// https://github.com/
|
|
60
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-done-callback.md
|
|
61
61
|
// decision: this rule is deprecated.
|
|
62
62
|
// 'vitest/no-done-callback': 'error',
|
|
63
63
|
|
|
64
64
|
// Disallow duplicate hooks and teardown hooks
|
|
65
|
-
// https://github.com/
|
|
65
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-duplicate-hooks.md
|
|
66
66
|
'vitest/no-duplicate-hooks': 'error',
|
|
67
67
|
|
|
68
68
|
// Disallow focused tests
|
|
69
|
-
// https://github.com/
|
|
69
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-focused-tests.md
|
|
70
70
|
'vitest/no-focused-tests': 'error',
|
|
71
71
|
|
|
72
72
|
// Disallow setup and teardown hooks
|
|
73
|
-
// https://github.com/
|
|
73
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-hooks.md
|
|
74
74
|
'vitest/no-hooks': 'off',
|
|
75
75
|
|
|
76
76
|
// Disallow identical titles
|
|
77
|
-
// https://github.com/
|
|
77
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-identical-title.md
|
|
78
78
|
'vitest/no-identical-title': 'error',
|
|
79
79
|
|
|
80
80
|
// Disallow importing node:test
|
|
81
|
-
// https://github.com/
|
|
81
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-import-node-test.md
|
|
82
82
|
'vitest/no-import-node-test': 'error',
|
|
83
83
|
|
|
84
84
|
// Disallow string interpolation in snapshots
|
|
85
|
-
// https://github.com/
|
|
85
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-interpolation-in-snapshots.md
|
|
86
86
|
'vitest/no-interpolation-in-snapshots': 'error',
|
|
87
87
|
|
|
88
88
|
// Disallow large snapshots
|
|
89
|
-
// https://github.com/
|
|
89
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-large-snapshots.md
|
|
90
90
|
'vitest/no-large-snapshots': ['error', { maxSize: 500 }],
|
|
91
91
|
|
|
92
92
|
// Disallow importing from mocks directory
|
|
93
|
-
// https://github.com/
|
|
93
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-mocks-import.md
|
|
94
94
|
'vitest/no-mocks-import': 'error',
|
|
95
95
|
|
|
96
96
|
// Disallow the use of certain matchers
|
|
97
|
-
// https://github.com/
|
|
97
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-matchers.md
|
|
98
98
|
'vitest/no-restricted-matchers': 'error',
|
|
99
99
|
|
|
100
100
|
// Disallow specific vi. methods
|
|
101
|
-
// https://github.com/
|
|
101
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-vi-methods.md
|
|
102
102
|
'vitest/no-restricted-vi-methods': 'error',
|
|
103
103
|
|
|
104
104
|
// Disallow using expect outside of it or test blocks
|
|
105
|
-
// https://github.com/
|
|
105
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-standalone-expect.md
|
|
106
106
|
'vitest/no-standalone-expect': 'error',
|
|
107
107
|
|
|
108
108
|
// Disallow using test as a prefix
|
|
109
|
-
// https://github.com/
|
|
109
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-prefixes.md
|
|
110
110
|
'vitest/no-test-prefixes': 'error',
|
|
111
111
|
|
|
112
112
|
// Disallow return statements in tests
|
|
113
|
-
// https://github.com/
|
|
113
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md
|
|
114
114
|
'vitest/no-test-return-statement': 'error',
|
|
115
115
|
|
|
116
116
|
// Suggest using toBeCalledWith() or toHaveBeenCalledWith()
|
|
117
|
-
// https://github.com/
|
|
117
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md
|
|
118
118
|
'vitest/prefer-called-with': 'error',
|
|
119
119
|
|
|
120
120
|
// Suggest using the built-in comparison matchers
|
|
121
|
-
// https://github.com/
|
|
121
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-comparison-matcher.md
|
|
122
122
|
'vitest/prefer-comparison-matcher': 'error',
|
|
123
123
|
|
|
124
124
|
// Prefer each rather than manual loops
|
|
125
|
-
// https://github.com/
|
|
125
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-each.md
|
|
126
126
|
'vitest/prefer-each': 'error',
|
|
127
127
|
|
|
128
128
|
// Suggest using the built-in quality matchers
|
|
129
|
-
// https://github.com/
|
|
129
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-equality-matcher.md
|
|
130
130
|
'vitest/prefer-equality-matcher': 'error',
|
|
131
131
|
|
|
132
132
|
// Suggest using expect assertions instead of callbacks
|
|
133
|
-
// https://github.com/
|
|
133
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-assertions.md
|
|
134
134
|
'vitest/prefer-expect-assertions': 'off',
|
|
135
135
|
|
|
136
136
|
// Suggest using expect().resolves over expect(await ...) syntax
|
|
137
|
-
// https://github.com/
|
|
137
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-resolves.md
|
|
138
138
|
'vitest/prefer-expect-resolves': 'error',
|
|
139
139
|
|
|
140
140
|
// Prefer having hooks in consistent order
|
|
141
|
-
// https://github.com/
|
|
141
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-in-order.md
|
|
142
142
|
'vitest/prefer-hooks-in-order': 'error',
|
|
143
143
|
|
|
144
144
|
// Suggest having hooks before any test cases
|
|
145
|
-
// https://github.com/
|
|
145
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md
|
|
146
146
|
'vitest/prefer-hooks-on-top': 'error',
|
|
147
147
|
|
|
148
148
|
// Enforce lowercase titles
|
|
149
|
-
// https://github.com/
|
|
149
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-lowercase-title.md
|
|
150
150
|
'vitest/prefer-lowercase-title': 'off',
|
|
151
151
|
|
|
152
152
|
// Prefer mock resolved/rejected shorthands for promises
|
|
153
|
-
// https://github.com/
|
|
153
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md
|
|
154
154
|
'vitest/prefer-mock-promise-shorthand': 'error',
|
|
155
155
|
|
|
156
156
|
// Prefer including a hint with external snapshots
|
|
157
|
-
// https://github.com/
|
|
157
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md
|
|
158
158
|
'vitest/prefer-snapshot-hint': 'error',
|
|
159
159
|
|
|
160
160
|
// Suggest using vi.spyOn
|
|
161
|
-
// https://github.com/
|
|
161
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-spy-on.md
|
|
162
162
|
'vitest/prefer-spy-on': 'error',
|
|
163
163
|
|
|
164
164
|
// Prefer strict equal over equal
|
|
165
|
-
// https://github.com/
|
|
165
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-equal.md
|
|
166
166
|
'vitest/prefer-strict-equal': 'error',
|
|
167
167
|
|
|
168
168
|
// Suggest using toBe()
|
|
169
|
-
// https://github.com/
|
|
169
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be.md
|
|
170
170
|
'vitest/prefer-to-be': 'error',
|
|
171
171
|
|
|
172
172
|
// Suggest using toBeFalsy()
|
|
173
|
-
// https://github.com/
|
|
173
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-falsy.md
|
|
174
174
|
// decision: not necessary to br prescriptive here
|
|
175
175
|
'vitest/prefer-to-be-falsy': 'off',
|
|
176
176
|
|
|
177
177
|
// Prefer toBeObject()
|
|
178
|
-
// https://github.com/
|
|
178
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-object.md
|
|
179
179
|
'vitest/prefer-to-be-object': 'error',
|
|
180
180
|
|
|
181
181
|
// Suggest using toBeTruthy
|
|
182
|
-
// https://github.com/
|
|
182
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-truthy.md
|
|
183
183
|
// decision: not necessary to br prescriptive here
|
|
184
184
|
'vitest/prefer-to-be-truthy': 'off',
|
|
185
185
|
|
|
186
186
|
// Prefer using toContain()
|
|
187
|
-
// https://github.com/
|
|
187
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-contain.md
|
|
188
188
|
'vitest/prefer-to-contain': 'error',
|
|
189
189
|
|
|
190
190
|
// Suggest using toHaveLength()
|
|
191
|
-
// https://github.com/
|
|
191
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md
|
|
192
192
|
'vitest/prefer-to-have-length': 'error',
|
|
193
193
|
|
|
194
194
|
// Suggest using test.todo
|
|
195
|
-
// https://github.com/
|
|
195
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-todo.md
|
|
196
196
|
'vitest/prefer-todo': 'error',
|
|
197
197
|
|
|
198
198
|
// Require setup and teardown to be within a hook
|
|
199
|
-
// https://github.com/
|
|
199
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
|
|
200
200
|
'vitest/require-hook': 'error',
|
|
201
201
|
|
|
202
202
|
// Require local Test Context for concurrent snapshot tests
|
|
203
|
-
// https://github.com/
|
|
203
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
|
|
204
204
|
'vitest/require-local-test-context-for-concurrent-snapshots': 'error',
|
|
205
205
|
|
|
206
206
|
// Require toThrow() to be called with an error message
|
|
207
|
-
// https://github.com/
|
|
207
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md
|
|
208
208
|
'vitest/require-to-throw-message': 'error',
|
|
209
209
|
|
|
210
210
|
// Enforce that all tests are in a top-level describe
|
|
211
|
-
// https://github.com/
|
|
211
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-top-level-describe.md
|
|
212
212
|
'vitest/require-top-level-describe': 'error',
|
|
213
213
|
|
|
214
214
|
// Enforce valid describe callback
|
|
215
|
-
// https://github.com/
|
|
215
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-describe-callback.md
|
|
216
216
|
'vitest/valid-describe-callback': 'error',
|
|
217
217
|
|
|
218
218
|
// Enforce valid expect() usage
|
|
219
|
-
// https://github.com/
|
|
219
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-expect.md
|
|
220
220
|
'vitest/valid-expect': 'error',
|
|
221
221
|
|
|
222
222
|
// Enforce valid titles
|
|
223
|
-
// https://github.com/
|
|
223
|
+
// https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md
|
|
224
224
|
'vitest/valid-title': 'error',
|
|
225
225
|
};
|