{"name":"eslint-plugin-unused-imports","version":"4.4.1","type":"commonjs","description":"Report and remove unused es6 modules","keywords":["eslint","eslintplugin","eslint-plugin","import","unused","modules","autofix"],"author":{"name":"Mikkel Holmer Pedersen"},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.js"}},"peerDependencies":{"@typescript-eslint/eslint-plugin":"^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0","eslint":"^10.0.0 || ^9.0.0 || ^8.0.0"},"peerDependenciesMeta":{"@typescript-eslint/eslint-plugin":{"optional":true}},"devDependencies":{"@types/eslint":"^9.6.1","@typescript-eslint-v5/eslint-plugin":"npm:@typescript-eslint/eslint-plugin@^5.62.0","@typescript-eslint-v5/parser":"npm:@typescript-eslint/parser@^5.62.0","@typescript-eslint-v6/eslint-plugin":"npm:@typescript-eslint/eslint-plugin@^6.21.0","@typescript-eslint-v6/parser":"npm:@typescript-eslint/parser@^6.21.0","@typescript-eslint-v7/eslint-plugin":"npm:@typescript-eslint/eslint-plugin@^7.18.0","@typescript-eslint-v7/parser":"npm:@typescript-eslint/parser@^7.18.0","@typescript-eslint/eslint-plugin":"^8.46.1","@typescript-eslint/parser":"^8.46.1","@typescript-eslint/utils":"^8.46.1","bumpp":"^10.3.1","eslint":"^9.37.0","prettier":"^3.6.2","tsup":"^8.5.0","typescript":"^5.9.3","typescript-eslint":"^8.46.1","vitest":"^3.2.4"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/sweepline/eslint-plugin-unused-imports.git"},"homepage":"https://github.com/sweepline/eslint-plugin-unused-imports","bugs":{"url":"https://github.com/sweepline/eslint-plugin-unused-imports/issues"},"scripts":{"build":"tsup","test":"vitest","format":"prettier --write '**/*.[jt]s'","release":"bumpp"},"_id":"eslint-plugin-unused-imports@4.4.1","_integrity":"sha512-oZGYUz1X3sRMGUB+0cZyK2VcvRX5lm/vB56PgNNcU+7ficUCKm66oZWKUubXWnOuPjQ8PvmXtCViXBMONPe7tQ==","_resolved":"/tmp/19909e2fbabf3911bed744a1df9f19c8/eslint-plugin-unused-imports-4.4.1.tgz","_from":"file:eslint-plugin-unused-imports-4.4.1.tgz","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-oZGYUz1X3sRMGUB+0cZyK2VcvRX5lm/vB56PgNNcU+7ficUCKm66oZWKUubXWnOuPjQ8PvmXtCViXBMONPe7tQ==","shasum":"a831f0a2937d7631eba30cb87091ab7d3a5da0e1","tarball":"http://registry-npm.ywwl.com/eslint-plugin-unused-imports/download/eslint-plugin-unused-imports-4.4.1.tgz","fileCount":7,"unpackedSize":18497,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/eslint-plugin-unused-imports@4.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGkFYpu/D0Wetf4XNe1jIVSzmSzXAq40htnzJi2xasWXAiA1W6U4bWRc1laXlUZ2abCUOLrHiMk8jSXcr44d0i/ZYg=="}],"size":4874,"noattachment":false,"key":"/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.4.1.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9d0ebcc7-ca5b-47e9-9d9a-0d38ed03645e"}},"directories":{},"maintainers":[{"name":"antfu","email":"anthonyfu117@hotmail.com"},{"name":"sweepline","email":"mikkel@holmerp.dk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-plugin-unused-imports_4.4.1_1770627608520_0.8114521281776192"},"_hasShrinkwrap":false,"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":1770627608682,"_cnpm_publish_time":1770627608682,"dist-tags":{"latest":"4.4.1"}}