Registry / testing / eslint-formatter-filelink-stylish

eslint-formatter-filelink-stylish

JSON →
library1.0.1jsnpmunverified

A modified version of the ESLint stylish formatter that makes file paths clickable/autolinkable in terminals (e.g., WebStorm, VS Code, iTerm2). Version 1.0.1 is current; no recent updates. It wraps the standard stylish formatter and converts file paths to clickable links using ANSI escape codes. Unlike the default stylish formatter, this helps developers quickly jump to files with lint errors. Intended for ESLint CLI usage or programmatic integration with ESLint's API.

npm install eslint-formatter-filelink-stylish
INSTALL
IMPORT
SIG · ESLINT-FORMATTER-F
E
eslint-formatter-filelink-stylish
testingjavascriptv1.0.1
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 formatter from 'eslint-formatter-filelink-stylish'
const formatter = require('eslint-formatter-filelink-stylish')
ESM default import; package is CommonJS but can be imported in ESM via default interop.
formatter
const formatter = require('eslint-formatter-filelink-stylish');
import { formatter } from 'eslint-formatter-filelink-stylish'
CommonJS require returns the function as default export, not named.
no named export
const formatter = require('eslint-formatter-filelink-stylish');
import * as formatter from 'eslint-formatter-filelink-stylish'
Only default export exists; namespace import gives an object { default: fn }.

Shows how to install and use the formatter both via CLI and programmatically with ESLint.

// Install: npm install --save-dev eslint eslint-formatter-filelink-stylish // Run ESLint with the formatter: // eslint -f filelink-stylish src/ // Or programmatically: const eslint = require('eslint'); const formatter = require('eslint-formatter-filelink-stylish'); const engine = new eslint.CLIEngine({ useEslintrc: true, cwd: __dirname }); const report = engine.executeOnFiles(['example.js']); console.log(formatter(report.results));
Debug
Known issues
deprecatedPackage uses CLIEngine which is deprecated in ESLint 8.57.0+. Use FlatESLint/ESLint class instead.
fix
Migrate to ESLint's new Flat API: const { ESLint } = require('eslint'); const formatter = require('eslint-formatter-filelink-stylish'); const eslint = new ESLint({ overrideConfigFile: true });
affects: >=8.57.0
breakingESLint 9.0+ removed CLIEngine - package will not work without adaptation.
fix
Use alternative formatter or wrap the package to accept ESLint 9's result format.
affects: >=9.0.0
gotchaFormatter expects results array from CLIEngine - if used with FlatESLint, results are LintResult objects, may not be compatible.
fix
Ensure the input matches the old format: [{ filePath, messages, ... }].
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'eslint-formatter-filelink-stylish'
Package not installed or not in node_modules when running ESLint CLI.
fix
Install as dev dependency: npm install --save-dev eslint-formatter-filelink-stylish
Error: Formatter 'filelink-stylish' not found
Typo in formatter name or not installed globally.
fix
Use exact name: eslint -f filelink-stylish. Ensure package is installed locally.
TypeError: formatter is not a function
Importing namespace import instead of default.
fix
Use const formatter = require('eslint-formatter-filelink-stylish'); instead of import * as.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
eslintoptionalPeer dependency; the formatter requires ESLint's result format. Not required at runtime for CLI usage but needed for programmatic API.
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-formatter-filelink-stylish — npm install eslint-formatter-filelink-stylish · libregistry