Registry / devops / eslint-formatter-codeclimate

eslint-formatter-codeclimate

JSON →
library2.0.1jsnpmunverified

An ESLint formatter that outputs lint results in the Code Climate report format, suitable for integration with Code Climate's platform. Version 2.0.1 supports ESLint >=9 and requires Node.js 20+. The v2.0.0 release switched fingerprint hashing from SHA1 to SHA256, a breaking change. It offers both a CLI formatter (--format codeclimate) and a programmatic API (toCodeClimate). Unlike generic JSON formatters, this produces a Code Climate-specific JSON structure with categories, fingerprints, and relative paths.

npm install eslint-formatter-codeclimate
INSTALL
IMPORT
SIG · ESLINT-FORMATTER-C
E
eslint-formatter-codeclimate
devopsjavascriptv2.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

formatter
import formatter from 'eslint-formatter-codeclimate'
const formatter = require('eslint-formatter-codeclimate')
Default export is the ESLint formatter function; package is ESM-only, so require() fails with ERR_REQUIRE_ESM.
toCodeClimate
import { toCodeClimate } from 'eslint-formatter-codeclimate'
const { toCodeClimate } = require('eslint-formatter-codeclimate')
Named export for programmatic conversion; also ESM-only.

Programmatically converts ESLint results to Code Climate format using toCodeClimate.

import { ESLint } from 'eslint'; import { toCodeClimate } from 'eslint-formatter-codeclimate'; const cwd = process.cwd(); const eslint = new ESLint({ cwd }); const results = await eslint.lintFiles([]); const rulesMeta = eslint.getRulesMetaForResults(results); const issues = toCodeClimate(results, rulesMeta, cwd); console.log(JSON.stringify(issues, null, 2));
Debug
Known issues
breakingFingerprint hash algorithm changed from SHA1 to SHA256 in v2.0.0, altering issue fingerprints.
fix
Update any systems that rely on fingerprint consistency (e.g., deduplication) to use the new hash.
affects: >=2.0.0
breakingPeer dependency requirement changed to eslint >=9 in v2.0.0.
fix
Ensure eslint version is 9 or above.
affects: >=2.0.0
gotchaPackage is ESM-only. Using require() throws ERR_REQUIRE_ESM.
fix
Use import syntax or dynamic import().
affects: >=1.0.0
gotchaNode.js version must be 20 or greater.
fix
Upgrade Node.js to 20+.
affects: >=1.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/eslint-formatter-codeclimate/index.js from /path/to/script.js not supported.
Using CommonJS require() on an ESM-only package.
fix
Use import syntax or dynamic import(), or set package type to module.
Error: Cannot find module 'eslint-formatter-codeclimate'
Package not installed or not in node_modules.
fix
Run 'npm install eslint-formatter-codeclimate'.
TypeError: toCodeClimate is not a function
Incorrect import of default export instead of named export.
fix
Use import { toCodeClimate } from 'eslint-formatter-codeclimate'.
Error: ESLint configuration error: The formatter 'codeclimate' is not found.
ESLint cannot find the formatter when used via CLI.
fix
Ensure the package is installed in the project and the formatter name matches the package name (--format codeclimate).
Upgrade
Version history
2.0.1latest on npm
Audit
Dependencies
eslintrequiredPeer dependency required to use the formatter; must be >=9
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-formatter-codeclimate — npm install eslint-formatter-codeclimate · libregistry