Skip to content

Commit

Permalink
feat: release new format rule based on sql-formatter
Browse files Browse the repository at this point in the history
BREAKING CHANGE: new formatting rules
  • Loading branch information
gajus committed Dec 19, 2024
1 parent e232271 commit 890d94b
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/rules/format.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,40 @@ export default createRuleTester(
\`
`,
},
{
code: multiline`
sql.fragment\`
select
COUNT(*)
from
message
where
id = \${message.id}
\`
`,
errors: [
{
messageId: 'format',
},
],
name: 'keywordCase:upper',
options: [
{},
{
keywordCase: 'upper',
},
],
output: multiline`
sql.fragment\`
SELECT
COUNT(*)
FROM
message
WHERE
id = \${message.id}
\`
`,
},
{
code: multiline`
sql.fragment\`
Expand Down

0 comments on commit 890d94b

Please sign in to comment.