Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace rome with biome #109

Merged
merged 1 commit into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"recommendations": [
"arcanis.vscode-zipfs",
"dbaeumer.vscode-eslint",
"rome.rome"
"biomejs.biome"
]
}
39 changes: 39 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json",
"files": {
"ignore": ["**/popup/vendors/*", "./.pnp.*", "*.json"]
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 4
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUndeclaredVariables": "error",
"noUnusedVariables": "error"
},
"complexity": {
"noThisInStatic": "off",
"noForEach": "off"
},
"suspicious": {
"noAssignInExpressions": "off"
},
"style": {
"useNumberNamespace": "off"
},
"nursery": {
"recommended": true
}
}
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"packageManager": "yarn@4.0.1",
"scripts": {
"check": "yarn copy_to_dist && yarn check_no_copy && del-cli dist",
"check_no_copy": "(eslint . && rome ci . && web-ext lint -w --ignore-files \"./popup/vendors/*\") || (del-cli dist && exit 1)",
"format": "eslint . --fix && rome format . --write",
"check_no_copy": "(eslint . && biome ci . && web-ext lint -w --ignore-files \"./popup/vendors/*\") || (del-cli dist && exit 1)",
"format": "eslint . --fix && biome format . --write",
"sas": "sass --update unpacked/popup",
"release": "release-it",
"publish": "gh workflow run publish.yml",
Expand All @@ -38,14 +38,14 @@
},
"homepage": "https://github.com/Araxeus/Youtube-Volume-Scroll#readme",
"devDependencies": {
"@biomejs/biome": "^1.7.3",
"@release-it/bumper": "^4.0.2",
"auto-changelog": "^2.4.0",
"cpy-cli": "^4.2.0",
"del-cli": "^5.0.0",
"dot-json": "^1.2.2",
"eslint": "^8.39.0",
"release-it": "^15.10.1",
"rome": "^12.0.0",
"sass": "^1.62.0",
"vendorfiles": "^1.1.1",
"web-ext": "^7.6.2",
Expand Down
29 changes: 0 additions & 29 deletions rome.json

This file was deleted.

5 changes: 3 additions & 2 deletions unpacked/pageAccess.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// set last active time to now every 15min (blocks "are you there?" popup)
setInterval(() => (window._lact = Date.now()), 9e5);

// biome-ignore lint/complexity/noStaticOnlyClass: this is a class to hide private variables and avoid page pollution
class ytvs {
static #$ = document.querySelector.bind(document);
static get $() {
Expand Down Expand Up @@ -587,7 +588,7 @@ class YoutubeVolumeScroll {
createNative();
}
break;
// rome-ignore lint/nursery/noUselessSwitchCase: Just here for clarity
// biome-ignore lint/complexity/noUselessSwitchCase: Just here for clarity
case ytvs.hudTypes.custom:
default:
if (!ytvs.$(`${this.hudContainer} .volume-hud-custom`)) {
Expand Down Expand Up @@ -735,7 +736,7 @@ class YoutubeVolumeScroll {
const newTop = ev.clientY - dragTargetRect.y - dragOffsetY;

const padding =
parseFloat(
Number.parseFloat(
window.getComputedStyle(draggedElement, undefined).padding,
) - 2;

Expand Down
1 change: 1 addition & 0 deletions unpacked/popup/elements/slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ customElements.define(
return this.getAttribute('value') || '1';
}

// biome-ignore lint/complexity/noUselessConstructor: for clarity
constructor() {
super();
}
Expand Down
1 change: 1 addition & 0 deletions unpacked/popup/elements/tooltip.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
customElements.define(
'tooltip-icon',
class Tooltip extends HTMLElement {
// biome-ignore lint/complexity/noUselessConstructor: for clarity
constructor() {
super();
}
Expand Down
164 changes: 92 additions & 72 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,97 @@ __metadata:
languageName: node
linkType: hard

"@biomejs/biome@npm:^1.7.3":
version: 1.7.3
resolution: "@biomejs/biome@npm:1.7.3"
dependencies:
"@biomejs/cli-darwin-arm64": "npm:1.7.3"
"@biomejs/cli-darwin-x64": "npm:1.7.3"
"@biomejs/cli-linux-arm64": "npm:1.7.3"
"@biomejs/cli-linux-arm64-musl": "npm:1.7.3"
"@biomejs/cli-linux-x64": "npm:1.7.3"
"@biomejs/cli-linux-x64-musl": "npm:1.7.3"
"@biomejs/cli-win32-arm64": "npm:1.7.3"
"@biomejs/cli-win32-x64": "npm: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: fafe2caa658489f80640ecad27b4715881eaf0e88868da039610ebf13385f6345761a7b685772926abe9c415c5eaec07c890206bfcee632daaf0808b310e01e9
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

"@commander-js/extra-typings@npm:^10.0.3":
version: 10.0.3
resolution: "@commander-js/extra-typings@npm:10.0.3"
Expand Down Expand Up @@ -474,48 +565,6 @@ __metadata:
languageName: node
linkType: hard

"@rometools/cli-darwin-arm64@npm:12.0.0":
version: 12.0.0
resolution: "@rometools/cli-darwin-arm64@npm:12.0.0"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard

"@rometools/cli-darwin-x64@npm:12.0.0":
version: 12.0.0
resolution: "@rometools/cli-darwin-x64@npm:12.0.0"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard

"@rometools/cli-linux-arm64@npm:12.0.0":
version: 12.0.0
resolution: "@rometools/cli-linux-arm64@npm:12.0.0"
conditions: os=linux & cpu=arm64
languageName: node
linkType: hard

"@rometools/cli-linux-x64@npm:12.0.0":
version: 12.0.0
resolution: "@rometools/cli-linux-x64@npm:12.0.0"
conditions: os=linux & cpu=x64
languageName: node
linkType: hard

"@rometools/cli-win32-arm64@npm:12.0.0":
version: 12.0.0
resolution: "@rometools/cli-win32-arm64@npm:12.0.0"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard

"@rometools/cli-win32-x64@npm:12.0.0":
version: 12.0.0
resolution: "@rometools/cli-win32-x64@npm:12.0.0"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard

"@sindresorhus/is@npm:^5.2.0":
version: 5.3.0
resolution: "@sindresorhus/is@npm:5.3.0"
Expand Down Expand Up @@ -6559,35 +6608,6 @@ __metadata:
languageName: node
linkType: hard

"rome@npm:^12.0.0":
version: 12.0.0
resolution: "rome@npm:12.0.0"
dependencies:
"@rometools/cli-darwin-arm64": "npm:12.0.0"
"@rometools/cli-darwin-x64": "npm:12.0.0"
"@rometools/cli-linux-arm64": "npm:12.0.0"
"@rometools/cli-linux-x64": "npm:12.0.0"
"@rometools/cli-win32-arm64": "npm:12.0.0"
"@rometools/cli-win32-x64": "npm:12.0.0"
dependenciesMeta:
"@rometools/cli-darwin-arm64":
optional: true
"@rometools/cli-darwin-x64":
optional: true
"@rometools/cli-linux-arm64":
optional: true
"@rometools/cli-linux-x64":
optional: true
"@rometools/cli-win32-arm64":
optional: true
"@rometools/cli-win32-x64":
optional: true
bin:
rome: bin/rome
checksum: 2c9ad2d58de52d821f568a2fb9e1857b8a79ec0bea972b074006846d337939f212ce2663fc55875458f6a0a8e9d1aa0e858e9ab57dc12548c13004a50714e840
languageName: node
linkType: hard

"run-applescript@npm:^5.0.0":
version: 5.0.0
resolution: "run-applescript@npm:5.0.0"
Expand Down Expand Up @@ -8206,14 +8226,14 @@ __metadata:
version: 0.0.0-use.local
resolution: "youtube-volume-scroll@workspace:."
dependencies:
"@biomejs/biome": "npm:^1.7.3"
"@release-it/bumper": "npm:^4.0.2"
auto-changelog: "npm:^2.4.0"
cpy-cli: "npm:^4.2.0"
del-cli: "npm:^5.0.0"
dot-json: "npm:^1.2.2"
eslint: "npm:^8.39.0"
release-it: "npm:^15.10.1"
rome: "npm:^12.0.0"
sass: "npm:^1.62.0"
vendorfiles: "npm:^1.1.1"
web-ext: "npm:^7.6.2"
Expand Down
Loading