Skip to content

Commit 94eb73b

Browse files
chore(deps): update eslint packages (#9615)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
1 parent 3fe55ce commit 94eb73b

35 files changed

Lines changed: 481 additions & 492 deletions

.github/commit-convention.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).
44
5-
#### TL;DR:
5+
### TL;DR:
66

77
Messages must be matched by the following regex:
88

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Vitest
2020
Next generation testing framework powered by Vite.
2121
<p>
2222
<p align="center">
23-
<a href="https://npmx.dev/package/vitest"><img src="https://img.shields.io/npm/v/vitest?color=729B1B&label="></a>
23+
<a href="https://npmx.dev/package/vitest"><img src="https://img.shields.io/npm/v/vitest?color=729B1B&label=" alt="current vitest version badge"></a>
2424
<p>
2525

2626
<p align="center">
@@ -89,31 +89,31 @@ $ npx vitest
8989

9090
<p align="center">
9191
<a href="https://cdn.jsdelivr.net/gh/sheremet-va/static/vitest/sponsors.svg">
92-
<img src='https://cdn.jsdelivr.net/gh/sheremet-va/static/vitest/sponsors.svg'/>
92+
<img src='https://cdn.jsdelivr.net/gh/sheremet-va/static/vitest/sponsors.svg' alt="vitest's sponsors"/>
9393
</a>
9494
</p>
9595

9696
### Vladimir Sponsors
9797

9898
<p align="center">
9999
<a href="https://cdn.jsdelivr.net/gh/sheremet-va/static/sponsors.svg">
100-
<img src='https://cdn.jsdelivr.net/gh/sheremet-va/static/sponsors.svg'/>
100+
<img src='https://cdn.jsdelivr.net/gh/sheremet-va/static/sponsors.svg' alt="vladimir's sponsors"/>
101101
</a>
102102
</p>
103103

104104
### Anthony Fu Sponsors
105105

106106
<p align="center">
107107
<a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
108-
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>
108+
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg' alt="anthony's sponsors"/>
109109
</a>
110110
</p>
111111

112112
### Patak Sponsors
113113

114114
<p align="center">
115115
<a href="https://cdn.jsdelivr.net/gh/patak-dev/static/sponsors.svg">
116-
<img src='https://cdn.jsdelivr.net/gh/patak-dev/static/sponsors.svg'/>
116+
<img src='https://cdn.jsdelivr.net/gh/patak-dev/static/sponsors.svg' alt="patak's sponsors"/>
117117
</a>
118118
</p>
119119

