@egy186/eslint-config 2.2.0 → 2.4.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/README.md +9 -0
- package/dist/base.d.ts +2 -2
- package/dist/base.js +1 -1
- package/dist/browser.d.ts +6 -2
- package/dist/commonjs.d.ts +2 -2
- package/dist/jest.d.ts +1 -1
- package/dist/jest.js +1 -1
- package/dist/vitest.d.ts +285 -0
- package/dist/vitest.js +78 -0
- package/package.json +26 -17
package/README.md
CHANGED
|
@@ -57,3 +57,12 @@ import { jest } from '@egy186/eslint-config/jest';
|
|
|
57
57
|
|
|
58
58
|
export default [base, jest];
|
|
59
59
|
```
|
|
60
|
+
|
|
61
|
+
Vitest:
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
import { base } from '@egy186/eslint-config';
|
|
65
|
+
import { vitest } from '@egy186/eslint-config/vitest';
|
|
66
|
+
|
|
67
|
+
export default [base, vitest];
|
|
68
|
+
```
|
package/dist/base.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import nPlugin from 'eslint-plugin-n';
|
|
|
3
3
|
declare const config: {
|
|
4
4
|
readonly files: ["**/*.{js,jsx,mjs}", "**/*.{ts,tsx,mts}"];
|
|
5
5
|
readonly languageOptions: {
|
|
6
|
-
readonly ecmaVersion:
|
|
6
|
+
readonly ecmaVersion: 2024;
|
|
7
7
|
readonly globals: {
|
|
8
8
|
readonly __dirname: false;
|
|
9
9
|
readonly __filename: false;
|
|
@@ -149,7 +149,7 @@ declare const config: {
|
|
|
149
149
|
readonly '@stylistic': ESLint.Plugin;
|
|
150
150
|
readonly import: ESLint.Plugin;
|
|
151
151
|
readonly jsdoc: ESLint.Plugin & {
|
|
152
|
-
configs: Record
|
|
152
|
+
configs: Record<`flat/${import("eslint-plugin-jsdoc").ConfigGroups}${import("eslint-plugin-jsdoc").ConfigVariants}${import("eslint-plugin-jsdoc").ErrorLevelVariants}`, import("eslint").Linter.Config>;
|
|
153
153
|
};
|
|
154
154
|
readonly n: ESLint.Plugin & {
|
|
155
155
|
configs: nPlugin.Configs;
|
package/dist/base.js
CHANGED
package/dist/browser.d.ts
CHANGED
|
@@ -133,6 +133,7 @@ declare const config: {
|
|
|
133
133
|
readonly CSSKeywordValue: false;
|
|
134
134
|
readonly CSSLayerBlockRule: false;
|
|
135
135
|
readonly CSSLayerStatementRule: false;
|
|
136
|
+
readonly CSSMarginRule: false;
|
|
136
137
|
readonly CSSMathClamp: false;
|
|
137
138
|
readonly CSSMathInvert: false;
|
|
138
139
|
readonly CSSMathMax: false;
|
|
@@ -1098,12 +1099,15 @@ declare const config: {
|
|
|
1098
1099
|
readonly XRDepthInformation: false;
|
|
1099
1100
|
readonly XRDOMOverlayState: false;
|
|
1100
1101
|
readonly XRFrame: false;
|
|
1102
|
+
readonly XRHand: false;
|
|
1101
1103
|
readonly XRHitTestResult: false;
|
|
1102
1104
|
readonly XRHitTestSource: false;
|
|
1103
1105
|
readonly XRInputSource: false;
|
|
1104
1106
|
readonly XRInputSourceArray: false;
|
|
1105
1107
|
readonly XRInputSourceEvent: false;
|
|
1106
1108
|
readonly XRInputSourcesChangeEvent: false;
|
|
1109
|
+
readonly XRJointPose: false;
|
|
1110
|
+
readonly XRJointSpace: false;
|
|
1107
1111
|
readonly XRLayer: false;
|
|
1108
1112
|
readonly XRLightEstimate: false;
|
|
1109
1113
|
readonly XRLightProbe: false;
|
|
@@ -1187,7 +1191,7 @@ declare const config: {
|
|
|
1187
1191
|
readonly WeakRef: false;
|
|
1188
1192
|
readonly WeakSet: false;
|
|
1189
1193
|
};
|
|
1190
|
-
readonly ecmaVersion:
|
|
1194
|
+
readonly ecmaVersion: 2024;
|
|
1191
1195
|
readonly sourceType: "module";
|
|
1192
1196
|
};
|
|
1193
1197
|
readonly rules: {
|
|
@@ -1706,7 +1710,7 @@ declare const config: {
|
|
|
1706
1710
|
readonly '@stylistic': import("eslint").ESLint.Plugin;
|
|
1707
1711
|
readonly import: import("eslint").ESLint.Plugin;
|
|
1708
1712
|
readonly jsdoc: import("eslint").ESLint.Plugin & {
|
|
1709
|
-
configs: Record
|
|
1713
|
+
configs: Record<`flat/${import("eslint-plugin-jsdoc").ConfigGroups}${import("eslint-plugin-jsdoc").ConfigVariants}${import("eslint-plugin-jsdoc").ErrorLevelVariants}`, import("eslint").Linter.Config>;
|
|
1710
1714
|
};
|
|
1711
1715
|
readonly n: import("eslint").ESLint.Plugin & {
|
|
1712
1716
|
configs: import("eslint-plugin-n").Configs;
|
package/dist/commonjs.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ declare const config: {
|
|
|
3
3
|
readonly files: ["**/*.{cjs,cts}"];
|
|
4
4
|
readonly languageOptions: {
|
|
5
5
|
readonly sourceType: "commonjs";
|
|
6
|
-
readonly ecmaVersion:
|
|
6
|
+
readonly ecmaVersion: 2024;
|
|
7
7
|
readonly globals: {
|
|
8
8
|
readonly __dirname: false;
|
|
9
9
|
readonly __filename: false;
|
|
@@ -656,7 +656,7 @@ declare const config: {
|
|
|
656
656
|
readonly '@stylistic': import("eslint").ESLint.Plugin;
|
|
657
657
|
readonly import: import("eslint").ESLint.Plugin;
|
|
658
658
|
readonly jsdoc: import("eslint").ESLint.Plugin & {
|
|
659
|
-
configs: Record
|
|
659
|
+
configs: Record<`flat/${import("eslint-plugin-jsdoc").ConfigGroups}${import("eslint-plugin-jsdoc").ConfigVariants}${import("eslint-plugin-jsdoc").ErrorLevelVariants}`, import("eslint").Linter.Config>;
|
|
660
660
|
};
|
|
661
661
|
readonly n: import("eslint").ESLint.Plugin & {
|
|
662
662
|
configs: import("eslint-plugin-n").Configs;
|
package/dist/jest.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Linter } from 'eslint';
|
|
2
2
|
declare const config: {
|
|
3
|
-
readonly files: ["**/*.{js,jsx,mjs,cjs}", "**/*.{ts,tsx,mts,cts}"];
|
|
3
|
+
readonly files: ["**/*.{spec,test}.{js,jsx,mjs,cjs}", "**/*.{spec,test}.{ts,tsx,mts,cts}"];
|
|
4
4
|
readonly languageOptions: {
|
|
5
5
|
readonly globals: {
|
|
6
6
|
readonly afterAll: false;
|
package/dist/jest.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import globals from 'globals';
|
|
2
2
|
import jest from 'eslint-plugin-jest';
|
|
3
3
|
const config = {
|
|
4
|
-
files: ['**/*.{js,jsx,mjs,cjs}', '**/*.{ts,tsx,mts,cts}'],
|
|
4
|
+
files: ['**/*.{spec,test}.{js,jsx,mjs,cjs}', '**/*.{spec,test}.{ts,tsx,mts,cts}'],
|
|
5
5
|
languageOptions: {
|
|
6
6
|
globals: {
|
|
7
7
|
...globals.jest
|
package/dist/vitest.d.ts
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
declare const config: {
|
|
2
|
+
readonly files: ["**/*.{spec,test}.{js,jsx,mjs,cjs}", "**/*.{spec,test}.{ts,tsx,mts,cts}"];
|
|
3
|
+
readonly plugins: {
|
|
4
|
+
readonly vitest: {
|
|
5
|
+
meta: {
|
|
6
|
+
name: string;
|
|
7
|
+
version: string;
|
|
8
|
+
};
|
|
9
|
+
rules: {
|
|
10
|
+
"prefer-lowercase-title": import("eslint").Rule.RuleModule;
|
|
11
|
+
"max-nested-describe": import("eslint").Rule.RuleModule;
|
|
12
|
+
"no-identical-title": import("eslint").Rule.RuleModule;
|
|
13
|
+
"no-focused-tests": import("eslint").Rule.RuleModule;
|
|
14
|
+
"no-conditional-tests": import("eslint").Rule.RuleModule;
|
|
15
|
+
"expect-expect": import("eslint").Rule.RuleModule;
|
|
16
|
+
"consistent-test-it": import("eslint").Rule.RuleModule;
|
|
17
|
+
"prefer-to-be": import("eslint").Rule.RuleModule;
|
|
18
|
+
"no-hooks": import("eslint").Rule.RuleModule;
|
|
19
|
+
"no-restricted-vi-methods": import("eslint").Rule.RuleModule;
|
|
20
|
+
"consistent-test-filename": import("eslint").Rule.RuleModule;
|
|
21
|
+
"max-expects": import("eslint").Rule.RuleModule;
|
|
22
|
+
"no-alias-methods": import("eslint").Rule.RuleModule;
|
|
23
|
+
"no-commented-out-tests": import("eslint").Rule.RuleModule;
|
|
24
|
+
"no-conditional-expect": import("eslint").Rule.RuleModule;
|
|
25
|
+
"no-conditional-in-test": import("eslint").Rule.RuleModule;
|
|
26
|
+
"no-disabled-tests": import("eslint").Rule.RuleModule;
|
|
27
|
+
"no-done-callback": import("eslint").Rule.RuleModule;
|
|
28
|
+
"no-duplicate-hooks": import("eslint").Rule.RuleModule;
|
|
29
|
+
"no-large-snapshots": import("eslint").Rule.RuleModule;
|
|
30
|
+
"no-interpolation-in-snapshots": import("eslint").Rule.RuleModule;
|
|
31
|
+
"no-mocks-import": import("eslint").Rule.RuleModule;
|
|
32
|
+
"no-restricted-matchers": import("eslint").Rule.RuleModule;
|
|
33
|
+
"no-standalone-expect": import("eslint").Rule.RuleModule;
|
|
34
|
+
"no-test-prefixes": import("eslint").Rule.RuleModule;
|
|
35
|
+
"no-test-return-statement": import("eslint").Rule.RuleModule;
|
|
36
|
+
"no-import-node-test": import("eslint").Rule.RuleModule;
|
|
37
|
+
"prefer-called-with": import("eslint").Rule.RuleModule;
|
|
38
|
+
"valid-title": import("eslint").Rule.RuleModule;
|
|
39
|
+
"valid-expect": import("eslint").Rule.RuleModule;
|
|
40
|
+
"prefer-to-be-falsy": import("eslint").Rule.RuleModule;
|
|
41
|
+
"prefer-to-be-object": import("eslint").Rule.RuleModule;
|
|
42
|
+
"prefer-to-be-truthy": import("eslint").Rule.RuleModule;
|
|
43
|
+
"prefer-to-have-length": import("eslint").Rule.RuleModule;
|
|
44
|
+
"prefer-equality-matcher": import("eslint").Rule.RuleModule;
|
|
45
|
+
"prefer-strict-equal": import("eslint").Rule.RuleModule;
|
|
46
|
+
"prefer-expect-resolves": import("eslint").Rule.RuleModule;
|
|
47
|
+
"prefer-each": import("eslint").Rule.RuleModule;
|
|
48
|
+
"prefer-hooks-on-top": import("eslint").Rule.RuleModule;
|
|
49
|
+
"prefer-hooks-in-order": import("eslint").Rule.RuleModule;
|
|
50
|
+
"require-local-test-context-for-concurrent-snapshots": import("eslint").Rule.RuleModule;
|
|
51
|
+
"prefer-mock-promise-shorthand": import("eslint").Rule.RuleModule;
|
|
52
|
+
"prefer-vi-mocked": import("eslint").Rule.RuleModule;
|
|
53
|
+
"prefer-snapshot-hint": import("eslint").Rule.RuleModule;
|
|
54
|
+
"valid-describe-callback": import("eslint").Rule.RuleModule;
|
|
55
|
+
"require-top-level-describe": import("eslint").Rule.RuleModule;
|
|
56
|
+
"require-to-throw-message": import("eslint").Rule.RuleModule;
|
|
57
|
+
"require-hook": import("eslint").Rule.RuleModule;
|
|
58
|
+
"prefer-todo": import("eslint").Rule.RuleModule;
|
|
59
|
+
"prefer-spy-on": import("eslint").Rule.RuleModule;
|
|
60
|
+
"prefer-comparison-matcher": import("eslint").Rule.RuleModule;
|
|
61
|
+
"prefer-to-contain": import("eslint").Rule.RuleModule;
|
|
62
|
+
"prefer-expect-assertions": import("eslint").Rule.RuleModule;
|
|
63
|
+
"padding-around-after-all-blocks": import("eslint").Rule.RuleModule;
|
|
64
|
+
"padding-around-after-each-blocks": import("eslint").Rule.RuleModule;
|
|
65
|
+
"padding-around-all": import("eslint").Rule.RuleModule;
|
|
66
|
+
"padding-around-before-all-blocks": import("eslint").Rule.RuleModule;
|
|
67
|
+
"padding-around-before-each-blocks": import("eslint").Rule.RuleModule;
|
|
68
|
+
"padding-around-describe-blocks": import("eslint").Rule.RuleModule;
|
|
69
|
+
"padding-around-expect-groups": import("eslint").Rule.RuleModule;
|
|
70
|
+
"padding-around-test-blocks": import("eslint").Rule.RuleModule;
|
|
71
|
+
"valid-expect-in-promise": import("eslint").Rule.RuleModule;
|
|
72
|
+
};
|
|
73
|
+
environments: {
|
|
74
|
+
env: {
|
|
75
|
+
globals: {
|
|
76
|
+
suite: true;
|
|
77
|
+
test: true;
|
|
78
|
+
describe: true;
|
|
79
|
+
it: true;
|
|
80
|
+
expectTypeOf: true;
|
|
81
|
+
assertType: true;
|
|
82
|
+
expect: true;
|
|
83
|
+
assert: true;
|
|
84
|
+
vitest: true;
|
|
85
|
+
vi: true;
|
|
86
|
+
beforeAll: true;
|
|
87
|
+
afterAll: true;
|
|
88
|
+
beforeEach: true;
|
|
89
|
+
afterEach: true;
|
|
90
|
+
onTestFailed: true;
|
|
91
|
+
onTestFinished: true;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
configs: {
|
|
96
|
+
"legacy-recommended": {
|
|
97
|
+
plugins: string[];
|
|
98
|
+
rules: {};
|
|
99
|
+
};
|
|
100
|
+
"legacy-all": {
|
|
101
|
+
plugins: string[];
|
|
102
|
+
rules: {};
|
|
103
|
+
};
|
|
104
|
+
recommended: {
|
|
105
|
+
plugins: {
|
|
106
|
+
readonly vitest: import("eslint").ESLint.Plugin;
|
|
107
|
+
};
|
|
108
|
+
rules: {
|
|
109
|
+
readonly "vitest/expect-expect": "error";
|
|
110
|
+
readonly "vitest/no-identical-title": "error";
|
|
111
|
+
readonly "vitest/no-commented-out-tests": "error";
|
|
112
|
+
readonly "vitest/valid-title": "error";
|
|
113
|
+
readonly "vitest/valid-expect": "error";
|
|
114
|
+
readonly "vitest/valid-describe-callback": "error";
|
|
115
|
+
readonly "vitest/require-local-test-context-for-concurrent-snapshots": "error";
|
|
116
|
+
readonly "vitest/no-import-node-test": "error";
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
all: {
|
|
120
|
+
plugins: {
|
|
121
|
+
readonly vitest: import("eslint").ESLint.Plugin;
|
|
122
|
+
};
|
|
123
|
+
rules: {
|
|
124
|
+
readonly "vitest/prefer-lowercase-title": "warn";
|
|
125
|
+
readonly "vitest/max-nested-describe": "warn";
|
|
126
|
+
readonly "vitest/no-focused-tests": "warn";
|
|
127
|
+
readonly "vitest/no-conditional-tests": "warn";
|
|
128
|
+
readonly "vitest/consistent-test-it": "warn";
|
|
129
|
+
readonly "vitest/no-hooks": "warn";
|
|
130
|
+
readonly "vitest/no-restricted-vi-methods": "warn";
|
|
131
|
+
readonly "vitest/consistent-test-filename": "warn";
|
|
132
|
+
readonly "vitest/max-expects": "warn";
|
|
133
|
+
readonly "vitest/no-alias-methods": "warn";
|
|
134
|
+
readonly "vitest/no-conditional-expect": "warn";
|
|
135
|
+
readonly "vitest/no-conditional-in-test": "warn";
|
|
136
|
+
readonly "vitest/no-disabled-tests": "warn";
|
|
137
|
+
readonly "vitest/no-done-callback": "warn";
|
|
138
|
+
readonly "vitest/no-duplicate-hooks": "warn";
|
|
139
|
+
readonly "vitest/no-large-snapshots": "warn";
|
|
140
|
+
readonly "vitest/no-interpolation-in-snapshots": "warn";
|
|
141
|
+
readonly "vitest/no-mocks-import": "warn";
|
|
142
|
+
readonly "vitest/no-restricted-matchers": "warn";
|
|
143
|
+
readonly "vitest/no-standalone-expect": "warn";
|
|
144
|
+
readonly "vitest/no-test-prefixes": "warn";
|
|
145
|
+
readonly "vitest/no-test-return-statement": "warn";
|
|
146
|
+
readonly "vitest/prefer-called-with": "warn";
|
|
147
|
+
readonly "vitest/prefer-to-be-falsy": "warn";
|
|
148
|
+
readonly "vitest/prefer-to-be-object": "warn";
|
|
149
|
+
readonly "vitest/prefer-to-be-truthy": "warn";
|
|
150
|
+
readonly "vitest/prefer-to-have-length": "warn";
|
|
151
|
+
readonly "vitest/prefer-equality-matcher": "warn";
|
|
152
|
+
readonly "vitest/prefer-strict-equal": "warn";
|
|
153
|
+
readonly "vitest/prefer-expect-resolves": "warn";
|
|
154
|
+
readonly "vitest/prefer-each": "warn";
|
|
155
|
+
readonly "vitest/prefer-hooks-on-top": "warn";
|
|
156
|
+
readonly "vitest/prefer-hooks-in-order": "warn";
|
|
157
|
+
readonly "vitest/prefer-mock-promise-shorthand": "warn";
|
|
158
|
+
readonly "vitest/prefer-vi-mocked": "warn";
|
|
159
|
+
readonly "vitest/prefer-snapshot-hint": "warn";
|
|
160
|
+
readonly "vitest/require-top-level-describe": "warn";
|
|
161
|
+
readonly "vitest/require-to-throw-message": "warn";
|
|
162
|
+
readonly "vitest/require-hook": "warn";
|
|
163
|
+
readonly "vitest/prefer-todo": "warn";
|
|
164
|
+
readonly "vitest/prefer-spy-on": "warn";
|
|
165
|
+
readonly "vitest/prefer-comparison-matcher": "warn";
|
|
166
|
+
readonly "vitest/prefer-to-contain": "warn";
|
|
167
|
+
readonly "vitest/prefer-expect-assertions": "warn";
|
|
168
|
+
readonly "vitest/prefer-to-be": "warn";
|
|
169
|
+
readonly "vitest/padding-around-after-all-blocks": "warn";
|
|
170
|
+
readonly "vitest/padding-around-after-each-blocks": "warn";
|
|
171
|
+
readonly "vitest/padding-around-all": "warn";
|
|
172
|
+
readonly "vitest/padding-around-before-all-blocks": "warn";
|
|
173
|
+
readonly "vitest/padding-around-before-each-blocks": "warn";
|
|
174
|
+
readonly "vitest/padding-around-describe-blocks": "warn";
|
|
175
|
+
readonly "vitest/padding-around-expect-groups": "warn";
|
|
176
|
+
readonly "vitest/padding-around-test-blocks": "warn";
|
|
177
|
+
readonly "vitest/valid-expect-in-promise": "warn";
|
|
178
|
+
readonly "vitest/expect-expect": "warn";
|
|
179
|
+
readonly "vitest/no-identical-title": "warn";
|
|
180
|
+
readonly "vitest/no-commented-out-tests": "warn";
|
|
181
|
+
readonly "vitest/valid-title": "warn";
|
|
182
|
+
readonly "vitest/valid-expect": "warn";
|
|
183
|
+
readonly "vitest/valid-describe-callback": "warn";
|
|
184
|
+
readonly "vitest/require-local-test-context-for-concurrent-snapshots": "warn";
|
|
185
|
+
readonly "vitest/no-import-node-test": "warn";
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
env: {
|
|
189
|
+
languageOptions: {
|
|
190
|
+
globals: {
|
|
191
|
+
suite: "writable";
|
|
192
|
+
test: "writable";
|
|
193
|
+
describe: "writable";
|
|
194
|
+
it: "writable";
|
|
195
|
+
expectTypeOf: "writable";
|
|
196
|
+
assertType: "writable";
|
|
197
|
+
expect: "writable";
|
|
198
|
+
assert: "writable";
|
|
199
|
+
vitest: "writable";
|
|
200
|
+
vi: "writable";
|
|
201
|
+
beforeAll: "writable";
|
|
202
|
+
afterAll: "writable";
|
|
203
|
+
beforeEach: "writable";
|
|
204
|
+
afterEach: "writable";
|
|
205
|
+
onTestFailed: "writable";
|
|
206
|
+
onTestFinished: "writable";
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
readonly rules: {
|
|
214
|
+
readonly 'max-lines-per-function': "off";
|
|
215
|
+
readonly 'max-statements': "off";
|
|
216
|
+
readonly 'n/no-unpublished-import': ["error", {
|
|
217
|
+
readonly allowModules: readonly ["vitest"];
|
|
218
|
+
}];
|
|
219
|
+
readonly 'vitest/consistent-test-filename': "error";
|
|
220
|
+
readonly 'vitest/consistent-test-it': "error";
|
|
221
|
+
readonly 'vitest/expect-expect': "error";
|
|
222
|
+
readonly 'vitest/max-expects': "error";
|
|
223
|
+
readonly 'vitest/max-nested-describe': "error";
|
|
224
|
+
readonly 'vitest/no-alias-methods': "error";
|
|
225
|
+
readonly 'vitest/no-commented-out-tests': "error";
|
|
226
|
+
readonly 'vitest/no-conditional-expect': "error";
|
|
227
|
+
readonly 'vitest/no-conditional-in-test': "error";
|
|
228
|
+
readonly 'vitest/no-conditional-tests': "error";
|
|
229
|
+
readonly 'vitest/no-disabled-tests': "error";
|
|
230
|
+
readonly 'vitest/no-duplicate-hooks': "error";
|
|
231
|
+
readonly 'vitest/no-focused-tests': "error";
|
|
232
|
+
readonly 'vitest/no-hooks': "off";
|
|
233
|
+
readonly 'vitest/no-identical-title': "error";
|
|
234
|
+
readonly 'vitest/no-import-node-test': "error";
|
|
235
|
+
readonly 'vitest/no-interpolation-in-snapshots': "error";
|
|
236
|
+
readonly 'vitest/no-large-snapshots': "error";
|
|
237
|
+
readonly 'vitest/no-mocks-import': "error";
|
|
238
|
+
readonly 'vitest/no-restricted-matchers': "error";
|
|
239
|
+
readonly 'vitest/no-restricted-vi-methods': "error";
|
|
240
|
+
readonly 'vitest/no-standalone-expect': "error";
|
|
241
|
+
readonly 'vitest/no-test-prefixes': "error";
|
|
242
|
+
readonly 'vitest/no-test-return-statement': "error";
|
|
243
|
+
readonly 'vitest/padding-around-after-all-blocks': "error";
|
|
244
|
+
readonly 'vitest/padding-around-after-each-blocks': "error";
|
|
245
|
+
readonly 'vitest/padding-around-all': "error";
|
|
246
|
+
readonly 'vitest/padding-around-before-all-blocks': "error";
|
|
247
|
+
readonly 'vitest/padding-around-before-each-blocks': "error";
|
|
248
|
+
readonly 'vitest/padding-around-describe-blocks': "error";
|
|
249
|
+
readonly 'vitest/padding-around-expect-groups': "error";
|
|
250
|
+
readonly 'vitest/padding-around-test-blocks': "error";
|
|
251
|
+
readonly 'vitest/prefer-called-with': "error";
|
|
252
|
+
readonly 'vitest/prefer-comparison-matcher': "error";
|
|
253
|
+
readonly 'vitest/prefer-each': "error";
|
|
254
|
+
readonly 'vitest/prefer-equality-matcher': "error";
|
|
255
|
+
readonly 'vitest/prefer-expect-assertions': ["error", {
|
|
256
|
+
readonly onlyFunctionsWithAsyncKeyword: true;
|
|
257
|
+
}];
|
|
258
|
+
readonly 'vitest/prefer-expect-resolves': "error";
|
|
259
|
+
readonly 'vitest/prefer-hooks-in-order': "error";
|
|
260
|
+
readonly 'vitest/prefer-hooks-on-top': "error";
|
|
261
|
+
readonly 'vitest/prefer-lowercase-title': "error";
|
|
262
|
+
readonly 'vitest/prefer-mock-promise-shorthand': "error";
|
|
263
|
+
readonly 'vitest/prefer-snapshot-hint': "error";
|
|
264
|
+
readonly 'vitest/prefer-spy-on': "error";
|
|
265
|
+
readonly 'vitest/prefer-strict-equal': "error";
|
|
266
|
+
readonly 'vitest/prefer-to-be': "error";
|
|
267
|
+
readonly 'vitest/prefer-to-be-falsy': "off";
|
|
268
|
+
readonly 'vitest/prefer-to-be-object': "error";
|
|
269
|
+
readonly 'vitest/prefer-to-be-truthy': "off";
|
|
270
|
+
readonly 'vitest/prefer-to-contain': "error";
|
|
271
|
+
readonly 'vitest/prefer-to-have-length': "error";
|
|
272
|
+
readonly 'vitest/prefer-todo': "error";
|
|
273
|
+
readonly 'vitest/prefer-vi-mocked': "error";
|
|
274
|
+
readonly 'vitest/require-hook': "error";
|
|
275
|
+
readonly 'vitest/require-local-test-context-for-concurrent-snapshots': "error";
|
|
276
|
+
readonly 'vitest/require-to-throw-message': "error";
|
|
277
|
+
readonly 'vitest/require-top-level-describe': "error";
|
|
278
|
+
readonly 'vitest/valid-describe-callback': "error";
|
|
279
|
+
readonly 'vitest/valid-expect': "error";
|
|
280
|
+
readonly 'vitest/valid-expect-in-promise': "error";
|
|
281
|
+
readonly 'vitest/valid-title': "error";
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
export { config as vitest };
|
|
285
|
+
export default config;
|
package/dist/vitest.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import vitest from '@vitest/eslint-plugin';
|
|
2
|
+
const config = {
|
|
3
|
+
files: ['**/*.{spec,test}.{js,jsx,mjs,cjs}', '**/*.{spec,test}.{ts,tsx,mts,cts}'],
|
|
4
|
+
plugins: { vitest },
|
|
5
|
+
rules: {
|
|
6
|
+
'max-lines-per-function': 'off',
|
|
7
|
+
'max-statements': 'off',
|
|
8
|
+
'n/no-unpublished-import': [
|
|
9
|
+
'error',
|
|
10
|
+
{
|
|
11
|
+
allowModules: ['vitest']
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
'vitest/consistent-test-filename': 'error',
|
|
15
|
+
'vitest/consistent-test-it': 'error',
|
|
16
|
+
'vitest/expect-expect': 'error',
|
|
17
|
+
'vitest/max-expects': 'error',
|
|
18
|
+
'vitest/max-nested-describe': 'error',
|
|
19
|
+
'vitest/no-alias-methods': 'error',
|
|
20
|
+
'vitest/no-commented-out-tests': 'error',
|
|
21
|
+
'vitest/no-conditional-expect': 'error',
|
|
22
|
+
'vitest/no-conditional-in-test': 'error',
|
|
23
|
+
'vitest/no-conditional-tests': 'error',
|
|
24
|
+
'vitest/no-disabled-tests': 'error',
|
|
25
|
+
'vitest/no-duplicate-hooks': 'error',
|
|
26
|
+
'vitest/no-focused-tests': 'error',
|
|
27
|
+
'vitest/no-hooks': 'off',
|
|
28
|
+
'vitest/no-identical-title': 'error',
|
|
29
|
+
'vitest/no-import-node-test': 'error',
|
|
30
|
+
'vitest/no-interpolation-in-snapshots': 'error',
|
|
31
|
+
'vitest/no-large-snapshots': 'error',
|
|
32
|
+
'vitest/no-mocks-import': 'error',
|
|
33
|
+
'vitest/no-restricted-matchers': 'error',
|
|
34
|
+
'vitest/no-restricted-vi-methods': 'error',
|
|
35
|
+
'vitest/no-standalone-expect': 'error',
|
|
36
|
+
'vitest/no-test-prefixes': 'error',
|
|
37
|
+
'vitest/no-test-return-statement': 'error',
|
|
38
|
+
'vitest/padding-around-after-all-blocks': 'error',
|
|
39
|
+
'vitest/padding-around-after-each-blocks': 'error',
|
|
40
|
+
'vitest/padding-around-all': 'error',
|
|
41
|
+
'vitest/padding-around-before-all-blocks': 'error',
|
|
42
|
+
'vitest/padding-around-before-each-blocks': 'error',
|
|
43
|
+
'vitest/padding-around-describe-blocks': 'error',
|
|
44
|
+
'vitest/padding-around-expect-groups': 'error',
|
|
45
|
+
'vitest/padding-around-test-blocks': 'error',
|
|
46
|
+
'vitest/prefer-called-with': 'error',
|
|
47
|
+
'vitest/prefer-comparison-matcher': 'error',
|
|
48
|
+
'vitest/prefer-each': 'error',
|
|
49
|
+
'vitest/prefer-equality-matcher': 'error',
|
|
50
|
+
'vitest/prefer-expect-assertions': ['error', { onlyFunctionsWithAsyncKeyword: true }],
|
|
51
|
+
'vitest/prefer-expect-resolves': 'error',
|
|
52
|
+
'vitest/prefer-hooks-in-order': 'error',
|
|
53
|
+
'vitest/prefer-hooks-on-top': 'error',
|
|
54
|
+
'vitest/prefer-lowercase-title': 'error',
|
|
55
|
+
'vitest/prefer-mock-promise-shorthand': 'error',
|
|
56
|
+
'vitest/prefer-snapshot-hint': 'error',
|
|
57
|
+
'vitest/prefer-spy-on': 'error',
|
|
58
|
+
'vitest/prefer-strict-equal': 'error',
|
|
59
|
+
'vitest/prefer-to-be': 'error',
|
|
60
|
+
'vitest/prefer-to-be-falsy': 'off',
|
|
61
|
+
'vitest/prefer-to-be-object': 'error',
|
|
62
|
+
'vitest/prefer-to-be-truthy': 'off',
|
|
63
|
+
'vitest/prefer-to-contain': 'error',
|
|
64
|
+
'vitest/prefer-to-have-length': 'error',
|
|
65
|
+
'vitest/prefer-todo': 'error',
|
|
66
|
+
'vitest/prefer-vi-mocked': 'error',
|
|
67
|
+
'vitest/require-hook': 'error',
|
|
68
|
+
'vitest/require-local-test-context-for-concurrent-snapshots': 'error',
|
|
69
|
+
'vitest/require-to-throw-message': 'error',
|
|
70
|
+
'vitest/require-top-level-describe': 'error',
|
|
71
|
+
'vitest/valid-describe-callback': 'error',
|
|
72
|
+
'vitest/valid-expect': 'error',
|
|
73
|
+
'vitest/valid-expect-in-promise': 'error',
|
|
74
|
+
'vitest/valid-title': 'error'
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
export { config as vitest };
|
|
78
|
+
export default config;
|
package/package.json
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egy186/eslint-config",
|
|
3
3
|
"description": "Eslint shareable config",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"author": "egy186",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/egy186/eslint-config/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@stylistic/eslint-plugin": "~2.
|
|
10
|
+
"@stylistic/eslint-plugin": "~2.12.1",
|
|
11
11
|
"eslint-plugin-import": "~2.31.0",
|
|
12
|
-
"eslint-plugin-jsdoc": "~50.
|
|
13
|
-
"eslint-plugin-n": "~17.
|
|
14
|
-
"globals": "^15.
|
|
12
|
+
"eslint-plugin-jsdoc": "~50.6.1",
|
|
13
|
+
"eslint-plugin-n": "~17.15.1",
|
|
14
|
+
"globals": "^15.14.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@eslint-stylistic/metadata": "~2.
|
|
18
|
-
"@eslint/js": "~9.
|
|
19
|
-
"@types/node": "^22.
|
|
20
|
-
"eslint": "~
|
|
21
|
-
"eslint
|
|
22
|
-
"eslint-
|
|
23
|
-
"eslint-plugin-
|
|
24
|
-
"eslint-plugin-react
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"typescript
|
|
17
|
+
"@eslint-stylistic/metadata": "~2.12.1",
|
|
18
|
+
"@eslint/js": "~9.17.0",
|
|
19
|
+
"@types/node": "^22.10.5",
|
|
20
|
+
"@vitest/eslint-plugin": "~1.1.24",
|
|
21
|
+
"eslint": "~9.17.0",
|
|
22
|
+
"eslint-import-resolver-typescript": "~3.7.0",
|
|
23
|
+
"eslint-plugin-jest": "~28.10.0",
|
|
24
|
+
"eslint-plugin-react": "~7.37.3",
|
|
25
|
+
"eslint-plugin-react-hooks": "~5.1.0",
|
|
26
|
+
"husky": "^9.1.7",
|
|
27
|
+
"jiti": "^2.4.2",
|
|
28
|
+
"typescript": "~5.7.2",
|
|
29
|
+
"typescript-eslint": "~8.19.1"
|
|
29
30
|
},
|
|
30
31
|
"engines": {
|
|
31
32
|
"node": ">=18.18.0"
|
|
@@ -46,6 +47,10 @@
|
|
|
46
47
|
"./typescript": {
|
|
47
48
|
"types": "./dist/typescript.d.ts",
|
|
48
49
|
"default": "./dist/typescript.js"
|
|
50
|
+
},
|
|
51
|
+
"./vitest": {
|
|
52
|
+
"types": "./dist/vitest.d.ts",
|
|
53
|
+
"default": "./dist/vitest.js"
|
|
49
54
|
}
|
|
50
55
|
},
|
|
51
56
|
"files": [
|
|
@@ -59,6 +64,7 @@
|
|
|
59
64
|
"license": "MIT",
|
|
60
65
|
"main": "./dist/index.js",
|
|
61
66
|
"peerDependencies": {
|
|
67
|
+
"@vitest/eslint-plugin": "^1.1.10",
|
|
62
68
|
"eslint": "^9.11.1",
|
|
63
69
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
64
70
|
"eslint-plugin-jest": "^28.8.3",
|
|
@@ -68,6 +74,9 @@
|
|
|
68
74
|
"typescript-eslint": "^8.15.0"
|
|
69
75
|
},
|
|
70
76
|
"peerDependenciesMeta": {
|
|
77
|
+
"@vitest/eslint-plugin": {
|
|
78
|
+
"optional": true
|
|
79
|
+
},
|
|
71
80
|
"@eslint/compat": {
|
|
72
81
|
"optional": true
|
|
73
82
|
},
|