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

Fix linting #314

Merged
merged 2 commits into from
Sep 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
37 changes: 29 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"lint:css": "stylelint src/**/*.css",
"lint:js": "xo",
"lint": "run-p lint:* check-types",
"pretest": "NODE_ENV=test run-p lint:* unused-exports build:mv3",
"pretest": "NODE_ENV=test run-p lint unused-exports build:mv3",
"test": "jest --runInBand",
"watch": "parcel watch src/mv2/manifest.json --dist-dir dist-mv2 --no-cache --no-hmr",
"watch:mv3": "parcel watch src/mv3/manifest.json --dist-dir dist-mv3 --no-cache --no-hmr",
Expand Down Expand Up @@ -268,7 +268,7 @@
"stylelint-config-prettier": "^9.0.5",
"ts-jest": "^29.0.5",
"ts-unused-exports": "^8.0.5",
"typescript": "^4.6.3",
"typescript": "^5.6.2",
"web-ext": "^7.4.0",
"xo": "^0.48.0"
},
Expand Down
10 changes: 0 additions & 10 deletions src/content/actions/scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ import { getSetting } from "../settings/settingsManager";

const DEFAULT_SCROLL_FACTOR = 0.66;

// Officially "instant" is not part of the specification yet, although it works
// in Firefox, Chrome and Safari.
declare global {
interface ScrollToOptions {
left?: number;
top?: number;
behavior?: "auto" | "instant" | "smooth";
}
}

let lastScrollContainer: Element | undefined;
let lastScrollFactor: number;

Expand Down
4 changes: 3 additions & 1 deletion src/content/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ async function isWrongFrame(request: RequestFromBackground) {
browser.runtime.onMessage.addListener(
async (
request: RequestFromBackground
): Promise<string | string[] | TalonAction[] | boolean | undefined> => {
): Promise<
string | number | string[] | TalonAction[] | boolean | undefined
> => {
if (await isWrongFrame(request)) return;

if ("target" in request) {
Expand Down
2 changes: 1 addition & 1 deletion src/content/utils/combineArrays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function odometerIncrement<T>(odometer: number[], arrayOfArrays: T[][]) {

if (odometer[iOdometerDigit]! + 1 <= maxee) {
// Increment, and you're done...
odometer[iOdometerDigit]++;
odometer[iOdometerDigit]!++;
return true;
}

Expand Down
Loading