chore: 🔨 rome -> biome

Biome is the new, continued fork of Rome (now discontinued)
This commit is contained in:
ThatOneCalculator 2023-09-01 16:46:00 -07:00
parent a75a19cd17
commit ed84b101eb
No known key found for this signature in database
GPG key ID: 8703CACD01000000
13 changed files with 150 additions and 124 deletions

View file

@ -1,18 +1,18 @@
{
"recommendations": [
"editorconfig.editorconfig",
"rome.rome",
"vue.volar",
"vue.vscode-typescript-vue-plugin",
"arcanis.vscode-zipfs",
"orta.vscode-twoslash-queries",
"antfu.iconify",
"vivaxy.vscode-conventional-commits",
"ms-azuretools.vscode-docker",
"gitlab.gitlab-workflow",
"mrmlnc.vscode-json5",
"esbenp.prettier-vscode",
"redhat.vscode-yaml",
"yoavbls.pretty-ts-errors"
]
"editorconfig.editorconfig",
"vue.volar",
"vue.vscode-typescript-vue-plugin",
"arcanis.vscode-zipfs",
"orta.vscode-twoslash-queries",
"antfu.iconify",
"vivaxy.vscode-conventional-commits",
"ms-azuretools.vscode-docker",
"gitlab.gitlab-workflow",
"mrmlnc.vscode-json5",
"esbenp.prettier-vscode",
"redhat.vscode-yaml",
"yoavbls.pretty-ts-errors",
"biomejs.biome"
]
}

50
biome.json Normal file
View file

@ -0,0 +1,50 @@
{
"$schema": "https://biomejs.dev/schemas/1.0.0/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
},
"ignore": [
"packages/firefish-js/api-extractor.json",
"packages/*/tsconfig.json",
"packages/*/built",
"packages/megalodon/lib",
"packages/*/package-lock.json",
"packages/backend/src/server/web/manifest.ts",
"packages/megalodon/src/misskey/web_socket.ts",
"packages/megalodon/src/misskey/api_client.ts",
"packages/backend/built/",
"*/model.json",
"*.md",
"*.png",
"*.jpeg",
"*.jpg",
"**/tsconfig.json",
"*/.yml"
]
},
"formatter": {
"ignore": [
"packages/firefish-js/api-extractor.json",
"packages/*/tsconfig.json",
"packages/*/built",
"packages/megalodon/lib",
"packages/*/package-lock.json",
"packages/backend/src/server/web/manifest.ts",
"packages/megalodon/src/misskey/web_socket.ts",
"packages/megalodon/src/misskey/api_client.ts",
"packages/backend/built/",
"*/model.json",
"*.md",
"*.png",
"*.jpeg",
"*.jpg",
"**/tsconfig.json",
"*/.yml"
]
}
}

View file

@ -46,6 +46,7 @@
"seedrandom": "^3.0.5"
},
"devDependencies": {
"@biomejs/biome": "1.0.0",
"@types/gulp": "4.0.13",
"@types/gulp-rename": "2.0.2",
"@types/node": "20.4.9",
@ -59,7 +60,6 @@
"gulp-replace": "1.1.4",
"gulp-terser": "2.1.0",
"install-peers": "^1.0.4",
"rome": "^12.1.3",
"start-server-and-test": "1.15.2",
"typescript": "5.1.6"
}

View file

