Skip to content

Commit af42008

Browse files
authored
Fix linting (#314)
* Fix linting npm script not working properly * Update typescript and fix some linting errors
1 parent b6202fe commit af42008

File tree

5 files changed

+35
-22
lines changed

5 files changed

+35
-22
lines changed

package-lock.json

+29-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"lint:css": "stylelint src/**/*.css",
1717
"lint:js": "xo",
1818
"lint": "run-p lint:* check-types",
19-
"pretest": "NODE_ENV=test run-p lint:* unused-exports build:mv3",
19+
"pretest": "NODE_ENV=test run-p lint unused-exports build:mv3",
2020
"test": "jest --runInBand",
2121
"watch": "parcel watch src/mv2/manifest.json --dist-dir dist-mv2 --no-cache --no-hmr",
2222
"watch:mv3": "parcel watch src/mv3/manifest.json --dist-dir dist-mv3 --no-cache --no-hmr",
@@ -268,7 +268,7 @@
268268
"stylelint-config-prettier": "^9.0.5",
269269
"ts-jest": "^29.0.5",
270270
"ts-unused-exports": "^8.0.5",
271-
"typescript": "^4.6.3",
271+
"typescript": "^5.6.2",
272272
"web-ext": "^7.4.0",
273273
"xo": "^0.48.0"
274274
},

src/content/actions/scroll.ts

-10
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,6 @@ import { getSetting } from "../settings/settingsManager";
55

66
const DEFAULT_SCROLL_FACTOR = 0.66;
77

8-
// Officially "instant" is not part of the specification yet, although it works
9-
// in Firefox, Chrome and Safari.
10-
declare global {
11-
interface ScrollToOptions {
12-
left?: number;
13-
top?: number;
14-
behavior?: "auto" | "instant" | "smooth";
15-
}
16-
}
17-
188
let lastScrollContainer: Element | undefined;
199
let lastScrollFactor: number;
2010

src/content/content.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ async function isWrongFrame(request: RequestFromBackground) {
3939
browser.runtime.onMessage.addListener(
4040
async (
4141
request: RequestFromBackground
42-
): Promise<string | string[] | TalonAction[] | boolean | undefined> => {
42+
): Promise<
43+
string | number | string[] | TalonAction[] | boolean | undefined
44+
> => {
4345
if (await isWrongFrame(request)) return;
4446

4547
if ("target" in request) {

src/content/utils/combineArrays.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function odometerIncrement<T>(odometer: number[], arrayOfArrays: T[][]) {
7171

7272
if (odometer[iOdometerDigit]! + 1 <= maxee) {
7373
// Increment, and you're done...
74-
odometer[iOdometerDigit]++;
74+
odometer[iOdometerDigit]!++;
7575
return true;
7676
}
7777

0 commit comments

Comments
 (0)