Developer
Ignoring Files

Ignoring Files

It's time to create the necessary ignore files to prevent certain files from being uploaded to GitHub!

Git Ignore

Let's create a .gitignore file:

.gitignore
# Node.js
node_modules/
dist/
 
# TypeScript
*.tsbuildinfo
 
# Logs
*.log
 
# Testing and coverage
coverage/
*.test.js
 
# IDE-specific files
.vscode/
.idea/
*.sublime-project
*.sublime-workspace
 
# OS-specific files
.DS_Store
Thumbs.db
ehthumbs.db
desktop.ini
 
# Environment variables
.env
 
# Miscellaneous
!.gitignore
🚫
Don't forget to include your .env file.

Prettier Ignore

Let's create a .prettierignore file:

.prettierignore
# Ignore artifacts:
build
coverage
node_modules
.next

Eslint Ignore

Also, its better to keep an .eslintignore file:

.eslintignore
# Ignore artifacts:
build/
coverage/
node_modules/
 
# Ignore specific files:
dist/

Alright, we have successfully created our ignore files. Now we can go ahead!