Closed maxh closed 11 months ago
Thanks for the feedback. I've iterated in that direction -- let me know what you think.
UPDATE:
I confirmed this approach works from prisma-lint
side: https://github.com/loop-payments/prisma-lint/pull/239/files
@maxh this feature should be available via prisma-ast v0.8.0
I finally got around to hacking on using location data in
prisma-lint
!https://github.com/loop-payments/prisma-lint/pull/84
Everything works great when testing in the
prisma-lint
repository, but I didn't get location data when running the linter on a schema in a different repository (backend
) that usesprisma-lint
. I think this is becauseprisma-ast
was looking for a config file inbackend
.I wasn't sure how to get the location node configuration for
prisma-ast
to be set byprisma-lint
without requiringbackend
to also have to configureprisma-ast
, which felt like too much to ask for users ofprisma-lint
.This PR allows
prisma-lint
to request location information on demand fromprisma-ast
, regardless of the config.I recommend reviewing with the hide whitespace option enabled: