A configurable, single-file linter runner with built-in checks for clang-format, CRLF line endings, linelint, and paired-file validation. Designed to run as a git pre-commit hook or in CI.
The bundled linter is a single ESM file (dist/linter.mjs) with no runtime dependencies beyond Node.js 18+.
Install from the repo at a specific commit:
yarn global add "https://github.com/skyrim-multiplayer/linter#<commit>"This makes skymp-linter available on your PATH:
skymp-linter --lint --mode ci
skymp-linter --install-hookDownload and install as a git pre-commit hook in one go:
curl -fsSL https://raw.githubusercontent.com/skyrim-multiplayer/linter/main/dist/linter.mjs -o .git/hooks/linter.mjs && node .git/hooks/linter.mjs --install-hookThis downloads linter.mjs into .git/hooks/ and creates a pre-commit hook next to it. If a pre-commit hook already exists, it is backed up to pre-commit.bak.
# Generate a minimal linter-config.json
skymp-linter --init
# Scaffold a custom check
skymp-linter --create-check ./checks/my-check.js
# Lint / fix
skymp-linter --lint
skymp-linter --fix --addRun skymp-linter --help for the full list of commands, options, built-in checks, and file sources.
See LICENSE.