{"name":"eslint-plugin-unused-imports","version":"4.2.0","keywords":["eslint","eslintplugin","eslint-plugin","import","unused","modules","autofix"],"author":{"name":"Mikkel Holmer Pedersen"},"license":"MIT","_id":"eslint-plugin-unused-imports@4.2.0","maintainers":[{"name":"antfu","email":"anthonyfu117@hotmail.com"},{"name":"sweepline","email":"mikkel@holmerp.dk"}],"homepage":"https://github.com/sweepline/eslint-plugin-unused-imports","bugs":{"url":"https://github.com/sweepline/eslint-plugin-unused-imports/issues"},"dist":{"shasum":"d83b23be66ae7713734c884df95988f039eb8362","tarball":"http://registry-npm.ywwl.com/eslint-plugin-unused-imports/download/eslint-plugin-unused-imports-4.2.0.tgz","fileCount":7,"integrity":"sha512-hLbJ2/wnjKq4kGA9AUaExVFIbNzyxYdVo49QZmKCnhk5pc9wcYRbfgLHvWJ8tnsdcseGhoUAddm9gn/lt+d74w==","signatures":[{"sig":"MEYCIQCcj1wZ7TF6WHUANWWiMbUgm9jET29glTZ2s4NuFjb9BwIhAI9TUSfFg3fs+uqR6E31B+2tg2+aaiufk8uUp+OFvu8Y","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16042,"size":4381,"noattachment":false,"key":"/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.2.0.tgz"},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"c8fda2500c2d3512f7a702dfda73121e39bcd347","scripts":{"test":"vitest","build":"tsup","format":"prettier --write '**/*.[jt]s'","prepack":"npm run build","release":"bumpp && npm publish"},"_npmUser":{"name":"antfu","email":"anthonyfu117@hotmail.com"},"repository":{"url":"git+https://github.com/sweepline/eslint-plugin-unused-imports.git","type":"git"},"_npmVersion":"10.9.2","description":"Report and remove unused es6 modules","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.14.0","devDependencies":{"tsup":"^8.5.0","bumpp":"^10.2.3","eslint":"^9.33.0","vitest":"^3.2.4","prettier":"^3.6.2","typescript":"^5.9.2","@types/eslint":"^9.6.1","typescript-eslint":"^8.39.1","@typescript-eslint/utils":"^8.39.1","@typescript-eslint/parser":"^8.39.1","@typescript-eslint-v5/parser":"npm:@typescript-eslint/parser@^5.62.0","@typescript-eslint-v6/parser":"npm:@typescript-eslint/parser@^6.21.0","@typescript-eslint-v7/parser":"npm:@typescript-eslint/parser@^7.18.0","@typescript-eslint/eslint-plugin":"^8.39.1","@typescript-eslint-v5/eslint-plugin":"npm:@typescript-eslint/eslint-plugin@^5.62.0","@typescript-eslint-v6/eslint-plugin":"npm:@typescript-eslint/eslint-plugin@^6.21.0","@typescript-eslint-v7/eslint-plugin":"npm:@typescript-eslint/eslint-plugin@^7.18.0"},"peerDependencies":{"eslint":"^9.0.0 || ^8.0.0","@typescript-eslint/eslint-plugin":"^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0"},"peerDependenciesMeta":{"@typescript-eslint/eslint-plugin":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-unused-imports_4.2.0_1755504946928_0.3970735567763213","host":"s3://npm-registry-packages-npm-production"},"readme":"# eslint-plugin-unused-imports\n\nFind and remove unused es6 module imports. It works by splitting up the `no-unused-vars` rule depending on it being an import statement in the AST and providing an autofix rule to remove the nodes if they are imports. This plugin composes the rule `no-unused-vars` of either the typescript or js plugin so be aware that the other plugins needs to be installed and reporting correctly for this to do so.\n\n## _Versions_\n\n-   Version 4.1.x is for eslint 9 with @typescript-eslint/eslint-plugin 5 - 8\n-   Version 4.0.x is for eslint 9 with @typescript-eslint/eslint-plugin 8\n-   Version 3.x.x is for eslint 8 with @typescript-eslint/eslint-plugin 6 - 7\n-   Version 2.x.x is for eslint 8 with @typescript-eslint/eslint-plugin 5\n-   Version 1.x.x is for eslint 6 and 7.\n\n## Typescript\n\nIf running typescript with [@typescript-eslint](https://github.com/typescript-eslint/typescript-eslint) make sure to use both `@typescript-eslint/eslint-plugin` and `@typescript-eslint/parser`.\n\n## React\n\nIf writing react code you need to install `eslint-plugin-react` and enable the two rules `react/jsx-uses-react` and `react/jsx-uses-vars`. Otherwise all imports for components will be reported unused.\n\n## Installation\n\nYou'll first need to install [ESLint](http://eslint.org) (and [@typescript-eslint](https://github.com/typescript-eslint/typescript-eslint) if using typescript):\n\n```bash\nnpm i eslint --save-dev\n```\n\nNext, install `eslint-plugin-unused-imports`:\n\n```bash\nnpm install eslint-plugin-unused-imports --save-dev\n```\n\n**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-unused-imports` globally.\n\n## Usage\n\nAdd `unused-imports` to the plugins section of your `eslint.config.js` configuration file.\n\n```js\nimport unusedImports from \"eslint-plugin-unused-imports\";\n\nexport default [{\n    plugins: {\n        \"unused-imports\": unusedImports,\n    },\n    rules: {\n        \"no-unused-vars\": \"off\", // or \"@typescript-eslint/no-unused-vars\": \"off\",\n        \"unused-imports/no-unused-imports\": \"error\",\n        \"unused-imports/no-unused-vars\": [\n            \"warn\",\n            {\n                \"vars\": \"all\",\n                \"varsIgnorePattern\": \"^_\",\n                \"args\": \"after-used\",\n                \"argsIgnorePattern\": \"^_\",\n            },\n        ]\n    }\n}];\n```\n\n## Supported Rules\n\n-   `no-unused-imports`\n-   `no-unused-vars`\n","publish_time":1755504947117,"_cnpm_publish_time":1755504947117,"dist-tags":{"latest":"4.4.1"}}