ls-lint

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

An extremely fast file and directory name linter for JavaScript and TypeScript projects, with pre-built 64-bit binaries for Linux, macOS, and Windows. The latest stable version is v2.3.1 (released via GitHub), published as an npm package primarily to distribute platform-specific binaries. It uses a simple YAML/JSON configuration to enforce naming conventions (e.g., kebab-case, PascalCase) across your entire codebase, and can lint individual files or directories. It is designed for CI/CD integration and supports monorepos. Unlike eslint or prettier plugins, ls-lint is a standalone Go binary that runs independently of your Node.js runtime, making it fast and uncoupled from your project's build setup.

error Error: Cannot find module 'pustovalov-ls-lint'
cause Trying to require or import the package as a JavaScript module.
fix
This package is not a JavaScript module; it only provides a binary. Remove any 'import' or 'require' statements for this package in your code.
error ls-lint: command not found
cause The binary is not in PATH or not installed correctly.
fix
Use 'npx ls-lint' or run './node_modules/.bin/ls-lint' instead of calling 'ls-lint' directly.
deprecated The package name 'pustovalov-ls-lint' is not the official package; the official ls-lint npm package is '@ls-lint/ls-lint'. Consider switching to the official package.
fix npm uninstall pustovalov-ls-lint && npm install --save-dev @ls-lint/ls-lint
gotcha This package only provides the 64-bit binary. It does not support 32-bit systems or ARM architectures (except via emulation).
fix Use the official ls-lint package which includes binaries for multiple architectures, or download the appropriate binary manually.
gotcha The binary requires Go runtime? No, it's a standalone binary. But ensure your system has the necessary permissions to execute the binary.
fix Run 'chmod +x node_modules/.bin/ls-lint' if the binary is not executable.
npm install pustovalov-ls-lint
yarn add pustovalov-ls-lint
pnpm add pustovalov-ls-lint

This shows how to install the platform-specific binary via npm and run a basic directory lint using an ls-lint config file.

// Install the binary for your platform via npm
npm install --save-dev pustovalov-ls-lint

# Then run ls-lint from the command line (available via npx or node_modules/.bin)
npx ls-lint --config .ls-lint.yml --directory .

# Example .ls-lint.yml configuration:
ls:
  .dir: kebab-case
  .js: kebab-case
  .ts: kebab-case
  .json: kebab-case
  .md: kebab-case