This commit is contained in:
gcch 2026-04-03 23:57:57 +02:00
commit 7d64b33321
24 changed files with 3264 additions and 2162 deletions

File diff suppressed because it is too large Load diff

15
.zed/settings.json Normal file
View file

@ -0,0 +1,15 @@
{
"lsp": {
"oxlint": {
"initialization_options": {
"settings": {
"configPath": "cfg/oxlint.config.ts",
"run": "onType",
"disableNestedConfig": false,
"fixKind": "safe_fix",
"unusedDisableDirectives": "deny"
}
}
}
}
}

116
bun.lock
View file

@ -5,37 +5,35 @@
"": {
"name": "@gcch/configuration-oxlint",
"dependencies": {
"eslint-plugin-astro": "^1.6.0",
"eslint-plugin-functional": "^9.0.4",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-perfectionist": "^5.8.0",
"eslint-plugin-sonarjs": "^4.0.2",
"globals": "^17.4.0",
"oxlint": "^1.58.0",
"oxlint-tsgolint": "^0.19.0",
"oxlint": "^1.59.0",
"oxlint-tsgolint": "^0.20.0",
},
"devDependencies": {
"@arethetypeswrong/core": "^0.18.2",
"@gcch/configuration-eslint": "git+https://git.gcch.fr/gcch/configuration-eslint#c0620280e6",
"@gcch/configuration-prettier": "git+https://git.gcch.fr/gcch/configuration-prettier#91d4573bff",
"@types/bun": "^1.3.11",
"@types/node": "^25.5.0",
"eslint-plugin-functional": "^9.0.4",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-perfectionist": "^5.7.0",
"eslint-plugin-sonarjs": "^4.0.2",
"knip": "^6.1.1",
"@types/node": "^25.5.2",
"knip": "^6.3.0",
"prettier": "^3.8.1",
"publint": "^0.3.18",
"tsdown": "^0.21.7",
"typescript": "^6.0.2",
},
"optionalDependencies": {
"eslint-plugin-astro": "^1.6.0",
},
"peerDependencies": {
"eslint-plugin-astro": "^1.6.0",
"eslint-plugin-functional": "^9.0.4",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-perfectionist": "^5.7.0",
"eslint-plugin-perfectionist": "^5.8.0",
"eslint-plugin-sonarjs": "^4.0.2",
"oxlint": "^1.58.0",
"oxlint-tsgolint": "^0.19.0",
"oxlint": "^1.59.0",
"oxlint-tsgolint": "^0.20.0",
"typescript": "^6.0.2",
},
},
@ -200,55 +198,55 @@
"@oxc-resolver/binding-win32-x64-msvc": ["@oxc-resolver/binding-win32-x64-msvc@11.19.1", "", { "os": "win32", "cpu": "x64" }, "sha512-6hIU3RQu45B+VNTY4Ru8ppFwjVS/S5qwYyGhBotmjxfEKk41I2DlGtRfGJndZ5+6lneE2pwloqunlOyZuX/XAw=="],
"@oxlint-tsgolint/darwin-arm64": ["@oxlint-tsgolint/darwin-arm64@0.19.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-FVOIp5Njte8Z6PpINz7sL5blqSro0pAL8VAHYQ+K5Xm4cOrPQ6DGIhH14oXnbRjzn8Kl69qjz8TPteyn8EqwsQ=="],
"@oxlint-tsgolint/darwin-arm64": ["@oxlint-tsgolint/darwin-arm64@0.20.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-KKQcIHZHMxqpHUA1VXIbOG6chNCFkUWbQy6M+AFVtPKkA/3xAeJkJ3njoV66bfzwPHRcWQO+kcj5XqtbkjakoA=="],
"@oxlint-tsgolint/darwin-x64": ["@oxlint-tsgolint/darwin-x64@0.19.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-GakDTDACePvqOFq3N4oQCl8SyMMa7VBnqV0gDcXPuK50jdWCUqlxM9tgRJarjyIVvmDEJRGYOen+4uBtVwg4Aw=="],
"@oxlint-tsgolint/darwin-x64": ["@oxlint-tsgolint/darwin-x64@0.20.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-7HeVMuclGfG+NLZi2ybY0T4fMI7/XxO/208rJk+zEIloKkVnlh11Wd241JMGwgNFXn+MLJbOqOfojDb2Dt4L1g=="],
"@oxlint-tsgolint/linux-arm64": ["@oxlint-tsgolint/linux-arm64@0.19.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-Ya0R7somo+KDhhkPtENJ9Q28Fost+aqA3MPe86pEqgmukHFc/KO65PgShOSbIFjZNptELEQvsWL8gDxYZWhH3w=="],
"@oxlint-tsgolint/linux-arm64": ["@oxlint-tsgolint/linux-arm64@0.20.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-zxhUwz+WSxE6oWlZLK2z2ps9yC6ebmgoYmjAl0Oa48+GqkZ56NVgo+wb8DURNv6xrggzHStQxqQxe3mK51HZag=="],
"@oxlint-tsgolint/linux-x64": ["@oxlint-tsgolint/linux-x64@0.19.0", "", { "os": "linux", "cpu": "x64" }, "sha512-yFH378jWc1k/oJmpk+TKpWbKvFieJJvsOHxVMSNFc+ukqs44ZSHVt4HFfAhXAt/bzVK2f7EIDTGp8Hm1OjoJ6Q=="],
"@oxlint-tsgolint/linux-x64": ["@oxlint-tsgolint/linux-x64@0.20.0", "", { "os": "linux", "cpu": "x64" }, "sha512-/1l6FnahC9im8PK+Ekkx/V3yetO/PzZnJegE2FXcv/iXEhbeVxP/ouiTYcUQu9shT1FWJCSNti1VJHH+21Y1dg=="],
"@oxlint-tsgolint/win32-arm64": ["@oxlint-tsgolint/win32-arm64@0.19.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-R6NyAtha7OWxh7NGBeFxqDTGAVl1Xj4xLa8Qj39PKbIDqBeVW8BIb+1nEnRp+Mo/VpRoeoFAcqlBsuMcUMd26Q=="],
"@oxlint-tsgolint/win32-arm64": ["@oxlint-tsgolint/win32-arm64@0.20.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-oPZ5Yz8sVdo7P/5q+i3IKeix31eFZ55JAPa1+RGPoe9PoaYVsdMvR6Jvib6YtrqoJnFPlg3fjEjlEPL8VBKYJA=="],
"@oxlint-tsgolint/win32-x64": ["@oxlint-tsgolint/win32-x64@0.19.0", "", { "os": "win32", "cpu": "x64" }, "sha512-2ePvxcbS5tPOmrQvxR8Kc+IqzdTtlrGeMDv+jjTYfkTFPmh2rF9yxVchi/4WM6js3gt2UauQeMV/tfnZNemENQ=="],
"@oxlint-tsgolint/win32-x64": ["@oxlint-tsgolint/win32-x64@0.20.0", "", { "os": "win32", "cpu": "x64" }, "sha512-4stx8RHj3SP9vQyRF/yZbz5igtPvYMEUR8CUoha4BVNZihi39DpCR8qkU7lpjB5Ga1DRMo2pHaA4bdTOMaY4mw=="],
"@oxlint/binding-android-arm-eabi": ["@oxlint/binding-android-arm-eabi@1.58.0", "", { "os": "android", "cpu": "arm" }, "sha512-1T7UN3SsWWxpWyWGn1cT3ASNJOo+pI3eUkmEl7HgtowapcV8kslYpFQcYn431VuxghXakPNlbjRwhqmR37PFOg=="],
"@oxlint/binding-android-arm-eabi": ["@oxlint/binding-android-arm-eabi@1.59.0", "", { "os": "android", "cpu": "arm" }, "sha512-etYDw/UaEv936AQUd/CRMBVd+e+XuuU6wC+VzOv1STvsTyZenLChepLWqLtnyTTp4YMlM22ypzogDDwqYxv5cg=="],
"@oxlint/binding-android-arm64": ["@oxlint/binding-android-arm64@1.58.0", "", { "os": "android", "cpu": "arm64" }, "sha512-GryzujxuiRv2YFF7bRy8mKcxlbuAN+euVUtGJt9KKbLT8JBUIosamVhcthLh+VEr6KE6cjeVMAQxKAzJcoN7dg=="],
"@oxlint/binding-android-arm64": ["@oxlint/binding-android-arm64@1.59.0", "", { "os": "android", "cpu": "arm64" }, "sha512-TgLc7XVLKH2a4h8j3vn1MDjfK33i9MY60f/bKhRGWyVzbk5LCZ4X01VZG7iHrMmi5vYbAp8//Ponigx03CLsdw=="],
"@oxlint/binding-darwin-arm64": ["@oxlint/binding-darwin-arm64@1.58.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-7/bRSJIwl4GxeZL9rPZ11anNTyUO9epZrfEJH/ZMla3+/gbQ6xZixh9nOhsZ0QwsTW7/5J2A/fHbD1udC5DQQA=="],
"@oxlint/binding-darwin-arm64": ["@oxlint/binding-darwin-arm64@1.59.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-DXyFPf5ZKldMLloRHx/B9fsxsiTQomaw7cmEW3YIJko2HgCh+GUhp9gGYwHrqlLJPsEe3dYj9JebjX92D3j3AA=="],
"@oxlint/binding-darwin-x64": ["@oxlint/binding-darwin-x64@1.58.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-EqdtJSiHweS2vfILNrpyJ6HUwpEq2g7+4Zx1FPi4hu3Hu7tC3znF6ufbXO8Ub2LD4mGgznjI7kSdku9NDD1Mkg=="],
"@oxlint/binding-darwin-x64": ["@oxlint/binding-darwin-x64@1.59.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-LgvrsdgVLX1qWqIEmNsSmMXJhpAWdtUQ0M+oR0CySwi+9IHWyOGuIL8w8+u/kbZNMyZr4WUyYB5i0+D+AKgkLg=="],
"@oxlint/binding-freebsd-x64": ["@oxlint/binding-freebsd-x64@1.58.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-VQt5TH4M42mY20F545G637RKxV/yjwVtKk2vfXuazfReSIiuvWBnv+FVSvIV5fKVTJNjt3GSJibh6JecbhGdBw=="],
"@oxlint/binding-freebsd-x64": ["@oxlint/binding-freebsd-x64@1.59.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-bOJhqX/ny4hrFuTPlyk8foSRx/vLRpxJh0jOOKN2NWW6FScXHPAA5rQbrwdQPcgGB5V8Ua51RS03fke8ssBcug=="],
"@oxlint/binding-linux-arm-gnueabihf": ["@oxlint/binding-linux-arm-gnueabihf@1.58.0", "", { "os": "linux", "cpu": "arm" }, "sha512-fBYcj4ucwpAtjJT3oeBdFBYKvNyjRSK+cyuvBOTQjh0jvKp4yeA4S/D0IsCHus/VPaNG5L48qQkh+Vjy3HL2/Q=="],
"@oxlint/binding-linux-arm-gnueabihf": ["@oxlint/binding-linux-arm-gnueabihf@1.59.0", "", { "os": "linux", "cpu": "arm" }, "sha512-vVUXxYMF9trXCsz4m9H6U0IjehosVHxBzVgJUxly1uz4W1PdDyicaBnpC0KRXsHYretLVe+uS9pJy8iM57Kujw=="],
"@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.58.0", "", { "os": "linux", "cpu": "arm" }, "sha512-0BeuFfwlUHlJ1xpEdSD1YO3vByEFGPg36uLjK1JgFaxFb4W6w17F8ET8sz5cheZ4+x5f2xzdnRrrWv83E3Yd8g=="],
"@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.59.0", "", { "os": "linux", "cpu": "arm" }, "sha512-TULQW8YBPGRWg5yZpFPL54HLOnJ3/HiX6VenDPi6YfxB/jlItwSMFh3/hCeSNbh+DAMaE1Py0j5MOaivHkI/9Q=="],
"@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.58.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-TXlZgnPTlxrQzxG9ZXU7BNwx1Ilrr17P3GwZY0If2EzrinqRH3zXPc3HrRcBJgcsoZNMuNL5YivtkJYgp467UQ=="],
"@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.59.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-Gt54Y4eqSgYJ90xipm24xeyaPV854706o/kiT8oZvUt3VDY7qqxdqyGqchMaujd87ib+/MXvnl9WkK8Cc1BExg=="],
"@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.58.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-zSoYRo5dxHLcUx93Stl2hW3hSNjPt99O70eRVWt5A1zwJ+FPjeCCANCD2a9R4JbHsdcl11TIQOjyigcRVOH2mw=="],
"@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.59.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-3CtsKp7NFB3OfqQzbuAecrY7GIZeiv7AD+xutU4tefVQzlfmTI7/ygWLrvkzsDEjTlMq41rYHxgsn6Yh8tybmA=="],
"@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.58.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-NQ0U/lqxH2/VxBYeAIvMNUK1y0a1bJ3ZicqkF2c6wfakbEciP9jvIE4yNzCFpZaqeIeRYaV7AVGqEO1yrfVPjA=="],
"@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.59.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-K0diOpT3ncDmOfl9I1HuvpEsAuTxkts0VYwIv/w6Xiy9CdwyPBVX88Ga9l8VlGgMrwBMnSY4xIvVlVY/fkQk7Q=="],
"@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.58.0", "", { "os": "linux", "cpu": "none" }, "sha512-X9J+kr3gIC9FT8GuZt0ekzpNUtkBVzMVU4KiKDSlocyQuEgi3gBbXYN8UkQiV77FTusLDPsovjo95YedHr+3yg=="],
"@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.59.0", "", { "os": "linux", "cpu": "none" }, "sha512-xAU7+QDU6kTJJ7mJLOGgo7oOjtAtkKyFZ0Yjdb5cEo3DiCCPFLvyr08rWiQh6evZ7RiUTf+o65NY/bqttzJiQQ=="],
"@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.58.0", "", { "os": "linux", "cpu": "none" }, "sha512-CDze3pi1OO3Wvb/QsXjmLEY4XPKGM6kIo82ssNOgmcl1IdndF9VSGAE38YLhADWmOac7fjqhBw82LozuUVxD0Q=="],
"@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.59.0", "", { "os": "linux", "cpu": "none" }, "sha512-KUmZmKlTTyauOnvUNVxK7G40sSSx0+w5l1UhaGsC6KPpOYHenx2oqJTnabmpLJicok7IC+3Y6fXAUOMyexaeJQ=="],
"@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.58.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-b/89glbxFaEAcA6Uf1FvCNecBJEgcUTsV1quzrqXM/o4R1M4u+2KCVuyGCayN2UpsRWtGGLb+Ver0tBBpxaPog=="],
"@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.59.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-4usRxC8gS0PGdkHnRmwJt/4zrQNZyk6vL0trCxwZSsAKM+OxhB8nKiR+mhjdBbl8lbMh2gc3bZpNN/ik8c4c2A=="],
"@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.58.0", "", { "os": "linux", "cpu": "x64" }, "sha512-0/yYpkq9VJFCEcuRlrViGj8pJUFFvNS4EkEREaN7CB1EcLXJIaVSSa5eCihwBGXtOZxhnblWgxks9juRdNQI7w=="],
"@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.59.0", "", { "os": "linux", "cpu": "x64" }, "sha512-s/rNE2gDmbwAOOP493xk2X7M8LZfI1LJFSSW1+yanz3vuQCFPiHkx4GY+O1HuLUDtkzGlhtMrIcxxzyYLv308w=="],
"@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.58.0", "", { "os": "linux", "cpu": "x64" }, "sha512-hr6FNvmcAXiH+JxSvaJ4SJ1HofkdqEElXICW9sm3/Rd5eC3t7kzvmLyRAB3NngKO2wzXRCAm4Z/mGWfrsS4X8w=="],
"@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.59.0", "", { "os": "linux", "cpu": "x64" }, "sha512-+yYj1udJa2UvvIUmEm0IcKgc0UlPMgz0nsSTvkPL2y6n0uU5LgIHSwVu4AHhrve6j9BpVSoRksnz8c9QcvITJA=="],
"@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.58.0", "", { "os": "none", "cpu": "arm64" }, "sha512-R+O368VXgRql1K6Xar+FEo7NEwfo13EibPMoTv3sesYQedRXd6m30Dh/7lZMxnrQVFfeo4EOfYIP4FpcgWQNHg=="],
"@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.59.0", "", { "os": "none", "cpu": "arm64" }, "sha512-bUplUb48LYsB3hHlQXP2ZMOenpieWoOyppLAnnAhuPag3MGPnt+7caxE3w/Vl9wpQsTA3gzLntQi9rxWrs7Xqg=="],
"@oxlint/binding-win32-arm64-msvc": ["@oxlint/binding-win32-arm64-msvc@1.58.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-Q0FZiAY/3c4YRj4z3h9K1PgaByrifrfbBoODSeX7gy97UtB7pySPUQfC2B/GbxWU6k7CzQrRy5gME10PltLAFQ=="],
"@oxlint/binding-win32-arm64-msvc": ["@oxlint/binding-win32-arm64-msvc@1.59.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-/HLsLuz42rWl7h7ePdmMTpHm2HIDmPtcEMYgm5BBEHiEiuNOrzMaUpd2z7UnNni5LGN9obJy2YoAYBLXQwazrA=="],
"@oxlint/binding-win32-ia32-msvc": ["@oxlint/binding-win32-ia32-msvc@1.58.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-Y8FKBABrSPp9H0QkRLHDHOSUgM/309a3IvOVgPcVxYcX70wxJrk608CuTg7w+C6vEd724X5wJoNkBcGYfH7nNQ=="],
"@oxlint/binding-win32-ia32-msvc": ["@oxlint/binding-win32-ia32-msvc@1.59.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-rUPy+JnanpPwV/aJCPnxAD1fW50+XPI0VkWr7f0vEbqcdsS8NpB24Rw6RsS7SdpFv8Dw+8ugCwao5nCFbqOUSg=="],
"@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.58.0", "", { "os": "win32", "cpu": "x64" }, "sha512-bCn5rbiz5My+Bj7M09sDcnqW0QJyINRVxdZ65x1/Y2tGrMwherwK/lpk+HRQCKvXa8pcaQdF5KY5j54VGZLwNg=="],
"@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.59.0", "", { "os": "win32", "cpu": "x64" }, "sha512-xkE7puteDS/vUyRngLXW0t8WgdWoS/tfxXjhP/P7SMqPDx+hs44SpssO3h3qmTqECYEuXBUPzcAw5257Ka+ofA=="],
"@pkgr/core": ["@pkgr/core@0.2.9", "", {}, "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA=="],
@ -314,7 +312,7 @@
"@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
"@types/node": ["@types/node@25.5.0", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw=="],
"@types/node": ["@types/node@25.5.2", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-tO4ZIRKNC+MDWV4qKVZe3Ql/woTnmHDr5JD8UI5hn2pwBrHEwOEMZK7WlNb5RKB6EoJ02gwmQS9OrjuFnZYdpg=="],
"@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
@ -498,7 +496,7 @@
"eslint-plugin-jsx-a11y": ["eslint-plugin-jsx-a11y@6.10.2", "", { "dependencies": { "aria-query": "^5.3.2", "array-includes": "^3.1.8", "array.prototype.flatmap": "^1.3.2", "ast-types-flow": "^0.0.8", "axe-core": "^4.10.0", "axobject-query": "^4.1.0", "damerau-levenshtein": "^1.0.8", "emoji-regex": "^9.2.2", "hasown": "^2.0.2", "jsx-ast-utils": "^3.3.5", "language-tags": "^1.0.9", "minimatch": "^3.1.2", "object.fromentries": "^2.0.8", "safe-regex-test": "^1.0.3", "string.prototype.includes": "^2.0.1" }, "peerDependencies": { "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" } }, "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q=="],
"eslint-plugin-perfectionist": ["eslint-plugin-perfectionist@5.7.0", "", { "dependencies": { "@typescript-eslint/utils": "^8.57.1", "natural-orderby": "^5.0.0" }, "peerDependencies": { "eslint": "^8.45.0 || ^9.0.0 || ^10.0.0" } }, "sha512-WRHj7OZS/INutQ/gKN5C1ZGnMhkQ3oKZQAA2I7rl5yM8keBtSd9oj/qlJaHuwh5873FhMPqYlttcadF0YsTN7g=="],
"eslint-plugin-perfectionist": ["eslint-plugin-perfectionist@5.8.0", "", { "dependencies": { "@typescript-eslint/utils": "^8.58.0", "natural-orderby": "^5.0.0" }, "peerDependencies": { "eslint": "^8.45.0 || ^9.0.0 || ^10.0.0" } }, "sha512-k8uIptWIxkUclonCFGyDzgYs9NI+Qh0a7cUXS3L7IYZDEsjXuimFBVbxXPQQngWqMiaxJRwbtYB4smMGMqF+cw=="],
"eslint-plugin-sonarjs": ["eslint-plugin-sonarjs@4.0.2", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "builtin-modules": "^3.3.0", "bytes": "^3.1.2", "functional-red-black-tree": "^1.0.1", "globals": "^17.4.0", "jsx-ast-utils-x": "^0.1.0", "lodash.merge": "^4.6.2", "minimatch": "^10.2.4", "scslre": "^0.3.0", "semver": "^7.7.4", "ts-api-utils": "^2.4.0", "typescript": ">=5" }, "peerDependencies": { "eslint": "^8.0.0 || ^9.0.0 || ^10.0.0" } }, "sha512-BTcT1zr1iTbmJtVlcesISwnXzh+9uhf9LEOr+RRNf4kR8xA0HQTPft4oiyOCzCOGKkpSJxjR8ZYF6H7VPyplyw=="],
@ -678,7 +676,7 @@
"keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="],
"knip": ["knip@6.1.1", "", { "dependencies": { "@nodelib/fs.walk": "^1.2.3", "fast-glob": "^3.3.3", "formatly": "^0.3.0", "get-tsconfig": "4.13.7", "jiti": "^2.6.0", "minimist": "^1.2.8", "oxc-parser": "^0.121.0", "oxc-resolver": "^11.19.1", "picocolors": "^1.1.1", "picomatch": "^4.0.1", "smol-toml": "^1.6.1", "strip-json-comments": "5.0.3", "unbash": "^2.2.0", "yaml": "^2.8.2", "zod": "^4.1.11" }, "bin": { "knip": "bin/knip.js", "knip-bun": "bin/knip-bun.js" } }, "sha512-BC/kbdxwCgv+p/3YkGbtlLxbOXhQDuR+CeKKFEpJyKb3BFwG1gZa+CMWSqAnPi+kUexz74m327d3zWxyn2fMew=="],
"knip": ["knip@6.3.0", "", { "dependencies": { "@nodelib/fs.walk": "^1.2.3", "fast-glob": "^3.3.3", "formatly": "^0.3.0", "get-tsconfig": "4.13.7", "jiti": "^2.6.0", "minimist": "^1.2.8", "oxc-parser": "^0.121.0", "oxc-resolver": "^11.19.1", "picocolors": "^1.1.1", "picomatch": "^4.0.1", "smol-toml": "^1.6.1", "strip-json-comments": "5.0.3", "unbash": "^2.2.0", "yaml": "^2.8.2", "zod": "^4.1.11" }, "bin": { "knip": "bin/knip.js", "knip-bun": "bin/knip-bun.js" } }, "sha512-g6dVPoTw6iNm3cubC5IWxVkVsd0r5hXhTBTbAGIEQN53GdA2ZM/slMTPJ7n5l8pBebNQPHpxjmKxuR4xVQ2/hQ=="],
"language-subtag-registry": ["language-subtag-registry@0.3.23", "", {}, "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ=="],
@ -784,9 +782,9 @@
"oxc-resolver": ["oxc-resolver@11.19.1", "", { "optionalDependencies": { "@oxc-resolver/binding-android-arm-eabi": "11.19.1", "@oxc-resolver/binding-android-arm64": "11.19.1", "@oxc-resolver/binding-darwin-arm64": "11.19.1", "@oxc-resolver/binding-darwin-x64": "11.19.1", "@oxc-resolver/binding-freebsd-x64": "11.19.1", "@oxc-resolver/binding-linux-arm-gnueabihf": "11.19.1", "@oxc-resolver/binding-linux-arm-musleabihf": "11.19.1", "@oxc-resolver/binding-linux-arm64-gnu": "11.19.1", "@oxc-resolver/binding-linux-arm64-musl": "11.19.1", "@oxc-resolver/binding-linux-ppc64-gnu": "11.19.1", "@oxc-resolver/binding-linux-riscv64-gnu": "11.19.1", "@oxc-resolver/binding-linux-riscv64-musl": "11.19.1", "@oxc-resolver/binding-linux-s390x-gnu": "11.19.1", "@oxc-resolver/binding-linux-x64-gnu": "11.19.1", "@oxc-resolver/binding-linux-x64-musl": "11.19.1", "@oxc-resolver/binding-openharmony-arm64": "11.19.1", "@oxc-resolver/binding-wasm32-wasi": "11.19.1", "@oxc-resolver/binding-win32-arm64-msvc": "11.19.1", "@oxc-resolver/binding-win32-ia32-msvc": "11.19.1", "@oxc-resolver/binding-win32-x64-msvc": "11.19.1" } }, "sha512-qE/CIg/spwrTBFt5aKmwe3ifeDdLfA2NESN30E42X/lII5ClF8V7Wt6WIJhcGZjp0/Q+nQ+9vgxGk//xZNX2hg=="],
"oxlint": ["oxlint@1.58.0", "", { "optionalDependencies": { "@oxlint/binding-android-arm-eabi": "1.58.0", "@oxlint/binding-android-arm64": "1.58.0", "@oxlint/binding-darwin-arm64": "1.58.0", "@oxlint/binding-darwin-x64": "1.58.0", "@oxlint/binding-freebsd-x64": "1.58.0", "@oxlint/binding-linux-arm-gnueabihf": "1.58.0", "@oxlint/binding-linux-arm-musleabihf": "1.58.0", "@oxlint/binding-linux-arm64-gnu": "1.58.0", "@oxlint/binding-linux-arm64-musl": "1.58.0", "@oxlint/binding-linux-ppc64-gnu": "1.58.0", "@oxlint/binding-linux-riscv64-gnu": "1.58.0", "@oxlint/binding-linux-riscv64-musl": "1.58.0", "@oxlint/binding-linux-s390x-gnu": "1.58.0", "@oxlint/binding-linux-x64-gnu": "1.58.0", "@oxlint/binding-linux-x64-musl": "1.58.0", "@oxlint/binding-openharmony-arm64": "1.58.0", "@oxlint/binding-win32-arm64-msvc": "1.58.0", "@oxlint/binding-win32-ia32-msvc": "1.58.0", "@oxlint/binding-win32-x64-msvc": "1.58.0" }, "peerDependencies": { "oxlint-tsgolint": ">=0.18.0" }, "optionalPeers": ["oxlint-tsgolint"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-t4s9leczDMqlvOSjnbCQe7gtoLkWgBGZ7sBdCJ9EOj5IXFSG/X7OAzK4yuH4iW+4cAYe8kLFbC8tuYMwWZm+Cg=="],
"oxlint": ["oxlint@1.59.0", "", { "optionalDependencies": { "@oxlint/binding-android-arm-eabi": "1.59.0", "@oxlint/binding-android-arm64": "1.59.0", "@oxlint/binding-darwin-arm64": "1.59.0", "@oxlint/binding-darwin-x64": "1.59.0", "@oxlint/binding-freebsd-x64": "1.59.0", "@oxlint/binding-linux-arm-gnueabihf": "1.59.0", "@oxlint/binding-linux-arm-musleabihf": "1.59.0", "@oxlint/binding-linux-arm64-gnu": "1.59.0", "@oxlint/binding-linux-arm64-musl": "1.59.0", "@oxlint/binding-linux-ppc64-gnu": "1.59.0", "@oxlint/binding-linux-riscv64-gnu": "1.59.0", "@oxlint/binding-linux-riscv64-musl": "1.59.0", "@oxlint/binding-linux-s390x-gnu": "1.59.0", "@oxlint/binding-linux-x64-gnu": "1.59.0", "@oxlint/binding-linux-x64-musl": "1.59.0", "@oxlint/binding-openharmony-arm64": "1.59.0", "@oxlint/binding-win32-arm64-msvc": "1.59.0", "@oxlint/binding-win32-ia32-msvc": "1.59.0", "@oxlint/binding-win32-x64-msvc": "1.59.0" }, "peerDependencies": { "oxlint-tsgolint": ">=0.18.0" }, "optionalPeers": ["oxlint-tsgolint"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-0xBLeGGjP4vD9pygRo8iuOkOzEU1MqOnfiOl7KYezL/QvWL8NUg6n03zXc7ZVqltiOpUxBk2zgHI3PnRIEdAvw=="],
"oxlint-tsgolint": ["oxlint-tsgolint@0.19.0", "", { "optionalDependencies": { "@oxlint-tsgolint/darwin-arm64": "0.19.0", "@oxlint-tsgolint/darwin-x64": "0.19.0", "@oxlint-tsgolint/linux-arm64": "0.19.0", "@oxlint-tsgolint/linux-x64": "0.19.0", "@oxlint-tsgolint/win32-arm64": "0.19.0", "@oxlint-tsgolint/win32-x64": "0.19.0" }, "bin": { "tsgolint": "bin/tsgolint.js" } }, "sha512-pSzUmDjMyjC8iUUZ7fCLo0D1iUaYIfodd/WIQ6Zra11YkjkUQk3BOFoW4I5ec6uZ/0s2FEmxtiZ7hiTXFRp1cg=="],
"oxlint-tsgolint": ["oxlint-tsgolint@0.20.0", "", { "optionalDependencies": { "@oxlint-tsgolint/darwin-arm64": "0.20.0", "@oxlint-tsgolint/darwin-x64": "0.20.0", "@oxlint-tsgolint/linux-arm64": "0.20.0", "@oxlint-tsgolint/linux-x64": "0.20.0", "@oxlint-tsgolint/win32-arm64": "0.20.0", "@oxlint-tsgolint/win32-x64": "0.20.0" }, "bin": { "tsgolint": "bin/tsgolint.js" } }, "sha512-/Uc9TQyN1l8w9QNvXtVHYtz+SzDJHKpb5X0UnHodl0BVzijUPk0LPlDOHAvogd1UI+iy9ZSF6gQxEqfzUxCULQ=="],
"p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="],
@ -1006,12 +1004,16 @@
"@eslint/config-array/minimatch": ["minimatch@10.2.4", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg=="],
"@gcch/configuration-eslint/eslint-plugin-perfectionist": ["eslint-plugin-perfectionist@5.7.0", "", { "dependencies": { "@typescript-eslint/utils": "^8.57.1", "natural-orderby": "^5.0.0" }, "peerDependencies": { "eslint": "^8.45.0 || ^9.0.0 || ^10.0.0" } }, "sha512-WRHj7OZS/INutQ/gKN5C1ZGnMhkQ3oKZQAA2I7rl5yM8keBtSd9oj/qlJaHuwh5873FhMPqYlttcadF0YsTN7g=="],
"@typescript-eslint/eslint-plugin/ignore": ["ignore@7.0.5", "", {}, "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg=="],
"@typescript-eslint/typescript-estree/minimatch": ["minimatch@10.2.4", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg=="],
"@typescript-eslint/visitor-keys/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="],
"bun-types/@types/node": ["@types/node@25.5.0", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw=="],
"clean-regexp/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="],
"eslint/escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],
@ -1030,6 +1032,8 @@
"eslint-plugin-jsdoc/espree": ["espree@11.2.0", "", { "dependencies": { "acorn": "^8.16.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^5.0.1" } }, "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw=="],
"eslint-plugin-perfectionist/@typescript-eslint/utils": ["@typescript-eslint/utils@8.58.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.58.0", "@typescript-eslint/types": "8.58.0", "@typescript-eslint/typescript-estree": "8.58.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-RfeSqcFeHMHlAWzt4TBjWOAtoW9lnsAGiP3GbaX9uVgTYYrMbVnGONEfUCiSss+xMHFl+eHZiipmA8WkQ7FuNA=="],
"eslint-plugin-sonarjs/minimatch": ["minimatch@10.2.4", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg=="],
"fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],
@ -1050,6 +1054,12 @@
"eslint-plugin-jsdoc/espree/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="],
"eslint-plugin-perfectionist/@typescript-eslint/utils/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.58.0", "", { "dependencies": { "@typescript-eslint/types": "8.58.0", "@typescript-eslint/visitor-keys": "8.58.0" } }, "sha512-W1Lur1oF50FxSnNdGp3Vs6P+yBRSmZiw4IIjEeYxd8UQJwhUF0gDgDD/W/Tgmh73mxgEU3qX0Bzdl/NGuSPEpQ=="],
"eslint-plugin-perfectionist/@typescript-eslint/utils/@typescript-eslint/types": ["@typescript-eslint/types@8.58.0", "", {}, "sha512-O9CjxypDT89fbHxRfETNoAnHj/i6IpRK0CvbVN3qibxlLdo5p5hcLmUuCCrHMpxiWSwKyI8mCP7qRNYuOJ0Uww=="],
"eslint-plugin-perfectionist/@typescript-eslint/utils/@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.58.0", "", { "dependencies": { "@typescript-eslint/project-service": "8.58.0", "@typescript-eslint/tsconfig-utils": "8.58.0", "@typescript-eslint/types": "8.58.0", "@typescript-eslint/visitor-keys": "8.58.0", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", "tinyglobby": "^0.2.15", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-7vv5UWbHqew/dvs+D3e1RvLv1v2eeZ9txRHPnEEBUgSNLx5ghdzjHa0sgLWYVKssH+lYmV0JaWdoubo0ncGYLA=="],
"eslint-plugin-sonarjs/minimatch/brace-expansion": ["brace-expansion@5.0.5", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ=="],
"eslint/minimatch/brace-expansion": ["brace-expansion@5.0.5", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ=="],
@ -1058,8 +1068,26 @@
"@typescript-eslint/typescript-estree/minimatch/brace-expansion/balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="],
"eslint-plugin-perfectionist/@typescript-eslint/utils/@typescript-eslint/scope-manager/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.58.0", "", { "dependencies": { "@typescript-eslint/types": "8.58.0", "eslint-visitor-keys": "^5.0.0" } }, "sha512-XJ9UD9+bbDo4a4epraTwG3TsNPeiB9aShrUneAVXy8q4LuwowN+qu89/6ByLMINqvIMeI9H9hOHQtg/ijrYXzQ=="],
"eslint-plugin-perfectionist/@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.58.0", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.58.0", "@typescript-eslint/types": "^8.58.0", "debug": "^4.4.3" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-8Q/wBPWLQP1j16NxoPNIKpDZFMaxl7yWIoqXWYeWO+Bbd2mjgvoF0dxP2jKZg5+x49rgKdf7Ck473M8PC3V9lg=="],
"eslint-plugin-perfectionist/@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.58.0", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-doNSZEVJsWEu4htiVC+PR6NpM+pa+a4ClH9INRWOWCUzMst/VA9c4gXq92F8GUD1rwhNvRLkgjfYtFXegXQF7A=="],
"eslint-plugin-perfectionist/@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.58.0", "", { "dependencies": { "@typescript-eslint/types": "8.58.0", "eslint-visitor-keys": "^5.0.0" } }, "sha512-XJ9UD9+bbDo4a4epraTwG3TsNPeiB9aShrUneAVXy8q4LuwowN+qu89/6ByLMINqvIMeI9H9hOHQtg/ijrYXzQ=="],
"eslint-plugin-perfectionist/@typescript-eslint/utils/@typescript-eslint/typescript-estree/minimatch": ["minimatch@10.2.4", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg=="],
"eslint-plugin-sonarjs/minimatch/brace-expansion/balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="],
"eslint/minimatch/brace-expansion/balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="],
"eslint-plugin-perfectionist/@typescript-eslint/utils/@typescript-eslint/scope-manager/@typescript-eslint/visitor-keys/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="],
"eslint-plugin-perfectionist/@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/visitor-keys/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="],
"eslint-plugin-perfectionist/@typescript-eslint/utils/@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@5.0.5", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ=="],
"eslint-plugin-perfectionist/@typescript-eslint/utils/@typescript-eslint/typescript-estree/minimatch/brace-expansion/balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="],
}
}

