Bump eslint-plugin-import to avoid vulnerability in dependency

This commit is contained in:
Henry Mercer 2023-01-18 20:26:59 +00:00
parent 10695e6a20
commit ed9506bbaf
1660 changed files with 67726 additions and 27926 deletions

View file

@ -1,5 +1,7 @@
# import/no-cycle
<!-- end auto-generated rule header -->
Ensures that there is no resolvable path back to this module via its dependencies.
This includes cycles of depth 1 (imported module imports me) to `"∞"` (or `Infinity`), if the
@ -20,6 +22,8 @@ import { b } from './dep-b.js' // reported: Dependency cycle detected.
This rule does _not_ detect imports that resolve directly to the linted module;
for that, see [`no-self-import`].
This rule ignores type-only imports in Flow and TypeScript syntax (`import type` and `import typeof`), which have no runtime effect.
## Rule Details
@ -75,6 +79,22 @@ import { a } from './dep-a.js' // not reported as this module is external
Its value is `false` by default, but can be set to `true` for reducing total project lint time, if needed.
#### `allowUnsafeDynamicCyclicDependency`
This option disable reporting of errors if a cycle is detected with at least one dynamic import.
```js
// bar.js
import { foo } from './foo';
export const bar = foo;
// foo.js
export const foo = 'Foo';
export function getBar() { return import('./bar'); }
```
> 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.
## When Not To Use It
This rule is comparatively computationally expensive. If you are pressed for lint