✨ [shared] Replace Prettier with Biome
This commit is contained in:
@ -1 +0,0 @@
|
|||||||
trailingComma = "none"
|
|
12
biome.jsonc
Normal file
12
biome.jsonc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://biomejs.dev/schemas/2.0.5/schema.json",
|
||||||
|
|
||||||
|
"formatter": {
|
||||||
|
"enabled": true,
|
||||||
|
"indentStyle": "space"
|
||||||
|
},
|
||||||
|
|
||||||
|
"linter": {
|
||||||
|
"enabled": false
|
||||||
|
}
|
||||||
|
}
|
@ -29,10 +29,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.search-wrapper .logo-and-wordmark .logo {
|
.search-wrapper .logo-and-wordmark .logo {
|
||||||
background:
|
background: url("zen-logo-mocha.svg"),
|
||||||
url("zen-logo-mocha.svg"),
|
|
||||||
url("https://raw.githubusercontent.com/IAmJafeth/zen-browser/main/themes/Mocha/Blue/zen-logo-mocha.svg")
|
url("https://raw.githubusercontent.com/IAmJafeth/zen-browser/main/themes/Mocha/Blue/zen-logo-mocha.svg")
|
||||||
no-repeat center !important;
|
no-repeat center !important;
|
||||||
display: inline-block !important;
|
display: inline-block !important;
|
||||||
height: 82px !important;
|
height: 82px !important;
|
||||||
width: 82px !important;
|
width: 82px !important;
|
||||||
|
@ -29,10 +29,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.search-wrapper .logo-and-wordmark .logo {
|
.search-wrapper .logo-and-wordmark .logo {
|
||||||
background:
|
background: url("zen-logo-mocha.svg"),
|
||||||
url("zen-logo-mocha.svg"),
|
|
||||||
url("https://raw.githubusercontent.com/IAmJafeth/zen-browser/main/themes/Mocha/Blue/zen-logo-mocha.svg")
|
url("https://raw.githubusercontent.com/IAmJafeth/zen-browser/main/themes/Mocha/Blue/zen-logo-mocha.svg")
|
||||||
no-repeat center !important;
|
no-repeat center !important;
|
||||||
display: inline-block !important;
|
display: inline-block !important;
|
||||||
height: 82px !important;
|
height: 82px !important;
|
||||||
width: 82px !important;
|
width: 82px !important;
|
||||||
|
@ -16,12 +16,20 @@
|
|||||||
helix =
|
helix =
|
||||||
let
|
let
|
||||||
prettier = format: {
|
prettier = format: {
|
||||||
command = "prettier";
|
command = lib.getExe pkgs.nodePackages.prettier;
|
||||||
args = [
|
args = [
|
||||||
"--stdin-filepath"
|
"--stdin-filepath"
|
||||||
"file.${format}"
|
"file.${format}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
biome = format: {
|
||||||
|
command = lib.getExe pkgs.biome;
|
||||||
|
args = [
|
||||||
|
"check"
|
||||||
|
"--stdin-file-path=file.${format}"
|
||||||
|
"--write"
|
||||||
|
];
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -60,7 +68,7 @@
|
|||||||
languages.language = [
|
languages.language = [
|
||||||
{
|
{
|
||||||
name = "css";
|
name = "css";
|
||||||
formatter = prettier "css";
|
formatter = biome "css";
|
||||||
auto-format = true;
|
auto-format = true;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -68,14 +76,14 @@
|
|||||||
language-servers = [
|
language-servers = [
|
||||||
"vscode-json-language-server"
|
"vscode-json-language-server"
|
||||||
];
|
];
|
||||||
formatter = prettier "json";
|
formatter = biome "json";
|
||||||
auto-format = true;
|
auto-format = true;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "jsonc";
|
name = "jsonc";
|
||||||
language-servers = [
|
language-servers = [
|
||||||
];
|
];
|
||||||
formatter = prettier "jsonc";
|
formatter = biome "jsonc";
|
||||||
file-types = [
|
file-types = [
|
||||||
"jsonc"
|
"jsonc"
|
||||||
];
|
];
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
nodePackages.prettier
|
biome # Linter + formatter
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
treefmt
|
treefmt
|
||||||
shfmt
|
shfmt
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
"nix"
|
"nix"
|
||||||
"git-firefly"
|
"git-firefly"
|
||||||
"just"
|
"just"
|
||||||
|
"biome"
|
||||||
];
|
];
|
||||||
userSettings =
|
userSettings =
|
||||||
let
|
let
|
||||||
|
@ -5,6 +5,5 @@
|
|||||||
jetbrains.webstorm
|
jetbrains.webstorm
|
||||||
nodejs_22
|
nodejs_22
|
||||||
pnpm
|
pnpm
|
||||||
nodePackages.prettier
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# Formatters needed for 'just fmt'
|
# Formatters needed for 'just fmt'
|
||||||
format = pkgs.mkShell {
|
format = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
nodePackages.prettier
|
biome
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
treefmt
|
treefmt
|
||||||
shfmt
|
shfmt
|
||||||
|
14
treefmt.toml
14
treefmt.toml
@ -2,17 +2,13 @@
|
|||||||
command = "nixfmt"
|
command = "nixfmt"
|
||||||
includes = ["*.nix"]
|
includes = ["*.nix"]
|
||||||
|
|
||||||
[formatter.prettier]
|
[formatter.biome]
|
||||||
command = "prettier"
|
command = "biome"
|
||||||
includes = ["*.css", "*.json", "*.jsonc", "*.yaml"]
|
includes = ["*.css", "*.json", "*.jsonc"]
|
||||||
options = ["--write"]
|
options = ["check", "--write"]
|
||||||
|
|
||||||
[formatter.shell]
|
[formatter.shell]
|
||||||
command = "shfmt"
|
command = "shfmt"
|
||||||
includes = ["fmt", "test", "switch"]
|
includes = ["fmt", "test", "switch"]
|
||||||
excludes = []
|
excludes = []
|
||||||
options = [
|
options = ["--indent", "2", "--simplify", "--write"]
|
||||||
"--indent", "2",
|
|
||||||
"--simplify",
|
|
||||||
"--write",
|
|
||||||
]
|
|
||||||
|
Reference in New Issue
Block a user