.cursorignore React

Anyone here got a nice one for working with react?

tried many things but it seems like it keeps indexing almost everything

Here’s a .cursorignore that should only index the important React files:

# First ignore everything
*

# Then unignore specific React source files
!src/**/*.js
!src/**/*.jsx
!src/**/*.ts
!src/**/*.tsx
!src/**/*.css
!src/**/*.scss

# Unignore package files
!package.json
!package-lock.json

# Keep ignoring node_modules even if in src
**/node_modules/**

This should keep your indexing focused on just the React source code. More details on ignore patterns here: Cursor – Ignore Files

1 Like

Youre the GOAT thank yo very much

1 Like