eslint-plugin-import
eslint-plugin-import copied to clipboard
ESLint plugin with rules that help validate proper imports.
With Node’s ES Module support explicitly suggesting to use [multiple `package.json` files in subfolders](https://nodejs.org/api/esm.html#esm_package_json_type_field), I think `no-extraneous-dependencies` should automatically support nested package.json **without further config** > The nearest parent `package.json`...
### Summary This PR enhances the import extensions rule by introducing auto-fix support. With this change, ESLint can now automatically: - Append a missing file extension when one is required....
It's possible to auto-fix detected duplicated import types as inline types with `import/no-duplicates` ("prefer-inline": true), but it's not possible to keep type imports as they are. Therefore, `import/no-duplicate` should be...
I was asked to open this issue here, instead of in [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript/issues/448) After upgrading from `eslint-import-resolver-typescript` version 3.8.3 to 4.3.4 and I am getting errors that there are pretty much...
Here is a proposal for a new rule: forbidding imports followed by equivalent exports, and prefer re-export syntax instead. Example: ```typescript // Forbidden import { obj } from 'module' export...
Am I misunderstanding something, or is this a bug? The newline is exactly in the right place. ``` "rules": { "import/order": [ "warn", { "groups": ["builtin", "external", "parent", "sibling", "index"],...
According [node documentation](https://nodejs.org/api/esm.html#esm_mandatory_file_extensions), in ESM, file extensions are mandatory, with default value for this rule, it breaks Node native behavior. There is in the [same documentation](https://nodejs.org/api/esm.html#esm_commonjs_namespaces) a detailed explanation of...
Given the following configuration: ```js "import/order": [ "error", { alphabetize: { order: "asc", }, named: true, }, ], ``` The following import statement will fail: ```js import { b, a...
The upgrade of `eslint-plugin-import` from version` 2.26.0 to 2.31.0`(to support **_flat config_**) has resulted in **increased processing time for ESLint**, primarily due to the **import/no-cycle** rule. Included screenshot as well...
### Config "import/order": [ "error", { "groups": [ "builtin", "external", "internal", "parent", "sibling", "index" ] } ] ### Actual/no error import { withStyles } from '@material-ui/core/styles'; import { required }...