Skip to content

Commit

Permalink
chore: use biome
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Sep 24, 2024
1 parent dbf11f6 commit a03646e
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 101 deletions.
4 changes: 1 addition & 3 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"extends": [
"@ow3"
]
"extends": ["@ow3"]
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"biomejs.biome",
"streetsidesoftware.code-spell-checker",
"davidanson.vscode-markdownlint"
]
Expand Down
83 changes: 10 additions & 73 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,80 +1,17 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,
// Auto fix
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{
"rule": "style/*",
"severity": "off"
},
{
"rule": "format/*",
"severity": "off"
},
{
"rule": "*-indent",
"severity": "off"
},
{
"rule": "*-spacing",
"severity": "off"
},
{
"rule": "*-spaces",
"severity": "off"
},
{
"rule": "*-order",
"severity": "off"
},
{
"rule": "*-dangle",
"severity": "off"
},
{
"rule": "*-newline",
"severity": "off"
},
{
"rule": "*quotes",
"severity": "off"
},
{
"rule": "*semi",
"severity": "off"
}
],
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"stx",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"toml"
],
"cSpell.ignorePaths": [
"node_modules",
"lang/de.yml"
],
"cSpell.dictionaries": [
"custom-dictionary"
],
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
},
"cSpell.ignorePaths": ["node_modules"],
"cSpell.dictionaries": ["custom-dictionary"],
"cSpell.diagnosticLevel": "Hint",
"cSpell.customDictionaries": {
"bun-plugin-yml": {
Expand All @@ -83,6 +20,6 @@
"scope": "user",
"addWords": true
},
"custom": true // enable the `custom` dictionary
"custom": true
}
}
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2023 Open Web Foundation
Copyright (c) 2024 Open Web Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 4 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@stacksjs/biome-config"]
}
Binary file modified bun.lockb
Binary file not shown.
8 changes: 0 additions & 8 deletions eslint.config.js

This file was deleted.

15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,11 @@
},
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist",
"src"
],
"files": ["dist", "src"],
"scripts": {
"build": "bun build.ts",
"lint": "bunx eslint .",
"lint:fix": "bunx eslint . --fix",
"lint": "biome check .",
"lint:fix": "biome check --fix .",
"fresh": "bunx rimraf node_modules/ bun.lock && bun i",
"commit": "git cz",
"changelog": "bunx changelogen --output CHANGELOG.md",
Expand All @@ -52,14 +49,14 @@
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@biomejs/biome": "^1.9.2",
"@commitlint/cli": "^19.5.0",
"@stacksjs/eslint-config": "^0.59.11",
"@stacksjs/biome-config": "^0.1.5",
"@types/bun": "^1.1.10",
"bumpp": "^9.5.2",
"changelogen": "^0.5.7",
"commitizen": "^4.3.0",
"cz-git": "^1.9.4",
"eslint": "^9.11.1",
"lint-staged": "^15.2.10",
"simple-git-hooks": "^2.11.1",
"typescript": "^5.6.2"
Expand All @@ -69,7 +66,7 @@
"commit-msg": "bunx --no -- commitlint --edit $1"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,vue}": "eslint --fix"
"*.{js,jsx,ts,tsx,vue}": "biome check --fix ."
},
"config": {
"commitizen": {
Expand Down
8 changes: 2 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
"compilerOptions": {
"incremental": true,
"target": "esnext",
"lib": [
"esnext"
],
"lib": ["esnext"],
"moduleDetection": "force",
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"types": [
"node"
],
"types": ["node"],
"allowImportingTsExtensions": true,
"strict": true,
"strictNullChecks": true,
Expand Down

0 comments on commit a03646e

Please sign in to comment.