Skip to content

Latest commit

 

History

History
136 lines (97 loc) · 7.63 KB

File metadata and controls

136 lines (97 loc) · 7.63 KB

Redlint License NPM version Build Status Coverage Status

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

image

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:

image

Scan

To scan your files use redlint scan:

image

Rules

Convert

To convert file to JSON or JavaScript use:

image image

Fix

To fix your files use redlint fix:

image

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

When you writing a rule for RedLint you can run tests with redlint test. Here is how it looks like: image

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