Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit d423e0e

Browse files
committed
Update vitest rules
1 parent aeef243 commit d423e0e

File tree

6 files changed

+28
-26
lines changed

6 files changed

+28
-26
lines changed

src/rules/vitest/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import type { PreferExpectResolvesRule } from './prefer-expect-resolves';
3030
import type { PreferHooksInOrderRule } from './prefer-hooks-in-order';
3131
import type { PreferHooksOnTopRule } from './prefer-hooks-on-top';
3232
import type { PreferLowercaseTitleRule } from './prefer-lowercase-title';
33+
import type { PreferMockPromiseShorthandRule } from './prefer-mock-promise-shorthand';
3334
import type { PreferSnapshotHintRule } from './prefer-snapshot-hint';
3435
import type { PreferSpyOnRule } from './prefer-spy-on';
3536
import type { PreferStrictEqualRule } from './prefer-strict-equal';
@@ -40,7 +41,6 @@ import type { PreferToBeTruthyRule } from './prefer-to-be-truthy';
4041
import type { PreferToContainRule } from './prefer-to-contain';
4142
import type { PreferToHaveLengthRule } from './prefer-to-have-length';
4243
import type { PreferTodoRule } from './prefer-todo';
43-
import type { PreferMockPromiseShorthandRule } from './preferMockPromiseShorthand';
4444
import type { RequireHookRule } from './require-hook';
4545
import type { RequireToThrowMessageRule } from './require-to-throw-message';
4646
import type { RequireTopLevelDescribeRule } from './require-top-level-describe';

src/rules/vitest/no-done-callback.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import type { RuleConfig } from '../rule-config';
22

33
/**
4-
* Disallow using a callback in asynchrounous tests and hooks.
4+
* Disallow using a callback in asynchronous tests and hooks.
55
*
66
* @see [no-done-callback](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-done-callback.md)
77
*/
88
export type NoDoneCallbackRuleConfig = RuleConfig<[]>;
99

1010
/**
11-
* Disallow using a callback in asynchrounous tests and hooks.
11+
* Disallow using a callback in asynchronous tests and hooks.
1212
*
1313
* @see [no-done-callback](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-done-callback.md)
1414
*/
1515
export interface NoDoneCallbackRule {
1616
/**
17-
* Disallow using a callback in asynchrounous tests and hooks.
17+
* Disallow using a callback in asynchronous tests and hooks.
1818
*
1919
* @see [no-done-callback](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-done-callback.md)
2020
*/

src/rules/vitest/prefer-lowercase-title.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export interface PreferLowercaseTitleOption {
77
ignore?: ('describe' | 'test' | 'it')[];
88
allowedPrefixes?: string[];
99
ignoreTopLevelDescribe?: boolean;
10+
lowercaseFirstCharacterOnly?: boolean;
1011
}
1112

1213
/**
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import type { RuleConfig } from '../rule-config';
2+
3+
/**
4+
* Prefer mock resolved/rejected shorthands for promises.
5+
*
6+
* @see [prefer-mock-promise-shorthand](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md)
7+
*/
8+
export type PreferMockPromiseShorthandRuleConfig = RuleConfig<[]>;
9+
10+
/**
11+
* Prefer mock resolved/rejected shorthands for promises.
12+
*
13+
* @see [prefer-mock-promise-shorthand](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md)
14+
*/
15+
export interface PreferMockPromiseShorthandRule {
16+
/**
17+
* Prefer mock resolved/rejected shorthands for promises.
18+
*
19+
* @see [prefer-mock-promise-shorthand](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md)
20+
*/
21+
'vitest/prefer-mock-promise-shorthand': PreferMockPromiseShorthandRuleConfig;
22+
}

src/rules/vitest/preferMockPromiseShorthand.d.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/rules/vitest/valid-title.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { RuleConfig } from '../rule-config';
55
*/
66
export interface ValidTitleOption {
77
ignoreTypeOfDescribeName?: boolean;
8+
allowArguments?: boolean;
89
disallowedWords?: string[];
910
/**
1011
*/

0 commit comments

Comments
 (0)