Ignoring Files
ignores
- Type:
string[]
Glob patterns for files to exclude. An entry with only ignores (no other fields) acts as a global ignore — matching files are excluded from all rules.
Pattern types in global ignores
Global ignore patterns affect both file matching and directory traversal (including config discovery in monorepos):
Use dir/** to completely exclude a directory (including any nested configs inside it). Use dir/**/* if you only want to ignore files but still allow nested configs to be discovered.
You can use ! negation patterns to re-include specific files. Patterns are evaluated sequentially — later patterns override earlier ones:
For directory-level patterns (dir/**), ! negation cannot re-include files because the directory traversal is blocked entirely. Use dir/**/* instead if you need negation:
node_modules and .git are automatically excluded by rslint — you don't need to add them to ignores.
.gitignore integration
Rslint automatically reads .gitignore files and treats their patterns as additional global ignores. This means files ignored by git (build outputs, coverage reports, etc.) are also ignored by the linter without extra configuration.
- Nested
.gitignorefiles are supported — each one only affects its own directory subtree - Parent patterns cascade to child directories (e.g., root
dist/also ignorespackages/app/dist/) - Child
.gitignorecan override parent patterns with!negation - Config
!negation can also override.gitignorepatterns (they are evaluated sequentially in the same global ignores list)
If you need to lint a file that is in .gitignore, add a ! negation pattern in your config's global ignores: