A Java lint utility library focused on removing unused imports. Current version 0.3.0 ships TypeScript types and requires Node.js ^18.13.0 || >=20.2.0. It uses java-parser for AST parsing. The package has been superseded by eslint-plugin-java-lang starting at v0.4.0, which converts the project into an ESLint plugin format. Key differentiators: lightweight, focused only on unused import removal, but with caveats about false negatives due to lazy global identifier collection.
npm install java-lintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates removing an unused import from a Java source string using removeUnusedImports.
Migrate to eslint-plugin-java-lang.
Review results manually or consider using eslint-plugin-java-lang.
Ensure Node.js version compatibility.
Use ESM import: import { removeUnusedImports } from 'java-lint'