Skip to content

Commit 6218a8a

Browse files
soryy708ljharb
authored andcommitted
[Docs] no-cycle: add disableScc to docs
1 parent 743ebca commit 6218a8a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
1717
### Changed
1818
- [Docs] [`no-relative-packages`]: fix typo ([#3066], thanks [@joshuaobrien])
1919
- [Performance] [`no-cycle`]: dont scc for each linted file ([#3068], thanks [@soryy708])
20+
- [Docs] [`no-cycle`]: add `disableScc` to docs ([#3070], thanks [@soryy708])
2021

2122
## [2.30.0] - 2024-09-02
2223

@@ -1141,6 +1142,7 @@ for info on changes for earlier releases.
11411142

11421143
[`memo-parser`]: ./memo-parser/README.md
11431144

1145+
[#3070]: https://github.com/import-js/eslint-plugin-import/pull/3070
11441146
[#3068]: https://github.com/import-js/eslint-plugin-import/pull/3068
11451147
[#3066]: https://github.com/import-js/eslint-plugin-import/pull/3066
11461148
[#3065]: https://github.com/import-js/eslint-plugin-import/pull/3065

docs/rules/no-cycle.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ export function getBar() { return import('./bar'); }
9494

9595
> Cyclic dependency are **always** a dangerous anti-pattern as discussed extensively in [#2265](https://github.com/import-js/eslint-plugin-import/issues/2265). Please be extra careful about using this option.
9696
97+
#### `disableScc`
98+
99+
This option disables a pre-processing step that calculates [Strongly Connected Components](https://en.wikipedia.org/wiki/Strongly_connected_component), which are used for avoiding unnecessary work checking files in different SCCs for cycles.
100+
101+
However, under some configurations, this pre-processing may be more expensive than the time it saves.
102+
103+
When this option is `true`, we don't calculate any SCC graph, and check all files for cycles (leading to higher time-complexity). Default is `false`.
104+
97105
## When Not To Use It
98106

99107
This rule is comparatively computationally expensive. If you are pressed for lint

0 commit comments

Comments
 (0)