{"library":"prettier-plugin-groq","title":"Prettier Plugin for GROQ","description":"A Prettier plugin for formatting GROQ queries used with Sanity.io. Version 0.2.5 is the latest stable release. Release cadence is irregular, driven by community contributions. Key differentiators: opinionated formatting following Prettier philosophy, groups object properties by value type, respects printWidth and inlineShorthandProperties option. Supports filters, projections, order, select, and conditional expressions. Does not preserve whitespace or inline comments. Standard Prettier plugin installation; auto-detected by editors when installed locally.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-plugin-groq"],"cli":null},"imports":["import * as prettierPluginGroq from 'prettier-plugin-groq'","// .prettierrc\n{ \"plugins\": [\"prettier-plugin-groq\"], \"groqInlineShorthandProperties\": false }","// .prettierrc\n{ \"groqInlineShorthandProperties\": true }"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"npm install --save-dev prettier prettier-plugin-groq\n\necho '{\n  \"plugins\": [\"prettier-plugin-groq\"],\n  \"groqInlineShorthandProperties\": true\n}' > .prettierrc\n\ncat << 'EOF' > query.groq\n*[_type == \"movie\" && popularity > 10] | order(popularity desc){ _id, title, popularity }\nEOF\n\nnpx prettier --write query.groq\n\ncat query.groq\n# Output:\n# *[_type == \"movie\" && popularity > 10] | order(popularity desc) {\n#   _id,\n#   title,\n#   popularity\n# }","lang":"javascript","description":"Installs the plugin, configures Prettier, formats a .groq file with inline shorthand enabled.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}