Skip to content

Commit b5d8ee7

Browse files
authored
fix(typescript) :: enable low hanging strict checks
These are now enabled: `erasableSyntaxOnly`, `noImplicitReturns`, `isolatedModules`, `verbatimModuleSyntax`, `noImplicitOverride`, `noFallthroughCasesInSwitch`, `noUnusedLocals`, `noUnusedParameters`, and no unreachable code nor unused labels.
1 parent e458dbe commit b5d8ee7

8 files changed

Lines changed: 18 additions & 6 deletions

File tree

‎frontend/src/chart_series.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export function xaxis_type_for(
4040
NUMERIC_X_CHART_TYPES.includes(chart_type)
4141
)
4242
return "numeric";
43+
return undefined;
4344
}
4445

4546
/**

‎tests/end-to-end/fixture.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from "node:path";
22
import { test as base, expect } from "@playwright/test";
33

4-
const fixturesDirectory = path.resolve(__dirname, "fixtures");
4+
const fixturesDirectory = path.resolve(import.meta.dirname, "fixtures");
55

66
export const test = base.extend({
77
page: async ({ page }, use, testInfo) => {

‎tests/end-to-end/fixtures/big-number/test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { expect, test } from "../../fixture";
1+
import { expect, test } from "../../fixture.ts";
22

33
for (const theme of ["light", "dark"]) {
44
test(`colored values match their cards in the ${theme} theme`, async ({

‎tests/end-to-end/fixtures/chart/test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { expect, type Page, test } from "../../fixture";
1+
import { expect, type Page, test } from "../../fixture.ts";
22

33
type ChartPoint = { x: string | number | Date; y: number | null };
44

‎tests/end-to-end/fixtures/form/test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { expect, test } from "../../fixture";
1+
import { expect, test } from "../../fixture.ts";
22

33
const fields = [
44
{ selector: 'input[name="modern_text"]', name: "text" },

‎tests/end-to-end/fixtures/map/test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { expect, type Page, test } from "../../fixture";
1+
import { expect, type Page, test } from "../../fixture.ts";
22

33
const PARIS_WITHOUT_ITS_LONGITUDE = "48.85,";
44
const NOT_COORDINATES = "somewhere nice";

‎tests/end-to-end/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "end-to-end",
33
"version": "1.0.0",
4+
"type": "module",
45
"description": "",
56
"main": "index.js",
67
"scripts": {

‎tsconfig.json‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,19 @@
66
"moduleResolution": "bundler",
77
"noEmit": true,
88
"allowImportingTsExtensions": true,
9+
"erasableSyntaxOnly": true,
10+
"isolatedModules": true,
11+
"verbatimModuleSyntax": true,
912
"strict": true,
13+
"noImplicitOverride": true,
14+
"noFallthroughCasesInSwitch": true,
15+
"noUnusedLocals": true,
16+
"noUnusedParameters": true,
17+
"allowUnreachableCode": false,
18+
"allowUnusedLabels": false,
1019
"noImplicitAny": false,
11-
"types": []
20+
"types": [],
21+
"noImplicitReturns": true
1222
},
1323
"include": ["frontend/src"]
1424
}

0 commit comments

Comments
 (0)