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

``` "import/no-duplicates": ["error", { "prefer-inline": true }], ``` Will detect an error in the following typescript code: ```ts import type { X } from "xyz"; import "xyz"; // [...] ```...

rule proposal

With an eslintrc containing this rule configuration: `'import/extensions': [ 1, 'ignorePackages' ]` a file containing an [internal package import](https://nodejs.org/dist/latest-v14.x/docs/api/esm.html#esm_internal_package_imports): ```js import dep from '#dep' ``` is incorrectly being flagged as...

bug
resolver
package: resolver/node

Can an option be added to the `no-restricted-paths` rule to ignore TypeScript's type imports? ```ts // Allow this. import type { T } from 'some/restricted/path'; // While still disallowing this....

enhancement
help wanted
typescript

Packages used: - babel-plugin-module-resolver v4.0.0 eslint-import-resolver-babel-module v5.1.2 eslint-plugin-import v2.22.0 I am unable to get ESLint to recognise the module import (**Unable to resolve path to module '_components/TheThing'.eslint(import/no-unresolved)**) unless I change...

bug

My eslint settings: ``` 'import/no-extraneous-dependencies': ['error', { devDependencies: ['**/*.test.js'] }], ``` and package.json: ``` "devDependencies": { ... "uuid": "^8.3.0", } ``` The following import does not error: ``` const v5...

bug
help wanted

Some time ago `no-internal-modules` rule added ES modules exports linting as a "fix" -> minor version bump (which was a breaking change btw). From my experience, linting exports with this...

enhancement

Some of the words might be obvious to seasoned developers, but for others it's not so obvious. Here's my understanding : `src/App/AppContainer.js` where `~` is an alias to `src/**` ```es6...

help wanted
docs

Good day! I have a folder structure: ``` my-project |----- src │ |----- main | |----- api.1 | |----- ConstService.js | |----- api.2 | |------ AccountService.js | |----- components |...

question

I had some code like this ```js import { a } from "pkg" import { b } from "pkg" ``` ESLint's autofix for "import/no-duplicates" did work, but it left `a`...

enhancement

Scenario: ```javascript 'import/no-extraneous-dependencies': [ 'error', { packageDir: [ __dirname, 'node_modules/module-exist', 'node_modules/module-not-exist', ], }, ] ``` If there is a module `module-not-exist` that's not installed in node_modules. Even if `module-exist` did...

enhancement