Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2021-08-09 19:49:16 +00:00
parent a0ab4842b5
commit 068ade0b31
93 changed files with 4472 additions and 4635 deletions

View file

@ -109,8 +109,6 @@ import foo from './foo';
import bar from './bar';
import Component from './Component';
import express from 'express';
```
The following patterns are not considered problems when configuration set to "always":
@ -122,8 +120,6 @@ import bar from './bar.json';
import Component from './Component.jsx';
import express from 'express/index.js';
import * as path from 'path';
```

View file

@ -67,4 +67,4 @@ enable this rule.
- Issue [#255]
[`import/order`]: ./order.md
[#255]: https://github.com/benmosher/eslint-plugin-import/issues/255
[#255]: https://github.com/import-js/eslint-plugin-import/issues/255

View file

@ -1,3 +1,3 @@
# imports-first
This rule was **deprecated** in eslint-plugin-import v2.0.0. Please use the corresponding rule [`first`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md).
This rule was **deprecated** in eslint-plugin-import v2.0.0. Please use the corresponding rule [`first`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/first.md).

View file

@ -5,7 +5,7 @@ Verifies that all named imports are part of the set of named exports in the refe
For `export`, verifies that all named exports exist in the referenced module.
Note: for packages, the plugin will find exported names
from [`jsnext:main`], if present in `package.json`.
from [`jsnext:main`] (deprecated) or `module`, if present in `package.json`.
Redux's npm module includes this key, and thereby is lintable, for example.
A module path that is [ignored] or not [unambiguously an ES module] will not be reported when imported. Note that type imports and exports, as used by [Flow], are always ignored.
@ -91,8 +91,10 @@ runtime, you will likely see false positives with this rule.
## Further Reading
- [`import/ignore`] setting
- [`jsnext:main`] (Rollup)
- [`jsnext:main`] deprecation
- [`pkg.module`] (Rollup)
[`jsnext:main`]: https://github.com/rollup/rollup/wiki/jsnext:main
[`jsnext:main`]: https://github.com/jsforum/jsforum/issues/5
[`pkg.module`]: https://github.com/rollup/rollup/wiki/pkg.module
[`import/ignore`]: ../../README.md#importignore

View file

@ -83,7 +83,7 @@ this rule enabled.
## Further Reading
- [Original inspiring issue](https://github.com/benmosher/eslint-plugin-import/issues/941)
- [Original inspiring issue](https://github.com/import-js/eslint-plugin-import/issues/941)
- Rule to detect that module imports itself: [`no-self-import`]
- [`import/external-module-folders`] setting

View file

@ -7,7 +7,7 @@ ESLint core has a similar rule ([`no-duplicate-imports`](http://eslint.org/docs/
is different in two key ways:
1. the paths in the source code don't have to exactly match, they just have to point to the same module on the filesystem. (i.e. `./foo` and `./foo.js`)
2. this version distinguishes Flow `type` imports from standard imports. ([#334](https://github.com/benmosher/eslint-plugin-import/pull/334))
2. this version distinguishes Flow `type` imports from standard imports. ([#334](https://github.com/import-js/eslint-plugin-import/pull/334))
## Rule Details

View file

@ -5,6 +5,12 @@ Enforce a convention of not using namespace (a.k.a. "wildcard" `*`) imports.
+(fixable) The `--fix` option on the [command line] automatically fixes problems reported by this rule, provided that the namespace object is only used for direct member access, e.g. `namespace.a`.
The `--fix` functionality for this rule requires ESLint 5 or newer.
### Options
This rule supports the following options:
- `ignore`: array of glob strings for modules that should be ignored by the rule.
## Rule Details
Valid:
@ -15,6 +21,11 @@ import { a, b } from './bar'
import defaultExport, { a, b } from './foobar'
```
```js
/* eslint import/no-namespace: ["error", {ignore: ['*.ext']] */
import * as bar from './ignored-module.ext';
```
Invalid:
```js

View file

@ -10,7 +10,7 @@ Note: dynamic imports are currently not supported.
### Usage
In order for this plugin to work, one of the options `missingExports` or `unusedExports` must be enabled (see "Options" section below). In the future, these options will be enabled by default (see https://github.com/benmosher/eslint-plugin-import/issues/1324)
In order for this plugin to work, one of the options `missingExports` or `unusedExports` must be enabled (see "Options" section below). In the future, these options will be enabled by default (see https://github.com/import-js/eslint-plugin-import/issues/1324)
Example:
```

View file

@ -72,7 +72,7 @@ import "./pages/index"; // should be "./pages" (auto-fixable)
import "./pages/index.js"; // should be "./pages" (auto-fixable)
```
Note: `noUselessIndex` only avoids ambiguous imports for `.js` files if you haven't specified other resolved file extensions. See [Settings: import/extensions](https://github.com/benmosher/eslint-plugin-import#importextensions) for details.
Note: `noUselessIndex` only avoids ambiguous imports for `.js` files if you haven't specified other resolved file extensions. See [Settings: import/extensions](https://github.com/import-js/eslint-plugin-import#importextensions) for details.
### commonjs

View file

@ -148,6 +148,27 @@ Example:
}]
}
```
You can also use `patterns`(e.g., `react`, `react-router-dom`, etc).
Example:
```json
{
"import/order": [
"error",
{
"pathGroups": [
{
"pattern": "react",
"group": "builtin",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"]
}
]
}
```
The default value is `["builtin", "external"]`.
### `newlines-between: [ignore|always|always-and-inside-groups|never]`: