Skip to content

Commit f20acd5

Browse files
committed
Format the code with Prettier
1 parent 367b088 commit f20acd5

2 files changed

Lines changed: 7 additions & 16 deletions

File tree

‎eslint.config.mjs‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// @ts-check
22

3-
import js from '@eslint/js';
4-
import { defineConfig } from 'eslint/config';
5-
import tseslint from 'typescript-eslint';
3+
import js from "@eslint/js";
4+
import { defineConfig } from "eslint/config";
5+
import tseslint from "typescript-eslint";
66

7-
export default defineConfig(
8-
js.configs.recommended,
9-
tseslint.configs.recommended,
10-
);
7+
export default defineConfig(js.configs.recommended, tseslint.configs.recommended);

‎src/cli.ts‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@
33
import { parseArgs } from "node:util";
44
import { format as prettierFormat } from "prettier";
55
import { format as sqlFormat, SqlLanguage, supportedDialects } from "sql-formatter";
6-
import {
7-
isLanguage,
8-
isSqlLanguage,
9-
Language,
10-
languages,
11-
parsePrintWidth,
12-
prettierParsers,
13-
} from "./options.js";
6+
import { isLanguage, isSqlLanguage, Language, languages, parsePrintWidth, prettierParsers } from "./options.js";
147
import { findBin, generateShortcuts } from "./shortcuts.js";
158

169
function formatSQL(input: string, sqlDialect: SqlLanguage): string {
@@ -149,7 +142,8 @@ async function runShortcuts(names: string[], values: CommandValues) {
149142
const selectedLanguages = names.length > 0 ? names.map(checkLanguage) : languages;
150143
const printWidth = values["print-width"] === undefined ? undefined : checkPrintWidth(values["print-width"]);
151144
const sqlDialect = values["sql-dialect"] === undefined ? undefined : checkSqlDialect(values["sql-dialect"]);
152-
const bin = values.bin ?? findBin() ?? fail("Cannot find format-code on the PATH. Run 'npm link' or give --bin PATH.");
145+
const bin =
146+
values.bin ?? findBin() ?? fail("Cannot find format-code on the PATH. Run 'npm link' or give --bin PATH.");
153147
const outDir = values.out ?? ".";
154148
const count = selectedLanguages.length;
155149

0 commit comments

Comments
 (0)