1
0
Fork 1
mirror of https://example.com synced 2024-11-22 12:36:40 +09:00

build: ♻️ Rome -> Biome

Rome is now discontinued, and Biome has taken its place
This commit is contained in:
ThatOneCalculator 2023-09-01 21:15:32 -07:00
parent a520f0ad94
commit 1deeb78878
No known key found for this signature in database
GPG key ID: 8703CACD01000000
15 changed files with 11047 additions and 113 deletions

View file

@ -1,7 +1,6 @@
{ {
"recommendations": [ "recommendations": [
"editorconfig.editorconfig", "editorconfig.editorconfig",
"rome.rome",
"vue.volar", "vue.volar",
"vue.vscode-typescript-vue-plugin", "vue.vscode-typescript-vue-plugin",
"arcanis.vscode-zipfs", "arcanis.vscode-zipfs",
@ -13,6 +12,7 @@
"mrmlnc.vscode-json5", "mrmlnc.vscode-json5",
"esbenp.prettier-vscode", "esbenp.prettier-vscode",
"redhat.vscode-yaml", "redhat.vscode-yaml",
"yoavbls.pretty-ts-errors" "yoavbls.pretty-ts-errors",
"biomejs.biome"
] ]
} }

12
biome.json Normal file
View file

@ -0,0 +1,12 @@
{
"$schema": "https://biomejs.dev/schemas/1.0.0/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}

View file

@ -46,9 +46,11 @@
"seedrandom": "^3.0.5" "seedrandom": "^3.0.5"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.0.0",
"@types/gulp": "4.0.13", "@types/gulp": "4.0.13",
"@types/gulp-rename": "2.0.2", "@types/gulp-rename": "2.0.2",
"@types/node": "20.5.8", "@types/node": "20.5.8",
"add": "2.0.6",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"cypress": "10.11.0", "cypress": "10.11.0",
"execa": "5.1.1", "execa": "5.1.1",
@ -58,7 +60,7 @@
"gulp-replace": "1.1.4", "gulp-replace": "1.1.4",
"gulp-terser": "2.1.0", "gulp-terser": "2.1.0",
"install-peers": "^1.0.4", "install-peers": "^1.0.4",
"rome": "^12.1.3", "pnpm": "8.7.1",
"start-server-and-test": "1.15.2", "start-server-and-test": "1.15.2",
"typescript": "5.2.2" "typescript": "5.2.2"
} }

File diff suppressed because one or more lines are too long

View file

