Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add real whitespace to no-trailing-spaces examples #17630

Merged
merged 2 commits into from Oct 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 10 additions & 9 deletions docs/src/rules/no-trailing-spaces.md
Expand Up @@ -18,9 +18,9 @@ Examples of **incorrect** code for this rule:
```js
/*eslint no-trailing-spaces: "error"*/

var foo = 0;//•••••
var baz = 5;//••
//•••••
var foo = 0;/* trailing whitespace */
var baz = 5;/* trailing whitespace */
/* trailing whitespace */
```

:::
Expand Down Expand Up @@ -58,7 +58,8 @@ Examples of **correct** code for this rule with the `{ "skipBlankLines": true }`

var foo = 0;
var baz = 5;
//•••••
// ↓ a line with whitespace only ↓

```

:::
Expand All @@ -72,12 +73,12 @@ Examples of **correct** code for this rule with the `{ "ignoreComments": true }`
```js
/*eslint no-trailing-spaces: ["error", { "ignoreComments": true }]*/

//foo•
//•••••
// ↓ these comments have trailing whitespace →
//
/**
*baz
*••
*bar
* baz
*
* bar
*/
```

Expand Down