PostgreSQL SQL Parser for ESLint
JSON →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.
Traffic · last 30 days ↑50% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇯🇵 Japan · 🇳🇴 Norway