diff --git a/apheleia-formatters.el b/apheleia-formatters.el index bef7aa04..cbf595cf 100644 --- a/apheleia-formatters.el +++ b/apheleia-formatters.el @@ -35,6 +35,7 @@ "-")) (brittany . ("brittany")) (buildifier . ("buildifier")) + (biome . ("apheleia-npx" "biome" "format" "--stdin-file-path" filepath)) (caddyfmt . ("caddy" "fmt" "-")) (clang-format . ("clang-format" "-assume-filename" diff --git a/test/formatters/installers/biome.bash b/test/formatters/installers/biome.bash new file mode 100644 index 00000000..56b6e1b7 --- /dev/null +++ b/test/formatters/installers/biome.bash @@ -0,0 +1 @@ +npm install -g @biomejs/biome diff --git a/test/formatters/samplecode/biome/in.css b/test/formatters/samplecode/biome/in.css new file mode 120000 index 00000000..d979eb8e --- /dev/null +++ b/test/formatters/samplecode/biome/in.css @@ -0,0 +1 @@ +../prettier-css/in.css \ No newline at end of file diff --git a/test/formatters/samplecode/biome/in.graphql b/test/formatters/samplecode/biome/in.graphql new file mode 120000 index 00000000..bb44c127 --- /dev/null +++ b/test/formatters/samplecode/biome/in.graphql @@ -0,0 +1 @@ +../prettier-graphql/in.graphql \ No newline at end of file diff --git a/test/formatters/samplecode/biome/in.js b/test/formatters/samplecode/biome/in.js new file mode 120000 index 00000000..da493037 --- /dev/null +++ b/test/formatters/samplecode/biome/in.js @@ -0,0 +1 @@ +../prettier-javascript/in.js \ No newline at end of file diff --git a/test/formatters/samplecode/biome/in.json b/test/formatters/samplecode/biome/in.json new file mode 120000 index 00000000..599a1e23 --- /dev/null +++ b/test/formatters/samplecode/biome/in.json @@ -0,0 +1 @@ +../prettier-json/in.json \ No newline at end of file diff --git a/test/formatters/samplecode/biome/in.md b/test/formatters/samplecode/biome/in.md new file mode 120000 index 00000000..99482b8a --- /dev/null +++ b/test/formatters/samplecode/biome/in.md @@ -0,0 +1 @@ +../prettier-markdown/in.md \ No newline at end of file diff --git a/test/formatters/samplecode/biome/in.scss b/test/formatters/samplecode/biome/in.scss new file mode 120000 index 00000000..c07bcb83 --- /dev/null +++ b/test/formatters/samplecode/biome/in.scss @@ -0,0 +1 @@ +../prettier-scss/in.scss \ No newline at end of file diff --git a/test/formatters/samplecode/biome/in.ts b/test/formatters/samplecode/biome/in.ts new file mode 120000 index 00000000..1b5f9d6c --- /dev/null +++ b/test/formatters/samplecode/biome/in.ts @@ -0,0 +1 @@ +../prettier-typescript/in.ts \ No newline at end of file diff --git a/test/formatters/samplecode/biome/in.yml b/test/formatters/samplecode/biome/in.yml new file mode 120000 index 00000000..bdbc9aaf --- /dev/null +++ b/test/formatters/samplecode/biome/in.yml @@ -0,0 +1 @@ +../prettier-yaml/in.yml \ No newline at end of file diff --git a/test/formatters/samplecode/biome/out.css b/test/formatters/samplecode/biome/out.css new file mode 120000 index 00000000..603e0aaf --- /dev/null +++ b/test/formatters/samplecode/biome/out.css @@ -0,0 +1 @@ +../prettier-css/out.css \ No newline at end of file diff --git a/test/formatters/samplecode/biome/out.graphql b/test/formatters/samplecode/biome/out.graphql new file mode 120000 index 00000000..64254cfe --- /dev/null +++ b/test/formatters/samplecode/biome/out.graphql @@ -0,0 +1 @@ +../prettier-graphql/out.graphql \ No newline at end of file diff --git a/test/formatters/samplecode/biome/out.js b/test/formatters/samplecode/biome/out.js new file mode 120000 index 00000000..83d53e75 --- /dev/null +++ b/test/formatters/samplecode/biome/out.js @@ -0,0 +1 @@ +../prettier-javascript/out.js \ No newline at end of file diff --git a/test/formatters/samplecode/biome/out.json b/test/formatters/samplecode/biome/out.json new file mode 120000 index 00000000..018b8c27 --- /dev/null +++ b/test/formatters/samplecode/biome/out.json @@ -0,0 +1 @@ +../prettier-json/out.json \ No newline at end of file diff --git a/test/formatters/samplecode/biome/out.md b/test/formatters/samplecode/biome/out.md new file mode 120000 index 00000000..e58dfd7c --- /dev/null +++ b/test/formatters/samplecode/biome/out.md @@ -0,0 +1 @@ +../prettier-markdown/out.md \ No newline at end of file diff --git a/test/formatters/samplecode/biome/out.scss b/test/formatters/samplecode/biome/out.scss new file mode 120000 index 00000000..1e914a43 --- /dev/null +++ b/test/formatters/samplecode/biome/out.scss @@ -0,0 +1 @@ +../prettier-scss/out.scss \ No newline at end of file diff --git a/test/formatters/samplecode/biome/out.ts b/test/formatters/samplecode/biome/out.ts new file mode 120000 index 00000000..022e7b82 --- /dev/null +++ b/test/formatters/samplecode/biome/out.ts @@ -0,0 +1 @@ +../prettier-typescript/out.ts \ No newline at end of file diff --git a/test/formatters/samplecode/biome/out.yml b/test/formatters/samplecode/biome/out.yml new file mode 120000 index 00000000..b0f089ee --- /dev/null +++ b/test/formatters/samplecode/biome/out.yml @@ -0,0 +1 @@ +../prettier-yaml/out.yml \ No newline at end of file diff --git a/test/formatters/samplecode/prettier-css/out.css b/test/formatters/samplecode/prettier-css/out.css index 91589966..87717b98 100644 --- a/test/formatters/samplecode/prettier-css/out.css +++ b/test/formatters/samplecode/prettier-css/out.css @@ -1,6 +1,6 @@ body { - padding-left: 11em; - font-family: Georgia, "Times New Roman", Times, serif; - color: purple; - background-color: #d8da3d; + padding-left: 11em; + font-family: Georgia, "Times New Roman", Times, serif; + color: purple; + background-color: #d8da3d; } diff --git a/test/formatters/samplecode/prettier-graphql/out.graphql b/test/formatters/samplecode/prettier-graphql/out.graphql index f406f637..89828dab 100644 --- a/test/formatters/samplecode/prettier-graphql/out.graphql +++ b/test/formatters/samplecode/prettier-graphql/out.graphql @@ -1,6 +1,6 @@ { - human(id: "1000") { - name - height(unit: FOOT) - } + human(id: "1000") { + name + height(unit: FOOT) + } } diff --git a/test/formatters/samplecode/prettier-javascript/out.js b/test/formatters/samplecode/prettier-javascript/out.js index ec9cfe46..1486b511 100644 --- a/test/formatters/samplecode/prettier-javascript/out.js +++ b/test/formatters/samplecode/prettier-javascript/out.js @@ -1,10 +1,10 @@ function HelloWorld({ - greeting = "hello", - greeted = '"World"', - silent = false, - onMouseOver, + greeting = "hello", + greeted = '"World"', + silent = false, + onMouseOver, }) { - if (!greeting) { - return null; - } + if (!greeting) { + return null; + } } diff --git a/test/formatters/samplecode/prettier-json/out.json b/test/formatters/samplecode/prettier-json/out.json index 59bb3b44..86787f9f 100644 --- a/test/formatters/samplecode/prettier-json/out.json +++ b/test/formatters/samplecode/prettier-json/out.json @@ -1,19 +1,19 @@ { - "arrowParens": "always", - "bracketSpacing": true, - "embeddedLanguageFormatting": "auto", - "htmlWhitespaceSensitivity": "css", - "insertPragma": false, - "jsxBracketSameLine": false, - "jsxSingleQuote": false, - "printWidth": 80, - "proseWrap": "preserve", - "quoteProps": "as-needed", - "requirePragma": false, - "semi": true, - "singleQuote": false, - "tabWidth": 2, - "trailingComma": "es5", - "useTabs": false, - "vueIndentScriptAndStyle": false + "arrowParens": "always", + "bracketSpacing": true, + "embeddedLanguageFormatting": "auto", + "htmlWhitespaceSensitivity": "css", + "insertPragma": false, + "jsxBracketSameLine": false, + "jsxSingleQuote": false, + "printWidth": 80, + "proseWrap": "preserve", + "quoteProps": "as-needed", + "requirePragma": false, + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "es5", + "useTabs": false, + "vueIndentScriptAndStyle": false } diff --git a/test/formatters/samplecode/prettier-typescript/out.ts b/test/formatters/samplecode/prettier-typescript/out.ts index 143b5a7b..b97c21b1 100644 --- a/test/formatters/samplecode/prettier-typescript/out.ts +++ b/test/formatters/samplecode/prettier-typescript/out.ts @@ -1,6 +1,6 @@ interface GreetingSettings { - greeting: string; - duration?: number; - color?: string; + greeting: string; + duration?: number; + color?: string; } declare function greet(setting: GreetingSettings): void;