Skip to content

Commit c54312b

Browse files
committed
chore: switch scripts to oxlint and oxfmt, remove eslint, prettier, and config files
1 parent 1a2ace3 commit c54312b

7 files changed

Lines changed: 9 additions & 137 deletions

File tree

.prettierignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

eslint.config.js

Lines changed: 0 additions & 108 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44
"type": "module",
55
"description": "GitHub notifications in the browser toolbar",
66
"scripts": {
7-
"ci": "npm run test && npm run lint:fix && npm run format",
7+
"ci": "npm run test && npm run lint && npm run format",
88
"dev": "npm run ci && npm run dev:firefox",
99
"all": "npm run ci && npm run build",
1010
"build": "rm -rf dist && mkdir -p dist && zip -r dist/github-notifier-pro-chrome.zip manifest.json src/ images/ -x '*.DS_Store' '*.git*' '*node_modules*' '*.md' && mkdir -p dist/tmp-firefox && cp manifest-firefox.json dist/tmp-firefox/manifest.json && cp -r src images dist/tmp-firefox/ && (cd dist/tmp-firefox && zip -r ../github-notifier-pro-firefox.zip manifest.json src/ images/ -x '*.DS_Store' '*.git*' '*node_modules*' '*.md') && rm -rf dist/tmp-firefox && echo '✨ Build complete! Chrome & Firefox packages in dist/'",
1111
"dev:firefox": "rm -rf dist/firefox-dev && mkdir -p dist/firefox-dev && cp manifest-firefox.json dist/firefox-dev/manifest.json && cp -r src dist/firefox-dev/ && cp -r images dist/firefox-dev/ && echo '🦊 Firefox dev environment ready at dist/firefox-dev/'",
1212
"test": "vitest run",
13-
"lint": "eslint src/ tests/",
14-
"lint:fix": "eslint src/ tests/ --fix",
15-
"format": "prettier --write \"src/**/*.{js,html,css}\" \"tests/**/*.js\"",
16-
"format:check": "prettier --check \"src/**/*.{js,html,css}\" \"tests/**/*.js\"",
13+
"lint": "oxlint src/ tests/",
14+
"format": "oxfmt --write .",
15+
"format:check": "oxfmt --check .",
1716
"prepare": "husky"
1817
},
1918
"lint-staged": {
@@ -44,17 +43,11 @@
4443
"url": "https://github.com/euxx/github-notifier-pro"
4544
},
4645
"devDependencies": {
47-
"@eslint/js": "latest",
48-
"eslint": "latest",
49-
"eslint-config-prettier": "latest",
50-
"eslint-plugin-prettier": "latest",
51-
"globals": "latest",
5246
"husky": "latest",
5347
"jsdom": "latest",
5448
"lint-staged": "latest",
5549
"oxfmt": "^0.42.0",
5650
"oxlint": "^1.57.0",
57-
"prettier": "latest",
5851
"vitest": "latest"
5952
}
6053
}

src/lib/github-api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ class GitHubAPI {
433433
try {
434434
const errorData = await response.json();
435435
apiMessage = errorData?.message || '';
436-
} catch (_error) {
436+
} catch {
437437
// Ignore parse errors for non-JSON responses
438438
}
439439

src/popup/popup.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ const POPUP_THEME_KEY = 'popupTheme';
8484
function getStorageValue(key, defaultValue) {
8585
try {
8686
return localStorage.getItem(key) ?? defaultValue;
87-
} catch (_error) {
87+
} catch {
8888
return defaultValue;
8989
}
9090
}
9191

9292
function setStorageValue(key, value) {
9393
try {
9494
localStorage.setItem(key, String(value));
95-
} catch (_error) {
95+
} catch {
9696
// Ignore storage errors to avoid blocking popup rendering
9797
}
9898
}
@@ -923,7 +923,7 @@ async function init() {
923923
});
924924

925925
// Listen for system theme changes
926-
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', async (_e) => {
926+
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', async () => {
927927
const currentTheme = await storage.getTheme();
928928
if (currentTheme === 'system') {
929929
applyTheme('system');

tests/service-worker.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ mockRuntime.onMessage.addListener.mockImplementation((handler) => {
156156
messageHandler = handler;
157157
});
158158

159-
mockAlarms.onAlarm.addListener.mockImplementation((_handler) => {
159+
mockAlarms.onAlarm.addListener.mockImplementation(() => {
160160
// Alarm handler captured but not used in tests
161161
});
162162

0 commit comments

Comments
 (0)