# Introducing Svet: A Git Repository Linter

DevFeed: [Introducing Svet: A Git Repository Linter](<https://devfeed.tech/articles/introducing-svet-a-git-repository-linter-110590.md>)

Original publisher: [Read original article](<https://code.dblock.org/2026/10/31/introducing-svet-a-git-repository-linter.html>)

Author: Daniel Doubrovkine (dblock@dblock.org)

Published: 2026-10-31T00:00:00Z

Content type: release

Language: en

Sources: [Daniel Doubrovkine](<https://devfeed.tech/sources/daniel-doubrovkine.md>)

Topics: [lint](<https://devfeed.tech/topics/lint.md>), [Git](<https://devfeed.tech/topics/git.md>), [ESLint](<https://devfeed.tech/topics/eslint.md>), [Repository](<https://devfeed.tech/topics/repository.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [Prettier](<https://devfeed.tech/topics/prettier.md>)

Tags: [eslint](<https://devfeed.tech/tags/eslint.md>), [git](<https://devfeed.tech/tags/git.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [lint](<https://devfeed.tech/tags/lint.md>), [linter](<https://devfeed.tech/tags/linter.md>), [nodejs](<https://devfeed.tech/tags/nodejs.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [portable](<https://devfeed.tech/tags/portable.md>), [pre-commit](<https://devfeed.tech/tags/pre-commit.md>), [repository](<https://devfeed.tech/tags/repository.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

Svet is a JavaScript repository linter that separates file selection from checks, so checks can use both file contents and Git path metadata without requiring a language parser. Its default Git selector checks tracked text files for LF endings and includes binary paths in the inventory used for filename checks. The `--precommit` mode checks staged Git-index snapshots without staging, stashing, or fixing files; revision comparisons use target-commit contents and do not fetch branches. Separate plugins provide checks such as trailing whitespace and path case. The excerpt contrasts this with an ESLint portability plugin that detects case and Unicode-normalization collisions, Windows-invalid names, and configurable path-length limits, but sees the current filesystem rather than staged snapshots and cannot fix filesystem names.

## Source excerpt

The idea for Svet came from a private repository at work, where checking filename case helps catch portability problems like Logo.svg and logo.svg colliding on a case-insensitive Windows filesystem. These checks are implemented in pure JavaScript. That seemed like a useful job for a reusable repository linter. I went looking for an existing tool. Tool Why it isn't enough here ESLint Can check filenames with a processor; byte-level checks and Git snapshots need custom plumbing. Oxlint Arbitrary non-JS/TS files don't reach its lint rules. Biome Checks supported languages, not arbitrary repository files. Stylelint Built for stylesheet rules; repository-wide checks need custom code. markdownlint-cli2 Can check filenames, but Markdown parsing isn't a byte-level checking API. HTML-validate Requires HTML or template transformations, not a general file-checking API. Prettier Skips or rejects unsupported formats; doesn't check repository-wide path rules. lint-staged Can run the checks, but doesn't supply rules or Git-index snapshots itself. Prettier is a formatter, and lint-staged is a task runner. They're in this list because they also appear in development and CI workflows. The important distinction is selecting a path, checking its name, understanding its contents, and choosing which version of those contents to inspect. Those are four different things. I built Svet for that job. Then I doubted myself and took a detour extending ESLint with eslint-plugin-portable-paths. It checks four portability problems: case-insensitive file and directory collisions, Unicode-normalization collisions, Windows-invalid names such as NUL.txt, and paths or individual names exceeding configurable lengths. It's almost everything. The remaining limitations of the eslint approach are about which files and bytes we're checking. This plugin sees the current filesystem, including untracked paths, and is not Git-aware, so a pre-commit hook would check the working tree, not the staged snapshot. ESLi