@ -16,10 +16,10 @@
"build": "pnpm swc src -d built -D",
"build:debug": "pnpm swc src -d built -s -D",
"watch": "pnpm swc src -d built -D -w",
"lint": "pnpm rome check --apply **/*.ts ; pnpm run format",
"lint": "pnpm biome check --apply **/*.ts ; pnpm run format",
"mocha": "cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha",
"test": "pnpm run mocha",
"format": "pnpm rome format * --write"
"format": "pnpm biome format * --write"
},
"optionalDependencies": {
"@swc/core-android-arm64": "1.3.11",

View file

@ -1,2 +1,2 @@
// rome-ignore lint/suspicious/noExplicitAny: i have no idea
// biome-ignore lint/suspicious/noExplicitAny: i have no idea
type FIXME = any;

View file

@ -473,7 +473,7 @@ export default abstract class Chart<T extends Schema> {
protected commit(diff: Commit<T>, group: string | null = null): void {
for (const [k, v] of Object.entries(diff)) {
if (v == null || v === 0 || (Array.isArray(v) && v.length === 0))
// rome-ignore lint/performance/noDelete: needs to be deleted not just set to undefined
// biome-ignore lint/performance/noDelete: needs to be deleted not just set to undefined
delete diff[k];
}
this.buffer.push({

View file

@ -169,7 +169,7 @@ export default async (
data: Option,
silent = false,
) =>
// rome-ignore lint/suspicious/noAsyncPromiseExecutor: FIXME
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: FIXME
new Promise<Note>(async (res, rej) => {
const dontFederateInitially = data.visibility === "hidden";

View file

@ -5,9 +5,9 @@
"watch": "pnpm vite build --watch --mode development",
"build": "pnpm vite build",
"build:debug": "pnpm run build",
"lint": "pnpm rome check **/*.ts --apply ; pnpm run lint:vue",
"lint": "pnpm biome check **/*.ts --apply ; pnpm run lint:vue",
"lint:vue": "pnpm eslint src --fix '**/*.vue' --cache ; pnpm run format",
"format": "pnpm rome format * --write && pnpm prettier --write '**/*.{scss,vue}' --cache --cache-strategy metadata"
"format": "pnpm biome format * --write && pnpm prettier --write '**/*.{scss,vue}' --cache --cache-strategy metadata"
},
"devDependencies": {
"@discordapp/twemoji": "14.1.2",

View file

@ -12,8 +12,8 @@
"api": "pnpm api-extractor run --local --verbose",
"api-prod": "pnpm api-extractor run --verbose",
"api-doc": "pnpm api-documenter markdown -i ./etc/",
"lint": "pnpm rome check --apply *.ts",
"format": "pnpm rome format --write *.ts",
"lint": "pnpm biome check --apply *.ts",
"format": "pnpm biome format --write *.ts",
"jest": "jest --coverage --detectOpenHandles",
"test": "pnpm jest && pnpm tsd"
},

View file

@ -6,8 +6,8 @@
"scripts": {
"build": "tsc -p ./",
"build:debug": "pnpm run build",
"lint": "pnpm rome check **/*.ts --apply",
"format": "pnpm rome format --write src/**/*.ts",
"lint": "pnpm biome check **/*.ts --apply",
"format": "pnpm biome format --write src/**/*.ts",
"doc": "typedoc --out ../docs ./src",
"test": "NODE_ENV=test jest -u --maxWorkers=3"
},

View file

@ -5,8 +5,8 @@
"build": "webpack",
"build:debug": "pnpm run build",
"watch": "pnpm swc src -d built -D -w",
"lint": "pnpm rome check **/*.ts --apply",
"format": "pnpm rome format * --write"
"lint": "pnpm biome check **/*.ts --apply",
"format": "pnpm biome format * --write"
},
"devDependencies": {
"@swc/cli": "^0.1.62",

View file

@ -30,6 +30,9 @@ importers:
specifier: ^3.0.5
version: 3.0.5
devDependencies:
'@biomejs/biome':
specifier: 1.0.0
version: 1.0.0
'@types/gulp':
specifier: 4.0.13
version: 4.0.13
@ -69,9 +72,6 @@ importers:
install-peers:
specifier: ^1.0.4
version: 1.0.4
rome:
specifier: ^12.1.3
version: 12.1.3
start-server-and-test:
specifier: 1.15.2
version: 1.15.2
@ -1556,6 +1556,74 @@ packages:
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
dev: true
/@biomejs/biome@1.0.0:
resolution: {integrity: sha512-Y5CND1QZ5pF6hc4dFw5ItDutv9KJO91ksLdBIFyvHL7LmXN0UomqyyRWryvrqq+YlA8Q58cR6sqjjQuMp9E2Ig==}
engines: {node: '>=14.*'}
hasBin: true
requiresBuild: true
optionalDependencies:
'@biomejs/cli-darwin-arm64': 1.0.0
'@biomejs/cli-darwin-x64': 1.0.0
'@biomejs/cli-linux-arm64': 1.0.0
'@biomejs/cli-linux-x64': 1.0.0
'@biomejs/cli-win32-arm64': 1.0.0
'@biomejs/cli-win32-x64': 1.0.0
dev: true
/@biomejs/cli-darwin-arm64@1.0.0:
resolution: {integrity: sha512-3v7kEyxkf3D246esH+q/lDK5wWn+xLCXZpHCuc1itAmC35GkEc6S7um6C1VD3XKXLx6N0sJR/rTmjKiRGV32Ig==}
engines: {node: '>=14.*'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@biomejs/cli-darwin-x64@1.0.0:
resolution: {integrity: sha512-uxIMt/X7TQWicjsImkqMvUUEqaFZTOJJrtEhlHl/eIaETWJmK3uAR7ihIWctpGJnN16sUgpLgwczc7FETqu/PQ==}
engines: {node: '>=14.*'}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@biomejs/cli-linux-arm64@1.0.0:
resolution: {integrity: sha512-kJWtu3Xr4MdHV2Yn4U+eZudAGPgv0kRCjWAyzLRewJiqE5TLPrX08imB9SU1n3+VxNO8e2JJ0tWWBHo4J+aSEg==}
engines: {node: '>=14.*'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@biomejs/cli-linux-x64@1.0.0:
resolution: {integrity: sha512-FK6hYZ0Lkk39eXYx1+2ZWtLkApc0RdOpcjDVM96JbvI0bxqvNnm193BPXuxh5A/fCl6N28RNUvcKnZ5LbgZ0Yw==}
engines: {node: '>=14.*'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@biomejs/cli-win32-arm64@1.0.0:
resolution: {integrity: sha512-kE+OY2isEJHBodiLPMlybZckHkl3CQWsvXuJEvSxkoMhLbGDPEV3yZ/0lEph3BlxP3KP5vUO3hOFGaTvHFOuqQ==}
engines: {node: '>=14.*'}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@biomejs/cli-win32-x64@1.0.0:
resolution: {integrity: sha512-Ko6ZsbmbScPMEnh/xz4mwDSCZIUCAEjbbbnUVApgAAL2+1Hoe7Vnhh2RiwYRqy3tHrBIMDwXkSxj0vlf1G3EHg==}
engines: {node: '>=14.*'}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@bull-board/api@5.7.2(@bull-board/ui@5.7.2):
resolution: {integrity: sha512-sYAa2Cdjlh5Rz5VntMcdtZ3ng0CswUyxprBUx6VyLI7L1vreaguQYVVsDG1kWw7ylKwL3PcYYI0+xe2rCKsbSg==}
peerDependencies:
@ -3229,54 +3297,6 @@ packages:
rollup: 3.28.1
dev: true
/@rometools/cli-darwin-arm64@12.1.3:
resolution: {integrity: sha512-AmFTUDYjBuEGQp/Wwps+2cqUr+qhR7gyXAUnkL5psCuNCz3807TrUq/ecOoct5MIavGJTH6R4aaSL6+f+VlBEg==}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@rometools/cli-darwin-x64@12.1.3:
resolution: {integrity: sha512-k8MbWna8q4LRlb005N2X+JS1UQ+s3ZLBBvwk4fP8TBxlAJXUz17jLLu/Fi+7DTTEmMhM84TWj4FDKW+rNar28g==}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@rometools/cli-linux-arm64@12.1.3:
resolution: {integrity: sha512-X/uLhJ2/FNA3nu5TiyeNPqiD3OZoFfNfRvw6a3ut0jEREPvEn72NI7WPijH/gxSz55znfQ7UQ6iM4DZumUknJg==}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@rometools/cli-linux-x64@12.1.3:
resolution: {integrity: sha512-csP17q1eWiUXx9z6Jr/JJPibkplyKIwiWPYNzvPCGE8pHlKhwZj3YHRuu7Dm/4EOqx0XFIuqqWZUYm9bkIC8xg==}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@rometools/cli-win32-arm64@12.1.3:
resolution: {integrity: sha512-RymHWeod57EBOJY4P636CgUwYA6BQdkQjh56XKk4pLEHO6X1bFyMet2XL7KlHw5qOTalzuzf5jJqUs+vf3jdXQ==}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@rometools/cli-win32-x64@12.1.3:
resolution: {integrity: sha512-yHSKYidqJMV9nADqg78GYA+cZ0hS1twANAjiFibQdXj9aGzD+s/IzIFEIi/U/OBLvWYg/SCw0QVozi2vTlKFDQ==}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@rushstack/node-core-library@3.59.4(@types/node@20.3.1):
resolution: {integrity: sha512-YAKJDC6Mz/KA1D7bvB88WaRX3knt/ZuLzkRu5G9QADGSjLtvTWzCNCytRF2PCSaaHOZaZsWul4F1KQdgFgUDqA==}
peerDependencies:
@ -16554,20 +16574,6 @@ packages:
fsevents: 2.3.3
dev: true
/rome@12.1.3:
resolution: {integrity: sha512-e+ff72hxDpe/t5/Us7YRBVw3PBET7SeczTQNn6tvrWdrCaAw3qOukQQ+tDCkyFtS4yGsnhjrJbm43ctNbz27Yg==}
engines: {node: '>=14.*'}
hasBin: true
requiresBuild: true
optionalDependencies:
'@rometools/cli-darwin-arm64': 12.1.3
'@rometools/cli-darwin-x64': 12.1.3
'@rometools/cli-linux-arm64': 12.1.3
'@rometools/cli-linux-x64': 12.1.3
'@rometools/cli-win32-arm64': 12.1.3
'@rometools/cli-win32-x64': 12.1.3
dev: true
/rss-parser@3.13.0:
resolution: {integrity: sha512-7jWUBV5yGN3rqMMj7CZufl/291QAhvrrGpDNE4k/02ZchL0npisiYYqULF71jCEKoIiHvK/Q2e6IkDwPziT7+w==}
dependencies:

View file

@ -1,30 +0,0 @@
{
"$schema": "./node_modules/rome/configuration_schema.json",
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"ignore": [
"packages/firefish-js/api-extractor.json",
"packages/*/tsconfig.json",
"packages/*/built",
"packages/megalodon/lib",
"packages/*/package-lock.json",
"packages/backend/src/server/web/manifest.ts",
"packages/megalodon/src/misskey/web_socket.ts",
"packages/megalodon/src/misskey/api_client.ts",
"packages/backend/built/",
"*/model.json",
"*.md",
"*.spec.ts",
"*.png",
"*.jpeg",
"*.jpg",
"**/tsconfig.json",
"*/.yml"
]
}
}