You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/order.md
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ Enforce a convention in the order of `require()` / `import` statements.
5
5
6
6
With the [`groups`](#groups-array) option set to `["builtin", "external", "internal", "parent", "sibling", "index", "object", "type"]` the order is as shown in the following example:
7
7
8
-
```js
8
+
```ts
9
9
// 1. node "builtin" modules
10
10
importfsfrom'fs';
11
11
importpathfrom'path';
@@ -36,7 +36,7 @@ Statements using the ES6 `import` syntax must appear before any `require()` stat
36
36
37
37
## Fail
38
38
39
-
```js
39
+
```ts
40
40
import_from'lodash';
41
41
importpathfrom'path'; // `path` import should occur before import of `lodash`
42
42
@@ -54,7 +54,7 @@ import foo from './foo'; // `import` statements must be before `require` stateme
54
54
55
55
## Pass
56
56
57
-
```js
57
+
```ts
58
58
importpathfrom'path';
59
59
import_from'lodash';
60
60
@@ -85,7 +85,7 @@ This rule supports the following options:
85
85
How groups are defined, and the order to respect. `groups` must be an array of `string` or [`string`]. The only allowed `string`s are:
0 commit comments