Registry / devops / eslint-improved-checkstyle-formatter

eslint-improved-checkstyle-formatter

JSON →
library0.2.0jsnpmunverified

An enhanced ESLint formatter that outputs Checkstyle-compatible XML, primarily for use with the Jenkins Checkstyle Plugin. Version 0.2.0 is the latest stable release. It allows optional tweaking of file paths via environment variables (CHECKSTYLE_OLD_PROJECT_DIR and CHECKSTYLE_NEW_PROJECT_DIR) to produce relative paths instead of absolute paths in CI environments. Unlike ESLint's built-in checkstyle formatter, this one supports path manipulation for Jenkins integration. The package is unmaintained since 2015 and serves a niche use case.

npm install eslint-improved-checkstyle-formatter
INSTALL
IMPORT
SIG · ESLINT-IMPROVED-CH
E
eslint-improved-checkstyle-formatter
devopsjavascriptv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
const formatter = require('eslint-improved-checkstyle-formatter');
import formatter from 'eslint-improved-checkstyle-formatter';
Package is CommonJS-only; ESM import will fail.
output
const formatter = require('eslint-improved-checkstyle-formatter'); const result = formatter(results);
const { output } = require('eslint-improved-checkstyle-formatter');
The module exports a single function, not an object with 'output' property.

Shows how to require the formatter and use it programmatically or via CLI with path manipulation environment variables.

// eslint.config.js const improvedFormatter = require('eslint-improved-checkstyle-formatter'); module.exports = { plugins: [], formatters: { 'checkstyle': improvedFormatter } }; // Usage: // CHECKSTYLE_OLD_PROJECT_DIR=/home/user/project CHECKSTYLE_NEW_PROJECT_DIR=/tmp/project eslint --format=node_modules/eslint-improved-checkstyle-formatter file.js // Or programmatically: const ESLint = require('eslint').ESLint; const cli = new ESLint(); const results = await cli.lintFiles(['file.js']); const formatter = require('eslint-improved-checkstyle-formatter'); console.log(formatter(results));
Debug
Known issues
deprecatedPackage is unmaintained since 2015. No updates for ESLint v9+ or modern Node.js.
fix
Consider using ESLint's built-in checkstyle formatter or a maintained alternative like eslint-formatter-checkstyle.
affects: >=0.0
breakingOnly works with CommonJS require(). ESM imports will fail with SyntaxError.
fix
Use require() or convert project to CommonJS for this package.
affects: >=0.0
gotchaThe formatter does not output a 'results' array like other formatters; it returns a string directly.
fix
Call formatter(results) and it returns a string, no need to access .output or .results.
affects: >=0.0
Errors
Common errors & fixes
SyntaxError: Cannot use import statement outside a module
Package only provides CommonJS module. ESM import fails.
fix
Use require('eslint-improved-checkstyle-formatter') instead of import.
TypeError: formatter is not a function
Incorrect import or using wrong export. Module exports a function directly.
fix
Use const formatter = require('eslint-improved-checkstyle-formatter'); then formatter(results);
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
eslint-improved-checkstyle-formatter — npm install eslint-improved-checkstyle-formatter · libregistry