Skip to content

Latest commit

 

History

History

README.md

@putout/plugin-gitignore NPM version

A .gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected.

(c) git-scm.com

🐊Putout plugin helps with .gitignore.

Install

npm i @putout/plugin-gitignore -D

Rules

Config

{
    "rules": {
        "gitignore/add": ["on", {
            "dismiss": [
                "*.swp",
                "coverage",
                "*.lock",
                "*.log"
            ]
        }],
        "gitignore/sort": "on"
    }
}

add

Adds .putoutcache, *.swp, .idea:

node_modules
+.putoutcache
+*.swp
+.idea

sort

❌ Example of incorrect code

node_modules
*.swp
yarn-error.log
yarn.lock
.idea
.DS_Store
deno.lock

coverage
.filesystem.json

✅ Example of correct code

.idea
.filesystem.json
.DS_Store

*.swp

yarn-error.log
yarn.lock
deno.lock

node_modules
coverage# sort

License

MIT