Skip to content

Commit

Permalink
Ignore .DS_Store files as well as folders
Browse files Browse the repository at this point in the history
They were previously only being ignored if they were folders, but these
things are typically files, not folders.

Via: https://twitter.com/feross/status/1144708835770167297
  • Loading branch information
isaacs committed Jun 28, 2019
1 parent 8d85a56 commit 7fcd045
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const defaultRules = [
'npm-debug.log',
'**/.npmrc',
'.*.swp',
'.DS_Store',
'**/.DS_Store/**',
'._*',
'**/._*/**',
Expand Down
5 changes: 5 additions & 0 deletions test/include-gitignore.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ t.test('setup', t => {
'!.gitignore'
)

fs.writeFileSync(
path.join(pkg, '/.DS_Store'),
'do not include me'
)

fs.writeFileSync(
path.join(pkg, 'package.json'),
JSON.stringify(json, null, 2)
Expand Down

0 comments on commit 7fcd045

Please # to comment.