Skip to content

Build your personal knowledge base with Trilium Notes

chore(eslint): integrate preact config

Elian Doranf7ac465e6749
diff --git a/eslint.config.mjs b/eslint.config.mjs
index af536a18fe..5ae642a87e 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -6,8 +6,10 @@ import tseslint from 'typescript-eslint';
import simpleImportSort from "eslint-plugin-simple-import-sort";
import playwright from "eslint-plugin-playwright";
import tsParser from "@typescript-eslint/parser";
+import preact from "eslint-config-preact";
-const mainConfig = defineConfig(
+const mainConfig = [
+ ...preact,
eslint.configs.recommended,
tseslint.configs.recommended,
// consider using rules below, once we have a full TS codebase and can be more strict
@@ -45,7 +47,7 @@ const mainConfig = defineConfig(
"simple-import-sort/exports": "error"
}
}
-);
+];
const playwrightConfig = {
files: [
diff --git a/package.json b/package.json
index de41a674e4..f2deff792d 100644
--- a/package.json
+++ b/package.json
@@ -56,9 +56,9 @@
"dpdm": "3.14.0",
"esbuild": "0.27.0",
"eslint": "9.39.1",
+ "eslint-config-preact": "2.0.0",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-playwright": "2.4.0",
- "eslint-plugin-react-hooks": "7.0.1",
"eslint-plugin-simple-import-sort": "12.1.1",
"happy-dom": "~20.0.0",
"http-server": "14.1.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 05e111d24f..d6e7fd9023 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -76,15 +76,15 @@ importers:
eslint:
specifier: 9.39.1
version: 9.39.1([email protected])
+ eslint-config-preact:
+ specifier: 2.0.0
eslint-config-prettier:
specifier: 10.1.8
eslint-plugin-playwright:
specifier: 2.4.0
- eslint-plugin-react-hooks:
- specifier: 7.0.1
eslint-plugin-simple-import-sort:
specifier: 12.1.1
@@ -7800,12 +7800,6 @@ packages:
peerDependencies:
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0
- resolution: {integrity: sha512-O0d0m04evaNzEPoSW+59Mezf8Qt0InfgGIBJnpC0h3NH/WjUAR7BIKUfysC6todmtiZ/A0oUVS8Gce0WhBrHsA==}
- engines: {node: '>=18'}
- peerDependencies:
- eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0
-
resolution: {integrity: sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==}
engines: {node: '>=4'}
@@ -8597,12 +8591,6 @@ packages:
resolution: {integrity: sha512-jOiHyAZsmnr8LqoPGmCjYAaiuWwjAPLgY8ZX2XrmHawt99/u1y6RgrZMTeoPfpUbV96HOalYgz1qzkRbw54Pmg==}
engines: {node: '>=18.0.0'}
- resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==}
-
- resolution: {integrity: sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==}
-
resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==}
engines: {node: '>=12.0.0'}
@@ -14268,12 +14256,6 @@ packages:
resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==}
engines: {node: '>= 14'}
- resolution: {integrity: sha512-OT5Y8lbUadqVZCsnyFaTQ4/O2mys4tj7PqhdbBCp7McPwvIEKfPtdA6QfPeFQK2/Rz5LgwmAXRJTugBNBi0btw==}
- engines: {node: '>=18.0.0'}
- peerDependencies:
- zod: ^3.25.0 || ^4.0.0
-
resolution: {integrity: sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==}
@@ -15846,8 +15828,6 @@ snapshots:
'@ckeditor/ckeditor5-ui': 47.3.0
'@ckeditor/ckeditor5-utils': 47.3.0
ckeditor5: 47.3.0
- transitivePeerDependencies:
- - supports-color
'@ckeditor/[email protected]':
dependencies:
@@ -23246,17 +23226,6 @@ snapshots:
dependencies:
eslint: 9.39.1([email protected])
- dependencies:
- '@babel/core': 7.28.0
- '@babel/parser': 7.28.4
- eslint: 9.39.1([email protected])
- hermes-parser: 0.25.1
- zod: 4.1.12
- zod-validation-error: 3.5.3([email protected])
- transitivePeerDependencies:
- - supports-color
-
dependencies:
array-includes: 3.1.9
@@ -24318,12 +24287,6 @@ snapshots:
-
- dependencies:
- hermes-estree: 0.25.1
-
@@ -31028,13 +30991,10 @@ snapshots:
compress-commons: 6.0.2
readable-stream: 4.7.0
- dependencies:
- zod: 4.1.12
-
+ optional: true
dependencies: