Correct way to specify rules globs?

There’s a lot of different ways people are specifying the globs in rules, I’m wondering what is the official schema for them?

YAML Array

globs: ['src/**/*.ts', 'tests/**/*.ts']

or

globs:
  - 'src/**/*.ts'
  - 'tests/**/*.ts'

Single String w/ quotes

globs: 'src/**/*.ts, tests/**/*.ts'

Single string (no quotes)

globs: src/**/*.ts, tests/**/*.ts

I’m seeing lots of files with the last but I’m guessing the first format is the correct one?

Specifying this better would make a great addition to the docs.

1 Like

last version works

1 Like

Yeah, that’s what I’m gathering but would be great for the Cursor team to put at least one example with the correct syntax in the docs.

3 Likes

Will let them know

1 Like