Skip to content

Commit 967ff59

Browse files
committed
docs(lint): deno fmt the new rule pages
1 parent 898a4a6 commit 967ff59

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

lint/rules/no-empty-file.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ tags: [recommended]
55
Disallows empty files.
66

77
A file that contains no code — only whitespace, comments, or a directive
8-
prologue such as `"use strict"` — serves no purpose and is usually the result
9-
of a mistake, such as an incomplete refactor or a bad merge. Either add some
10-
code to the file or delete it.
8+
prologue such as `"use strict"` — serves no purpose and is usually the result of
9+
a mistake, such as an incomplete refactor or a bad merge. Either add some code
10+
to the file or delete it.
1111

1212
A file consisting solely of a triple-slash reference directive (for example
1313
`/// <reference types="..." />`) is allowed, since such directives are

lint/rules/no-invalid-remove-event-listener.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ tags: [recommended]
44

55
Disallows passing inline or bound functions to `removeEventListener()`.
66

7-
`removeEventListener()` removes a listener only if it receives a reference to the
8-
_same_ function that was passed to `addEventListener()`. An inline function
7+
`removeEventListener()` removes a listener only if it receives a reference to
8+
the _same_ function that was passed to `addEventListener()`. An inline function
99
expression, an arrow function, or a `.bind()` call each create a brand-new
1010
function every time they are evaluated, so they can never match a
1111
previously-added listener and the call silently does nothing.

lint/rules/no-new-array.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ with any other single argument it creates an array containing that one
1010
_element_. This makes the intent unclear to readers and is a common source of
1111
bugs.
1212

13-
Use an array literal when you want a list of elements, or `Array.from({ length:
13+
Use an array literal when you want a list of elements, or
14+
`Array.from({ length:
1415
n })` when you want an array of a given length.
1516

1617
**Invalid:**

lint/rules/no-useless-length-check.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ Disallows redundant array length checks combined with `Array#every()` or
88
`Array#every()` returns `true` for an empty array, and `Array#some()` returns
99
`false` for an empty array. Because of this:
1010

11-
- `array.length === 0 || array.every(...)` is equivalent to just `array.every(...)`.
12-
- `array.length !== 0 && array.some(...)` is equivalent to just `array.some(...)`.
11+
- `array.length === 0 || array.every(...)` is equivalent to just
12+
`array.every(...)`.
13+
- `array.length !== 0 && array.some(...)` is equivalent to just
14+
`array.some(...)`.
1315

1416
The explicit length check is redundant and can be removed.
1517

0 commit comments

Comments
 (0)