feat: add biome replacing eslint
This commit is contained in:
parent
1d2e173dba
commit
3efe7a93f5
@ -1,14 +0,0 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: { browser: true, es2020: true },
|
||||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', 'plugin:storybook/recommended'],
|
||||
ignorePatterns: ['dist', '.eslintrc.cjs'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['react-refresh'],
|
||||
rules: {
|
||||
'react-refresh/only-export-components': [
|
||||
'warn',
|
||||
{ allowConstantExport: true },
|
||||
],
|
||||
},
|
||||
}
|
27
biome.json
Normal file
27
biome.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
|
||||
"vcs": {
|
||||
"enabled": true,
|
||||
"clientKind": "git",
|
||||
"useIgnoreFile": true,
|
||||
"defaultBranch": "main"
|
||||
},
|
||||
"organizeImports": {
|
||||
"enabled": true
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": true,
|
||||
"formatWithErrors": false,
|
||||
"attributePosition": "multiline",
|
||||
"indentWidth": 2,
|
||||
"indentStyle": "space",
|
||||
"lineEnding": "lf",
|
||||
"lineWidth": 80
|
||||
},
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": true
|
||||
}
|
||||
}
|
||||
}
|
10
lefthook.yml
Normal file
10
lefthook.yml
Normal file
@ -0,0 +1,10 @@
|
||||
pre-commit:
|
||||
commands:
|
||||
biome_write:
|
||||
glob: "*.{ts,tsx,json}"
|
||||
run: yarn biome check --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} && git update-index --again
|
||||
pre-push:
|
||||
commands:
|
||||
biome_check:
|
||||
glob: "*.{ts,tsx,json}"
|
||||
run: yarn biome check --no-errors-on-unmatched --files-ignore-unknown=true {staged_files}
|
@ -10,9 +10,10 @@
|
||||
"packageManager": "yarn@4.3.0+sha512.1606bef7c84bc7d83b8576063de2fd08f7d69f9939015bed800f9585a002390268ecc777e9feeba7e26e9556aef6beaad4806968db2182ab5dd3e955ab3b9a0b",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"postinstall": "lefthook install",
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build && cp ./404.html ./dist",
|
||||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
||||
"lint": "biome check --write --no-errors-on-unmatched",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -28,6 +29,7 @@
|
||||
"tailwind-merge": "^2.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.8.3",
|
||||
"@mdx-js/rollup": "^3.0.1",
|
||||
"@psw-ui/cli": "^0.5.0",
|
||||
"@tailwindcss/typography": "^0.5.13",
|
||||
@ -44,6 +46,7 @@
|
||||
"eslint": "^9.4.0",
|
||||
"eslint-plugin-react-hooks": "^4.6.2",
|
||||
"eslint-plugin-react-refresh": "^0.4.7",
|
||||
"lefthook": "^1.6.18",
|
||||
"postcss": "^8.4.38",
|
||||
"tailwind-scrollbar": "^3.1.0",
|
||||
"tailwindcss": "^3.4.4",
|
||||
|
184
yarn.lock
184
yarn.lock
@ -299,6 +299,97 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@biomejs/biome@npm:1.8.3":
|
||||
version: 1.8.3
|
||||
resolution: "@biomejs/biome@npm:1.8.3"
|
||||
dependencies:
|
||||
"@biomejs/cli-darwin-arm64": "npm:1.8.3"
|
||||
"@biomejs/cli-darwin-x64": "npm:1.8.3"
|
||||
"@biomejs/cli-linux-arm64": "npm:1.8.3"
|
||||
"@biomejs/cli-linux-arm64-musl": "npm:1.8.3"
|
||||
"@biomejs/cli-linux-x64": "npm:1.8.3"
|
||||
"@biomejs/cli-linux-x64-musl": "npm:1.8.3"
|
||||
"@biomejs/cli-win32-arm64": "npm:1.8.3"
|
||||
"@biomejs/cli-win32-x64": "npm:1.8.3"
|
||||
dependenciesMeta:
|
||||
"@biomejs/cli-darwin-arm64":
|
||||
optional: true
|
||||
"@biomejs/cli-darwin-x64":
|
||||
optional: true
|
||||
"@biomejs/cli-linux-arm64":
|
||||
optional: true
|
||||
"@biomejs/cli-linux-arm64-musl":
|
||||
optional: true
|
||||
"@biomejs/cli-linux-x64":
|
||||
optional: true
|
||||
"@biomejs/cli-linux-x64-musl":
|
||||
optional: true
|
||||
"@biomejs/cli-win32-arm64":
|
||||
optional: true
|
||||
"@biomejs/cli-win32-x64":
|
||||
optional: true
|
||||
bin:
|
||||
biome: bin/biome
|
||||
checksum: 10c0/95fe99ce82cd8242f1be51cbf3ac26043b253f5a369d3dc24df09bdb32ec04dba679b1d4fa8b9d602b1bf2c30ecd80af14aa8f5c92d6e0cd6214a99a1099a65b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@biomejs/cli-darwin-arm64@npm:1.8.3":
|
||||
version: 1.8.3
|
||||
resolution: "@biomejs/cli-darwin-arm64@npm:1.8.3"
|
||||
conditions: os=darwin & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@biomejs/cli-darwin-x64@npm:1.8.3":
|
||||
version: 1.8.3
|
||||
resolution: "@biomejs/cli-darwin-x64@npm:1.8.3"
|
||||
conditions: os=darwin & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@biomejs/cli-linux-arm64-musl@npm:1.8.3":
|
||||
version: 1.8.3
|
||||
resolution: "@biomejs/cli-linux-arm64-musl@npm:1.8.3"
|
||||
conditions: os=linux & cpu=arm64 & libc=musl
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@biomejs/cli-linux-arm64@npm:1.8.3":
|
||||
version: 1.8.3
|
||||
resolution: "@biomejs/cli-linux-arm64@npm:1.8.3"
|
||||
conditions: os=linux & cpu=arm64 & libc=glibc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@biomejs/cli-linux-x64-musl@npm:1.8.3":
|
||||
version: 1.8.3
|
||||
resolution: "@biomejs/cli-linux-x64-musl@npm:1.8.3"
|
||||
conditions: os=linux & cpu=x64 & libc=musl
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@biomejs/cli-linux-x64@npm:1.8.3":
|
||||
version: 1.8.3
|
||||
resolution: "@biomejs/cli-linux-x64@npm:1.8.3"
|
||||
conditions: os=linux & cpu=x64 & libc=glibc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@biomejs/cli-win32-arm64@npm:1.8.3":
|
||||
version: 1.8.3
|
||||
resolution: "@biomejs/cli-win32-arm64@npm:1.8.3"
|
||||
conditions: os=win32 & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@biomejs/cli-win32-x64@npm:1.8.3":
|
||||
version: 1.8.3
|
||||
resolution: "@biomejs/cli-win32-x64@npm:1.8.3"
|
||||
conditions: os=win32 & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/aix-ppc64@npm:0.21.5":
|
||||
version: 0.21.5
|
||||
resolution: "@esbuild/aix-ppc64@npm:0.21.5"
|
||||
@ -3729,6 +3820,97 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lefthook-darwin-arm64@npm:1.6.18":
|
||||
version: 1.6.18
|
||||
resolution: "lefthook-darwin-arm64@npm:1.6.18"
|
||||
conditions: os=darwin & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lefthook-darwin-x64@npm:1.6.18":
|
||||
version: 1.6.18
|
||||
resolution: "lefthook-darwin-x64@npm:1.6.18"
|
||||
conditions: os=darwin & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lefthook-freebsd-arm64@npm:1.6.18":
|
||||
version: 1.6.18
|
||||
resolution: "lefthook-freebsd-arm64@npm:1.6.18"
|
||||
conditions: os=freebsd & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lefthook-freebsd-x64@npm:1.6.18":
|
||||
version: 1.6.18
|
||||
resolution: "lefthook-freebsd-x64@npm:1.6.18"
|
||||
conditions: os=freebsd & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lefthook-linux-arm64@npm:1.6.18":
|
||||
version: 1.6.18
|
||||
resolution: "lefthook-linux-arm64@npm:1.6.18"
|
||||
conditions: os=linux & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lefthook-linux-x64@npm:1.6.18":
|
||||
version: 1.6.18
|
||||
resolution: "lefthook-linux-x64@npm:1.6.18"
|
||||
conditions: os=linux & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lefthook-windows-arm64@npm:1.6.18":
|
||||
version: 1.6.18
|
||||
resolution: "lefthook-windows-arm64@npm:1.6.18"
|
||||
conditions: os=win32 & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lefthook-windows-x64@npm:1.6.18":
|
||||
version: 1.6.18
|
||||
resolution: "lefthook-windows-x64@npm:1.6.18"
|
||||
conditions: os=win32 & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"lefthook@npm:^1.6.18":
|
||||
version: 1.6.18
|
||||
resolution: "lefthook@npm:1.6.18"
|
||||
dependencies:
|
||||
lefthook-darwin-arm64: "npm:1.6.18"
|
||||
lefthook-darwin-x64: "npm:1.6.18"
|
||||
lefthook-freebsd-arm64: "npm:1.6.18"
|
||||
lefthook-freebsd-x64: "npm:1.6.18"
|
||||
lefthook-linux-arm64: "npm:1.6.18"
|
||||
lefthook-linux-x64: "npm:1.6.18"
|
||||
lefthook-windows-arm64: "npm:1.6.18"
|
||||
lefthook-windows-x64: "npm:1.6.18"
|
||||
dependenciesMeta:
|
||||
lefthook-darwin-arm64:
|
||||
optional: true
|
||||
lefthook-darwin-x64:
|
||||
optional: true
|
||||
lefthook-freebsd-arm64:
|
||||
optional: true
|
||||
lefthook-freebsd-x64:
|
||||
optional: true
|
||||
lefthook-linux-arm64:
|
||||
optional: true
|
||||
lefthook-linux-x64:
|
||||
optional: true
|
||||
lefthook-windows-arm64:
|
||||
optional: true
|
||||
lefthook-windows-x64:
|
||||
optional: true
|
||||
bin:
|
||||
lefthook: bin/index.js
|
||||
checksum: 10c0/bd76ba3050d805f777a17ef01174e11f538c4e4434dee22e281fcf63a2704d103249f4b606035a0b02af50c77ea589a35d43afaaa8eb1a679c071f2c80e75d97
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"levn@npm:^0.4.1":
|
||||
version: 0.4.1
|
||||
resolution: "levn@npm:0.4.1"
|
||||
@ -6562,6 +6744,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "ui-docs@workspace:."
|
||||
dependencies:
|
||||
"@biomejs/biome": "npm:1.8.3"
|
||||
"@mdx-js/react": "npm:^3.0.1"
|
||||
"@mdx-js/rollup": "npm:^3.0.1"
|
||||
"@psw-ui/cli": "npm:^0.5.0"
|
||||
@ -6581,6 +6764,7 @@ __metadata:
|
||||
eslint-plugin-react-hooks: "npm:^4.6.2"
|
||||
eslint-plugin-react-refresh: "npm:^0.4.7"
|
||||
highlight.js: "npm:^11.9.0"
|
||||
lefthook: "npm:^1.6.18"
|
||||
postcss: "npm:^8.4.38"
|
||||
react: "npm:^18.3.1"
|
||||
react-dom: "npm:^18.3.1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user