A command-line prose linter that enforces your team's writing style rules in editors, CI, and code, running offline.
loeffel-io/ls-lint
A fast command-line linter that enforces naming conventions for directories and filenames in your project, configured through .ls-lint.yml files.
- Stars
- 2,430
- Forks
- 46
- Open issues
- 43
- Last commit
- yesterday
What is it?
ls-lint checks the names of directories and files in a project against rules you define, such as kebab-case, camelCase, or PascalCase, and can require related files like test files to exist next to source files. Rules are written in one or more .ls-lint.yml files, with path patterns mapped to the naming conventions that apply to them.
It supports all file extensions and Unicode names, and runs on Windows, macOS, and Linux. Besides the standalone binary, it can be installed through npm, Homebrew, or Docker, and a GitHub Action is available for running it in CI. Ignore patterns let you exclude directories such as node_modules from checks.
The tool is written in Go and depends on only a couple of small libraries for YAML parsing and glob matching.
Key features
- 01Define naming rules per path pattern in .ls-lint.yml files
- 02Supports kebab-case, camelCase, PascalCase and regex-based patterns
- 03Can require companion files such as tests to exist
- 04Handles all file extensions and full Unicode names
- 05Ignore patterns to skip directories like node_modules
Use cases
- Enforcing consistent file naming across a frontend or monorepo codebase
- Checking filename conventions in CI before merging pull requests
- Verifying that every component directory contains required test files
Quick start
- 1
Install the npm package @ls-lint/ls-lint, Homebrew formula, or Docker image, as listed in the README
- 2
Create a .ls-lint.yml file defining naming rules for your directories and filenames
Topics
FAQ
- What is ls-lint?
- A fast command-line linter that enforces naming conventions for directories and filenames in your project, configured through .ls-lint.yml files. ls-lint checks the names of directories and files in a project against rules you define, such as kebab-case, camelCase, or PascalCase, and can require related files like test files to exist next to source files. Rules are written in one or more .ls-lint.yml files, with path patterns mapped to the naming conventions that apply to them.
- Is ls-lint free to use? What license does it have?
- ls-lint is open source under the MIT license. Check the license terms before using it in commercial products.
- Is ls-lint still maintained?
- Actively maintained. The last commit to ls-lint was on Oct 21, 2026.
- What can I use ls-lint for?
- Enforcing consistent file naming across a frontend or monorepo codebase Checking filename conventions in CI before merging pull requests Verifying that every component directory contains required test files
- How do I install ls-lint?
- Install the npm package @ls-lint/ls-lint, Homebrew formula, or Docker image, as listed in the README Create a .ls-lint.yml file defining naming rules for your directories and filenames
- Where can I get ls-lint?
- The source code and installation instructions are on GitHub: https://github.com/loeffel-io/ls-lint
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Black is an opinionated, deterministic Python code formatter that rewrites files in place with minimal diffs.
A fast Git hooks manager written in Go that runs pre-commit and other hook commands in parallel across Node.js, Ruby, Python and other projects.
Fast, open-source static analysis CLI that finds bugs and enforces coding standards using code-like patterns instead of regex or ASTs.
A fast Go-based Dockerfile linter with 60+ best-practice rules, quality scoring, and security checks for secrets and ARG usage.
A fast, user-friendly command-line alternative to the Unix find command for locating files and directories by name.