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 1 commit
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
18 changes: 9 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,7 @@ Examples of **correct** code for this rule with the `{ "skipBlankLines": true }`

var foo = 0;
var baz = 5;
//•••••
// trailing whitespace →
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example is "correct" in the docs but "incorrect" in the playground. I think this should be a line with spaces only so that "skipBlankLines": true has an effect.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks! I forgot to check this block.

```

:::
Expand All @@ -72,12 +72,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