chore(eslint): integrate preact config

This commit is contained in:
Elian Doran 2025-12-06 15:31:38 +02:00
parent 912f14549c
commit f7ac465e67
No known key found for this signature in database
3 changed files with 10 additions and 48 deletions

View File

@ -6,8 +6,10 @@ import tseslint from 'typescript-eslint';
import simpleImportSort from "eslint-plugin-simple-import-sort"; import simpleImportSort from "eslint-plugin-simple-import-sort";
import playwright from "eslint-plugin-playwright"; import playwright from "eslint-plugin-playwright";
import tsParser from "@typescript-eslint/parser"; import tsParser from "@typescript-eslint/parser";
import preact from "eslint-config-preact";
const mainConfig = defineConfig( const mainConfig = [
...preact,
eslint.configs.recommended, eslint.configs.recommended,
tseslint.configs.recommended, tseslint.configs.recommended,
// consider using rules below, once we have a full TS codebase and can be more strict // 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" "simple-import-sort/exports": "error"
} }
} }
); ];
const playwrightConfig = { const playwrightConfig = {
files: [ files: [

View File

@ -56,9 +56,9 @@
"dpdm": "3.14.0", "dpdm": "3.14.0",
"esbuild": "0.27.0", "esbuild": "0.27.0",
"eslint": "9.39.1", "eslint": "9.39.1",
"eslint-config-preact": "2.0.0",
"eslint-config-prettier": "10.1.8", "eslint-config-prettier": "10.1.8",
"eslint-plugin-playwright": "2.4.0", "eslint-plugin-playwright": "2.4.0",
"eslint-plugin-react-hooks": "7.0.1",
"eslint-plugin-simple-import-sort": "12.1.1", "eslint-plugin-simple-import-sort": "12.1.1",
"happy-dom": "~20.0.0", "happy-dom": "~20.0.0",
"http-server": "14.1.1", "http-server": "14.1.1",

50
pnpm-lock.yaml generated
View File

@ -76,15 +76,15 @@ importers:
eslint: eslint:
specifier: 9.39.1 specifier: 9.39.1
version: 9.39.1(jiti@2.6.1) version: 9.39.1(jiti@2.6.1)
eslint-config-preact:
specifier: 2.0.0
version: 2.0.0(eslint@9.39.1(jiti@2.6.1))
eslint-config-prettier: eslint-config-prettier:
specifier: 10.1.8 specifier: 10.1.8
version: 10.1.8(eslint@9.39.1(jiti@2.6.1)) version: 10.1.8(eslint@9.39.1(jiti@2.6.1))
eslint-plugin-playwright: eslint-plugin-playwright:
specifier: 2.4.0 specifier: 2.4.0
version: 2.4.0(eslint@9.39.1(jiti@2.6.1)) version: 2.4.0(eslint@9.39.1(jiti@2.6.1))
eslint-plugin-react-hooks:
specifier: 7.0.1
version: 7.0.1(eslint@9.39.1(jiti@2.6.1))
eslint-plugin-simple-import-sort: eslint-plugin-simple-import-sort:
specifier: 12.1.1 specifier: 12.1.1
version: 12.1.1(eslint@9.39.1(jiti@2.6.1)) version: 12.1.1(eslint@9.39.1(jiti@2.6.1))
@ -7800,12 +7800,6 @@ packages:
peerDependencies: peerDependencies:
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0
eslint-plugin-react-hooks@7.0.1:
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
eslint-plugin-react@7.37.5: eslint-plugin-react@7.37.5:
resolution: {integrity: sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==} resolution: {integrity: sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==}
engines: {node: '>=4'} engines: {node: '>=4'}
@ -8597,12 +8591,6 @@ packages:
resolution: {integrity: sha512-jOiHyAZsmnr8LqoPGmCjYAaiuWwjAPLgY8ZX2XrmHawt99/u1y6RgrZMTeoPfpUbV96HOalYgz1qzkRbw54Pmg==} resolution: {integrity: sha512-jOiHyAZsmnr8LqoPGmCjYAaiuWwjAPLgY8ZX2XrmHawt99/u1y6RgrZMTeoPfpUbV96HOalYgz1qzkRbw54Pmg==}
engines: {node: '>=18.0.0'} engines: {node: '>=18.0.0'}
hermes-estree@0.25.1:
resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==}
hermes-parser@0.25.1:
resolution: {integrity: sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==}
highlight.js@11.11.1: highlight.js@11.11.1:
resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==} resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==}
engines: {node: '>=12.0.0'} engines: {node: '>=12.0.0'}
@ -14268,12 +14256,6 @@ packages:
resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==}
engines: {node: '>= 14'} engines: {node: '>= 14'}
zod-validation-error@3.5.3:
resolution: {integrity: sha512-OT5Y8lbUadqVZCsnyFaTQ4/O2mys4tj7PqhdbBCp7McPwvIEKfPtdA6QfPeFQK2/Rz5LgwmAXRJTugBNBi0btw==}
engines: {node: '>=18.0.0'}
peerDependencies:
zod: ^3.25.0 || ^4.0.0
zod@3.24.4: zod@3.24.4:
resolution: {integrity: sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==} resolution: {integrity: sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==}
@ -15846,8 +15828,6 @@ snapshots:
'@ckeditor/ckeditor5-ui': 47.3.0 '@ckeditor/ckeditor5-ui': 47.3.0
'@ckeditor/ckeditor5-utils': 47.3.0 '@ckeditor/ckeditor5-utils': 47.3.0
ckeditor5: 47.3.0 ckeditor5: 47.3.0
transitivePeerDependencies:
- supports-color
'@ckeditor/ckeditor5-restricted-editing@47.3.0': '@ckeditor/ckeditor5-restricted-editing@47.3.0':
dependencies: dependencies:
@ -23246,17 +23226,6 @@ snapshots:
dependencies: dependencies:
eslint: 9.39.1(jiti@2.6.1) eslint: 9.39.1(jiti@2.6.1)
eslint-plugin-react-hooks@7.0.1(eslint@9.39.1(jiti@2.6.1)):
dependencies:
'@babel/core': 7.28.0
'@babel/parser': 7.28.4
eslint: 9.39.1(jiti@2.6.1)
hermes-parser: 0.25.1
zod: 4.1.12
zod-validation-error: 3.5.3(zod@4.1.12)
transitivePeerDependencies:
- supports-color
eslint-plugin-react@7.37.5(eslint@9.39.1(jiti@2.6.1)): eslint-plugin-react@7.37.5(eslint@9.39.1(jiti@2.6.1)):
dependencies: dependencies:
array-includes: 3.1.9 array-includes: 3.1.9
@ -24318,12 +24287,6 @@ snapshots:
helmet@8.1.0: {} helmet@8.1.0: {}
hermes-estree@0.25.1: {}
hermes-parser@0.25.1:
dependencies:
hermes-estree: 0.25.1
highlight.js@11.11.1: {} highlight.js@11.11.1: {}
highlightjs-cobol@0.3.3: highlightjs-cobol@0.3.3:
@ -31028,13 +30991,10 @@ snapshots:
compress-commons: 6.0.2 compress-commons: 6.0.2
readable-stream: 4.7.0 readable-stream: 4.7.0
zod-validation-error@3.5.3(zod@4.1.12):
dependencies:
zod: 4.1.12
zod@3.24.4: {} zod@3.24.4: {}
zod@4.1.12: {} zod@4.1.12:
optional: true
zustand@4.5.6(@types/react@19.1.7)(react@19.2.0): zustand@4.5.6(@types/react@19.1.7)(react@19.2.0):
dependencies: dependencies: