Redlint [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]
April 14, 2026 ยท View on GitHub
Karna is the goddess of retribution, a strict and fair Judge in whose hands is the Book of Fates. In this book she records all the deeds and actions of people. Karna works together with the goddess Makosh. Makosh weaves the destinies of people in accordance with the records of the goddess Karna.
(c) The Book of Kon, PoKon and ZaKon
What if Filesystem was a simple JSON file .filesystem.json. What if you can transform JSON file with ๐Putout code transformer and this changes modify Filesystem?
What if I tell you it is possible? ๐ฑ Checkout in ๐Putout Editor.
First time ever! Linter for your Filesystem ๐๐พ.
Install
npm i redlint -g
Choose
You can choose interactively when run redlint:
Scan
To scan your files use redlint scan:
Rules
- โ
madrun/rename-file; - โ
package-json/find-file; - โ
package-json/remove-exports-with-missing-files; - โ
esm/resolve-imported-file; - โ
esm/shorten-imported-file; - โ
esm/apply-name-to-imported-file; - โ
esm/apply-namespace-to-imported-file; - โ
esm/apply-privately-imported-file; - โ
esm/apply-js-imported-file; - โ
putout-config/remove-empty-file; - โ
typescript/find-file; - โ
typescript/cts-file; - โ
typescript/mts-file; - โ
typescript/rename-file-cts-to-ts; - โ
typescript/rename-file-mts-to-ts; - โ
nodejs/apply-privately-required-files; - โ
nodejs/cjs-file; - โ
nodejs/mjs-file; - โ
nodejs/rename-file-cjs-to-js; - โ
nodejs/rename-file-mjs-to-js; - โ
filesystem/remove-vim-swap-file; - โ
filesystem/remove-files; - โ
filesystem/remove-nyc-output-files; - โ
filesystem/remove-travis-yml-file; - โ
filesystem/remove-empty-directory; - โ
filesystem/remove-ds-store-file;
Convert
To convert file to JSON or JavaScript use:
Fix
To fix your files use redlint fix:
Generate
You can also generate .filesystem.json file with putout generate.
How to add a new rule?
To add new rule create-file located in plugin custom for RedLint write a new ๐Putout rule Scanner. And add it to .putout.json:
{
"match": {
".filesystem": {
"custom/create-file": "on"
}
},
"plugins": ["custom"]
}
Test
- โ
get fixture names from
index.spec.js. - โ init fixture;
- โ read fixture;
- โ run plugin;
- โ get file name with content;
When you writing a rule for RedLint you can run tests with redlint test.
Here is how it looks like:
Pack
redlint pack
Will produce file filesystem.red with content of current directory
Extract
redlint extract
Will extract filesystem.red to current directory. Also works from stdin:
cat ../../filesystem.red | redlint extract
License
MIT