Skip to content

lttb/gitignored

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitignored

Check if staged files should be ignored by some of https://github.com/github/gitignore.

Installation

npm install --save-dev gitignored

Usage

lint-staged

Recommended way is to use gitignored as a pre-commit hook with lint-staged.

For example package.json:

"lint-staged": {
  "*": "gitignored"
},
"gitignored": {
  "types": ["Global/macOS", "Global/Linux"]
}

CLI

gitignored -t Global/macOS,Global/Linux file1 file2

Config

  • package.json

.gitignoredrc

yaml

types:
  - Global/macOS
  - Global/Linux

json

{
  "types": ["Global/macOS", "Global/Linux"]
}