# Ripgrep Configuration File Standards
## Rule
Every developer workstation and project SHOULD have a .ripgreprc file with sensible defaults. Set RIPGREP_CONFIG_PATH in your shell profile for global configuration.
## Format
```
# ~/.ripgreprc
--smart-case
--hidden
--glob=!.git/
--glob=!node_modules/
--glob=!.next/
--glob=!dist/
--glob=!coverage/
--max-columns=200
--max-columns-preview
```
## Good Examples
```bash
# ~/.ripgreprc — global config
--smart-case
--hidden
--follow
--glob=!.git/
--glob=!node_modules/
--glob=!.next/
--glob=!dist/
--glob=!build/
--glob=!coverage/
--glob=!*.min.js
--glob=!*.min.css
--glob=!package-lock.json
--glob=!yarn.lock
--glob=!pnpm-lock.yaml
--max-columns=200
--max-columns-preview
--colors=match:fg:yellow
--colors=match:style:bold
```
```bash
# Enable global config in shell profile
export RIPGREP_CONFIG_PATH="$HOME/.ripgreprc"
```
```bash
# Project-specific .rgignore (same syntax as .gitignore)
# .rgignore
node_modules/
dist/
coverage/
*.generated.ts
```
## Bad Examples
```bash
# BAD: No config — constantly typing exclusions
rg "pattern" --glob='!node_modules' --glob='!dist' --glob='!.git'
# Same flags every single time
# BAD: No smart-case — always case-sensitive
rg "error" # Misses "Error", "ERROR"
# With --smart-case: lowercase = insensitive, uppercase = sensitive
```
## Enforcement
- Set RIPGREP_CONFIG_PATH in team shell profile template
- Use .rgignore in project root for project-specific exclusions
- Document recommended config in project contributing guide