Registry / devops / eslint-bamboo-formatter

eslint-bamboo-formatter

JSON →
library0.1.2jsnpmunverified

An ESLint formatter that produces JSON output compatible with Atlassian Bamboo's Mocha Test Parser, enabling ESLint results to be parsed and visualized in Bamboo CI. Current version 0.1.2 is stable with low release cadence. It outputs to a file (default eslint.json) instead of stdout, making it distinct from standard ESLint formatters. Supports configurable output file via ESLINT_FILE env var and optional warning-as-error via ESLINT_WARNING_AS_ERROR.

npm install eslint-bamboo-formatter
INSTALL
IMPORT
SIG · ESLINT-BAMBOO-FORM
E
eslint-bamboo-formatter
devopsjavascriptv0.1.2
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 import
const reporter = require('eslint-bamboo-formatter');
import reporter from 'eslint-bamboo-formatter';
Package is CommonJS-only; ESM import is not supported.
require in gulp-eslint
const reporter = require('eslint-bamboo-formatter');
const { default: reporter } = require('eslint-bamboo-formatter');
The module exports a single function directly, not an object with default property.
ESLint CLI usage
eslint file.js -f node_modules/eslint-bamboo-formatter/reporter.js
eslint file.js -f eslint-bamboo-formatter
The -f flag requires an absolute or relative path to the reporter file, not just the package name.

Integrate ESLint with gulp-eslint and output Bamboo-compatible report to eslint.json.

const eslint = require('gulp-eslint'); const reporter = require('eslint-bamboo-formatter'); gulp.src(['js/**/*.js']) .pipe(eslint()) .pipe(eslint.format(reporter));
Debug
Known issues
gotchaOutput is written to a file (eslint.json by default) instead of stdout, which is unlike most ESLint formatters.
fix
Set the ESLINT_FILE environment variable to change the output file path, or use a different formatter if stdout is needed.
affects: =0.1.2
gotchaWarnings are not reported as errors by default; they are omitted from the output.
fix
Set the environment variable ESLINT_WARNING_AS_ERROR to any truthy value to treat warnings as errors.
affects: =0.1.2
gotchaThe ESLint CLI -f flag must point to the actual script file, not the package name.
fix
Use -f node_modules/eslint-bamboo-formatter/reporter.js instead of -f eslint-bamboo-formatter.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'eslint-bamboo-formatter'
The reporter file is not found because the CLI -f flag expects a file path, not a package name.
fix
Use the correct path: eslint file.js -f node_modules/eslint-bamboo-formatter/reporter.js
TypeError: reporter is not a function
Incorrect import using destructuring with 'default' property on CommonJS module.
fix
Use const reporter = require('eslint-bamboo-formatter'); without destructuring.
ESLINT_FILE environment variable not recognized
Environment variable name is misspelled or not set correctly.
fix
Set ESLINT_FILE (not ESLINT_FILE_PATH) to a valid file path, e.g., export ESLINT_FILE=./reports/eslint.json
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies
eslintrequiredPeer dependency; the formatter is invoked by ESLint and expects ESLint's result format.
Agent activity
9 hits · last 30 days
node
8
Resources
eslint-bamboo-formatter — npm install eslint-bamboo-formatter · libregistry