Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta: whitelist dotfiles in .gitignore #8016

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Whitelist dotfiles
.*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to use /.* ? I think that way we wouldn't have to whitelist subdirectories below.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are meta files from various file managers (e.g. Finder in macOS), IDEs, version control systems, backup systems that can/will create dotfiles in subdirectories.

I think it's easier to whitelist what the Node.js project knows it needs than to react case-by-case to every external product out there.

!deps/**/.*
!test/fixtures/**/.*
!tools/eslint/**/.*
!tools/doc/node_modules/**/.*
!.editorconfig
!.eslintignore
!.eslintrc
!.gitattributes
!.github
!.gitignore
!.gitkeep
!.mailmap
!.remarkrc

core
vgcore.*
v8*.log
Expand All @@ -16,8 +32,6 @@ node
node_g
*.swp
.benchmark_reports
/.project
/.cproject
icu_config.gypi

/out
Expand Down