@ -16,10 +16,10 @@
"build": "pnpm swc src -d built -D", "build": "pnpm swc src -d built -D",
"build:debug": "pnpm swc src -d built -s -D", "build:debug": "pnpm swc src -d built -s -D",
"watch": "pnpm swc src -d built -D -w", "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", "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", "test": "pnpm run mocha",
"format": "pnpm rome format * --write" "format": "pnpm biome format * --write"
}, },
"optionalDependencies": { "optionalDependencies": {
"@swc/core-android-arm64": "1.3.11", "@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; type FIXME = any;

View file

@ -472,7 +472,7 @@ export default abstract class Chart<T extends Schema> {
protected commit(diff: Commit<T>, group: string | null = null): void { protected commit(diff: Commit<T>, group: string | null = null): void {
for (const [k, v] of Object.entries(diff)) { for (const [k, v] of Object.entries(diff)) {
if (v == null || v === 0 || (Array.isArray(v) && v.length === 0)) 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]; delete diff[k];
} }
this.buffer.push({ this.buffer.push({

View file

@ -78,7 +78,7 @@ export async function fetchInstanceMetadata(
} catch (e) { } catch (e) {
logger.error(`Failed to update metadata of ${instance.host}: ${e}`); logger.error(`Failed to update metadata of ${instance.host}: ${e}`);
} finally { } finally {
await getFetchInstanceMetadataLock(instance.host) await getFetchInstanceMetadataLock(instance.host);
} }
} }

View file

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

View file

@ -5,9 +5,9 @@
"watch": "pnpm vite build --watch --mode development", "watch": "pnpm vite build --watch --mode development",
"build": "pnpm vite build", "build": "pnpm vite build",
"build:debug": "pnpm run 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", "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": { "devDependencies": {
"@discordapp/twemoji": "14.1.2", "@discordapp/twemoji": "14.1.2",

View file

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

View file

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

View file

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

View file

@ -30,6 +30,9 @@ importers:
specifier: ^3.0.5 specifier: ^3.0.5
version: 3.0.5 version: 3.0.5
devDependencies: devDependencies:
'@biomejs/biome':
specifier: 1.0.0
version: 1.0.0
'@types/gulp': '@types/gulp':
specifier: 4.0.13 specifier: 4.0.13
version: 4.0.13 version: 4.0.13
@ -39,6 +42,9 @@ importers:
'@types/node': '@types/node':
specifier: 20.5.8 specifier: 20.5.8
version: 20.5.8 version: 20.5.8
add:
specifier: 2.0.6
version: 2.0.6
cross-env: cross-env:
specifier: 7.0.3 specifier: 7.0.3
version: 7.0.3 version: 7.0.3
@ -66,9 +72,9 @@ importers:
install-peers: install-peers:
specifier: ^1.0.4 specifier: ^1.0.4
version: 1.0.4 version: 1.0.4
rome: pnpm:
specifier: ^12.1.3 specifier: 8.7.1
version: 12.1.3 version: 8.7.1
start-server-and-test: start-server-and-test:
specifier: 1.15.2 specifier: 1.15.2
version: 1.15.2 version: 1.15.2
@ -1444,6 +1450,74 @@ packages:
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
dev: true 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.8.0(@bull-board/ui@5.8.0): /@bull-board/api@5.8.0(@bull-board/ui@5.8.0):
resolution: {integrity: sha512-jHJ7Mw/CHixNgIsrbUihyYVxIdlM/lzii+ZUo7E8CFEsOCjE+Um5RDr9boYghWVHuJykkLy7b+wPvbnTwmX0SA==} resolution: {integrity: sha512-jHJ7Mw/CHixNgIsrbUihyYVxIdlM/lzii+ZUo7E8CFEsOCjE+Um5RDr9boYghWVHuJykkLy7b+wPvbnTwmX0SA==}
peerDependencies: peerDependencies:
@ -3073,54 +3147,6 @@ packages:
rollup: 3.28.1 rollup: 3.28.1
dev: true 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): /@rushstack/node-core-library@3.59.4(@types/node@20.3.1):
resolution: {integrity: sha512-YAKJDC6Mz/KA1D7bvB88WaRX3knt/ZuLzkRu5G9QADGSjLtvTWzCNCytRF2PCSaaHOZaZsWul4F1KQdgFgUDqA==} resolution: {integrity: sha512-YAKJDC6Mz/KA1D7bvB88WaRX3knt/ZuLzkRu5G9QADGSjLtvTWzCNCytRF2PCSaaHOZaZsWul4F1KQdgFgUDqA==}
peerDependencies: peerDependencies:
@ -5297,6 +5323,10 @@ packages:
engines: {node: '>=0.4.0'} engines: {node: '>=0.4.0'}
hasBin: true hasBin: true
/add@2.0.6:
resolution: {integrity: sha512-j5QzrmsokwWWp6kUcJQySpbG+xfOBqqKnup3OIk1pz+kB/80SLorZ9V8zHFLO92Lcd+hbvq8bT+zOGoPkmBV0Q==}
dev: true
/adm-zip@0.5.10: /adm-zip@0.5.10:
resolution: {integrity: sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==} resolution: {integrity: sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==}
engines: {node: '>=6.0'} engines: {node: '>=6.0'}
@ -15302,6 +15332,12 @@ packages:
engines: {node: '>=14.19.0'} engines: {node: '>=14.19.0'}
dev: false dev: false
/pnpm@8.7.1:
resolution: {integrity: sha512-Qbt3EhYUaXFS2k4FLQA7r2/eYz/JoDeG680/3UXG0Ga03LPuY4GgdvCLe+zO3M7ZnWG4VI4bAwk7QpJyfr5eqA==}
engines: {node: '>=16.14'}
hasBin: true
dev: true
/posix-character-classes@0.1.1: /posix-character-classes@0.1.1:
resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==} resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
@ -16530,20 +16566,6 @@ packages:
fsevents: 2.3.2 fsevents: 2.3.2
dev: true 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
/rrweb-cssom@0.6.0: /rrweb-cssom@0.6.0:
resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==}
dev: false dev: false

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"
]
}
}