Skip to content

Commit 3a36de2

Browse files
mitigate breaking changes:
* update formatters test because "00:00:00" is now the standard representation for the start of a day in a 24-hour clock * migrate to eslint.config.js usage
1 parent 3f2f89c commit 3a36de2

6 files changed

Lines changed: 112 additions & 29 deletions

File tree

clients/web/.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

clients/web/.eslintrc.json

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

clients/web/eslint.config.js

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import tseslint from "typescript-eslint";
4+
import solid from "eslint-plugin-solid";
5+
import prettierConfig from "eslint-config-prettier";
6+
7+
export default tseslint.config(
8+
{
9+
ignores: ["src/lib/proto/**/*", "dist/**/*"],
10+
},
11+
js.configs.recommended,
12+
...tseslint.configs.recommended,
13+
solid.configs["flat/recommended"],
14+
prettierConfig,
15+
{
16+
rules: {
17+
"no-unassigned-vars": "off",
18+
},
19+
},
20+
{
21+
files: ["**/*.{ts,tsx}"],
22+
languageOptions: {
23+
parser: tseslint.parser,
24+
parserOptions: {
25+
ecmaVersion: "latest",
26+
sourceType: "module",
27+
},
28+
globals: {
29+
...globals.browser,
30+
...globals.es2021,
31+
},
32+
},
33+
plugins: {
34+
"@typescript-eslint": tseslint.plugin,
35+
},
36+
rules: {
37+
"@typescript-eslint/no-unused-vars": [
38+
"error",
39+
{
40+
argsIgnorePattern: "^_",
41+
varsIgnorePattern: "^_",
42+
caughtErrorsIgnorePattern: "^_",
43+
},
44+
],
45+
},
46+
},
47+
{
48+
files: ["**/*.js", "**/*.cjs", "**/*.mjs"],
49+
languageOptions: {
50+
globals: {
51+
...globals.node,
52+
},
53+
},
54+
},
55+
);

clients/web/package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"build": "pnpm proto && vite build",
1414
"preview": "pnpm proto && vite preview",
1515
"format": "prettier --write --cache .",
16-
"lint": "eslint . --ext .ts,.tsx",
17-
"lint:fix": "eslint . --fix --ext .ts,.tsx",
16+
"lint": "eslint .",
17+
"lint:fix": "eslint . --fix",
1818
"test": "cross-env TZ=UTC pnpm proto && vitest",
1919
"prepare": "cd ../.. && husky clients/web/.husky"
2020
},
@@ -23,6 +23,7 @@
2323
"*.{ts,tsx}": "pnpm lint"
2424
},
2525
"devDependencies": {
26+
"@eslint/js": "^10.0.1",
2627
"@protobuf-ts/protoc": "^2.11.1",
2728
"@shikijs/transformers": "^1.29.2",
2829
"@solidjs/testing-library": "^0.8.10",
@@ -34,15 +35,17 @@
3435
"cross-env": "^7.0.3",
3536
"csp-header": "^5.2.1",
3637
"eslint": "^9.35",
37-
"eslint-config-prettier": "^9.1",
38-
"eslint-plugin-solid": "^0.14",
38+
"eslint-config-prettier": "^9.1.2",
39+
"eslint-plugin-solid": "^0.14.5",
40+
"globals": "^17.4.0",
3941
"husky": "^9.1.7",
4042
"jsdom": "^28.1",
4143
"lint-staged": "^15.5.2",
4244
"postcss": "^8.5.8",
4345
"prettier": "^3.8.1",
4446
"tailwindcss": "^3.4.19",
4547
"typescript": "^5.9.3",
48+
"typescript-eslint": "^8.56.1",
4649
"vite": "^7.3",
4750
"vite-plugin-solid": "^2.11",
4851
"vite-plugin-static-copy": "^3.2",

clients/web/src/lib/span/tests/formatters.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ describe("formatters", () => {
2121
it("should formatTimestamp", () => {
2222
expect(
2323
formatTimestamp(new Date("2019-08-19T00:00:00")),
24-
).toMatchInlineSnapshot('"24:00:00:000"');
24+
).toMatchInlineSnapshot(`"00:00:00:000"`);
2525
});
2626
it("should getTime", () => {
2727
expect(getTime(new Date("2019-08-19T00:00:00"))).toMatchInlineSnapshot(
28-
'"24:00:00"',
28+
`"00:00:00"`,
2929
);
3030
});
3131
it("should timestampToDate", () => {

pnpm-lock.yaml

Lines changed: 48 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)