Skip to content

Commit

Permalink
feat: add biome formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpza committed Dec 25, 2024
1 parent 543f6d6 commit a334eeb
Show file tree
Hide file tree
Showing 23 changed files with 53 additions and 35 deletions.
1 change: 1 addition & 0 deletions apheleia-formatters.el
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions test/formatters/installers/biome.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm install -g @biomejs/biome
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/in.css
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/in.graphql
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/in.js
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/in.json
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/in.md
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/in.scss
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/in.ts
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/in.yml
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/out.css
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/out.graphql
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/out.js
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/out.json
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/out.md
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/out.scss
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/out.ts
1 change: 1 addition & 0 deletions test/formatters/samplecode/biome/out.yml
8 changes: 4 additions & 4 deletions test/formatters/samplecode/prettier-css/out.css
Original file line number Diff line number Diff line change
@@ -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;
}
8 changes: 4 additions & 4 deletions test/formatters/samplecode/prettier-graphql/out.graphql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
human(id: "1000") {
name
height(unit: FOOT)
}
human(id: "1000") {
name
height(unit: FOOT)
}
}
14 changes: 7 additions & 7 deletions test/formatters/samplecode/prettier-javascript/out.js
Original file line number Diff line number Diff line change
@@ -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;
}
}
34 changes: 17 additions & 17 deletions test/formatters/samplecode/prettier-json/out.json
Original file line number Diff line number Diff line change
@@ -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
}
6 changes: 3 additions & 3 deletions test/formatters/samplecode/prettier-typescript/out.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interface GreetingSettings {
greeting: string;
duration?: number;
color?: string;
greeting: string;
duration?: number;
color?: string;
}
declare function greet(setting: GreetingSettings): void;

0 comments on commit a334eeb

Please sign in to comment.