-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add documentation for padding-around-after-all-blocks rule (#622)
* refactor: remove @ts-ignore * docs: add padding-around-after-all-blocks docs * docs: update README
- Loading branch information
Showing
3 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Enforce padding around `afterAll` blocks (`vitest/padding-around-after-all-blocks`) | ||
|
||
⚠️ This rule _warns_ in the 🌐 `all` config. | ||
|
||
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). | ||
|
||
<!-- end auto-generated rule header --> | ||
|
||
## Rule Details | ||
|
||
This rule enforces a line of padding before _and_ after 1 or more `afterAll` | ||
statements. | ||
|
||
Note that it doesn't add/enforce a padding line if it's the last statement in | ||
its scope. | ||
|
||
Examples of **incorrect** code for this rule: | ||
|
||
```js | ||
const someText = 'hoge'; | ||
afterAll(() => {}); | ||
describe('foo', () => {}); | ||
``` | ||
|
||
Examples of **correct** code for this rule: | ||
|
||
```js | ||
const someText = 'hoge'; | ||
|
||
afterAll(() => {}); | ||
|
||
describe('foo', () => {}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters