PostgreSQL SQL Parser for ESLint

JSON →
library 0.1.8 ·javascript
verified May 27, 2026

postgresql-eslint-parser provides a specialized parser for PostgreSQL SQL syntax, enabling ESLint to perform static analysis on `.sql` files or SQL embedded within other codebases. It leverages the `libpg-query` library to convert PostgreSQL SQL into an ESTree-compatible Abstract Syntax Tree (AST), which is the standard format for ESLint. The current stable version is 0.1.8, indicating it's still in its early development stages with minor patch releases for bug fixes and improvements. Its primary differentiation lies in its tight integration with the ESLint ecosystem, offering functions like `parseForESLint` that provide not only the AST but also visitor keys essential for traversing the tree and a scope manager (currently `null`). This allows developers to write custom ESLint rules specifically for PostgreSQL, ensuring SQL code adheres to project-specific style guides and best practices, enhancing code quality and maintainability in projects that utilize PostgreSQL.

total hits 18
actors 7 distinct systems
last hit 3d ago AhrefsBot
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇯🇵 Japan · 🇳🇴 Norway