mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Migrate from perttier/eslint to biome
This commit is contained in:
parent
1572bd26c5
commit
871aaa032d
15
.github/workflows/coding-style.yml
vendored
15
.github/workflows/coding-style.yml
vendored
@ -25,18 +25,13 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Biome
|
||||||
uses: actions/setup-node@v4
|
uses: biomejs/setup-biome@v2
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
version: latest
|
||||||
cache: yarn
|
|
||||||
cache-dependency-path: front/yarn.lock
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Run Biome
|
||||||
run: yarn install --immutable
|
run: biome ci .
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: yarn lint && yarn format
|
|
||||||
|
|
||||||
scanner:
|
scanner:
|
||||||
name: "Lint scanner/autosync"
|
name: "Lint scanner/autosync"
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["next/core-web-vitals", "prettier"],
|
|
||||||
"plugins": ["header"],
|
|
||||||
"settings": {
|
|
||||||
"next": {
|
|
||||||
"rootDir": "apps/web/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"@next/next/no-img-element": "off",
|
|
||||||
"header/header": [
|
|
||||||
"error",
|
|
||||||
"block",
|
|
||||||
[
|
|
||||||
"",
|
|
||||||
" * Kyoo - A portable and vast media library solution.",
|
|
||||||
" * Copyright (c) Kyoo.",
|
|
||||||
" *",
|
|
||||||
" * See AUTHORS.md and LICENSE file in the project root for full license information.",
|
|
||||||
" *",
|
|
||||||
" * Kyoo is free software: you can redistribute it and/or modify",
|
|
||||||
" * it under the terms of the GNU General Public License as published by",
|
|
||||||
" * the Free Software Foundation, either version 3 of the License, or",
|
|
||||||
" * any later version.",
|
|
||||||
" *",
|
|
||||||
" * Kyoo is distributed in the hope that it will be useful,",
|
|
||||||
" * but WITHOUT ANY WARRANTY; without even the implied warranty of",
|
|
||||||
" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
|
|
||||||
" * GNU General Public License for more details.",
|
|
||||||
" *",
|
|
||||||
" * You should have received a copy of the GNU General Public License",
|
|
||||||
" * along with Kyoo. If not, see <https://www.gnu.org/licenses/>.",
|
|
||||||
" "
|
|
||||||
],
|
|
||||||
2
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
.yarn
|
|
52
front/biome.json
Normal file
52
front/biome.json
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json",
|
||||||
|
"formatter": {
|
||||||
|
"enabled": true,
|
||||||
|
"formatWithErrors": false,
|
||||||
|
"indentStyle": "tab",
|
||||||
|
"indentWidth": 2,
|
||||||
|
"lineEnding": "lf",
|
||||||
|
"lineWidth": 100,
|
||||||
|
"attributePosition": "auto",
|
||||||
|
"ignore": [
|
||||||
|
"**/.yarn/**",
|
||||||
|
"**/.next/**",
|
||||||
|
"**/.expo/**"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"organizeImports": {
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
"linter": {
|
||||||
|
"enabled": true,
|
||||||
|
"rules": {
|
||||||
|
"recommended": true,
|
||||||
|
"style": {
|
||||||
|
"noNonNullAssertion": "off",
|
||||||
|
"useImportType": "off",
|
||||||
|
"noParameterAssign": "off"
|
||||||
|
},
|
||||||
|
"suspicious": {
|
||||||
|
"noExplicitAny": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ignore": [
|
||||||
|
"**/.yarn/**",
|
||||||
|
"**/.next/**",
|
||||||
|
"**/.expo/**"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"javascript": {
|
||||||
|
"formatter": {
|
||||||
|
"jsxQuoteStyle": "double",
|
||||||
|
"quoteProperties": "asNeeded",
|
||||||
|
"trailingComma": "all",
|
||||||
|
"semicolons": "always",
|
||||||
|
"arrowParentheses": "always",
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"bracketSameLine": false,
|
||||||
|
"quoteStyle": "double",
|
||||||
|
"attributePosition": "auto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -21,17 +21,8 @@
|
|||||||
"apps/*",
|
"apps/*",
|
||||||
"packages/*"
|
"packages/*"
|
||||||
],
|
],
|
||||||
"prettier": {
|
|
||||||
"useTabs": true,
|
|
||||||
"printWidth": 100,
|
|
||||||
"trailingComma": "all"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "8.56.0",
|
"@biomejs/biome": "1.7.3",
|
||||||
"eslint-config-next": "14.1.0",
|
|
||||||
"eslint-config-prettier": "^9.1.0",
|
|
||||||
"eslint-plugin-header": "^3.1.1",
|
|
||||||
"prettier": "^3.2.4",
|
|
||||||
"typescript": "5.3.3"
|
"typescript": "5.3.3"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@3.2.4"
|
"packageManager": "yarn@3.2.4"
|
||||||
|
128
front/yarn.lock
128
front/yarn.lock
@ -1711,6 +1711,97 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@biomejs/biome@npm:1.7.3":
|
||||||
|
version: 1.7.3
|
||||||
|
resolution: "@biomejs/biome@npm:1.7.3"
|
||||||
|
dependencies:
|
||||||
|
"@biomejs/cli-darwin-arm64": 1.7.3
|
||||||
|
"@biomejs/cli-darwin-x64": 1.7.3
|
||||||
|
"@biomejs/cli-linux-arm64": 1.7.3
|
||||||
|
"@biomejs/cli-linux-arm64-musl": 1.7.3
|
||||||
|
"@biomejs/cli-linux-x64": 1.7.3
|
||||||
|
"@biomejs/cli-linux-x64-musl": 1.7.3
|
||||||
|
"@biomejs/cli-win32-arm64": 1.7.3
|
||||||
|
"@biomejs/cli-win32-x64": 1.7.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: ad6a6585f1d6fcb9c060319c614b4437d715637ecedbe5f4d45f170f0532894654e7cf5c80420da38c8c626d76fef4b6334c7ee85e6c790bd5ad4f7aa49c5182
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@biomejs/cli-darwin-arm64@npm:1.7.3":
|
||||||
|
version: 1.7.3
|
||||||
|
resolution: "@biomejs/cli-darwin-arm64@npm:1.7.3"
|
||||||
|
conditions: os=darwin & cpu=arm64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@biomejs/cli-darwin-x64@npm:1.7.3":
|
||||||
|
version: 1.7.3
|
||||||
|
resolution: "@biomejs/cli-darwin-x64@npm:1.7.3"
|
||||||
|
conditions: os=darwin & cpu=x64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@biomejs/cli-linux-arm64-musl@npm:1.7.3":
|
||||||
|
version: 1.7.3
|
||||||
|
resolution: "@biomejs/cli-linux-arm64-musl@npm:1.7.3"
|
||||||
|
conditions: os=linux & cpu=arm64 & libc=musl
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@biomejs/cli-linux-arm64@npm:1.7.3":
|
||||||
|
version: 1.7.3
|
||||||
|
resolution: "@biomejs/cli-linux-arm64@npm:1.7.3"
|
||||||
|
conditions: os=linux & cpu=arm64 & libc=glibc
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@biomejs/cli-linux-x64-musl@npm:1.7.3":
|
||||||
|
version: 1.7.3
|
||||||
|
resolution: "@biomejs/cli-linux-x64-musl@npm:1.7.3"
|
||||||
|
conditions: os=linux & cpu=x64 & libc=musl
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@biomejs/cli-linux-x64@npm:1.7.3":
|
||||||
|
version: 1.7.3
|
||||||
|
resolution: "@biomejs/cli-linux-x64@npm:1.7.3"
|
||||||
|
conditions: os=linux & cpu=x64 & libc=glibc
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@biomejs/cli-win32-arm64@npm:1.7.3":
|
||||||
|
version: 1.7.3
|
||||||
|
resolution: "@biomejs/cli-win32-arm64@npm:1.7.3"
|
||||||
|
conditions: os=win32 & cpu=arm64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@biomejs/cli-win32-x64@npm:1.7.3":
|
||||||
|
version: 1.7.3
|
||||||
|
resolution: "@biomejs/cli-win32-x64@npm:1.7.3"
|
||||||
|
conditions: os=win32 & cpu=x64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@emotion/is-prop-valid@npm:^0.8.2":
|
"@emotion/is-prop-valid@npm:^0.8.2":
|
||||||
version: 0.8.8
|
version: 0.8.8
|
||||||
resolution: "@emotion/is-prop-valid@npm:0.8.8"
|
resolution: "@emotion/is-prop-valid@npm:0.8.8"
|
||||||
@ -6950,17 +7041,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"eslint-config-prettier@npm:^9.1.0":
|
|
||||||
version: 9.1.0
|
|
||||||
resolution: "eslint-config-prettier@npm:9.1.0"
|
|
||||||
peerDependencies:
|
|
||||||
eslint: ">=7.0.0"
|
|
||||||
bin:
|
|
||||||
eslint-config-prettier: bin/cli.js
|
|
||||||
checksum: 9229b768c879f500ee54ca05925f31b0c0bafff3d9f5521f98ff05127356de78c81deb9365c86a5ec4efa990cb72b74df8612ae15965b14136044c73e1f6a907
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"eslint-import-resolver-node@npm:^0.3.6, eslint-import-resolver-node@npm:^0.3.9":
|
"eslint-import-resolver-node@npm:^0.3.6, eslint-import-resolver-node@npm:^0.3.9":
|
||||||
version: 0.3.9
|
version: 0.3.9
|
||||||
resolution: "eslint-import-resolver-node@npm:0.3.9"
|
resolution: "eslint-import-resolver-node@npm:0.3.9"
|
||||||
@ -7002,15 +7082,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"eslint-plugin-header@npm:^3.1.1":
|
|
||||||
version: 3.1.1
|
|
||||||
resolution: "eslint-plugin-header@npm:3.1.1"
|
|
||||||
peerDependencies:
|
|
||||||
eslint: ">=7.7.0"
|
|
||||||
checksum: 2353e4ba011be81d5c27fbd79929e18dce118d7673a2f717b1ac5a0bceb33e06ec9a7c80a01dddc5804df75e2cc8eb475d268cd1abef5eab5088ede62e5ad246
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"eslint-plugin-import@npm:^2.28.1":
|
"eslint-plugin-import@npm:^2.28.1":
|
||||||
version: 2.29.1
|
version: 2.29.1
|
||||||
resolution: "eslint-plugin-import@npm:2.29.1"
|
resolution: "eslint-plugin-import@npm:2.29.1"
|
||||||
@ -7126,7 +7197,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"eslint@npm:8.56.0, eslint@npm:^8.56.0":
|
"eslint@npm:^8.56.0":
|
||||||
version: 8.56.0
|
version: 8.56.0
|
||||||
resolution: "eslint@npm:8.56.0"
|
resolution: "eslint@npm:8.56.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -9577,11 +9648,7 @@ __metadata:
|
|||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "kyoo@workspace:."
|
resolution: "kyoo@workspace:."
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint: 8.56.0
|
"@biomejs/biome": 1.7.3
|
||||||
eslint-config-next: 14.1.0
|
|
||||||
eslint-config-prettier: ^9.1.0
|
|
||||||
eslint-plugin-header: ^3.1.1
|
|
||||||
prettier: ^3.2.4
|
|
||||||
typescript: 5.3.3
|
typescript: 5.3.3
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
@ -11378,15 +11445,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"prettier@npm:^3.2.4":
|
|
||||||
version: 3.2.4
|
|
||||||
resolution: "prettier@npm:3.2.4"
|
|
||||||
bin:
|
|
||||||
prettier: bin/prettier.cjs
|
|
||||||
checksum: 6ec9385a836e0b9bac549e585101c086d1521c31d7b882d5c8bb7d7646da0693da5f31f4fff6dc080710e5e2d34c85e6fb2f8766876b3645c8be2f33b9c3d1a3
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"pretty-bytes@npm:5.6.0":
|
"pretty-bytes@npm:5.6.0":
|
||||||
version: 5.6.0
|
version: 5.6.0
|
||||||
resolution: "pretty-bytes@npm:5.6.0"
|
resolution: "pretty-bytes@npm:5.6.0"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"extends": ["config:recommended", ":disableRateLimiting"],
|
"extends": ["config:recommended", ":disableRateLimiting", "regexManagers:biomeVersions"],
|
||||||
"minimumReleaseAge": "5 days",
|
"minimumReleaseAge": "5 days",
|
||||||
"ignorePaths": ["**/front/**"],
|
"ignorePaths": ["**/front/**"],
|
||||||
"packageRules": [
|
"packageRules": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user