View file

@ -1,4 +1,6 @@
import { configAstro } from "@gcch/configuration-eslint";
import { defineConfig } from "eslint/config";
export default defineConfig([...configAstro]);
const config = defineConfig([...configAstro]);
export default config;

View file

@ -1,3 +1,3 @@
import config from "../index";
import config from "../index.ts";
export default config;

View file

@ -1,13 +1,16 @@
import type { UserConfig } from "tsdown";
import { defineConfig } from "tsdown";
const config: UserConfig = defineConfig({
checks: { circularDependency: true },
clean: true,
dts: { oxc: true, parallel: true },
entry: ["../index.ts"],
minify: false,
outDir: "../dist",
platform: "node",
publint: true,
sourcemap: false,
target: "esnext",
treeshake: true,

2089
dist/index.mjs vendored

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,17 @@
import { defineConfig } from "oxlint";
import type { OxlintConfig } from "oxlint";
import astroConfig from "./rules/astro";
import functionalRules from "./rules/functional";
import esLintRules from "./rules/eslint";
import jsDocRules from "./rules/jsdoc";
import sonarJsRules from "./rules/sonarjs";
import perfectionistRules from "./rules/perfectionist";
import typeScriptRules from "./rules/typescript";
import unicornRules from "./rules/unicorn";
import { defineConfig } from "oxlint";
import astroConfig from "./rules/astro.ts";
import esLintRules from "./rules/eslint.ts";
import functionalRules from "./rules/functional.ts";
import importRules from "./rules/import.ts";
import jsDocRules from "./rules/jsdoc.ts";
import nodeRules from "./rules/node.ts";
import oxcRules from "./rules/oxc.ts";
import perfectionistRules from "./rules/perfectionist.ts";
import promiseRules from "./rules/promise.ts";
import typeScriptRules from "./rules/typescript.ts";
import unicornRules from "./rules/unicorn.ts";
const config: OxlintConfig = defineConfig({
categories: {
@ -25,7 +29,7 @@ const config: OxlintConfig = defineConfig({
node: true,
},
ignorePatterns: [".astro", ".cache", "dist/**/*"],
jsPlugins: ["eslint-plugin-functional", "eslint-plugin-perfectionist", "eslint-plugin-sonarjs"],
jsPlugins: ["eslint-plugin-functional", "eslint-plugin-perfectionist"],
options: {
reportUnusedDisableDirectives: "warn",
typeAware: true,
@ -36,9 +40,12 @@ const config: OxlintConfig = defineConfig({
rules: {
...esLintRules,
...functionalRules,
...importRules,
...jsDocRules,
...sonarJsRules,
...nodeRules,
...oxcRules,
...perfectionistRules,
...promiseRules,
...typeScriptRules,
...unicornRules,
},

View file

@ -48,3 +48,7 @@ clean:
rm -rf bun.lock
rm -rf node_modules/
rm -rfv dist/
# Teste les règles à la mise à jour des fichiers sources.
watch:
watchexec --watch "./rules/" just build lint-js

View file

@ -1,6 +1,6 @@
{
"name": "@gcch/configuration-oxlint",
"version": "0.0.1",
"version": "0.0.3",
"type": "module",
"description": "Configuration Oxlint partageable pour gcch.",
"main": "./dist/index.mjs",
@ -15,32 +15,29 @@
"eslint-plugin-astro": "^1.6.0",
"eslint-plugin-functional": "^9.0.4",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-perfectionist": "^5.7.0",
"eslint-plugin-perfectionist": "^5.8.0",
"eslint-plugin-sonarjs": "^4.0.2",
"oxlint": "^1.58.0",
"oxlint-tsgolint": "^0.19.0",
"oxlint": "^1.59.0",
"oxlint-tsgolint": "^0.20.0",
"typescript": "^6.0.2"
},
"dependencies": {
"eslint-plugin-astro": "^1.6.0",
"eslint-plugin-functional": "^9.0.4",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-perfectionist": "^5.8.0",
"eslint-plugin-sonarjs": "^4.0.2",
"globals": "^17.4.0",
"oxlint": "^1.58.0",
"oxlint-tsgolint": "^0.19.0"
},
"optionalDependencies": {
"eslint-plugin-astro": "^1.6.0"
"oxlint": "^1.59.0",
"oxlint-tsgolint": "^0.20.0"
},
"devDependencies": {
"@arethetypeswrong/core": "^0.18.2",
"@gcch/configuration-eslint": "git+https://git.gcch.fr/gcch/configuration-eslint#c0620280e6",
"@gcch/configuration-prettier": "git+https://git.gcch.fr/gcch/configuration-prettier#91d4573bff",
"@types/bun": "^1.3.11",
"@types/node": "^25.5.0",
"eslint-plugin-astro": "^1.6.0",
"eslint-plugin-functional": "^9.0.4",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-perfectionist": "^5.7.0",
"eslint-plugin-sonarjs": "^4.0.2",
"knip": "^6.1.1",
"@types/node": "^25.5.2",
"knip": "^6.3.0",
"prettier": "^3.8.1",
"publint": "^0.3.18",
"tsdown": "^0.21.7",

View file

@ -7,70 +7,70 @@ const astroConfig: OxlintOverride = {
files: ["**/*.astro"],
jsPlugins: ["eslint-plugin-astro"],
rules: {
"astro/jsx-a11y/alt-text": "error",
"astro/jsx-a11y/anchor-ambiguous-text": "error",
"astro/jsx-a11y/anchor-has-content": "error",
"astro/jsx-a11y/anchor-is-valid": "error",
"astro/jsx-a11y/aria-activedescendant-has-tabindex": "error",
"astro/jsx-a11y/aria-props": "error",
"astro/jsx-a11y/aria-proptypes": "error",
"astro/jsx-a11y/aria-role": "error",
"astro/jsx-a11y/aria-unsupported-elements": "error",
"astro/jsx-a11y/autocomplete-valid": "error",
"astro/jsx-a11y/click-events-have-key-events": "error",
"astro/jsx-a11y/control-has-associated-label": "error",
"astro/jsx-a11y/heading-has-content": "error",
"astro/jsx-a11y/html-has-lang": "error",
"astro/jsx-a11y/iframe-has-title": "error",
"astro/jsx-a11y/img-redundant-alt": "error",
"astro/jsx-a11y/interactive-supports-focus": "error",
"astro/jsx-a11y/label-has-associated-control": "error",
"astro/jsx-a11y/lang": "error",
"astro/jsx-a11y/media-has-caption": "error",
"astro/jsx-a11y/mouse-events-have-key-events": "error",
"astro/jsx-a11y/no-access-key": "error",
"astro/jsx-a11y/no-aria-hidden-on-focusable": "error",
"astro/jsx-a11y/no-autofocus": "error",
"astro/jsx-a11y/no-distracting-elements": "error",
"astro/jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
"astro/jsx-a11y/no-noninteractive-element-interactions": "error",
"astro/jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
"astro/jsx-a11y/no-noninteractive-tabindex": "error",
"astro/jsx-a11y/no-redundant-roles": "error",
"astro/jsx-a11y/no-static-element-interactions": "error",
"astro/jsx-a11y/prefer-tag-over-role": "error",
"astro/jsx-a11y/role-has-required-aria-props": "error",
"astro/jsx-a11y/role-supports-aria-props": "error",
"astro/jsx-a11y/scope": "error",
"astro/jsx-a11y/tabindex-no-positive": "error",
"astro/missing-client-only-directive-value": "error",
"astro/no-conflict-set-directives": "error",
"astro/no-deprecated-astro-canonicalurl": "error",
"astro/no-deprecated-astro-fetchcontent": "error",
"astro/no-deprecated-astro-resolve": "error",
"astro/no-deprecated-getentrybyslug": "error",
"astro/no-exports-from-components": "error",
"astro/no-set-html-directive": "error",
"astro/no-set-text-directive": "error",
"astro/no-unused-css-selector": "error",
"astro/no-unused-define-vars-in-style": "error",
"astro/prefer-class-list-directive": "error",
"astro/prefer-object-class-list": "error",
"astro/jsx-a11y/alt-text": "deny",
"astro/jsx-a11y/anchor-ambiguous-text": "deny",
"astro/jsx-a11y/anchor-has-content": "deny",
"astro/jsx-a11y/anchor-is-valid": "deny",
"astro/jsx-a11y/aria-activedescendant-has-tabindex": "deny",
"astro/jsx-a11y/aria-props": "deny",
"astro/jsx-a11y/aria-proptypes": "deny",
"astro/jsx-a11y/aria-role": "deny",
"astro/jsx-a11y/aria-unsupported-elements": "deny",
"astro/jsx-a11y/autocomplete-valid": "deny",
"astro/jsx-a11y/click-events-have-key-events": "deny",
"astro/jsx-a11y/control-has-associated-label": "deny",
"astro/jsx-a11y/heading-has-content": "deny",
"astro/jsx-a11y/html-has-lang": "deny",
"astro/jsx-a11y/iframe-has-title": "deny",
"astro/jsx-a11y/img-redundant-alt": "deny",
"astro/jsx-a11y/interactive-supports-focus": "deny",
"astro/jsx-a11y/label-has-associated-control": "deny",
"astro/jsx-a11y/lang": "deny",
"astro/jsx-a11y/media-has-caption": "deny",
"astro/jsx-a11y/mouse-events-have-key-events": "deny",
"astro/jsx-a11y/no-access-key": "deny",
"astro/jsx-a11y/no-aria-hidden-on-focusable": "deny",
"astro/jsx-a11y/no-autofocus": "deny",
"astro/jsx-a11y/no-distracting-elements": "deny",
"astro/jsx-a11y/no-interactive-element-to-noninteractive-role": "deny",
"astro/jsx-a11y/no-noninteractive-element-interactions": "deny",
"astro/jsx-a11y/no-noninteractive-element-to-interactive-role": "deny",
"astro/jsx-a11y/no-noninteractive-tabindex": "deny",
"astro/jsx-a11y/no-redundant-roles": "deny",
"astro/jsx-a11y/no-static-element-interactions": "deny",
"astro/jsx-a11y/prefer-tag-over-role": "deny",
"astro/jsx-a11y/role-has-required-aria-props": "deny",
"astro/jsx-a11y/role-supports-aria-props": "deny",
"astro/jsx-a11y/scope": "deny",
"astro/jsx-a11y/tabindex-no-positive": "deny",
"astro/missing-client-only-directive-value": "deny",
"astro/no-conflict-set-directives": "deny",
"astro/no-deprecated-astro-canonicalurl": "deny",
"astro/no-deprecated-astro-fetchcontent": "deny",
"astro/no-deprecated-astro-resolve": "deny",
"astro/no-deprecated-getentrybyslug": "deny",
"astro/no-exports-from-components": "deny",
"astro/no-set-html-directive": "deny",
"astro/no-set-text-directive": "deny",
"astro/no-unused-css-selector": "deny",
"astro/no-unused-define-vars-in-style": "deny",
"astro/prefer-class-list-directive": "deny",
"astro/prefer-object-class-list": "deny",
"astro/prefer-split-class-list": [
"error",
"deny",
{
splitLiteral: false,
},
],
"astro/sort-attributes": [
"error",
"deny",
{
ignoreCase: false,
order: "asc",
type: "alphabetical",
},
],
"astro/valid-compile": "error",
"astro/valid-compile": "deny",
},
};

View file

@ -52,7 +52,17 @@ const esLintRules: DummyRuleMap = {
},
],
"eslint/guard-for-in": "deny",
"eslint/id-length": "deny",
"eslint/id-length": [
"deny",
{
checkGeneric: true,
exceptionPatterns: [],
exceptions: ["_"],
max: 100_000_000,
min: 2,
properties: "always",
},
],
"eslint/init-declarations": ["deny", "always"],
"eslint/new-cap": [
"deny",
@ -266,6 +276,7 @@ const esLintRules: DummyRuleMap = {
"deny",
{
args: "all",
argsIgnorePattern: "^_",
caughtErrors: "all",
fix: {
ignoreClassWithStaticInitBlock: false,

View file

@ -1,12 +1,12 @@
import type { DummyRuleMap } from "oxlint";
const functionalRules: DummyRuleMap = {
"functional/immutable-data": "error",
"functional/no-let": "error",
"functional/no-throw-statements": "error",
"functional/no-try-statements": "error",
"functional/prefer-property-signatures": "error",
"functional/readonly-type": ["error", "generic"],
"functional/immutable-data": "deny",
"functional/no-let": "deny",
"functional/no-throw-statements": "deny",
"functional/no-try-statements": "deny",
"functional/prefer-property-signatures": "deny",
"functional/readonly-type": ["deny", "generic"],
};
export default functionalRules;

111
rules/import.ts Normal file
View file

@ -0,0 +1,111 @@
import type { DummyRuleMap } from "oxlint";
const MAX_DEPTH = 4_294_967_295;
const importRules: DummyRuleMap = {
"import/consistent-type-specifier-style": ["deny", "prefer-top-level"],
"import/default": "deny",
"import/export": "deny",
"import/exports-last": "deny",
"import/extensions": [
"deny",
"always",
{
checkTypeImports: true,
ignorePackages: true,
},
],
"import/first": ["deny", "absolute-first"],
"import/group-exports": "deny",
"import/max-dependencies": "allow",
"import/named": "deny",
"import/namespace": [
"deny",
{
allowComputed: false,
},
],
"import/no-absolute-path": [
"deny",
{
amd: false,
commonjs: true,
esmodule: true,
},
],
"import/no-amd": "deny",
"import/no-anonymous-default-export": [
"deny",
{
allowAnonymousClass: false,
allowAnonymousFunction: false,
allowArray: false,
allowArrowFunction: false,
allowCallExpression: false,
allowLiteral: false,
allowNew: false,
allowObject: false,
},
],
"import/no-commonjs": [
"deny",
{
allowConditionalRequire: false,
allowPrimitiveModules: false,
allowRequire: false,
},
],
"import/no-cycle": [
"deny",
{
allowUnsafeDynamicCyclicDependency: false,
ignoreExternal: false,
ignoreTypes: true,
maxDepth: MAX_DEPTH,
},
],
// J'aime les exports par défaut.
"import/no-default-export": "allow",
"import/no-duplicates": [
"deny",
{
considerQueryString: true,
preferInline: false,
},
],
"import/no-dynamic-require": [
"deny",
{
esmodule: true,
},
],
"import/no-empty-named-blocks": "deny",
"import/no-mutable-exports": "deny",
"import/no-named-as-default": "deny",
"import/no-named-as-default-member": "deny",
"import/no-named-default": "deny",
/**
* Prohibit named exports.
*
* Named exports require strict identifier matching and can lead to fragile imports, while default exports enforce a
* single, consistent module entry point.
*
* Activer cette règle empêche l'existence de multiples exports au sein d'un module.
*/
"import/no-named-export": "allow",
"import/no-namespace": "deny",
"import/no-nodejs-modules": "allow",
"import/no-relative-parent-imports": "allow",
"import/no-self-import": "deny",
"import/no-unassigned-import": "deny",
"import/no-webpack-loader-syntax": "deny",
"import/prefer-default-export": [
"deny",
{
target: "single",
},
],
"import/unambiguous": "deny",
};
export default importRules;

View file

@ -7,20 +7,50 @@ const jsDocRules: DummyRuleMap = {
"warn",
{
definedTags: ["link"],
typed: true,
},
],
"jsdoc/empty-tags": "warn",
"jsdoc/implements-on-classes": "warn",
"jsdoc/no-defaults": "warn",
"jsdoc/require-param": "warn",
"jsdoc/no-defaults": ["warn", { noOptionalParamNames: true }],
"jsdoc/require-param": [
"warn",
{
checkConstructors: true,
checkDestructured: true,
checkDestructuredRoots: true,
checkGetters: true,
checkRestProperty: true,
checkSetters: true,
},
],
"jsdoc/require-param-description": "warn",
"jsdoc/require-param-name": "warn",
// Pris en charge par les annotations de type TypeScript.
"jsdoc/require-param-type": "allow",
"jsdoc/require-property": "warn",
"jsdoc/require-property-description": "warn",
"jsdoc/require-property-name": "warn",
"jsdoc/require-returns": "warn",
// Pris en charge par les annotations de type TypeScript.
"jsdoc/require-property-type": "allow",
"jsdoc/require-returns": [
"warn",
{
checkConstructors: true,
checkGetters: true,
forceRequireReturn: true,
forceReturnsWithAsync: true,
},
],
"jsdoc/require-returns-description": "warn",
"jsdoc/require-yields": "warn",
"jsdoc/require-returns-type": "allow",
"jsdoc/require-yields": [
"warn",
{
forceRequireYields: false,
withGeneratorTag: false,
},
],
};
export default jsDocRules;

12
rules/node.ts Normal file
View file

@ -0,0 +1,12 @@
import type { DummyRuleMap } from "oxlint";
const nodeRules: DummyRuleMap = {
"node/global-require": "deny",
"node/handle-callback-err": "allow",
"node/no-exports-assign": "deny",
"node/no-new-require": "deny",
"node/no-path-concat": "deny",
"node/no-process-env": "deny",
};
export default nodeRules;

View file

@ -1,87 +0,0 @@
import type { DummyRuleMap } from "oxlint";
const esLintRules: DummyRuleMap = {
"array-callback-return": [
"error",
{
allowVoid: true,
checkForEach: true,
},
],
"for-direction": "error",
"max-params": [
"error",
{
max: 3,
},
],
"no-array-constructor": "error",
"no-async-promise-executor": "error",
"no-case-declarations": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-constant-binary-expression": "error",
"no-constant-condition": "error",
"no-control-regex": "error",
"no-debugger": "error",
"no-delete-var": "error",
"no-dupe-else-if": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": [
"error",
{
allowSeparateTypeImports: true,
},
],
"no-empty": "error",
"no-empty-character-class": "error",
"no-empty-function": "error",
"no-empty-pattern": "error",
"no-empty-static-block": "error",
"no-ex-assign": "error",
"no-extra-boolean-cast": "error",
"no-fallthrough": "error",
"no-global-assign": "error",
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-loss-of-precision": "error",
"no-misleading-character-class": "error",
"no-nonoctal-decimal-escape": "error",
"no-param-reassign": "error",
"no-prototype-builtins": "error",
"no-regex-spaces": "error",
"no-self-assign": "error",
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "error",
"no-unassigned-vars": "error",
"no-unexpected-multiline": "error",
"no-unneeded-ternary": [
"error",
{
defaultAssignment: false,
},
],
"no-unsafe-finally": "error",
"no-unsafe-optional-chaining": "error",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"no-unused-private-class-members": "error",
"no-unused-vars": "error",
"no-useless-backreference": "error",
"no-useless-catch": "error",
"no-useless-constructor": "error",
"no-useless-escape": "error",
"no-var": "error",
"prefer-const": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"preserve-caught-error": "error",
"require-yield": "error",
// Rentre en conflit avec perfectionnist.
"sort-imports": "off",
"use-isnan": "error",
"valid-typeof": "error",
yoda: ["error", "never"],
};
export default esLintRules;

35
rules/oxc.ts Normal file
View file

@ -0,0 +1,35 @@
import type { DummyRuleMap } from "oxlint";
const oxcRules: DummyRuleMap = {
"oxc/approx-constant": "deny",
"oxc/bad-array-method-on-arguments": "deny",
"oxc/bad-bitwise-operator": "deny",
"oxc/bad-char-at-comparison": "deny",
"oxc/bad-comparison-sequence": "deny",
"oxc/bad-min-max-func": "deny",
"oxc/bad-object-literal-comparison": "deny",
"oxc/bad-replace-all-arg": "deny",
"oxc/branches-sharing-code": "warn",
"oxc/const-comparisons": "deny",
"oxc/double-comparisons": "deny",
"oxc/erasing-op": "deny",
"oxc/misrefactored-assign-op": "deny",
"oxc/missing-throw": "deny",
"oxc/no-accumulating-spread": "deny",
// This rule should generally not be used in modern JavaScript/TypeScript codebases without good reason.
"oxc/no-async-await": "allow",
"oxc/no-async-endpoint-handlers": "allow",
"oxc/no-barrel-file": ["deny", { threshold: 100 }],
"oxc/no-const-enum": "deny",
"oxc/no-map-spread": "allow",
// In most codebases at this point, you should not use this rule.
"oxc/no-optional-chaining": "allow",
// In most codebases at this point, you should not use this rule.
"oxc/no-rest-spread-properties": "allow",
"oxc/no-this-in-exported-function": "deny",
"oxc/number-arg-out-of-range": "deny",
"oxc/only-used-in-recursion": "deny",
"oxc/uninvoked-array-callback": "deny",
};
export default oxcRules;

View file

@ -2,147 +2,147 @@ import type { DummyRuleMap } from "oxlint";
const perfectionistRules: DummyRuleMap = {
"perfectionist/sort-array-includes": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-classes": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-decorators": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-enums": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-export-attributes": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-exports": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-heritage-clauses": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-import-attributes": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-interfaces": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-intersection-types": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-jsx-props": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-maps": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-modules": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-named-exports": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-named-imports": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-object-types": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-objects": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-sets": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-switch-case": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-union-types": [
"error",
"deny",
{
order: "asc",
type: "natural",
},
],
"perfectionist/sort-variable-declarations": [
"error",
"deny",
{
order: "asc",
type: "natural",

64
rules/promise.ts Normal file
View file

@ -0,0 +1,64 @@
import type { DummyRuleMap } from "oxlint";
const promiseRules: DummyRuleMap = {
"promise/always-return": [
"deny",
{
ignoreAssignmentVariable: ["globalThis"],
ignoreLastCallback: false,
},
],
"promise/avoid-new": "deny",
"promise/catch-or-return": [
"deny",
{
allowFinally: false,
allowThen: false,
terminationMethod: ["catch"],
},
],
"promise/no-callback-in-promise": [
"deny",
{
callbacks: ["callback", "cb", "done", "next"],
exceptions: [],
timeoutsErr: false,
},
],
"promise/no-multiple-resolved": "deny",
"promise/no-nesting": "deny",
"promise/no-new-statics": "deny",
"promise/no-promise-in-callback": "deny",
"promise/no-return-in-finally": "deny",
"promise/no-return-wrap": [
"deny",
{
allowReject: false,
},
],
"promise/param-names": [
"deny",
{
rejectPattern: "^_?reject$",
resolvePattern: "^_?resolve$",
},
],
// Émet de faux positifs avec Effect.
"promise/prefer-await-to-callbacks": "allow",
"promise/prefer-await-to-then": [
"deny",
{
strict: true,
},
],
"promise/prefer-catch": "deny",
"promise/spec-only": [
"deny",
{
allowedMethods: [],
},
],
"promise/valid-params": "deny",
};
export default promiseRules;

View file

@ -1,216 +0,0 @@
import type { DummyRuleMap } from "oxlint";
const sonarJsRules: DummyRuleMap = {
"sonarjs/anchor-precedence": "error",
"sonarjs/argument-type": "error",
"sonarjs/arguments-order": "error",
"sonarjs/arguments-usage": "error",
"sonarjs/array-callback-without-return": "error",
"sonarjs/assertions-in-tests": "error",
"sonarjs/aws-apigateway-public-api": "error",
"sonarjs/aws-ec2-rds-dms-public": "error",
"sonarjs/aws-ec2-unencrypted-ebs-volume": "error",
"sonarjs/aws-efs-unencrypted": "error",
"sonarjs/aws-iam-all-privileges": "error",
"sonarjs/aws-iam-privilege-escalation": "error",
"sonarjs/aws-iam-public-access": "error",
"sonarjs/aws-opensearchservice-domain": "error",
"sonarjs/aws-rds-unencrypted-databases": "error",
"sonarjs/aws-restricted-ip-admin-access": "error",
"sonarjs/aws-s3-bucket-granted-access": "error",
"sonarjs/aws-s3-bucket-insecure-http": "error",
"sonarjs/aws-s3-bucket-public-access": "error",
"sonarjs/aws-s3-bucket-versioning": "error",
"sonarjs/aws-sagemaker-unencrypted-notebook": "error",
"sonarjs/aws-sns-unencrypted-topics": "error",
"sonarjs/aws-sqs-unencrypted-queue": "error",
"sonarjs/bitwise-operators": "error",
"sonarjs/block-scoped-var": "error",
"sonarjs/call-argument-line": "error",
"sonarjs/chai-determinate-assertion": "error",
"sonarjs/class-name": "error",
"sonarjs/code-eval": "error",
"sonarjs/cognitive-complexity": "error",
"sonarjs/comma-or-logical-or-case": "error",
"sonarjs/concise-regex": "error",
"sonarjs/confidential-information-logging": "error",
"sonarjs/constructor-for-side-effects": "error",
"sonarjs/content-length": "error",
"sonarjs/content-security-policy": "error",
"sonarjs/cookie-no-httponly": "error",
"sonarjs/cors": "error",
"sonarjs/csrf": "error",
"sonarjs/deprecation": "error",
"sonarjs/different-types-comparison": "error",
"sonarjs/disabled-auto-escaping": "error",
"sonarjs/disabled-resource-integrity": "error",
"sonarjs/disabled-timeout": "error",
"sonarjs/duplicates-in-character-class": "error",
"sonarjs/dynamically-constructed-templates": "error",
"sonarjs/empty-string-repetition": "error",
"sonarjs/encryption-secure-mode": "error",
"sonarjs/existing-groups": "error",
"sonarjs/file-permissions": "error",
"sonarjs/file-uploads": "error",
"sonarjs/fixme-tag": "error",
"sonarjs/for-loop-increment-sign": "error",
"sonarjs/frame-ancestors": "error",
"sonarjs/function-inside-loop": "error",
"sonarjs/function-return-type": "error",
"sonarjs/future-reserved-words": "error",
"sonarjs/generator-without-yield": "error",
"sonarjs/hardcoded-secret-signatures": "error",
"sonarjs/hashing": "error",
"sonarjs/hidden-files": "error",
"sonarjs/in-operator-type-error": "error",
"sonarjs/inconsistent-function-call": "error",
"sonarjs/index-of-compare-to-positive-number": "error",
"sonarjs/insecure-cookie": "error",
"sonarjs/insecure-jwt-token": "error",
"sonarjs/inverted-assertion-arguments": "error",
"sonarjs/jsx-no-leaked-render": "error",
"sonarjs/label-position": "error",
"sonarjs/link-with-target-blank": "error",
"sonarjs/max-switch-cases": "error",
"sonarjs/misplaced-loop-counter": "error",
"sonarjs/new-operator-misuse": "error",
"sonarjs/no-all-duplicated-branches": "error",
"sonarjs/no-alphabetical-sort": "error",
"sonarjs/no-angular-bypass-sanitization": "error",
"sonarjs/no-array-delete": "error",
"sonarjs/no-associative-arrays": "error",
"sonarjs/no-async-constructor": "error",
"sonarjs/no-case-label-in-switch": "error",
"sonarjs/no-clear-text-protocols": "error",
"sonarjs/no-code-after-done": "error",
"sonarjs/no-collapsible-if": "error",
"sonarjs/no-collection-size-mischeck": "error",
"sonarjs/no-commented-code": "error",
"sonarjs/no-control-regex": "error",
"sonarjs/no-dead-store": "error",
"sonarjs/no-delete-var": "error",
"sonarjs/no-duplicate-in-composite": "error",
"sonarjs/no-duplicate-string": "error",
"sonarjs/no-duplicated-branches": "error",
"sonarjs/no-element-overwrite": "error",
"sonarjs/no-empty-after-reluctant": "error",
"sonarjs/no-empty-alternatives": "error",
"sonarjs/no-empty-character-class": "error",
"sonarjs/no-empty-collection": "error",
"sonarjs/no-empty-group": "error",
"sonarjs/no-empty-test-file": "error",
"sonarjs/no-equals-in-for-termination": "error",
"sonarjs/no-exclusive-tests": "error",
"sonarjs/no-extra-arguments": "error",
"sonarjs/no-fallthrough": "error",
"sonarjs/no-global-this": "error",
"sonarjs/no-globals-shadowing": "error",
"sonarjs/no-gratuitous-expressions": "error",
"sonarjs/no-hardcoded-ip": "error",
"sonarjs/no-hardcoded-passwords": "error",
"sonarjs/no-hardcoded-secrets": "error",
"sonarjs/no-hook-setter-in-body": "error",
"sonarjs/no-identical-conditions": "error",
"sonarjs/no-identical-expressions": "error",
"sonarjs/no-identical-functions": "error",
"sonarjs/no-ignored-exceptions": "error",
"sonarjs/no-ignored-return": "error",
"sonarjs/no-implicit-global": "error",
"sonarjs/no-in-misuse": "error",
"sonarjs/no-incomplete-assertions": "error",
"sonarjs/no-inconsistent-returns": "error",
"sonarjs/no-internal-api-use": "error",
"sonarjs/no-intrusive-permissions": "error",
"sonarjs/no-invalid-regexp": "error",
"sonarjs/no-invariant-returns": "error",
"sonarjs/no-inverted-boolean-check": "error",
"sonarjs/no-ip-forward": "error",
"sonarjs/no-labels": "error",
"sonarjs/no-literal-call": "error",
"sonarjs/no-mime-sniff": "error",
"sonarjs/no-misleading-array-reverse": "error",
"sonarjs/no-misleading-character-class": "error",
"sonarjs/no-mixed-content": "error",
"sonarjs/no-nested-assignment": "error",
"sonarjs/no-nested-conditional": "error",
"sonarjs/no-nested-functions": "error",
"sonarjs/no-nested-switch": "error",
"sonarjs/no-nested-template-literals": "error",
"sonarjs/no-os-command-from-path": "error",
"sonarjs/no-parameter-reassignment": "error",
"sonarjs/no-primitive-wrappers": "error",
"sonarjs/no-redundant-assignments": "error",
"sonarjs/no-redundant-boolean": "error",
"sonarjs/no-redundant-jump": "error",
"sonarjs/no-redundant-optional": "error",
"sonarjs/no-referrer-policy": "error",
"sonarjs/no-regex-spaces": "error",
"sonarjs/no-same-argument-assert": "error",
"sonarjs/no-same-line-conditional": "error",
"sonarjs/no-selector-parameter": "error",
"sonarjs/no-session-cookies-on-static-assets": "error",
"sonarjs/no-skipped-tests": "error",
"sonarjs/no-small-switch": "error",
"sonarjs/no-table-as-layout": "error",
"sonarjs/no-try-promise": "error",
"sonarjs/no-undefined-argument": "error",
"sonarjs/no-unenclosed-multiline-block": "error",
"sonarjs/no-uniq-key": "error",
"sonarjs/no-unsafe-unzip": "error",
"sonarjs/no-unthrown-error": "error",
"sonarjs/no-unused-collection": "error",
"sonarjs/no-unused-vars": "error",
"sonarjs/no-use-of-empty-return-value": "error",
"sonarjs/no-useless-catch": "error",
"sonarjs/no-useless-increment": "error",
"sonarjs/no-useless-intersection": "error",
"sonarjs/no-useless-react-setstate": "error",
"sonarjs/no-weak-cipher": "error",
"sonarjs/no-weak-keys": "error",
"sonarjs/non-existent-operator": "error",
"sonarjs/null-dereference": "error",
"sonarjs/object-alt-content": "error",
"sonarjs/os-command": "error",
"sonarjs/post-message": "error",
"sonarjs/prefer-default-last": "error",
"sonarjs/prefer-immediate-return": "error",
"sonarjs/prefer-promise-shorthand": "error",
"sonarjs/prefer-read-only-props": "error",
"sonarjs/prefer-regexp-exec": "error",
"sonarjs/prefer-single-boolean-return": "error",
"sonarjs/prefer-type-guard": "error",
"sonarjs/prefer-while": "error",
"sonarjs/production-debug": "error",
"sonarjs/pseudo-random": "error",
"sonarjs/public-static-readonly": "error",
"sonarjs/publicly-writable-directories": "error",
"sonarjs/reduce-initial-value": "error",
"sonarjs/redundant-type-aliases": "error",
"sonarjs/regex-complexity": "error",
"sonarjs/review-blockchain-mnemonic": "error",
"sonarjs/session-regeneration": "error",
"sonarjs/single-char-in-character-classes": "error",
"sonarjs/single-character-alternation": "error",
"sonarjs/slow-regex": "error",
"sonarjs/sql-queries": "error",
"sonarjs/stable-tests": "error",
"sonarjs/stateful-regex": "error",
"sonarjs/strict-transport-security": "error",
"sonarjs/table-header": "error",
"sonarjs/table-header-reference": "error",
"sonarjs/test-check-exception": "error",
"sonarjs/todo-tag": "error",
"sonarjs/unused-import": "error",
"sonarjs/unused-named-groups": "error",
"sonarjs/unverified-certificate": "error",
"sonarjs/unverified-hostname": "error",
"sonarjs/updated-const-var": "error",
"sonarjs/updated-loop-counter": "error",
"sonarjs/use-type-alias": "error",
"sonarjs/void-use": "error",
"sonarjs/weak-ssl": "error",
"sonarjs/x-powered-by": "error",
"sonarjs/xml-parser-xxe": "error",
};
export default sonarJsRules;

View file

@ -1,94 +1,374 @@
import type { DummyRuleMap } from "oxlint";
/** Longueur minimale de la description accompagnat une directive (p. ex. `@ts-expect-error`). */
const MIN_DIRECTIVE_DESCRIPTION_LENGTH = 10;
const typeScriptRules: DummyRuleMap = {
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": [
"error",
"typescript/adjacent-overload-signatures": "deny",
"typescript/array-type": [
"deny",
{
default: "generic",
readonly: "generic",
},
],
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": [
"error",
"typescript/await-thenable": "deny",
"typescript/ban-ts-comment": [
"deny",
{
minimumDescriptionLength: 10,
minimumDescriptionLength: MIN_DIRECTIVE_DESCRIPTION_LENGTH,
"ts-check": false,
"ts-expect-error": "allow-with-description",
"ts-ignore": true,
"ts-nocheck": true,
},
],
"@typescript-eslint/ban-tslint-comment": "error",
"@typescript-eslint/class-literal-property-style": "error",
"@typescript-eslint/consistent-generic-constructors": "error",
"@typescript-eslint/consistent-indexed-object-style": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
"@typescript-eslint/no-deprecated": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-meaningless-void-operator": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-misused-spread": "error",
"@typescript-eslint/no-mixed-enums": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-redundant-type-constituents": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unnecessary-template-expression": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unnecessary-type-conversion": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "error",
"@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/no-unsafe-return": "error",
"@typescript-eslint/no-unsafe-unary-minus": "error",
"@typescript-eslint/no-useless-default-assignment": "error",
"@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-find": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-literal-enum-member": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-promise-reject-errors": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-return-this-type": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/related-getter-setter-pairs": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/restrict-plus-operands": [
"error",
"typescript/ban-tslint-comment": "deny",
"typescript/class-literal-property-style": ["deny", "fields"],
"typescript/consistent-generic-constructors": [
"deny",
{
option: "constructor",
},
],
"typescript/consistent-indexed-object-style": ["deny", "record"],
"typescript/consistent-return": [
"deny",
{
treatUndefinedAsUnspecified: false,
},
],
"typescript/consistent-type-assertions": [
"deny",
{
assertionStyle: "never",
},
],
"typescript/consistent-type-definitions": ["deny", "type"],
"typescript/consistent-type-exports": [
"deny",
{
fixMixedExportsWithInlineTypeSpecifier: false,
},
],
"typescript/consistent-type-imports": [
"deny",
{
disallowTypeAnnotations: true,
fixStyle: "separate-type-imports",
prefer: "type-imports",
},
],
"typescript/dot-notation": [
"deny",
{
allowIndexSignaturePropertyAccess: false,
allowKeywords: false,
allowPattern: "",
allowPrivateClassPropertyAccess: false,
allowProtectedClassPropertyAccess: false,
},
],
"typescript/explicit-function-return-type": [
"deny",
{
allowConciseArrowFunctionExpressionsStartingWithVoid: false,
allowDirectConstAssertionInArrowFunctions: true,
allowedNames: [],
allowExpressions: false,
allowFunctionsWithoutTypeParameters: false,
allowHigherOrderFunctions: true,
allowIIFEs: false,
allowTypedFunctionExpressions: true,
},
],
"typescript/explicit-module-boundary-types": [
"deny",
{
allowArgumentsExplicitlyTypedAsAny: false,
allowDirectConstAssertionInArrowFunctions: true,
allowedNames: [],
allowHigherOrderFunctions: true,
allowOverloadFunctions: false,
allowTypedFunctionExpressions: true,
},
],
"typescript/no-array-delete": "deny",
"typescript/no-base-to-string": [
"deny",
{
checkUnknown: true,
ignoredTypeNames: ["deny", "RegExp", "URL", "URLSearchParams"],
},
],
"typescript/no-confusing-non-null-assertion": "deny",
"typescript/no-confusing-void-expression": [
"deny",
{
ignoreArrowShorthand: false,
ignoreVoidOperator: false,
ignoreVoidReturningFunctions: false,
},
],
"typescript/no-deprecated": "deny",
"typescript/no-duplicate-enum-values": "deny",
"typescript/no-duplicate-type-constituents": [
"deny",
{
ignoreIntersections: false,
ignoreUnions: false,
},
],
"typescript/no-dynamic-delete": "deny",
"typescript/no-empty-interface": [
"deny",
{
allowSingleExtends: false,
},
],
"typescript/no-empty-object-type": [
"deny",
{
allowInterfaces: "never",
allowObjectTypes: "never",
},
],
"typescript/no-explicit-any": [
"deny",
{
fixToUnknown: true,
ignoreRestArgs: false,
},
],
"typescript/no-extra-non-null-assertion": "deny",
"typescript/no-extraneous-class": [
"deny",
{
allowConstructorOnly: false,
allowEmpty: false,
allowStaticOnly: false,
allowWithDecorator: false,
},
],
"typescript/no-floating-promises": [
"deny",
{
allowForKnownSafeCalls: [],
allowForKnownSafePromises: [],
checkThenables: true,
ignoreIIFE: false,
ignoreVoid: false,
},
],
"typescript/no-for-in-array": "deny",
"typescript/no-implied-eval": "deny",
"typescript/no-import-type-side-effects": "deny",
//
"typescript/no-inferrable-types": [
"deny",
{
ignoreParameters: true,
ignoreProperties: true,
},
],
"typescript/no-invalid-void-type": [
"deny",
{
allowAsThisParameter: false,
allowInGenericTypeArguments: true,
},
],
"typescript/no-meaningless-void-operator": [
"deny",
{
checkNever: true,
},
],
"typescript/no-misused-new": "deny",
"typescript/no-misused-promises": [
"deny",
{
checksConditionals: true,
checksSpreads: true,
checksVoidReturn: true,
},
],
"typescript/no-misused-spread": [
"deny",
{
allow: [],
},
],
"typescript/no-mixed-enums": "deny",
"typescript/no-namespace": [
"deny",
{
allowDeclarations: false,
allowDefinitionFiles: true,
},
],
"typescript/no-non-null-asserted-nullish-coalescing": "deny",
"typescript/no-non-null-asserted-optional-chain": "deny",
"typescript/no-non-null-assertion": "deny",
"typescript/no-redundant-type-constituents": "deny",
"typescript/no-require-imports": [
"deny",
{
allow: [],
allowAsImport: false,
},
],
"typescript/no-this-alias": [
"deny",
{
allowDestructuring: false,
allowedNames: [],
},
],
// J'apprécie de pouvoir être explicite dans la comparaison.
"typescript/no-unnecessary-boolean-literal-compare": "allow",
"typescript/no-unnecessary-condition": [
"deny",
{
allowConstantLoopConditions: "never",
checkTypePredicates: true,
},
],
"typescript/no-unnecessary-parameter-property-assignment": "deny",
"typescript/no-unnecessary-qualifier": "deny",
"typescript/no-unnecessary-template-expression": "deny",
"typescript/no-unnecessary-type-arguments": "deny",
"typescript/no-unnecessary-type-assertion": [
"deny",
{
checkLiteralConstAssertions: false,
typesToIgnore: [],
},
],
"typescript/no-unnecessary-type-constraint": "deny",
"typescript/no-unnecessary-type-conversion": "deny",
"typescript/no-unnecessary-type-parameters": "deny",
"typescript/no-unsafe-argument": "deny",
"typescript/no-unsafe-assignment": "deny",
"typescript/no-unsafe-call": "deny",
"typescript/no-unsafe-declaration-merging": "deny",
"typescript/no-unsafe-enum-comparison": "deny",
"typescript/no-unsafe-function-type": "deny",
"typescript/no-unsafe-member-access": [
"deny",
{
allowOptionalChaining: false,
},
],
"typescript/no-unsafe-return": "deny",
"typescript/no-unsafe-type-assertion": "deny",
"typescript/no-unsafe-unary-minus": "deny",
"typescript/no-useless-default-assignment": "deny",
"typescript/no-useless-empty-export": "deny",
"typescript/no-wrapper-object-types": "deny",
"typescript/non-nullable-type-assertion-style": "allow",
"typescript/only-throw-error": [
"deny",
{
allow: [],
allowRethrowing: true,
allowThrowingAny: false,
allowThrowingUnknown: false,
},
],
"typescript/parameter-properties": [
"deny",
{
prefer: "class-property",
},
],
"typescript/prefer-as-const": "deny",
"typescript/prefer-enum-initializers": "deny",
"typescript/prefer-find": "deny",
"typescript/prefer-for-of": "deny",
"typescript/prefer-function-type": "deny",
"typescript/prefer-includes": "deny",
"typescript/prefer-literal-enum-member": [
"deny",
{
allowBitwiseExpressions: false,
},
],
"typescript/prefer-nullish-coalescing": [
"deny",
{
ignoreBooleanCoercion: false,
ignoreConditionalTests: true,
ignoreIfStatements: false,
ignoreMixedLogicalExpressions: false,
ignorePrimitives: false,
ignoreTernaryTests: false,
},
],
"typescript/prefer-optional-chain": [
"deny",
{
checkAny: true,
checkBigInt: true,
checkBoolean: true,
checkNumber: true,
checkString: true,
checkUnknown: true,
requireNullish: false,
},
],
"typescript/prefer-promise-reject-errors": [
"deny",
{
allowEmptyReject: false,
allowThrowingAny: false,
allowThrowingUnknown: false,
},
],
"typescript/prefer-readonly": [
"deny",
{
onlyInlineLambdas: false,
},
],
// Nécessite trop de bruit dans le code avec l'ajout d'annotations de type `Readonly`.
"typescript/prefer-readonly-parameter-types": [
"allow",
{
allow: [],
checkParameterProperties: true,
ignoreInferredTypes: true,
treatMethodsAsReadonly: false,
},
],
"typescript/prefer-reduce-type-parameter": "deny",
"typescript/prefer-regexp-exec": "deny",
"typescript/prefer-return-this-type": "deny",
"typescript/prefer-string-starts-ends-with": ["deny", { allowSingleElementEquality: "never" }],
// Règle rendue caduque par typescript/ban-ts-comment.
"typescript/prefer-ts-expect-error": "allow",
"typescript/promise-function-async": [
"deny",
{
allowAny: false,
allowedPromiseNames: [],
checkArrowFunctions: true,
checkFunctionDeclarations: true,
checkFunctionExpressions: true,
checkMethodDeclarations: true,
},
],
"typescript/related-getter-setter-pairs": "deny",
"typescript/require-array-sort-compare": [
"deny",
{
ignoreStringArrays: true,
},
],
"typescript/require-await": "deny",
"typescript/restrict-plus-operands": [
"deny",
{
allowAny: false,
allowBoolean: false,
@ -97,9 +377,10 @@ const typeScriptRules: DummyRuleMap = {
allowRegExp: false,
},
],
"@typescript-eslint/restrict-template-expressions": [
"error",
"typescript/restrict-template-expressions": [
"deny",
{
allow: [{ from: "lib", name: ["Error", "URL", "URLSearchParams"] }],
allowAny: false,
allowBoolean: false,
allowNever: false,
@ -108,12 +389,57 @@ const typeScriptRules: DummyRuleMap = {
allowRegExp: false,
},
],
"@typescript-eslint/return-await": ["error", "error-handling-correctness-only"],
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
"typescript/return-await": ["deny", "error-handling-correctness-only"],
"typescript/strict-boolean-expressions": [
"deny",
{
allowAny: false,
allowNullableBoolean: true,
allowNullableEnum: true,
allowNullableNumber: false,
allowNullableObject: false,
allowNullableString: false,
allowNumber: false,
allowString: false,
},
],
"typescript/strict-void-return": [
"deny",
{
allowReturnAny: false,
},
],
"typescript/switch-exhaustiveness-check": [
"deny",
{
allowDefaultCaseForExhaustiveSwitch: true,
considerDefaultExhaustiveForUnions: false,
defaultCaseCommentPattern: "@skip-exhaustive-check",
requireDefaultForNonUnion: false,
},
],
"typescript/triple-slash-reference": [
"deny",
{
lib: "never",
path: "never",
types: "prefer-import",
},
],
"typescript/unbound-method": [
"deny",
{
ignoreStatic: false,
},
],
"typescript/unified-signatures": [
"deny",
{
ignoreDifferentlyNamedParameters: false,
ignoreOverloadsWithDifferentJSDoc: false,
},
],
"typescript/use-unknown-in-catch-callback-variable": "deny",
};
export default typeScriptRules;

View file

@ -1,121 +1,774 @@
import type { DummyRuleMap } from "oxlint";
const unicornRules: DummyRuleMap = {
"unicorn/catch-error-name": "error",
"unicorn/consistent-date-clone": "error",
"unicorn/consistent-empty-array-spread": "error",
"unicorn/consistent-existence-index-check": "error",
"unicorn/custom-error-definition": "error",
"unicorn/error-message": "error",
"unicorn/escape-case": "error",
/**
* This rule enforces consistent and descriptive naming for error variables in `catch` statements, preventing the use
* of vague names like `badName` or _ when the error is used.
*
* Using non-descriptive names like `badName` or _ makes the code harder to read and understand, especially when
* debugging. It's important to use clear, consistent names to represent errors.
*/
"unicorn/catch-error-name": [
"deny",
{
ignore: ["_"],
},
],
/** Enforces consistent usage of the `assert` module. */
"unicorn/consistent-assert": "deny",
/**
* The `Date` constructor can clone a `Date` object directly when passed as an argument, making timestamp conversion
* unnecessary. This rule enforces the use of the direct `Date` cloning instead of using `.getTime()` for conversion.
*
* Using `.getTime()` to convert a `Date` object to a timestamp and then back to a `Date` is redundant and
* unnecessary. Simply passing the `Date` object to the `Date` constructor is cleaner and more efficient.
*/
"unicorn/consistent-date-clone": "deny",
/**
* When spreading a ternary in an array, we can use both `[]` and `''` as fallbacks, but it's better to have
* consistent types in both branches.
*/
"unicorn/consistent-empty-array-spread": "deny",
/**
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and
* `findLastIndex()`. This ensures that comparisons are performed in a standard and clear way.
*
* This rule is meant to enforce a specific style and improve code clarity. Using inconsistent comparison styles
* (e.g., `index < 0`, `index >= 0`) can make the intention behind the code unclear, especially in large codebases.
*/
"unicorn/consistent-existence-index-check": "deny",
/**
* Disallow functions that are declared in a scope which does not capture any variables from the outer scope.
*
* Moving function declarations to the highest possible scope improves readability, directly improves performance and allows JavaScript engines to better optimize your performance.
*/
"unicorn/consistent-function-scoping": [
"deny",
{
/** Whether to check scoping with arrow functions. */
checkArrowFunctions: true,
},
],
/**
* Enforces the only valid way of `Error` subclassing. It works with any super class that ends in `Error`.
*
* Incorrectly defined custom errors can lead to unexpected behavior when catching and identifying errors. Missing
* `super()` calls, wrong `name` property values, or non-standard class names make error handling unreliable.
*/
"unicorn/custom-error-definition": "deny",
/**
* Removes the extra spaces or new line characters inside a pair of braces that does not contain additional code. This
* ensures that braces are clean and do not contain unnecessary spaces or newlines.
*
* Extra spaces inside braces can negatively impact the readability of the code. Keeping braces clean and free of
* unnecessary characters improves consistency and makes the code easier to understand and maintain.
*/
"unicorn/empty-brace-spaces": "deny",
/**
* Enforces providing a `message` when creating built-in `Error` objects to improve readability and debugging.
*
* Throwing an `Error` without a message, like throw new `Error()`, provides no context on what went wrong, making
* debugging harder. A clear error message improves code clarity and helps developers quickly identify issues.
*/
"unicorn/error-message": "deny",
/**
* Enforces defining escape sequence values with uppercase characters rather than lowercase ones. This promotes
* readability by making the escaped value more distinguishable from the identifier.
*/
"unicorn/escape-case": "deny",
/** Enforce explicitly comparing the `length` or `size` property of a value. */
"unicorn/explicit-length-check": [
"error",
"deny",
{
"non-zero": "not-equal",
},
],
"unicorn/new-for-builtins": "error",
"unicorn/no-abusive-eslint-disable": "error",
"unicorn/no-accessor-recursion": "error",
"unicorn/no-anonymous-default-export": "error",
"unicorn/no-array-method-this-argument": "error",
"unicorn/no-array-reverse": "error",
"unicorn/no-array-sort": "error",
"unicorn/no-await-in-promise-methods": "error",
"unicorn/no-console-spaces": "error",
"unicorn/no-document-cookie": "error",
"unicorn/no-empty-file": "error",
"unicorn/no-hex-escape": "error",
"unicorn/no-instanceof-builtins": "error",
"unicorn/no-invalid-fetch-options": "error",
"unicorn/no-invalid-remove-event-listener": "error",
"unicorn/no-lonely-if": "error",
"unicorn/no-magic-array-flat-depth": "error",
"unicorn/no-negated-condition": "error",
"unicorn/no-negation-in-equality-check": "error",
"unicorn/no-nested-ternary": "error",
"unicorn/no-new-array": "error",
"unicorn/no-new-buffer": "error",
"unicorn/no-null": "error",
"unicorn/no-object-as-default-parameter": "error",
"unicorn/no-process-exit": "error",
"unicorn/no-single-promise-in-promise-methods": "error",
"unicorn/no-static-only-class": "error",
"unicorn/no-thenable": "error",
"unicorn/no-this-assignment": "error",
"unicorn/no-typeof-undefined": "error",
"unicorn/no-unnecessary-array-flat-depth": "error",
"unicorn/no-unnecessary-array-splice-count": "error",
"unicorn/no-unnecessary-await": "error",
"unicorn/no-unnecessary-slice-end": "error",
"unicorn/no-unreadable-array-destructuring": "error",
"unicorn/no-unreadable-iife": "error",
"unicorn/no-useless-collection-argument": "error",
"unicorn/no-useless-error-capture-stack-trace": "error",
"unicorn/no-useless-fallback-in-spread": "error",
"unicorn/no-useless-length-check": "error",
"unicorn/no-useless-promise-resolve-reject": "error",
"unicorn/no-useless-spread": "error",
"unicorn/no-useless-switch-case": "error",
"unicorn/no-useless-undefined": "error",
"unicorn/no-zero-fractions": "error",
"unicorn/number-literal-case": "error",
"unicorn/numeric-separators-style": "error",
"unicorn/prefer-add-event-listener": "error",
"unicorn/prefer-array-find": "error",
"unicorn/prefer-array-flat": "error",
"unicorn/prefer-array-flat-map": "error",
"unicorn/prefer-array-index-of": "error",
"unicorn/prefer-array-some": "error",
"unicorn/prefer-at": "error",
"unicorn/prefer-bigint-literals": "error",
"unicorn/prefer-blob-reading-methods": "error",
"unicorn/prefer-class-fields": "error",
"unicorn/prefer-classlist-toggle": "error",
"unicorn/prefer-code-point": "error",
"unicorn/prefer-date-now": "error",
"unicorn/prefer-default-parameters": "error",
"unicorn/prefer-dom-node-append": "error",
"unicorn/prefer-dom-node-remove": "error",
"unicorn/prefer-dom-node-text-content": "error",
"unicorn/prefer-event-target": "error",
"unicorn/prefer-global-this": "error",
"unicorn/prefer-includes": "error",
"unicorn/prefer-keyboard-event-key": "error",
"unicorn/prefer-logical-operator-over-ternary": "error",
"unicorn/prefer-math-min-max": "error",
"unicorn/prefer-math-trunc": "error",
"unicorn/prefer-modern-dom-apis": "error",
"unicorn/prefer-modern-math-apis": "error",
"unicorn/prefer-module": "error",
"unicorn/prefer-native-coercion-functions": "error",
"unicorn/prefer-negative-index": "error",
"unicorn/prefer-node-protocol": "error",
"unicorn/prefer-number-properties": "error",
"unicorn/prefer-object-from-entries": "error",
"unicorn/prefer-optional-catch-binding": "error",
"unicorn/prefer-prototype-methods": "error",
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-response-static-json": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-set-size": "error",
"unicorn/prefer-string-raw": "error",
"unicorn/prefer-string-replace-all": "error",
"unicorn/prefer-string-slice": "error",
"unicorn/prefer-string-starts-ends-with": "error",
"unicorn/prefer-string-trim-start-end": "error",
"unicorn/prefer-structured-clone": "error",
"unicorn/prefer-ternary": "off",
"unicorn/prefer-top-level-await": "error",
"unicorn/prefer-type-error": "error",
"unicorn/relative-url-style": "error",
"unicorn/require-array-join-separator": "error",
"unicorn/require-module-attributes": "error",
"unicorn/require-module-specifiers": "error",
"unicorn/require-number-to-fixed-digits-argument": "error",
"unicorn/text-encoding-identifier-case": "error",
"unicorn/throw-new-error": "error",
/**
* Enforces a consistent case style for filenames to improve project organization and maintainability. By default,
* `kebab-case` is enforced, but other styles can be configured.
*
* Files named `index.js`, `index.ts`, etc. are exempt from this rule as they cannot reliably be renamed to other
* casings (mainly just a problem with PascalCase).
*
* Inconsistent file naming conventions make it harder to locate files, navigate projects, and enforce consistency
* across a codebase. Standardizing naming conventions improves readability, reduces cognitive overhead, and aligns
* with best practices in large-scale development.
*/
"unicorn/filename-case": [
"deny",
{
case: "kebabCase",
ignore: "",
multipleFileExtensions: true,
},
],
/** Enforces the use of `new` for many builtins and disallow it for some other. */
"unicorn/new-for-builtins": "deny",
/** Disallows `oxlint-disable` or `eslint-disable` comments without specifying rules. */
"unicorn/no-abusive-eslint-disable": "deny",
/**
* Disallow recursive access to `this` within getters and setters.
*
* This rule prevents recursive access to `this` within getter and setter methods in objects and classes, avoiding infinite recursion and stack overflow errors.
*/
"unicorn/no-accessor-recursion": "deny",
/** Disallows anonymous functions and classes as default exports. */
"unicorn/no-anonymous-default-export": "deny",
/**
* Prevents passing a function reference directly to iterator methods.
*
* Passing functions to iterator methods can cause issues when the function is changed without realizing that the
* iterator passes 2 more parameters to it (index and array). This can lead to unexpected behavior when the function
* signature changes.
*
* Cause des soucis avec les pipelines `Effect`.
*/
"unicorn/no-array-callback-reference": "allow",
/**
* Forbids the use of Array#forEach in favor of a for loop.
*
* Je préfère utiliser les méthodes `.forEach` dans les pipelines.
*/
"unicorn/no-array-for-each": "allow",
/**
* Disallows the use of the `thisArg` parameter in array iteration methods such as `map`, `filter`, `some`, `every`,
* and similar.
*
* The `thisArg` parameter makes code harder to understand and reason about. Instead, prefer arrow functions or bind
* explicitly in a clearer way. Arrow functions inherit `this` from the lexical scope, which is more intuitive and
* less error-prone.
*
* Cause des soucis avec les pipelines `Effect`.
*/
"unicorn/no-array-method-this-argument": "allow",
/**
* Disallow `Array#reduce()` and `Array#reduceRight()`.
*
* `reduce()` est utile dans certains cas.
*/
"unicorn/no-array-reduce": "allow",
/**
* Prefer using `Array#toReversed()` over `Array#reverse()`.
*
* `Array#reverse()` modifies the original array in place, which can lead to unintended side effectsespecially when the original array is used elsewhere in the code.
*/
"unicorn/no-array-reverse": [
"deny",
{
/** This rule allows `array.reverse()` as an expression statement by default. Set to `false` to forbid `Array#reverse()` even if it's an expression statement. */
allowExpressionStatement: false,
},
],
/**
* Prefer using `Array#toSorted()` over `Array#sort()`.
*
* `Array#sort()` modifies the original array in place, which can lead to unintended side effectsespecially when the original array is used elsewhere in the code.
*/
"unicorn/no-array-sort": [
"deny",
{
/** When set to `true` (default), allows `array.sort()` as an expression statement. Set to `false` to forbid `Array#sort()` even if it's an expression statement. */
allowExpressionStatement: false,
},
],
/**
* Disallows member access from `await` expressions.
*
* When accessing a member from an `await` expression, the `await` expression has to be parenthesized, which is not
* readable.
*/
"unicorn/no-await-expression-member": "deny",
/** Disallow using await in Promise method parameters. */
"unicorn/no-await-in-promise-methods": "deny",
/**
* Disallows leading/trailing space inside `console.log()` and similar methods.
*
* The `console.log()` method and similar methods join the parameters with a space so adding a leading/trailing space
* to a parameter, results in two spaces being added.
*/
"unicorn/no-console-spaces": "deny",
/** Disallows direct use of [`document.cookie`](https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie). */
"unicorn/no-document-cookie": "deny",
/** Disallows files that do not contain any meaningful code. */
/** Disallows files that do not contain any meaningful code. */
"unicorn/no-empty-file": "deny",
/** Enforces a convention of using Unicode escapes instead of hexadecimal escapes for consistency and clarity. */
"unicorn/no-hex-escape": "deny",
/** Disallows mutating a variable immediately after initialization. */
"unicorn/no-immediate-mutation": "deny",
/** Require `Array.isArray()` instead of `instanceof Array`. */
"unicorn/no-instanceof-array": "deny",
/**
* Disallows the use of `instanceof` with ECMAScript built-in constructors because:
*
* - it breaks across execution contexts (`iframe`, Web Worker, Node VM, etc.);
* - it is often misleading (e.g. `instanceof Array` fails for a subclass);
* - there is always a clearer and safer alternative `(Array.isArray`, `typeof`, `Buffer.isBuffer`, ).
*
* `instanceof` breaks across execution contexts (`iframe`, Web Worker, Node `vm`), and may give misleading results for subclasses or exotic objects.
*/
"unicorn/no-instanceof-builtins": [
"deny",
{
/** Constructor names to exclude from checking. */
exlude: [],
/** Additional constructor names to check beyond the default set. Use this to extend the rule with additional constructors. */
include: [],
/**
* Controls which built-in constructors are checked.
*
* - `"loose"` (default): Only checks `Array`, `Function`, `Error` (if `useErrorIsError` is `true`), and primitive wrappers;
* - `"strict"`: Additionally checks `Error` types, collections, typed arrays, and other built-in constructors.
*/
strategy: "strict",
/**
* When `true`, checks `instanceof Error` and suggests using `Error.isError()` instead. Requires the `Error.isError()` function to be available.
*/
useErrorIsError: true,
},
],
/**
* Disallow invalid options in `fetch()` and new `Request().` Specifically, this rule ensures that a body is not
* provided when the method is `GET` or `HEAD,` as it will result in a `TypeError.`
*/
"unicorn/no-invalid-fetch-options": "deny",
/** It warns when you use a non-function value as the second argument of `removeEventListener`. */
"unicorn/no-invalid-remove-event-listener": "deny",
/** Disallow using `length` as the end argument of a `slice` call. */
"unicorn/no-length-as-slice-end": "deny",
/** Disallow `if` statements as the only statement in `if` blocks without `else`. */
"unicorn/no-lonely-if": "deny",
/**
* Disallow magic numbers for
* [`Array.prototype.flat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat)
* depth.
*
* Magic numbers are hard to understand and maintain. When calling `Array.prototype.flat`, it is usually called with
* `1`, or `Infinity`. If you are using a different number, it is better to add a comment explaining the reason for
* the depth provided.
*/
"unicorn/no-magic-array-flat-depth": "deny",
"unicorn/no-negated-condition": "deny",
/** Disallow negated expressions on the left of (in)equality checks. */
"unicorn/no-negation-in-equality-check": "deny",
/**
* This rule disallows deeply nested ternary expressions. Nested ternary expressions that are only one level deep and
* wrapped in parentheses are allowed.
*
* Nesting ternary expressions can make code more difficult to understand.
*/
"unicorn/no-nested-ternary": "deny",
/** Disallow new `Array()`. */
"unicorn/no-new-array": "deny",
/** Disallows the deprecated new `Buffer()` constructor. */
"unicorn/no-new-buffer": "deny",
/**
* Disallow the use of the `null` literal, to encourage using undefined instead.
*
* There are some reasons for using `undefined` instead of `null`.
*
* - From experience, most developers use `null` and `undefined` inconsistently and interchangeably, and few know when
* to use which.
* - Supporting both `null` and `undefined` complicates input validation.
* - Using `null` makes TypeScript types more verbose: `type A = {foo?: string | null} vs type A = {foo?: string}`.
*/
"unicorn/no-null": [
"deny",
{
checkStrictEquality: true,
},
],
/** Disallow the use of an object literal as a default value for a parameter. */
"unicorn/no-object-as-default-parameter": "deny",
/**
* Disallow all usage of `process.exit()`.
*
* `process.exit()` should generally only be used in command-line utilities. In all other types of applications, the
* code should throw an error instead.
*/
"unicorn/no-process-exit": "deny",
/** Disallow passing single-element arrays to `Promise` methods. */
"unicorn/no-single-promise-in-promise-methods": "deny",
/** Disallow `class` declarations that exclusively contain `static` members. */
"unicorn/no-static-only-class": "deny",
/** Disallow defining a `then` property. */
"unicorn/no-thenable": "deny",
/** Disallow assigning `this` to a variable. */
"unicorn/no-this-assignment": "deny",
/** Disallow `typeof` comparisons with `undefined`. */
"unicorn/no-typeof-undefined": "deny",
/** Disallows passing `1` to `Array.prototype.flat`. */
"unicorn/no-unnecessary-array-flat-depth": "deny",
/**
* Disallows passing `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#splice()` or
* `Array#toSpliced()`.
*/
"unicorn/no-unnecessary-array-splice-count": "deny",
/** Disallow awaiting on non-`Promise` values. */
"unicorn/no-unnecessary-await": "deny",
/** Disallows unnecessarily passing a second argument to `slice(...)`, for cases where it would not change the result. */
"unicorn/no-unnecessary-slice-end": "deny",
/**
* Disallows destructuring values from an array in ways that are difficult to read.
*
* Destructuring can be very useful, but it can also make some code harder to read. This rule prevents ignoring
* consecutive values (e.g. `let [,,foo] = array`) when destructuring from an array.
*/
"unicorn/no-unreadable-array-destructuring": "deny",
/** This rule disallows IIFEs with a parenthesized arrow function body. */
"unicorn/no-unreadable-iife": "deny",
/**
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
*
* It is unnecessary to pass an empty array or empty string when constructing a `Set`, `Map`, `WeakSet`, or `WeakMap`,
* since they accept nullish values.
*
* It is also unnecessary to provide a fallback for possible nullish values.
*/
"unicorn/no-useless-collection-argument": "deny",
/**
* Disallows unnecessary `Error.captureStackTrace(…)` in error constructors.
*
* Calling `Error.captureStackTrace(…)` inside the constructor of a built-in `Error` subclass is unnecessary, since
* the `Error` constructor calls it automatically.
*/
"unicorn/no-useless-error-capture-stack-trace": "deny",
/** Disallow useless fallback when spreading in object litterals. */
"unicorn/no-useless-fallback-in-spread": "deny",
/** It checks for an unnecessary array length check in a logical expression. */
"unicorn/no-useless-length-check": "deny",
/**
* Disallows returning values wrapped in `Promise.resolve` or `Promise.reject` in an async function or a
* `Promise#then/catch/finally` callback.
*/
"unicorn/no-useless-promise-resolve-reject": [
"deny",
{
allowReject: false,
},
],
/**
* Disallows using spread syntax in following, unnecessary cases:
*
* - Spread an array literal as elements of an array literal
* - Spread an array literal as arguments of a call or a new call
* - Spread an object literal as properties of an object literal
* - Use spread syntax to clone an array created inline
*/
"unicorn/no-useless-spread": "deny",
/** Disallows useless `default` cases in `switch` statements. */
"unicorn/no-useless-switch-case": "deny",
/** Prevents usage of undefined in cases where it would be useless. */
"unicorn/no-useless-undefined": "deny",
/**
* Prevents the use of zero fractions.
*
* There is no difference in JavaScript between, for example, `1,` `1.0` and `1.`, so prefer the former for consistency and brevity.
*/
"unicorn/no-zero-fractions": "deny",
/**
* This rule enforces proper case for numeric literals.
*
* When both an identifier and a numeric literal are in lower case, it can be hard to differentiate between them.
*/
"unicorn/number-literal-case": "deny",
/**
* Enforces a convention of grouping digits using numeric separators.
*
* A long series of digits can be difficult to read, and it can be difficult to determine the value of the number at a glance. Breaking up the digits with numeric separators (`_`) can greatly improve readability.
*/
"unicorn/numeric-separators-style": [
"deny",
{
binary: {
groupLength: 3,
minimumDigits: 4,
},
hexadecimal: {
groupLength: 3,
minimumDigits: 4,
},
number: {
groupLength: 3,
minimumDigits: 4,
},
octal: {
groupLength: 3,
minimumDigits: 4,
},
onlyIfContainsSeparator: false,
},
],
/**
* Enforces the use of `.addEventListener()` and `.removeEventListener()` over their on-function counterparts.
*
* For example, `foo.addEventListener('click', handler);` is preferred over `foo.onclick = handler;` for HTML DOM Events.
*
* There are numerous advantages of using `addEventListener`. Some of these advantages include registering unlimited event handlers and optionally having the event handler invoked only once.
*/
"unicorn/prefer-add-event-listener": "deny",
/**
* Encourages using `Array.prototype.find` instead of `filter(...)[0]` or similar patterns when only the first
* matching element is needed.
*/
"unicorn/prefer-array-find": "deny",
/** Prefers `Array#flat()` over legacy techniques to flatten arrays. */
"unicorn/prefer-array-flat": "deny",
/** Prefers the use of `.flatMap()` when `map().flat()` are used together. */
"unicorn/prefer-array-flat-map": "deny",
/**
* Enforces using `indexOf` or `lastIndexOf` instead of `findIndex` or `findLastIndex` when the callback is a simple strict equality comparison.
*
* Using `findIndex(x => x === value)` is unnecessarily verbose when `indexOf(value)` accomplishes the same thing more concisely and clearly. It also avoids the overhead of creating a callback function.
*/
"unicorn/prefer-array-index-of": "deny",
/**
* Prefers using `Array#some()` over `Array#find()`, `Array#findLast()` with comparing to `undefined`, or
* `Array#findIndex()`, `Array#findLastIndex()` and a non-zero length check on the result of `Array#filter()`.
*/
"unicorn/prefer-array-some": "deny",
/**
* Prefer the `Array#at()` and `String#at()` methods for index access.
*
* This rule also discourages using `String#charAt()`.
*/
"unicorn/prefer-at": [
"deny",
{
/**
* Check all index access, not just special patterns like `array.length - 1`. When enabled, `array[0]`,
* `array[1]`, etc. will also be flagged.
*/
checkAllIndexAccess: true,
/**
* List of function names to treat as "get last element" functions. These functions will be checked for `.at(-1)`
* usage.
*/
getLastElementFunctions: [],
},
],
/**
* Requires using `BigInt` literals (e.g. `123n`) instead of calling the `BigInt()` constructor with literal arguments such as numbers or numeric strings.
*
* Using `BigInt(…)` with literal values is unnecessarily verbose and less idiomatic than using a `BigInt` literal.
*/
"unicorn/prefer-bigint-literals": "deny",
/**
* Recommends using `Blob#text()` and `Blob#arrayBuffer()` over `FileReader#readAsText()` and
* `FileReader#readAsArrayBuffer()`.
*/
"unicorn/prefer-blob-reading-methods": "deny",
/**
* Prefers class field declarations over `this` assignments in constructors for static values.
*
* Class field declarations are more readable and less error-prone than assigning static values to `this` in the constructor. Using class fields keeps the constructor cleaner and makes the intent clearer.
*/
"unicorn/prefer-class-fields": "deny",
/**
* Prefers the use of `element.classList.toggle(className, condition)` over conditional add/remove patterns.
*
* The `toggle()` method is more concise and expressive than using conditional logic to switch between `add()` and `remove()`.
*/
"unicorn/prefer-classlist-toggle": "deny",
/**
* Prefers usage of `String.prototype.codePointAt` over `String.prototype.charCodeAt.` Prefers usage of
* `String.fromCodePoint` over `String.fromCharCode`.
*/
"unicorn/prefer-code-point": "deny",
/** Prefers use of `Date.now()` over new `Date().getTime()` or new `Date().valueOf()`. */
"unicorn/prefer-date-now": "deny",
/**
* Instead of reassigning a function parameter, default parameters should be used. The `foo = foo || 123` statement evaluates to `123` when `foo` is falsy, possibly leading to confusing behavior, whereas default parameters only apply when passed an `undefined` value. This rule only reports reassignments to literal values.
*
*You should disable this rule if you want your functions to deal with `null` and other falsy values the same way as `undefined`. Default parameters are exclusively applied when undefined is received.. However, we recommend moving away from null.
*
* Using default parameters makes it clear that a parameter has a default value, improving code readability and maintainability.
*/
"unicorn/prefer-default-parameters": "deny",
/**
* Enforces the use of, for example, `document.body.append(div);` over `document.body.appendChild(div);` for DOM
* nodes.
*/
"unicorn/prefer-dom-node-append": "deny",
/**
* Use `.dataset` on DOM elements over `getAttribute(…)`, `.setAttribute(…)`, `.removeAttribute(…)` and
* ``.hasAttribute()`.
*/
"unicorn/prefer-dom-node-dataset": "allow",
/** Prefers the use of `child.remove()` over `parentNode.removeChild(child)`. */
"unicorn/prefer-dom-node-remove": "deny",
/**
* Enforces the use of `.textContent` over `.innerText` for DOM nodes.
*
* There are some disadvantages of using `.innerText`.
*
* - `.innerText` is much more performance-heavy as it requires layout information to return the result.
* - `.innerText` is defined only for `HTMLElement` objects, while `.textContent` is defined for all `Node` objects.
* - `.innerText` is not standard, for example, it is not present in Firefox.
*/
"unicorn/prefer-dom-node-text-content": "deny",
/**
* Prefers `EventTarget` over `EventEmitter`.
*
* This rule reduces the bundle size and makes your code more cross-platform friendly.
*/
"unicorn/prefer-event-target": "deny",
/**
* Enforces the use of `globalThis` instead of environmentspecific global object aliases `(window,` `self,` or `global`).
*
* Using the standard `globalThis` makes your code portable across browsers, Web Workers, Node.js, and future JavaScript runtimes.
*
* `window` is only defined in browser main threads, `self` is used in Web Workers, and `global` is Nodespecific. Choosing the wrong alias causes runtime crashes when the code is executed outside of its original environment.
*
* `globalThis` clearly communicates that you are referring to the global object itself rather than a particular platform.
*/
"unicorn/prefer-global-this": "deny",
/**
* Prefer `includes()` over `indexOf()` when checking for existence or non-existence. All built-ins have `.includes()` in addition to `.indexOf()`.
*
* The `.includes()` method is more readable and less error-prone than `.indexOf()`.
*/
"unicorn/prefer-includes": "deny",
/**
* Enforces the use of `KeyboardEvent#key` over `KeyboardEvent#keyCode`, which is deprecated.
*
*The `.key` property is also more semantic and readable.
*
* The `keyCode,` `which`, and `charCode` properties are deprecated and should be avoided in favor of the `key` property.
*/
"unicorn/prefer-keyboard-event-key": "deny",
/**
* This rule finds ternary expressions that can be simplified to a logical operator.
*
* Using a logical operator is shorter and simpler than a ternary expression.
*/
"unicorn/prefer-logical-operator-over-ternary": "deny",
/** Prefers use of `Math.min()` and `Math.max()` instead of ternary expressions when performing simple comparisons. */
"unicorn/prefer-math-min-max": "deny",
/** Prefers use of `Math.trunc()` instead of bitwise operations for clarity and more reliable results. */
"unicorn/prefer-math-trunc": "deny",
/**
* Enforces the use of:
*
* - `childNode.replaceWith(newNode)` over `parentNode.replaceChild(newNode, oldNode)` ;
* - `referenceNode.before(newNode)` over `parentNode.insertBefore(newNode, referenceNode)` ;
* - `referenceNode.before('text')` over `referenceNode.insertAdjacentText('beforebegin', 'text')` ;
* - `referenceNode.before(newNode)` over `referenceNode.insertAdjacentElement('beforebegin', newNode)`.
*/
"unicorn/prefer-modern-dom-apis": "deny",
/**
* Checks for usage of legacy patterns for mathematical operations.
*
* Modern JavaScript provides more concise and readable alternatives to legacy patterns.
*
* Currently, the following cases are checked:
*
* - Prefer `Math.log10(x)` over alternatives
* - Prefer `Math.hypot(…)` over alternatives
*/
"unicorn/prefer-modern-math-apis": "deny",
/**
* Prefer JavaScript modules (ESM) over CommonJS.
*
* CommonJS globals and patterns (`require`, `module`, `exports`, `__filename`, `__dirname`) make code harder to
* migrate and can block ESM-only features.
*/
"unicorn/prefer-module": "deny",
/** Prefers built in functions, over custom ones with the same functionality. */
"unicorn/prefer-native-coercion-functions": "deny",
/**
* Prefer using a negative index over `.length - index` when possible.
*
* Using a negative index with `at` or `slice` is generally more readable and concise than using `.length - index`.
*/
"unicorn/prefer-negative-index": "deny",
/**
* Prefer using the `node:protocol` when importing Node.js builtin modules.
*
* Node.js builtin modules should be imported using the `node:` protocol to avoid ambiguity with local modules.
*/
"unicorn/prefer-node-protocol": "deny",
/**
* Disallows use of parseInt(), parseFloat(), isNan(), isFinite(), Nan, Infinity and -Infinity as global variables.
*
* ECMAScript 2015 moved globals onto the Number constructor for consistency and to slightly improve them. This rule
* enforces their usage to limit the usage of globals:
*
* - `Number.parseInt()` over `parseInt()`
* - `Number.parseFloat()` over `parseFloat()`
* - `Number.isNaN()` over `isNaN()` (they have slightly different behavior)
* - `Number.isFinite()` over `isFinite()` (they have slightly different behavior)
* - `Number.NaN` over `NaN`
* - `Number.POSITIVE_INFINITY` over `Infinity`
* - `Number.NEGATIVE_INFINITY` over `-Infinity`
*/
"unicorn/prefer-number-properties": [
"deny",
{
/** If set to `true`, checks for usage of `Infinity` and `-Infinity` as global variables. */
checkInfinity: true,
/** If set to `true`, checks for usage of `NaN` as a global variable. */
checkNaN: true,
},
],
/**
* Encourages using `Object.fromEntries` when converting an array of key-value pairs into an object.
*
* Manually constructing objects from key-value pairs using `reduce` or `forEach` is more verbose, error-prone, and harder to understand. The `Object.fromEntries` method is clearer, more declarative, and built for exactly this purpose.
*/
"unicorn/prefer-object-from-entries": "deny",
/**
* Prefers omitting the catch binding parameter if it is unused.
*
* It is unnecessary to bind the error to a variable if it is not used.
*/
"unicorn/prefer-optional-catch-binding": "deny",
/**
* Borrowing a method from an instance of `Array` or `Object` is less clear than getting it from the corresponding
* prototype.
*/
"unicorn/prefer-prototype-methods": "deny",
/**
* Prefer `.querySelector()` over `.getElementById().` And prefer `.querySelectorAll()` over
* `.getElementsByClassName()`, `.getElementsByTagName()`, and `.getElementsByName()`.
*/
"unicorn/prefer-query-selector": "deny",
/**
* Disallows the use of `Function.prototype.apply()` and suggests using `Reflect.apply()` instead.
*
* `Reflect.apply()` is arguably less verbose and easier to understand. In addition, when you accept arbitrary methods, it's not safe to assume `.apply()` exists or is not overridden.
*/
"unicorn/prefer-reflect-apply": "deny",
/** Prefers `RegExp#test()` over `String#match()` and `String#exec()`. */
"unicorn/prefer-regexp-test": "deny",
/**
* Enforces the use of `Response.json()` over `new Response(JSON.stringify())`.
*
* `Response.json()` is a more concise and semantically clear way to create JSON responses. It automatically sets the correct `Content-Type` header (`application/json`) and handles serialization, making the code more maintainable and less error-prone.
*/
"unicorn/prefer-response-static-json": "deny",
/** Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence. */
"unicorn/prefer-set-has": "deny",
/** Prefer `Set#size` over `Set#length` when the `Set` is converted to an array. */
"unicorn/prefer-set-size": "deny",
/**
* Enforces the use of the spread operator (...) over outdated patterns.
*
* Using the spread operator is more concise and readable.
*/
"unicorn/prefer-spread": "deny",
/**
* Prefers use of `String.raw` to avoid escaping `\`.
*
* Excessive backslashes can make string values less readable which can be avoided by using `String.raw`.
*/
"unicorn/prefer-string-raw": "deny",
/** Prefers `String#replaceAll()` over `String#replace()` when using a regex with the global flag. */
"unicorn/prefer-string-replace-all": "deny",
/** Prefer `String#slice()` over `String#substr()` and `String#substring()`. */
"unicorn/prefer-string-slice": "deny",
/** Prefer `String#startsWith()` and `String#endsWith()` over using a regex with `/^foo/` or `/foo$/`. */
"unicorn/prefer-string-starts-ends-with": "deny",
/**
* `String#trimLeft()` and `String#trimRight()` are aliases of `String#trimStart()` and `String#trimEnd()`. This is to ensure consistency and use direction-independent wording.
*
* The `trimLeft` and `trimRight` names are confusing and inconsistent with the rest of the language.
*/
"unicorn/prefer-string-trim-start-end": "deny",
/**
* Prefer using `structuredClone` to create a deep clone.
*
* `structuredClone` is the modern way to create a deep clone of a value.
*/
"unicorn/prefer-structured-clone": "deny",
/**
* Prefers ternary expressions over simple `if/else` statements.
*
* Simple `if/else` branches for the same operation are often shorter and clearer when expressed as a ternary.
*
* Je n'aime pas les ternaires.
*/
"unicorn/prefer-ternary": "allow",
/** Prefer top-level await over top-level promises and async function calls. */
"unicorn/prefer-top-level-await": "deny",
/** Enforce throwing a `TypeError` instead of a generic `Error` after a type checking if-statement. */
"unicorn/prefer-type-error": "deny",
/**
* Enforce consistent relative URL style.
*
* When using a relative URL in `new URL()`, the URL should either never or always use the `./` prefix consistently.
*/
"unicorn/relative-url-style": [
"deny",
/* Always add a ./ prefix to the relative URL when possible. */
"always",
],
/**
* Enforce using the separator argument with `Array#join()`.
*
* It's better to make it clear what the separator is when calling `Array#join()`, instead of relying on the default comma (`','`) separator.
*/
"unicorn/require-array-join-separator": "deny",
/**
* This rule enforces non-empty attribute list in `import`/`export` statements and `import()` expressions.
*
* Import attributes are meant to provide metadata about how a module should be loaded (e.g., with `{ type: "json"
* }`). An empty attribute object provides no information and should be removed.
*/
"unicorn/require-module-attributes": "deny",
/**
* Enforce non-empty specifier list in `import` and `export` statements.
*
* Empty `import`/`export` specifiers add no value and can be confusing. If you want to import a module for side effects, use `import 'module'` instead.
*/
"unicorn/require-module-specifiers": "deny",
/** Enforce using the digits argument with `Number#toFixed()`. */
"unicorn/require-number-to-fixed-digits-argument": "deny",
/**
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
*
* Note that this rule may have false positives, as it is not capable of detecting all cases correctly without type information. As such, it may not be a good idea to enable in cases where `postMessage()` may be used with `BroadcastChannel` or worker/service worker contexts (for example, `WorkerGlobalScope#postMessage`, where the second argument is a transfer list or options object, not `targetOrigin`).
*
* When calling `window.postMessage()` without the `targetOrigin` argument, the message cannot be received by any window.
*/
"unicorn/require-post-message-target-origin": "deny",
/**
* Requires empty switch cases to omit braces, while non-empty cases must use braces. This reduces visual clutter for
* empty cases and enforces proper scoping for non-empty ones.
*
* Using braces unnecessarily for empty cases adds visual noise, while omitting braces in non-empty cases can lead to
* scoping issues.
*/
"unicorn/switch-case-braces": [
"deny",
/* Allow braces only when needed for scoping (e.g., variable or function declarations). */
"avoid",
],
/**
* Enforce consistent `break`/`return`/`continue`/`throw` position in case clauses.
*
* Enforce that terminating statements (`break`, `return`, `continue`, `throw`) appear inside the block statement of a `case` clause, not after it. This can happen when refactoring for example, removing an `if` wrapper but leaving the `break` outside the braces.
*/
"unicorn/switch-case-break-position": "deny",
/**
* This rule enforces consistent casing for text encoding identifiers, specifically:
*
* - `'utf8'` instead of `'UTF-8'` or `'utf-8'` (or `'utf-8'` if `withDash` is enabled) ;
* - `'ascii'` instead of `'ASCII'`.
*
* Inconsistent casing of encoding identifiers reduces code readability and can lead to subtle confusion across a
* codebase. Although casing is not strictly enforced by ECMAScript or Node.js, using lowercase is the conventional
* and widely recognized style.
*/
"unicorn/text-encoding-identifier-case": "deny",
/**
* This rule makes sure you always use new when throwing an error.
*
* In JavaScript, omitting `new` (e.g., `throw Error('message')`) is allowed, but it does not properly initialize the
* error object. This can lead to missing stack traces or incorrect prototype chains. Using `new` makes the intent
* clear, ensures consistent behavior, and helps avoid subtle bugs.
*/
"unicorn/throw-new-error": "deny",
};
export default unicornRules;