Skip to content

Commit 4fde73a

Browse files
committed
feat: migrates to eslint v9
1 parent b53bad3 commit 4fde73a

File tree

12 files changed

+281
-174
lines changed

12 files changed

+281
-174
lines changed

.eslintrc.json

-26
This file was deleted.

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup Bun
1919
uses: oven-sh/setup-bun@v1
2020
with:
21-
bun-version: 1.1.42
21+
bun-version: 1.2.3
2222
- name: Install Dependencies
2323
run: bun install --frozen-lockfile
2424
- name: Type Check

bun.lock

100755100644
+173-125
Large diffs are not rendered by default.

eslint.config.ts

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import js from "@eslint/js";
2+
import simpleImportSort from "eslint-plugin-simple-import-sort";
3+
import solid from "eslint-plugin-solid/configs/typescript";
4+
import globals from "globals";
5+
import tseslint from "typescript-eslint";
6+
7+
export default tseslint.config(
8+
{
9+
// config with just ignores is the replacement for `.eslintignore`
10+
ignores: ["**/build/**", "**/coverage/**", "**/dist/**", "**/node_modules/**"],
11+
},
12+
js.configs.recommended,
13+
tseslint.configs.strict,
14+
{
15+
plugins: {
16+
"simple-import-sort": simpleImportSort,
17+
},
18+
rules: {
19+
"simple-import-sort/imports": "error",
20+
"simple-import-sort/exports": "error",
21+
},
22+
},
23+
{
24+
files: ["**/*.ts", "**/*.tsx"],
25+
languageOptions: {
26+
parser: tseslint.parser,
27+
parserOptions: {
28+
sourceType: "module",
29+
project: "./tsconfig.json",
30+
ecmaFeatures: {
31+
jsx: true,
32+
},
33+
},
34+
globals: {
35+
...globals.browser,
36+
...globals.es2022,
37+
},
38+
},
39+
plugins: solid.plugins,
40+
rules: {
41+
...solid.rules,
42+
"@typescript-eslint/no-non-null-assertion": "off",
43+
"@typescript-eslint/no-namespace": "off",
44+
"no-unused-vars": "off",
45+
"@typescript-eslint/no-unused-vars": [
46+
"error",
47+
{
48+
varsIgnorePattern: "^_",
49+
argsIgnorePattern: "^_",
50+
destructuredArrayIgnorePattern: "^_",
51+
},
52+
],
53+
},
54+
},
55+
{
56+
files: ["server/**/*.ts"],
57+
languageOptions: {
58+
parser: tseslint.parser,
59+
parserOptions: {
60+
sourceType: "module",
61+
project: "./tsconfig.json",
62+
},
63+
globals: {
64+
Bun: true,
65+
},
66+
},
67+
rules: {
68+
"@typescript-eslint/no-non-null-assertion": "off",
69+
},
70+
},
71+
{
72+
files: ["__tests__/**/*.ts", "__tests__/**/*.tsx"],
73+
languageOptions: {
74+
globals: {
75+
...globals.node,
76+
...globals.vitest,
77+
},
78+
},
79+
},
80+
);

package.json

+22-18
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
"dev": "vite",
1010
"format": "prettier . --check",
1111
"format:fix": "prettier . --write",
12-
"lint": "eslint . --ext .ts,.tsx",
13-
"lint:fix": "eslint . --ext .ts,.tsx --fix",
12+
"lint": "eslint .",
13+
"lint:fix": "eslint . --fix",
1414
"serve": "vite preview",
1515
"start": "vite",
1616
"start:msw": "VITE_MSW=true vite",
17-
"start:server": "bun backend/server.ts",
17+
"start:server": "bun server/index.ts",
1818
"test": "bun run test:ui && bun run test:server",
1919
"test:ui": "vitest run",
2020
"test:ui:cov": "vitest run --coverage",
@@ -25,29 +25,33 @@
2525
"devDependencies": {
2626
"@solidjs/testing-library": "^0.8.10",
2727
"@testing-library/jest-dom": "^6.6.3",
28-
"@testing-library/user-event": "^14.5.2",
29-
"@types/bun": "^1.1.16",
30-
"@typescript-eslint/eslint-plugin": "^8.20.0",
31-
"@typescript-eslint/parser": "^8.20.0",
32-
"@vitest/coverage-istanbul": "^2.1.8",
33-
"eslint": "^8.57.1",
28+
"@testing-library/user-event": "^14.6.1",
29+
"@types/bun": "^1.2.3",
30+
"@vitest/coverage-istanbul": "^2.1.9",
31+
"eslint": "^9.21.0",
3432
"eslint-plugin-simple-import-sort": "^12.1.1",
3533
"eslint-plugin-solid": "^0.14.5",
34+
"globals": "^15.15.0",
35+
"jiti": "^2.4.2",
3636
"jsdom": "^26.0.0",
37-
"msw": "^2.7.0",
38-
"prettier": "^3.4.2",
37+
"msw": "^2.7.3",
38+
"prettier": "^3.5.2",
3939
"typescript": "^5.7.3",
40-
"vite": "^6.0.7",
41-
"vite-plugin-solid": "^2.11.0",
42-
"vitest": "^2.1.8"
40+
"typescript-eslint": "^8.25.0",
41+
"vite": "^6.2.0",
42+
"vite-plugin-solid": "^2.11.2",
43+
"vitest": "^2.1.9"
4344
},
4445
"dependencies": {
4546
"@elysiajs/eden": "^1.2.0",
4647
"@elysiajs/static": "^1.2.0",
47-
"@solidjs/router": "^0.15.2",
48-
"@tanstack/solid-query": "^5.64.1",
49-
"elysia": "^1.2.10",
50-
"solid-js": "^1.9.4"
48+
"@solidjs/router": "^0.15.3",
49+
"@tanstack/solid-query": "^5.66.9",
50+
"elysia": "^1.2.22",
51+
"solid-js": "^1.9.5"
52+
},
53+
"overrides": {
54+
"cssstyle": "4.1.0"
5155
},
5256
"msw": {
5357
"workerDirectory": [

public/mockServiceWorker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* - Please do NOT serve this file on production.
99
*/
1010

11-
const PACKAGE_VERSION = '2.7.0'
11+
const PACKAGE_VERSION = '2.7.3'
1212
const INTEGRITY_CHECKSUM = '00729d72e3b82faf54ca8b9621dbb96f'
1313
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
1414
const activeClientIds = new Set()

backend/__tests__/server.test.ts renamed to server/__tests__/server.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { treaty } from "@elysiajs/eden";
22
import { describe, expect, it } from "vitest";
33

4-
import { app } from "../server";
4+
import { app } from "..";
55

66
const api = treaty(app);
77

File renamed without changes.
File renamed without changes.

src/backend.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { treaty } from "@elysiajs/eden";
22

3-
import type { Server } from "../backend/server";
3+
import type { Server } from "../server";
44

55
const serverClient = treaty<Server>(window.location.origin);
66

src/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
3030
}
3131

3232
enableMocking().then(() => {
33+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3334
render(() => <App />, root!);
3435
});

vite.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const TEST_EXCLUDES = [
88
"src/index.tsx",
99
"src/mocks",
1010
"public",
11-
"backend",
11+
"server",
1212
];
1313
const COVERAGE_EXCLUDE = [...TEST_EXCLUDES, "**/*.test.{ts,tsx}"];
1414

0 commit comments

Comments
 (0)