loop-payments / prisma-lint

A linter for Prisma schema files.
https://www.npmjs.com/package/prisma-lint
MIT License
128 stars 6 forks source link

Add support for index name linting #498

Open daeteck opened 1 week ago

daeteck commented 1 week ago

Hi team,

It would be helpful to have a linting rule for index names, such as enforcing the use of snake_case for index names. For example, the following should throw an error: @@index([createdAt], map: "ticket_createdAt_idx").

Perhaps a rule: index-name-mapping-snake-case

maxh commented 1 week ago

Yes, that makes sense. Likely we won't get to it in the near term, but PRs welcome!