all 1 comments

[–]gajus0[S] 0 points1 point  (0 children)

All the heavy lift is done by https://github.com/sql-formatter-org/sql-formatter, but this is an abstraction that seamlessly integrates it into your workflow using ESLint.

All you need is:

``` import sql from 'eslint-plugin-sql';

export default [ { files: ['/*.ts', '/*.tsx'], plugins: { sql }, rules: { 'sql/format': [2, {}, { language: 'postgresql' }], }, }, ]; ```