elint

raw JSON →
2.0.1 verified Fri May 01 auth: no javascript

elint is a unified linting orchestrator that wraps ESLint, Stylelint, and Commitlint, providing a single command (elint) to run all three tools with minimal configuration. Version 2.0.1 (latest) supports Node >=10.12.0 and is maintained by x-orpheus. It differentiates by offering a zero-config setup for static analysis of JavaScript/TypeScript, CSS, and commit messages, while also allowing custom presets via .elintrc. Compared to alternatives like standard or Husky, elint bundles multiple linters into one dependency, simplifying CI and pre-commit hooks integration. It supports .eslintignore, .stylelintignore, and caching for performance. However, note that version 2.x introduces breaking changes in configuration structure versus 1.x.

error Error: Cannot find module 'eslint'
cause ESLint peer dependency not installed
fix
Run 'npm install --save-dev eslint' in your project directory.
error TypeError: elint.lintFiles is not a function
cause Using deprecated API from v2
fix
Replace elint.lintFiles() with elint.lint().
error SyntaxError: Unexpected token 'export'
cause CJS require() used with ESM-only package
fix
Use import syntax or set "type": "module" in package.json, or use dynamic import().
error ERR_PEER_DEPENDENCY_MISSING
cause One or more peer dependencies not installed
fix
Run 'npx elint install-peers' or manually npm install the missing package.
breaking v2.0.0 changed configuration structure; .elintrc format is different from v1.x
fix Update .elintrc to use nested keys per linter (eslint, stylelint, commitlint) instead of flat options.
breaking v2 switches to ESM-only exports; CJS require() throws error
fix Use import statements or dynamic import() in CommonJS contexts.
deprecated elint.lintFiles() is deprecated in v2.0.1; use elint.lint() instead
fix Replace elint.lintFiles(args) with elint.lint(args).
gotcha elint does not install peer dependencies automatically; missing eslint, stylelint, or commitlint causes silent failures
fix Install peer dependencies explicitly: npm install --save-dev eslint stylelint @commitlint/cli
gotcha elint ignores .eslintrc if .elintrc is present with eslint config; merging is not automatic
fix Either remove .elintrc or include all rules within it; see docs for resolution strategy.
npm install elint
yarn add elint
pnpm add elint

Shows zero-config setup with optional .elintrc override, CLI command, and programmatic linting.

// Install elint and peer dependencies
// npm install --save-dev elint eslint stylelint @commitlint/cli

// .elintrc (optional override)
{
  "eslint": {
    "config": {
      "extends": ["eslint:recommended"]
    }
  },
  "stylelint": {
    "config": {
      "extends": ["stylelint-config-standard"]
    }
  },
  "commitlint": {
    "config": {
      "extends": ["@commitlint/config-conventional"]
    }
  }
}

// Run all linters
// npx elint --fix

// Programmatic usage
import elint from 'elint';
const result = elint.lint(['src/**/*.{js,css}'], { fix: true });
console.log(result.results);