eslint-plugin-sql
eslint-plugin-sql copied to clipboard
Should handle sql-formatter crashes and report with eslint
I noticed that when sql-formatter fails to format (malformed sql) it crashes eslint.
Instead, eslint-plugin-sql should probably catch the error, report and move on.
Example:
sql`SELECT hi !`
Output:
Oops! Something went wrong! :(
ESLint: 9.36.0
Error: Parse error: Unexpected "!" at line 1 column 11.
This likely happens because you're using the default "sql" dialect.
If possible, please select a more specific dialect (like sqlite, postgresql, etc).
[stacktrace]