eslint-plugin-import icon indicating copy to clipboard operation
eslint-plugin-import copied to clipboard

ESLint plugin with rules that help validate proper imports.

Results 362 eslint-plugin-import issues
Sort by recently updated
recently updated
newest added

It would be helpful to include the `description` property for each rule. Personally, I like to use a simple script which uses meta information such as the URL (which is...

help wanted
docs

`import/extensions` rule does not detect `export ... from` syntax without an extension. config: `"import/extensions": ["error", "always"]` package version: `2.22.1`

bug

```ts import type ESLint from 'eslint' import type { Linter, SourceCode } from 'eslint' ``` If I merge them into one statement: ```ts import type ESLint, { Linter, SourceCode }...

bug
help wanted
typescript

If there is no `package.json`-file in the file to check (or any parent directory), the `eslint`-run fails due to this piece of code: https://github.com/benmosher/eslint-plugin-import/blob/802ce7d49d912289d590f735bf9bd2d931064863/src/core/packagePath.js#L11-L12 Following error is reported: ``` TypeError...

enhancement
help wanted

In TypeScript, it is common to write declaration files for 3rd-party modules or global variables. For example, a file called "foo.d.ts": ```typescript declare const foo: number; ``` However, this file...

bug
typescript

Refactoring some code today in a package called 'our-utils' I noticed one of the files in that package was importing like: ```js import { someDep } from 'our-utils'; ``` Now...

enhancement
resolver
package: resolver/node

In our monorepo we store our internal packages under `./packages` So we tried a config like this: ```js rules: { 'import/order': 'warn', }, settings: { 'import/internal-regex': '^internal-', // This makes...

bug
help wanted

This is more of a low-priority FYI, given that `no-unresolved` always gets fixed right away, so the issue is inconsequential. ![image](https://user-images.githubusercontent.com/497926/125773310-c49a2956-2cc4-493e-99ec-7bed552393ad.png) I haven't specified `import/extensions` rule and thus the default...

enhancement
help wanted

I'd like to be able to detect when I'm requiring a file that has no exports. Maybe more specifically when I try to assign it to a variable. For example:...

enhancement

`Node.js` doesn’t supports imports without file extension: ```js import client from './client'; ``` This will be error, extension should be provided: ```js import client from './client.js'; ``` Extensions can be:...

enhancement