From e0caee2b8be9b0d960cba07b430e0f6ca0781c45 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 12 Aug 2026 18:44:13 +0800 Subject: [PATCH 1/4] chore(deps): upgrade Rslint to v0.8.0 --- client-src/overlay.ts | 18 +++++----- package.json | 2 +- pnpm-lock.yaml | 84 +++++++++++++++++++++---------------------- rslint.config.ts | 17 ++++++++- src/server.ts | 1 + 5 files changed, 68 insertions(+), 54 deletions(-) diff --git a/client-src/overlay.ts b/client-src/overlay.ts index 2dd4432..ce57a8a 100644 --- a/client-src/overlay.ts +++ b/client-src/overlay.ts @@ -617,7 +617,14 @@ const createOverlay = (options: CreateOverlayOptions): StateMachine => { }, trustedTypesPolicyName); } - let handleEscapeKey: (event: KeyboardEvent) => void; + /** + * ESC key press to dismiss the overlay. + */ + function handleEscapeKey(event: KeyboardEvent): void { + if (event.key === 'Escape' || event.key === 'Esc' || event.keyCode === 27) { + overlayService.send({ type: 'DISMISS' }); + } + } const hideOverlayWithEscCleanup = (): void => { window.removeEventListener('keydown', handleEscapeKey); @@ -629,15 +636,6 @@ const createOverlay = (options: CreateOverlayOptions): StateMachine => { show(level, messages, options.trustedTypesPolicyName, messageSource), hideOverlay: hideOverlayWithEscCleanup, }); - /** - * ESC key press to dismiss the overlay. - */ - handleEscapeKey = (event: KeyboardEvent): void => { - if (event.key === 'Escape' || event.key === 'Esc' || event.keyCode === 27) { - overlayService.send({ type: 'DISMISS' }); - } - }; - window.addEventListener('keydown', handleEscapeKey); if (options.catchRuntimeError) { diff --git a/package.json b/package.json index c8b2530..eaba806 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@hono/node-server": "^2.0.11", "@microsoft/api-extractor": "^7.58.12", "@rslib/core": "^0.23.2", - "@rslint/core": "^0.7.1", + "@rslint/core": "^0.8.0", "@rspack/core": "2.0.0-rc.0", "@rspack/plugin-react-refresh": "2.0.2", "@rstest/core": "^0.11.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9b717bc..30d2765 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,8 +22,8 @@ importers: specifier: ^0.23.2 version: 0.23.2(@microsoft/api-extractor@7.58.12(@types/node@24.13.3))(@module-federation/runtime-tools@2.8.0)(typescript@7.0.2) '@rslint/core': - specifier: ^0.7.1 - version: 0.7.1 + specifier: ^0.8.0 + version: 0.8.0 '@rspack/core': specifier: 2.0.0-rc.0 version: 2.0.0-rc.0(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@module-federation/runtime-tools@2.8.0)(@swc/helpers@0.5.23) @@ -373,56 +373,56 @@ packages: typescript: optional: true - '@rslint/core@0.7.1': - resolution: {integrity: sha512-FOeueVzYCNIJO/R+Wf75ZS8LljZlzZHlesJsghBxkteoNpuuKCXcFGibNiUv1XKB6hknJpznt+shGyTSYSWLVA==} + '@rslint/core@0.8.0': + resolution: {integrity: sha512-MfMC6lxiXoKPWsYRu9fuAxWA9mCD/I4E5Aa6Sl20a6q5w8r2C12fJM+bceC01AMGYuvWygKHqS3QBJdJHjniRw==} hasBin: true peerDependencies: - jiti: ^2.0.0 + jiti: ^2.7.0 peerDependenciesMeta: jiti: optional: true - '@rslint/native-darwin-arm64@0.7.1': - resolution: {integrity: sha512-+jW0+xxMOaDXcfVuqjRr11dYZXsHZwKeYtn7ZIrY05S6Jwny6cvtsU1P2Jm02jhRost+K7/v7kGKqEFqGFYpKw==} + '@rslint/native-darwin-arm64@0.8.0': + resolution: {integrity: sha512-Bo6kXL1/TkjVUl6maZ3Sw+JEnZUkgpUD35v06jyBTcjpxlXE6yqFj66NAzB/G2CVu220ADp/FEE7l2Kocrefhg==} cpu: [arm64] os: [darwin] - '@rslint/native-darwin-x64@0.7.1': - resolution: {integrity: sha512-rg+C73OUO9J9KAh5qpGDv8hzC0uZ8f0OBtc7Qoo9C7Ka1CHcrn23tCDls6oKIiRrzlwi80JlMu310LL0UpsRQQ==} + '@rslint/native-darwin-x64@0.8.0': + resolution: {integrity: sha512-F5pabdH7dluxoj7PGuQjPYuoNU+yxnctcJzqrb/CZ122FLP3uJPrbiLufh+ZF9e5ui700rNyb7macJqnHlBV2w==} cpu: [x64] os: [darwin] - '@rslint/native-linux-arm64-gnu@0.7.1': - resolution: {integrity: sha512-8qL0pG4XPLm0/iSUFUWScJuS4nrmIHtXVWwKct/bA1S+0izqR4GwP+2lxEBgvciW2JrxbRE8V3vqd6ZmAqlG4w==} + '@rslint/native-linux-arm64-gnu@0.8.0': + resolution: {integrity: sha512-SSgSjyaeXI032Wk8bq6VmkLQTWOEqHZH5MWAk3831pd/G2rWr2XcoDi5Wf6w0o2rSCeYzkYbIejOePYwIKT4Lg==} cpu: [arm64] os: [linux] libc: [glibc] - '@rslint/native-linux-arm64-musl@0.7.1': - resolution: {integrity: sha512-MANHcVzdtOt8LR9gAwLwWVgfetO5DgH47spRiaUnJ07gewoRkHomm4NHiCOIiLht+F6XkzhHwsN8VItvsEABMw==} + '@rslint/native-linux-arm64-musl@0.8.0': + resolution: {integrity: sha512-50VDZQFAc9kp6rbOUOjyppVjC3d3AdbOJyA6JxlhK3mp8a/8sPIqWG0BlfcN/7ZpwdZrFsQt2Ds+0yMXITfu5A==} cpu: [arm64] os: [linux] libc: [musl] - '@rslint/native-linux-x64-gnu@0.7.1': - resolution: {integrity: sha512-CKUKk5hmHObR93bGFheMkVBLxBVOtMoo7nc1x06rZESRtKw5vKHyMUieHg+8AAaJGEhxHMIMhrQTCDOZ4DUR7g==} + '@rslint/native-linux-x64-gnu@0.8.0': + resolution: {integrity: sha512-wfc/UfnuTBAofwLPK5MLB2Hus1YYnsxP2MVchp380fUvMfQuGFPzz1WOAUY66zqrsrDKpUJsh3V1bx7c8DTlJA==} cpu: [x64] os: [linux] libc: [glibc] - '@rslint/native-linux-x64-musl@0.7.1': - resolution: {integrity: sha512-gqytinzowpPC1bTRN2eUw7HxHcIT+X2HYgnlxxchrjINmseoa8yt46QQWn7OPMwNKWKSoLk2BHvuw0fhPo4m/Q==} + '@rslint/native-linux-x64-musl@0.8.0': + resolution: {integrity: sha512-MTYcAMz6IZWb6ZmLo12pakCBA8mS3EW9cOI0jd3At6vs0Yia9YbeOAUiWbIC4Z9yyp75b8ZQCQMRSnY6rDnbaA==} cpu: [x64] os: [linux] libc: [musl] - '@rslint/native-win32-arm64-msvc@0.7.1': - resolution: {integrity: sha512-zRryqKmmmWCUWX4iaOetQC0yycWSNSIXB6YqMR+T56clv3VXvLrM2TQsGiQbwxLAzGjNmRBp+rYEUt2NyEeaYA==} + '@rslint/native-win32-arm64-msvc@0.8.0': + resolution: {integrity: sha512-hids2jgNWBxZf2mSBLZJxubWRLWlJapEfeJHVokzjpRpBZZNv7O06enoyXSb4Lswff9WaHssIqu1sfZIc9lC2g==} cpu: [arm64] os: [win32] - '@rslint/native-win32-x64-msvc@0.7.1': - resolution: {integrity: sha512-/mwDeo742sE/bzdWhWp/2TQELSUf4UoWJqHNT7zmejiZQCLSz9aXU742JfWVOKipNUWNoB8THvpCLDfav7RJYg==} + '@rslint/native-win32-x64-msvc@0.8.0': + resolution: {integrity: sha512-bun7uURKl6NdChwmw/i2mk3Yj9klZQyh1uRbIQG0RDEJ9oTIbU5M3c7K5sd/Rukat0TVCGgbBAzR+YB0DAXPZQ==} cpu: [x64] os: [win32] @@ -1640,8 +1640,8 @@ packages: resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} engines: {node: '>=8.6'} - picomatch@4.0.4: - resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} + picomatch@4.0.5: + resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} engines: {node: '>=12'} pkijs@3.4.0: @@ -2292,41 +2292,41 @@ snapshots: - '@typescript/native-preview' - core-js - '@rslint/core@0.7.1': + '@rslint/core@0.8.0': dependencies: - picomatch: 4.0.4 + picomatch: 4.0.5 optionalDependencies: - '@rslint/native-darwin-arm64': 0.7.1 - '@rslint/native-darwin-x64': 0.7.1 - '@rslint/native-linux-arm64-gnu': 0.7.1 - '@rslint/native-linux-arm64-musl': 0.7.1 - '@rslint/native-linux-x64-gnu': 0.7.1 - '@rslint/native-linux-x64-musl': 0.7.1 - '@rslint/native-win32-arm64-msvc': 0.7.1 - '@rslint/native-win32-x64-msvc': 0.7.1 + '@rslint/native-darwin-arm64': 0.8.0 + '@rslint/native-darwin-x64': 0.8.0 + '@rslint/native-linux-arm64-gnu': 0.8.0 + '@rslint/native-linux-arm64-musl': 0.8.0 + '@rslint/native-linux-x64-gnu': 0.8.0 + '@rslint/native-linux-x64-musl': 0.8.0 + '@rslint/native-win32-arm64-msvc': 0.8.0 + '@rslint/native-win32-x64-msvc': 0.8.0 - '@rslint/native-darwin-arm64@0.7.1': + '@rslint/native-darwin-arm64@0.8.0': optional: true - '@rslint/native-darwin-x64@0.7.1': + '@rslint/native-darwin-x64@0.8.0': optional: true - '@rslint/native-linux-arm64-gnu@0.7.1': + '@rslint/native-linux-arm64-gnu@0.8.0': optional: true - '@rslint/native-linux-arm64-musl@0.7.1': + '@rslint/native-linux-arm64-musl@0.8.0': optional: true - '@rslint/native-linux-x64-gnu@0.7.1': + '@rslint/native-linux-x64-gnu@0.8.0': optional: true - '@rslint/native-linux-x64-musl@0.7.1': + '@rslint/native-linux-x64-musl@0.8.0': optional: true - '@rslint/native-win32-arm64-msvc@0.7.1': + '@rslint/native-win32-arm64-msvc@0.8.0': optional: true - '@rslint/native-win32-x64-msvc@0.7.1': + '@rslint/native-win32-x64-msvc@0.8.0': optional: true '@rspack/binding-darwin-arm64@2.0.0-beta.7': @@ -3391,7 +3391,7 @@ snapshots: picomatch@2.3.2: {} - picomatch@4.0.4: {} + picomatch@4.0.5: {} pkijs@3.4.0: dependencies: diff --git a/rslint.config.ts b/rslint.config.ts index 879395e..6a10b16 100644 --- a/rslint.config.ts +++ b/rslint.config.ts @@ -1,10 +1,25 @@ -import { defineConfig, ts } from '@rslint/core'; +import { defineConfig, js, ts } from '@rslint/core'; export default defineConfig([ + js.configs.recommended, ts.configs.recommended, { rules: { '@typescript-eslint/no-explicit-any': 'off', }, }, + { + files: ['tests/**/*'], + rules: { + '@typescript-eslint/no-require-imports': 'off', + '@typescript-eslint/no-unused-expressions': 'off', + 'no-undef': 'off', + }, + }, + { + files: ['example/**/*'], + rules: { + 'no-undef': 'off', + }, + }, ]); diff --git a/src/server.ts b/src/server.ts index 69a78f2..a55c0d7 100644 --- a/src/server.ts +++ b/src/server.ts @@ -907,6 +907,7 @@ class Server< ) { throw new Error( 'Cannot generate a self-signed certificate because optional peer dependency `selfsigned@^5.0.0` is not installed. Please install it and try again.', + { cause: error }, ); } From bcb8b9d9f8f1a140add9090d3df04ca4fe55bab8 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 20 Aug 2026 14:47:33 +0800 Subject: [PATCH 2/4] chore(deps): upgrade Rslint to v0.8.1 --- package.json | 2 +- pnpm-lock.yaml | 74 ++++++++++++++++++++++++------------------------ rslint.config.ts | 17 +++++++++-- 3 files changed, 53 insertions(+), 40 deletions(-) diff --git a/package.json b/package.json index eaba806..8d6135e 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@hono/node-server": "^2.0.11", "@microsoft/api-extractor": "^7.58.12", "@rslib/core": "^0.23.2", - "@rslint/core": "^0.8.0", + "@rslint/core": "^0.8.1", "@rspack/core": "2.0.0-rc.0", "@rspack/plugin-react-refresh": "2.0.2", "@rstest/core": "^0.11.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 30d2765..fee4f07 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,8 +22,8 @@ importers: specifier: ^0.23.2 version: 0.23.2(@microsoft/api-extractor@7.58.12(@types/node@24.13.3))(@module-federation/runtime-tools@2.8.0)(typescript@7.0.2) '@rslint/core': - specifier: ^0.8.0 - version: 0.8.0 + specifier: ^0.8.1 + version: 0.8.1 '@rspack/core': specifier: 2.0.0-rc.0 version: 2.0.0-rc.0(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2)(@module-federation/runtime-tools@2.8.0)(@swc/helpers@0.5.23) @@ -373,8 +373,8 @@ packages: typescript: optional: true - '@rslint/core@0.8.0': - resolution: {integrity: sha512-MfMC6lxiXoKPWsYRu9fuAxWA9mCD/I4E5Aa6Sl20a6q5w8r2C12fJM+bceC01AMGYuvWygKHqS3QBJdJHjniRw==} + '@rslint/core@0.8.1': + resolution: {integrity: sha512-cqpDcgJ8TgBC+I/OZkICze0sSNcsdjtxNCv01fQTYvgIvBkwbhNlg4celD3XEPfA8B2B2H/woYgeaX0IPEeTMA==} hasBin: true peerDependencies: jiti: ^2.7.0 @@ -382,47 +382,47 @@ packages: jiti: optional: true - '@rslint/native-darwin-arm64@0.8.0': - resolution: {integrity: sha512-Bo6kXL1/TkjVUl6maZ3Sw+JEnZUkgpUD35v06jyBTcjpxlXE6yqFj66NAzB/G2CVu220ADp/FEE7l2Kocrefhg==} + '@rslint/native-darwin-arm64@0.8.1': + resolution: {integrity: sha512-HlucYn3RLELMHRjlvKcr0vPlE/2RUs6BVn5ClRKFcLShON4j+q8NWaIPHwY5zrQjqq7GJxX3b/7G9skU+TrQ2w==} cpu: [arm64] os: [darwin] - '@rslint/native-darwin-x64@0.8.0': - resolution: {integrity: sha512-F5pabdH7dluxoj7PGuQjPYuoNU+yxnctcJzqrb/CZ122FLP3uJPrbiLufh+ZF9e5ui700rNyb7macJqnHlBV2w==} + '@rslint/native-darwin-x64@0.8.1': + resolution: {integrity: sha512-HV4FOwq3ofuoMkUxjEyGvaOGyr79OzFhAIpMcT9uOO6BxEA/PndepwBAPmkBt33aewm2oPKM2khsC582XTsxew==} cpu: [x64] os: [darwin] - '@rslint/native-linux-arm64-gnu@0.8.0': - resolution: {integrity: sha512-SSgSjyaeXI032Wk8bq6VmkLQTWOEqHZH5MWAk3831pd/G2rWr2XcoDi5Wf6w0o2rSCeYzkYbIejOePYwIKT4Lg==} + '@rslint/native-linux-arm64-gnu@0.8.1': + resolution: {integrity: sha512-O9kvvw2O7WAzeBAp7KSfXVbyl4Q4hAY1rUSRpeJp9hOY3yQUipE98qF29QicbXTRsoZZooMTmrjV/0EiYGL8OA==} cpu: [arm64] os: [linux] libc: [glibc] - '@rslint/native-linux-arm64-musl@0.8.0': - resolution: {integrity: sha512-50VDZQFAc9kp6rbOUOjyppVjC3d3AdbOJyA6JxlhK3mp8a/8sPIqWG0BlfcN/7ZpwdZrFsQt2Ds+0yMXITfu5A==} + '@rslint/native-linux-arm64-musl@0.8.1': + resolution: {integrity: sha512-I92YjEMPcdeXz29rGuWR7kKjlek3LG/kcLHaBop6ucYkAXbuwdCwALM/JKxjcnRjoEZA3qR4QCRu92Llbzh+Ig==} cpu: [arm64] os: [linux] libc: [musl] - '@rslint/native-linux-x64-gnu@0.8.0': - resolution: {integrity: sha512-wfc/UfnuTBAofwLPK5MLB2Hus1YYnsxP2MVchp380fUvMfQuGFPzz1WOAUY66zqrsrDKpUJsh3V1bx7c8DTlJA==} + '@rslint/native-linux-x64-gnu@0.8.1': + resolution: {integrity: sha512-9uh4XygsKs2lj7JWM2yi92qjrgrXM7slppAgTQnFfkiRoKASVt4M2anSiJfs2v5hU3UhsmVotXAOYtWoV5Hd3g==} cpu: [x64] os: [linux] libc: [glibc] - '@rslint/native-linux-x64-musl@0.8.0': - resolution: {integrity: sha512-MTYcAMz6IZWb6ZmLo12pakCBA8mS3EW9cOI0jd3At6vs0Yia9YbeOAUiWbIC4Z9yyp75b8ZQCQMRSnY6rDnbaA==} + '@rslint/native-linux-x64-musl@0.8.1': + resolution: {integrity: sha512-pcWlxs9ZLaETAoDaYcO6f8jeuE+nZliIVrhCJ1eWX+aTB+WPKHVHK6dFMPjxqsvUtwbK1zfpTeo8rOaeGRrSfQ==} cpu: [x64] os: [linux] libc: [musl] - '@rslint/native-win32-arm64-msvc@0.8.0': - resolution: {integrity: sha512-hids2jgNWBxZf2mSBLZJxubWRLWlJapEfeJHVokzjpRpBZZNv7O06enoyXSb4Lswff9WaHssIqu1sfZIc9lC2g==} + '@rslint/native-win32-arm64-msvc@0.8.1': + resolution: {integrity: sha512-GGRcKGBOQs7WsxSfXWRQnY15nRyikaDajWoefhKnYVj+AMg6BEWWsdH3Q2xOOuVMGNCC/SoXUAGb9cGpV7Smdg==} cpu: [arm64] os: [win32] - '@rslint/native-win32-x64-msvc@0.8.0': - resolution: {integrity: sha512-bun7uURKl6NdChwmw/i2mk3Yj9klZQyh1uRbIQG0RDEJ9oTIbU5M3c7K5sd/Rukat0TVCGgbBAzR+YB0DAXPZQ==} + '@rslint/native-win32-x64-msvc@0.8.1': + resolution: {integrity: sha512-rokvuC3MKTNMbGU5eh/p6a715xzl1yZvjh9gQByNPKGHrF3OUmqN1c6QGCtlNU8HGHekvMS9dUNzjTCoMenZjQ==} cpu: [x64] os: [win32] @@ -2292,41 +2292,41 @@ snapshots: - '@typescript/native-preview' - core-js - '@rslint/core@0.8.0': + '@rslint/core@0.8.1': dependencies: picomatch: 4.0.5 optionalDependencies: - '@rslint/native-darwin-arm64': 0.8.0 - '@rslint/native-darwin-x64': 0.8.0 - '@rslint/native-linux-arm64-gnu': 0.8.0 - '@rslint/native-linux-arm64-musl': 0.8.0 - '@rslint/native-linux-x64-gnu': 0.8.0 - '@rslint/native-linux-x64-musl': 0.8.0 - '@rslint/native-win32-arm64-msvc': 0.8.0 - '@rslint/native-win32-x64-msvc': 0.8.0 + '@rslint/native-darwin-arm64': 0.8.1 + '@rslint/native-darwin-x64': 0.8.1 + '@rslint/native-linux-arm64-gnu': 0.8.1 + '@rslint/native-linux-arm64-musl': 0.8.1 + '@rslint/native-linux-x64-gnu': 0.8.1 + '@rslint/native-linux-x64-musl': 0.8.1 + '@rslint/native-win32-arm64-msvc': 0.8.1 + '@rslint/native-win32-x64-msvc': 0.8.1 - '@rslint/native-darwin-arm64@0.8.0': + '@rslint/native-darwin-arm64@0.8.1': optional: true - '@rslint/native-darwin-x64@0.8.0': + '@rslint/native-darwin-x64@0.8.1': optional: true - '@rslint/native-linux-arm64-gnu@0.8.0': + '@rslint/native-linux-arm64-gnu@0.8.1': optional: true - '@rslint/native-linux-arm64-musl@0.8.0': + '@rslint/native-linux-arm64-musl@0.8.1': optional: true - '@rslint/native-linux-x64-gnu@0.8.0': + '@rslint/native-linux-x64-gnu@0.8.1': optional: true - '@rslint/native-linux-x64-musl@0.8.0': + '@rslint/native-linux-x64-musl@0.8.1': optional: true - '@rslint/native-win32-arm64-msvc@0.8.0': + '@rslint/native-win32-arm64-msvc@0.8.1': optional: true - '@rslint/native-win32-x64-msvc@0.8.0': + '@rslint/native-win32-x64-msvc@0.8.1': optional: true '@rspack/binding-darwin-arm64@2.0.0-beta.7': diff --git a/rslint.config.ts b/rslint.config.ts index 6a10b16..190861a 100644 --- a/rslint.config.ts +++ b/rslint.config.ts @@ -1,4 +1,4 @@ -import { defineConfig, js, ts } from '@rslint/core'; +import { defineConfig, globals, js, ts } from '@rslint/core'; export default defineConfig([ js.configs.recommended, @@ -10,10 +10,23 @@ export default defineConfig([ }, { files: ['tests/**/*'], + languageOptions: { + globals: { + ...globals.browser, + ...globals.node, + ...globals.rstest, + ...globals.worker, + }, + }, rules: { '@typescript-eslint/no-require-imports': 'off', '@typescript-eslint/no-unused-expressions': 'off', - 'no-undef': 'off', + }, + }, + { + files: ['**/*.test.{ts,tsx}'], + languageOptions: { + globals: globals.rstest, }, }, { From ec3b42c20fc6022626dcaa313c062815182cc240 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 20 Aug 2026 15:46:59 +0800 Subject: [PATCH 3/4] chore: replace no-undef overrides with globals --- rslint.config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rslint.config.ts b/rslint.config.ts index 190861a..59418c3 100644 --- a/rslint.config.ts +++ b/rslint.config.ts @@ -30,9 +30,9 @@ export default defineConfig([ }, }, { - files: ['example/**/*'], - rules: { - 'no-undef': 'off', + files: ['example/src/**/*'], + languageOptions: { + globals: globals.browser, }, }, ]); From d17bb2ea8a380d14b1606a68dcc2a98442a57575 Mon Sep 17 00:00:00 2001 From: neverland Date: Fri, 21 Aug 2026 14:27:28 +0800 Subject: [PATCH 4/4] chore: disable no-undef globally --- rslint.config.ts | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/rslint.config.ts b/rslint.config.ts index 59418c3..3973260 100644 --- a/rslint.config.ts +++ b/rslint.config.ts @@ -1,4 +1,4 @@ -import { defineConfig, globals, js, ts } from '@rslint/core'; +import { defineConfig, js, ts } from '@rslint/core'; export default defineConfig([ js.configs.recommended, @@ -6,33 +6,14 @@ export default defineConfig([ { rules: { '@typescript-eslint/no-explicit-any': 'off', + 'no-undef': 'off', }, }, { files: ['tests/**/*'], - languageOptions: { - globals: { - ...globals.browser, - ...globals.node, - ...globals.rstest, - ...globals.worker, - }, - }, rules: { '@typescript-eslint/no-require-imports': 'off', '@typescript-eslint/no-unused-expressions': 'off', }, }, - { - files: ['**/*.test.{ts,tsx}'], - languageOptions: { - globals: globals.rstest, - }, - }, - { - files: ['example/src/**/*'], - languageOptions: { - globals: globals.browser, - }, - }, ]);