Registry / devops / smartlint

smartlint

JSON →
library7.0.7jsnpmunverified

CLI tool that lints entire codebase with a single command, bundling multiple linters (ESLint, ls-lint, dprint, Biome). Deprecated since v7.0.0 in favor of smartlint-unix. Built-in dependencies: eslint, ls-lint, dprint, biome. Peer dependencies: @stoplight/spectral-cli, dockerfilelint, stylelint, prettier (note: some contain known security issues). Requires Node >=18.20.3. Ships TypeScript definitions.

npm install smartlint
INSTALL
IMPORT
SIG · SMARTLINT
S
smartlint
devopsjavascriptv7.0.7
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.

smartlint (CLI)
npx smartlint --linters=eslint,prettier .
require('smartlint')
smartlint is a CLI tool, not a Node library. Use npx or install globally.
default import (not supported)
Run as CLI command
import smartlint from 'smartlint'
smartlint has no JS API; only CLI usage is supported.
TypeScript types (not exposed)
N/A
import { LinterOptions } from 'smartlint'
TypeScript types are bundled for internal use only, not exported.

Shows how to add smartlint as a script in package.json and run it to lint the codebase with ESLint and Prettier.

{ "scripts": { "lint": "npx smartlint --linters=eslint,prettier ." } } // Run: npm run lint // Or directly: npx smartlint --linters=eslint,prettier .
Debug
Known issues
deprecatedsmartlint is deprecated as of v7.0.0. Use smartlint-unix instead.
fix
Replace 'smartlint' with 'smartlint-unix' in package.json and run 'npm install smartlint-unix --save-dev'.
affects: >=7.0.0
breakingsmartlint v7 dropped support for Node <18.20.3. Older versions may fail to install.
fix
Upgrade Node.js to >=18.20.3.
affects: >=7.0.0
gotchaSome peer dependencies (dockerfilelint, @stoplight/spectral-cli, etc.) contain known security issues. Review before using.
fix
Evaluate each peer dependency for security vulnerabilities. Consider alternatives if necessary.
affects: *
gotchasmartlint is a CLI-only tool. It cannot be required or imported as a module.
fix
Use npx or global installation to run the command.
affects: *
breakingThe --linters argument changed default values with v6. 'markdownlint' replaced 'markdown'.
fix
Update scripts using 'markdown' linter to 'markdownlint'.
affects: >=6.0.0
Errors
Common errors & fixes
Cannot find module 'smartlint'
Attempting to import smartlint as a module instead of running it as a CLI.
fix
Run 'npx smartlint ...' or add 'smartlint' to scripts in package.json.
The engine "node" is incompatible with this module. Expected version ">=18.20.3"
Node.js version is too old for smartlint v7.
fix
Upgrade Node.js to >=18.20.3 or use an older smartlint version.
Error: linter 'markdown' not found. Use --linters to specify one of: lslint, eslint, stylelint, markdownlint, jsonymllint, biome, prettier, dockerfile
Outdated linter name 'markdown' was used; renamed to 'markdownlint' in v6.
fix
Replace 'markdown' with 'markdownlint' in the --linters argument.
Upgrade
Version history
7.0.7latest on npm
Audit
Dependencies
@stoplight/spectral-clioptionalRequired for linting OpenAPI/JSON/YAML with Spectral
@stoplight/spectral-ruleset-migratoroptionalRequired for migrating Spectral rulesets
dockerfilelintoptionalRequired for linting Dockerfiles (known security issues)
stylelintoptionalRequired for linting CSS/SCSS with Stylelint
prettieroptionalRequired for code formatting with Prettier
Agent activity
2 hits · last 30 days
node
2
Resources
smartlint — npm install smartlint · libregistry