Registry / testing / live-alert-bp-formatter-jshint

live-alert-bp-formatter-jshint

JSON →
library1.0.3jsnpmunverified

A JSHint message formatter for live-alert-bp, a browser-based live alerting library. This package transforms JSHint lint messages into styled HTML for display via live-alert-bp. Current version 1.0.3, no recent updates. Differentiates by providing customizable styling and filtering by error level (E, W, I). Requires live-alert-bp as a peer dependency.

npm install live-alert-bp-formatter-jshint
INSTALL
IMPORT
SIG · LIVE-ALERT-BP-FORM
L
live-alert-bp-formatter-jshint
testingjavascriptv1.0.3
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.

live-alert-bp-formatter-jshint
const formatterJSlint = require('live-alert-bp-formatter-jshint');
import formatterJSlint from 'live-alert-bp-formatter-jshint';
Package uses CommonJS; no ESM exports. Use require().

Shows how to require the formatter, pass JSHint messages, and display via live-alert-bp.

const liveAlert = require('live-alert-bp'); const formatterJSlint = require('live-alert-bp-formatter-jshint'); // Example JSHint messages const messagesJSlint = [ { file: 'app.js', line: 10, col: 5, evidence: 'var x = 1;', reason: 'Expected "const" instead of "var".', code: 'W117' } ]; // Open live alert with formatted messages liveAlert.open( formatterJSlint(messagesJSlint, {}, ['E', 'W']) );
Debug
Known issues
gotchaPackage only provides CommonJS module; using ES import will fail.
fix
Use require() instead of import.
affects: >=1.0.0
gotchaThe formatter expects an array of JSHint messages; passing other formats may cause errors.
fix
Ensure messages conform to JSHint output structure: file, line, col, evidence, reason, code.
affects: >=1.0.0
gotchaThe 'filter' parameter is optional, but when provided must be an array containing 'E', 'W', or 'I'.
fix
Pass filter as ['E'] or ['E','W','I'] etc.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'live-alert-bp-formatter-jshint'
Package not installed or missing from node_modules.
fix
Run npm install live-alert-bp-formatter-jshint --save-dev
formatterJSlint is not a function
Using ES import on CommonJS module; require returns an object but named exports may be missing.
fix
Use const formatterJSlint = require('live-alert-bp-formatter-jshint');
Cannot read property 'open' of undefined
live-alert-bp not installed or incorrectly required.
fix
Ensure live-alert-bp is installed and required properly.
Upgrade
Version history
1.0.3latest on npm
Audit
Dependencies
live-alert-bprequiredCore library required to display formatted messages
Agent activity
2 hits · last 30 days
node
2
Resources
live-alert-bp-formatter-jshint — npm install live-alert-bp-formatter-jshint · libregistry