-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π§βπ» chore: Add
biome
linter and formatter (#879)
* π§βπ» chore: Add `biome` linter and formatter * Format code
- Loading branch information
1 parent
da12f3f
commit eebae94
Showing
10 changed files
with
109 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json", | ||
"files": { | ||
"ignore": ["**/node_modules", "**/dist", "**/types", ".vscode", ".idea"] | ||
}, | ||
"formatter": { | ||
"indentStyle": "space", | ||
"indentSize": 2 | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"quoteStyle": "single", | ||
"trailingComma": "none", | ||
"semicolons": "asNeeded" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module.exports = { | ||
extends: [ 'gitmoji' ], | ||
rules: { | ||
'subject-case': [2, 'always', 'sentence-case'], | ||
'header-max-length': [2, 'always', 72], | ||
} | ||
extends: ['gitmoji'], | ||
rules: { | ||
'subject-case': [2, 'always', 'sentence-case'], | ||
'header-max-length': [2, 'always', 72] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import {bye, hello, sayHello} from 'greetings' | ||
import { bye, hello, sayHello } from 'greetings' | ||
|
||
sayHello("Alice") | ||
sayHello('Alice') | ||
|
||
console.log(hello("Bob")) | ||
console.log(bye("Carol")) | ||
console.log(hello('Bob')) | ||
console.log(bye('Carol')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"lint": "biome format . --write", | ||
"lint:check": "biome check ." | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.2.2", | ||
"commitlint-config-gitmoji": "^2.3.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import chalk from 'chalk' | ||
|
||
export function bye(name: string) { | ||
return `Bye ${chalk.red(name)}!`; | ||
return `Bye ${chalk.red(name)}!` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import {hello} from './hello' | ||
import { hello } from './hello' | ||
|
||
export function sayHello(name: string) { | ||
console.log(hello(name)) | ||
console.log(hello(name)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import chalk from 'chalk'; | ||
import chalk from 'chalk' | ||
|
||
console.log(chalk.green('Hello, world!')); | ||
console.log(chalk.green('Hello, world!')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,3 @@ | |
"forceConsistentCasingInFileNames": true | ||
} | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.