docs/api/advanced/test-project.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default defineConfig({
5151
:::
5252

5353
::: info
54-
If the [root project](/api/advanced/vitest#getroottestproject) is not part of user projects, its `name` will not be resolved.
54+
If the [root project](/api/advanced/vitest#getrootproject) is not part of user projects, its `name` will not be resolved.
5555
:::
5656

5757
## vitest
@@ -78,7 +78,7 @@ project.serializedConfig === project.serializedConfig // ❌
7878

7979
## globalConfig
8080

81-
The test config that [`Vitest`](/api/advanced/vitest) was initialized with. If this is the [root project](/api/advanced/vitest#getroottestproject), `globalConfig` and `config` will reference the same object. This config is useful for values that cannot be set on the project level, like `coverage` or `reporters`.
81+
The test config that [`Vitest`](/api/advanced/vitest) was initialized with. If this is the [root project](/api/advanced/vitest#getrootproject), `globalConfig` and `config` will reference the same object. This config is useful for values that cannot be set on the project level, like `coverage` or `reporters`.
8282

8383
```ts
8484
import type { ResolvedConfig } from 'vitest/node'
@@ -206,7 +206,7 @@ Also note that `project.createSpecification` always returns a new instance.
206206
function isRootProject(): boolean
207207
```
208208

209-
Checks if the current project is the root project. You can also get the root project by calling [`vitest.getRootProject()`](#getrootproject).
209+
Checks if the current project is the root project. You can also get the root project by calling [`vitest.getRootProject()`](/api/advanced/vitest#getrootproject).
210210

211211
## globTestFiles
212212

docs/api/browser/locators.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ By default, many semantic elements in HTML have a role; for example, `<input typ
6565
Providing roles via `role` or `aria-*` attributes to built-in elements that already have an implicit role is **highly discouraged** by ARIA guidelines.
6666
:::
6767

68-
##### Options
68+
**Options**
6969

7070
- `exact: boolean`
7171

@@ -189,7 +189,7 @@ Providing roles via `role` or `aria-*` attributes to built-in elements that alre
189189
page.getByRole('button', { selected: false }) // ❌
190190
```
191191

192-
##### See also
192+
**See also**
193193

194194
- [List of ARIA roles at MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles)
195195
- [List of ARIA roles at w3.org](https://www.w3.org/TR/wai-aria-1.2/#role_definitions)
@@ -213,13 +213,13 @@ page.getByAltText(/incredibles.*? poster/i) // ✅
213213
page.getByAltText('non existing alt text') // ❌
214214
```
215215

216-
#### Options
216+
**Options**
217217

218218
- `exact: boolean`
219219

220220
Whether the `text` is matched exactly: case-sensitive and whole-string. Disabled by default. This option is ignored if `text` is a regular expression. Note that exact match still trims whitespace.
221221

222-
#### See also
222+
**See also**
223223

224224
- [testing-library's `ByAltText`](https://testing-library.com/docs/queries/byalttext/)
225225

@@ -260,13 +260,13 @@ The `page.getByLabelText('Username')` locator will find every input in the examp
260260
<input aria-label="Username" />
261261
```
262262

263-
#### Options
263+
**Options**
264264

265265
- `exact: boolean`
266266

267267
Whether the `text` is matched exactly: case-sensitive and whole-string. Disabled by default. This option is ignored if `text` is a regular expression. Note that exact match still trims whitespace.
268268

269-
#### See also
269+
**See also**
270270

271271
- [testing-library's `ByLabelText`](https://testing-library.com/docs/queries/bylabeltext/)
272272

@@ -292,13 +292,13 @@ page.getByPlaceholder('not found') // ❌
292292
It is generally better to rely on a label using [`getByLabelText`](#getbylabeltext) than a placeholder.
293293
:::
294294

295-
#### Options
295+
**Options**
296296

297297
- `exact: boolean`
298298

299299
Whether the `text` is matched exactly: case-sensitive and whole-string. Disabled by default. This option is ignored if `text` is a regular expression. Note that exact match still trims whitespace.
300300

301-
#### See also
301+
**See also**
302302

303303
- [testing-library's `ByPlaceholderText`](https://testing-library.com/docs/queries/byplaceholdertext/)
304304

@@ -324,13 +324,13 @@ page.getByText('about', { exact: true }) // ❌
324324
This locator is useful for locating non-interactive elements. If you need to locate an interactive element, like a button or an input, prefer [`getByRole`](#getbyrole).
325325
:::
326326

327-
#### Options
327+
**Options**
328328

329329
- `exact: boolean`
330330

331331
Whether the `text` is matched exactly: case-sensitive and whole-string. Disabled by default. This option is ignored if `text` is a regular expression. Note that exact match still trims whitespace.
332332

333-
#### See also
333+
**See also**
334334

335335
- [testing-library's `ByText`](https://testing-library.com/docs/queries/bytext/)
336336

@@ -352,13 +352,13 @@ page.getByTitle('Delete') // ✅
352352
page.getByTitle('Create') // ❌
353353
```
354354

355-
#### Options
355+
**Options**
356356

357357
- `exact: boolean`
358358

359359
Whether the `text` is matched exactly: case-sensitive and whole-string. Disabled by default. This option is ignored if `text` is a regular expression. Note that exact match still trims whitespace.
360360

361-
#### See also
361+
**See also**
362362

363363
- [testing-library's `ByTitle`](https://testing-library.com/docs/queries/bytitle/)
364364

@@ -381,13 +381,13 @@ page.getByTestId('non-existing-element') // ❌
381381
It is recommended to use this only after the other locators don't work for your use case. Using `data-testid` attributes does not resemble how your software is used and should be avoided if possible.
382382
:::
383383

384-
#### Options
384+
**Options**
385385

386386
- `exact: boolean`
387387

388388
Whether the `text` is matched exactly: case-sensitive and whole-string. Disabled by default. This option is ignored if `text` is a regular expression. Note that exact match still trims whitespace.
389389

390-
#### See also
390+
**See also**
391391

392392
- [testing-library's `ByTestId`](https://testing-library.com/docs/queries/bytestid/)
393393

docs/api/expect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The following types are used in the type signatures below
66
type Awaitable<T> = T | PromiseLike<T>
77
```
88
9-
`expect` is used to create assertions. In this context `assertions` are functions that can be called to assert a statement. Vitest provides `chai` assertions by default and also `Jest` compatible assertions built on top of `chai`. Since Vitest 4.1, for spy/mock testing, Vitest also provides [Chai-style assertions](#chai-style-spy-assertions) (e.g., `expect(spy).to.have.been.called()`) alongside Jest-style assertions (e.g., `expect(spy).toHaveBeenCalled()`). Unlike `Jest`, Vitest supports a message as the second argument - if the assertion fails, the error message will be equal to it.
9+
`expect` is used to create assertions. In this context `assertions` are functions that can be called to assert a statement. Vitest provides `chai` assertions by default and also `Jest` compatible assertions built on top of `chai`. Since Vitest 4.1, for spy/mock testing, Vitest also provides Chai-style assertions (e.g., [`expect(spy).to.have.been.called()`](#called)) alongside Jest-style assertions (e.g., `expect(spy).toHaveBeenCalled()`). Unlike `Jest`, Vitest supports a message as the second argument - if the assertion fails, the error message will be equal to it.
1010
1111
```ts
1212
export interface ExpectStatic extends Chai.ExpectStatic, AsymmetricMatchersContaining {

docs/blog/vitest-3-2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ This option will be removed completely in a future major, replaced by `projects`
4747

4848
The new [annotation API](/guide/test-annotations) allows you to annotate any test with a custom message and attachment. These annotations are visible in the UI, HTML, junit, tap and GitHub Actions reporters. Vitest will also print related annotation in the CLI if the test fails.
4949

50-
<img src="/annotation-api-cute-puppy-example.png" />
50+
<img src="/annotation-api-cute-puppy-example.png" alt="an example of annotation with a cute puppy" />
5151

5252
## Scoped Fixtures
5353

@@ -106,7 +106,7 @@ export default defineConfig({
106106
```
107107
:::
108108

109-
<img src="/v3-2-custom-colors.png" />
109+
<img src="/v3-2-custom-colors.png" alt="an example of project names with custom backgrounds" />
110110

111111
## Custom Browser Locators API
112112

docs/blog/vitest-3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Alongside this change, we also redesign the public reporter API (the `reporters`
6767
You can follow the design process in [#7069](https://github.com/vitest-dev/vitest/pull/7069) PR. It was a hard fight trying to reverse-engineer the previous `onTaskUpdate` API to make this new elegant lifecycle possible.
6868

6969
<div class="flex align-center justify-center">
70-
<img src="/on-task-update.gif" />
70+
<img src="/on-task-update.gif" alt="a gif from it's always sunny with a drawing board" />
7171
</div>
7272

7373
## Inline Workspace

docs/config/alias.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Define custom aliases when running inside tests. They will be merged with aliase
1212
::: warning
1313
Vitest uses Vite SSR primitives to run tests which has [certain pitfalls](https://vitejs.dev/guide/ssr.html#ssr-externals).
1414

15-
1. Aliases affect only modules imported directly with an `import` keyword by an [inlined](#server-deps-inline) module (all source code is inlined by default).
15+
1. Aliases affect only modules imported directly with an `import` keyword by an [inlined](/config/server#server-deps-inline) module (all source code is inlined by default).
1616
2. Vitest does not support aliasing `require` calls.
1717
3. If you are aliasing an external dependency (e.g., `react` -> `preact`), you may want to alias the actual `node_modules` packages instead to make it work for externalized dependencies. Both [Yarn](https://classic.yarnpkg.com/en/docs/cli/add/#toc-yarn-add-alias) and [pnpm](https://pnpm.io/aliases/) support aliasing via the `npm:` prefix.
1818
:::

docs/config/benchmark.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Exclude globs for benchmark test files
2828
- **Type:** `string[]`
2929
- **Default:** `[]`
3030

31-
Include globs for in-source benchmark test files. This option is similar to [`includeSource`](#includesource).
31+
Include globs for in-source benchmark test files. This option is similar to [`includeSource`](/config/include-source).
3232

3333
When defined, Vitest will run all matched files with `import.meta.vitest` inside.
3434

docs/config/browser/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ outline: deep
99
- **Default:** `63315`
1010
- **CLI:** `--browser.api=63315`, `--browser.api.port=1234, --browser.api.host=example.com`
1111

12-
Configure options for Vite server that serves code in the browser. Does not affect [`test.api`](#api) option. By default, Vitest assigns port `63315` to avoid conflicts with the development server, allowing you to run both in parallel.
12+
Configure options for Vite server that serves code in the browser. Does not affect [`test.api`](/config/api) option. By default, Vitest assigns port `63315` to avoid conflicts with the development server, allowing you to run both in parallel.
1313

1414
## api.allowWrite <Version>4.1.0</Version> {#api-allowwrite}
1515

0 commit comments

Comments
 (0)