Skip to content

Commit d122c8a

Browse files
authored
docs: add missing backticks to sort-imports (#19282)
* docs: add missing backticks to `sort-imports` * wip
1 parent 0367a70 commit d122c8a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

docs/src/_data/rules_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2894,7 +2894,7 @@
28942894
}
28952895
],
28962896
"docs": {
2897-
"description": "Enforce sorted import declarations within modules",
2897+
"description": "Enforce sorted `import` declarations within modules",
28982898
"recommended": false,
28992899
"frozen": true,
29002900
"url": "https://eslint.org/docs/latest/rules/sort-imports"

docs/src/rules/sort-imports.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ related_rules:
88

99

1010

11-
The import statement is used to import members (functions, objects or primitives) that have been exported from an external module. Using a specific member syntax:
11+
The `import` statement is used to import members (functions, objects or primitives) that have been exported from an external module. Using a specific member syntax:
1212

1313
```js
1414
// single - Import single member.
@@ -22,18 +22,18 @@ import {foo, bar} from "my-module.js";
2222
import * as myModule from "my-module.js";
2323
```
2424

25-
The import statement can also import a module without exported bindings. Used when the module does not export anything, but runs it own code or changes the global context object.
25+
The `import` statement can also import a module without exported bindings. Used when the module does not export anything, but runs it own code or changes the global context object.
2626

2727
```js
2828
// none - Import module without exported bindings.
2929
import "my-module.js"
3030
```
3131

32-
When declaring multiple imports, a sorted list of import declarations make it easier for developers to read the code and find necessary imports later. This rule is purely a matter of style.
32+
When declaring multiple imports, a sorted list of `import` declarations make it easier for developers to read the code and find necessary imports later. This rule is purely a matter of style.
3333

3434
## Rule Details
3535

36-
This rule checks all import declarations and verifies that all imports are first sorted by the used member syntax and then alphabetically by the first member or alias name.
36+
This rule checks all `import` declarations and verifies that all imports are first sorted by the used member syntax and then alphabetically by the first member or alias name.
3737

3838
The `--fix` option on the command line automatically fixes some problems reported by this rule: multiple members on a single line are automatically sorted (e.g. `import { b, a } from 'foo.js'` is corrected to `import { a, b } from 'foo.js'`), but multiple lines are not reordered.
3939

lib/rules/sort-imports.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @fileoverview Rule to require sorting of import declarations
2+
* @fileoverview Rule to enforce sorted `import` declarations within modules
33
* @author Christian Schuller
44
*/
55

@@ -23,7 +23,7 @@ module.exports = {
2323
}],
2424

2525
docs: {
26-
description: "Enforce sorted import declarations within modules",
26+
description: "Enforce sorted `import` declarations within modules",
2727
recommended: false,
2828
frozen: true,
2929
url: "https://eslint.org/docs/latest/rules/sort-imports"

0 commit comments

Comments
 (0)