eslint-formatter-autolinkable-stylish
raw JSON → 1.4.0 verified Sat Apr 25 auth: no javascript
An ESLint formatter that extends the default "stylish" formatter by making file paths, line numbers, and column numbers into clickable links in terminals that support hyperlinks. Version 1.4.0 is the latest stable release (no recent updates, likely stable). Supports ESLint 8 and 9. Differentiators: automatically generates hyperlinks without requiring IDE-specific plugins, works in VS Code, iTerm2, and other hyperlink-aware terminals.
Common errors
error Error: Cannot find module 'eslint-formatter-autolinkable-stylish' ↓
cause Package not installed or not in node_modules.
fix
Run npm install --save-dev eslint-formatter-autolinkable-stylish
error Error: Invalid option '--format' - perhaps you meant '--format=autolinkable-stylish'? ↓
cause Typo in the format name.
fix
Use exactly --format=autolinkable-stylish
error TypeError: formatter is not a function ↓
cause Using import instead of require in a Node.js script.
fix
Use const stylish = require('eslint-formatter-autolinkable-stylish');
Warnings
gotcha The formatter does not export an ESM module; using import will fail. ↓
fix Use require() instead.
gotcha Hyperlinks require a terminal that supports the OSC 8 escape sequence (e.g., iTerm2, VS Code terminal). Standard terminals like cmd.exe or plain xterm may not work. ↓
fix Use a hyperlink-compatible terminal.
gotcha The formatter is only usable via CLI --format flag; it cannot be used directly from Node.js code. ↓
fix Use the CLI or eslint.executeOnFiles() with the formatter name string.
Install
npm install eslint-formatter-autolinkable-stylish yarn add eslint-formatter-autolinkable-stylish pnpm add eslint-formatter-autolinkable-stylish Imports
- default wrong
import stylish from 'eslint-formatter-autolinkable-stylish'correctconst stylish = require('eslint-formatter-autolinkable-stylish')
Quickstart
// Install: npm i -D eslint eslint-formatter-autolinkable-stylish
// Run ESLint with the formatter:
eslint --format=autolinkable-stylish src/
// Or via .eslintrc (not recommended for formatters):
// Not supported in config file; only CLI.