Skip to content

Commit

Permalink
Update no-cycle.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Page authored May 28, 2019
1 parent cf5573b commit d27aeaf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/rules/no-cycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ This includes cycles of depth 1 (imported module imports me) to `Infinity`, if t
import './dep-a.js'

export function b() { /* ... */ }
```

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

// dep-c.js
import './dep-a.js'
```

```js
// dep-b.js
import './dep-c.js'

export function b() { /* ... */ }
```

```js
// dep-a.js
import { b } from './dep-b.js' // not reported as the cycle is at depth 2
```
Expand Down

0 comments on commit d27aeaf

Please sign in to comment.