eslint-formatter-linotte v1.1.0
eslint-formatter-linotte
An ESLint formatter that logs results to linotte.dev
This formatter sends your ESLint results to linotte platform while also displaying them in your terminal using ESLint's stylish formatter. Linotte platform will provide static analysis intelligence by turning raw linting data into actionable insights, identifying code quality patterns and other trend analysis over time.
Features
- Displays formatted ESLint results in your terminal (truncated if above 400 lines)
- Logs ESLint results to linotte.dev for monitoring and analysis
- Strips source code from results for privacy
- Automatically links linter runs to git metadata if available (branch name, commit hash, author email)
- Minimal configuration via environment variables
Prerequisites
Before using this formatter, you'll need:
- A linotte.dev account
- API credentials of a project created on your linotte dashboard as
LINOTTE_PUBLIC_ID
andLINOTTE_PRIVATE_TOKEN
env variables - ESLint v9.x or above
Installation
# pnpm
pnpm add --save-dev eslint-formatter-linotte
# npm
npm install --save-dev eslint-formatter-linotte
# yarn
yarn add --dev eslint-formatter-linotte
Usage
Recommended:
# Using this command as a script in your package.json (e.g. "lint", or "lint:ci")
eslint . --stats --format linotte
Or in a temporary environment
# Using npx
npx eslint . --stats --format linotte
# yarn
yarn dlx eslint . --stats --format linotte
# pnpm
pnpm dlx eslint . --stats --format linotte
If properly setup, on your next linter run it should display
Configuration
This formatter requires a linotte.dev account and a pair of API keys. Configure it using environment variables.
Environment Variables
LINOTTE_PUBLIC_ID
: Your linotte public key that should look likeprj_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LINOTTE_PRIVATE_TOKEN
: Your linotte private token that should look like"pwd_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
(make sure this key is saved between quotes"
as it might contain=
character throwing off env variable configurations)
Example usage with inlined environment variables:
LINOTTE_PUBLIC_ID="prj_x" LINOTTE_PRIVATE_TOKEN="pwd_x" npx eslint . --stats --format linotte
Example above is not a recommended definitive CI setup, while this is good enough for testing your API keys, we recommend setting up your env variables in your CI configuration and/or
.env
files (see github actions variables, gitlab ci/cd variables or dotenvx)
License
MIT
Related
- linotte.dev - Learn more about linotte