dtype-linter
v1.0.11
Published
A tiny, zero-dependency code-style checker for JavaScript
Maintainers
Readme
dtype-linter
A tiny, zero-dependency code-style checker for JavaScript.
dtype-linter scans the .js files in your project and reports common formatting
issues that quietly hurt readability — overly long lines, trailing whitespace,
mixed indentation and empty catch blocks. No config files, no plugins, no setup.
Just run it.
Why another linter?
Full-featured linters are powerful but heavy: dozens of transitive dependencies,
a config file to maintain and a learning curve. Sometimes you just want a fast,
honest check that your code is tidy. dtype-linter does exactly that — and nothing more.
- 🪶 Zero dependencies — a single small script
- ⚡ Instant — no config, no cache, no warm-up
- 📁 Recursive — scans the current folder and subfolders (skips
node_modules) - 🎯 Clear output — every issue as
file:line - 🤖 CI-friendly — exits with code
1when issues are found
Installation
npm install -g dtype-linterUsage
Run it from the root of any project:
dtype-linter lintExample output:
src/app.js:45 line longer than 100 characters
src/db.js:12 trailing whitespace
server.js:8 mixed tabs and spaces
Problems found: 3When everything is clean:
Clean! No problems found.The process exits with status 1 if any problems are found, so you can drop it
straight into a CI pipeline or a pre-commit hook:
dtype-linter lint || echo "Please fix the issues above before committing."Rules
| Rule | What it catches |
|------|-----------------|
| Line length | Lines longer than 100 characters |
| Trailing whitespace | Spaces or tabs at the end of a line |
| Mixed indentation | Lines that mix tabs and spaces |
| Empty catch | catch {} blocks that silently swallow errors |
Notes
dtype-linter is intentionally minimal. It does not rewrite your code, it only
reports. For deep static analysis and auto-fixing, reach for a full linter — for a
quick tidiness check, this is all you need.
License
ISC
