Aberlaas Lint
raw JSON → 2.27.4 verified Fri May 01 auth: no javascript
Aberlaas Lint is a CLI tool and library for linting files in JavaScript/TypeScript projects. As part of the Aberlaas toolkit (v2.27.4), it consolidates ESLint, Prettier, and other linters into a single command. It provides opinionated defaults but allows customization via config files. The library is primarily used via the `aberlaas lint` CLI command, but also exports a `lint` function for programmatic use. It targets Node.js and requires ESM. Version 2.x is stable; releases follow changes in underlying linters.
Common errors
error Cannot find module 'aberlaas-lint' or its corresponding type declarations. ↓
cause Missing dependency or wrong import path.
fix
Run
npm install aberlaas-lint and ensure ESM (type: 'module' in package.json) or .mjs extension. error TypeError: (0 , aberlaas_lint.lint) is not a function ↓
cause Using CommonJS require() on an ESM-only package.
fix
Change to
import { lint } from 'aberlaas-lint' and use ESM context. Warnings
breaking Package renamed from `aberlaas-lint` to `@aberlaas/lint` in v3 ↓
fix Use `@aberlaas/lint` instead.
deprecated Deprecated: Use `aberlaas lint` CLI command instead of direct import. ↓
fix Run `npx aberlaas lint` in your project.
gotcha Requires Node.js >=14; fails silently on older versions. ↓
fix Update Node.js to 14+.
Install
npm install aberlaas-lint yarn add aberlaas-lint pnpm add aberlaas-lint Imports
- lint wrong
const { lint } = require('aberlaas-lint')correctimport { lint } from 'aberlaas-lint' - lint (default) wrong
const lint = require('aberlaas-lint')correctimport lint from 'aberlaas-lint' - config wrong
import config from 'aberlaas-lint'correctimport { config } from 'aberlaas-lint'
Quickstart
import { lint } from 'aberlaas-lint';
const result = await lint({
cwd: process.cwd(),
fix: true,
files: ['src/**/*.js'],
});
console.log(result);