Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d27aeaf

Browse files
author
Alex Page
authoredMay 28, 2019
Update no-cycle.md
1 parent cf5573b commit d27aeaf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎docs/rules/no-cycle.md

+6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ This includes cycles of depth 1 (imported module imports me) to `Infinity`, if t
1010
import './dep-a.js'
1111

1212
export function b() { /* ... */ }
13+
```
1314

15+
```js
1416
// dep-a.js
1517
import { b } from './dep-b.js' // reported: Dependency cycle detected.
1618
```
@@ -36,12 +38,16 @@ There is a `maxDepth` option available to prevent full expansion of very deep de
3638

3739
// dep-c.js
3840
import './dep-a.js'
41+
```
3942

43+
```js
4044
// dep-b.js
4145
import './dep-c.js'
4246

4347
export function b() { /* ... */ }
48+
```
4449

50+
```js
4551
// dep-a.js
4652
import { b } from './dep-b.js' // not reported as the cycle is at depth 2
4753
```

0 commit comments

Comments
 (0)
Please sign in to comment.