0.0.2
en cours: règles ESLint/Oxlint - eslint OK - imports EN COURS
This commit is contained in:
parent
63781a6119
commit
93dd909919
14 changed files with 2293 additions and 1509 deletions
85
bun.lock
85
bun.lock
|
|
@ -6,8 +6,8 @@
|
||||||
"name": "@gcch/configuration-oxlint",
|
"name": "@gcch/configuration-oxlint",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"globals": "^17.4.0",
|
"globals": "^17.4.0",
|
||||||
"oxlint": "^1.57.0",
|
"oxlint": "^1.58.0",
|
||||||
"oxlint-tsgolint": "^0.18.1",
|
"oxlint-tsgolint": "^0.19.0",
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@arethetypeswrong/core": "^0.18.2",
|
"@arethetypeswrong/core": "^0.18.2",
|
||||||
|
|
@ -15,16 +15,27 @@
|
||||||
"@gcch/configuration-prettier": "git+https://git.gcch.fr/gcch/configuration-prettier#91d4573bff",
|
"@gcch/configuration-prettier": "git+https://git.gcch.fr/gcch/configuration-prettier#91d4573bff",
|
||||||
"@types/bun": "^1.3.11",
|
"@types/bun": "^1.3.11",
|
||||||
"@types/node": "^25.5.0",
|
"@types/node": "^25.5.0",
|
||||||
"eslint-plugin-astro": "^1.6.0",
|
"eslint-plugin-functional": "^9.0.4",
|
||||||
"knip": "^6.1.0",
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
||||||
|
"eslint-plugin-perfectionist": "^5.7.0",
|
||||||
|
"eslint-plugin-sonarjs": "^4.0.2",
|
||||||
|
"knip": "^6.1.1",
|
||||||
"prettier": "^3.8.1",
|
"prettier": "^3.8.1",
|
||||||
"publint": "^0.3.18",
|
"publint": "^0.3.18",
|
||||||
"tsdown": "^0.21.7",
|
"tsdown": "^0.21.7",
|
||||||
"typescript": "^6.0.2",
|
"typescript": "^6.0.2",
|
||||||
},
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"eslint-plugin-astro": "^1.6.0",
|
||||||
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"oxlint": "^1.57.0",
|
"eslint-plugin-astro": "^1.6.0",
|
||||||
"oxlint-tsgolint": "^0.18.1",
|
"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",
|
||||||
|
"oxlint": "^1.58.0",
|
||||||
|
"oxlint-tsgolint": "^0.19.0",
|
||||||
"typescript": "^6.0.2",
|
"typescript": "^6.0.2",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -189,55 +200,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=="],
|
"@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.18.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-CxSd15ZwHn70UJFTXVvy76bZ9zwI097cVyjvUFmYRJwvkQF3VnrTf2oe1gomUacErksvtqLgn9OKvZhLMYwvog=="],
|
"@oxlint-tsgolint/darwin-arm64": ["@oxlint-tsgolint/darwin-arm64@0.19.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-FVOIp5Njte8Z6PpINz7sL5blqSro0pAL8VAHYQ+K5Xm4cOrPQ6DGIhH14oXnbRjzn8Kl69qjz8TPteyn8EqwsQ=="],
|
||||||
|
|
||||||
"@oxlint-tsgolint/darwin-x64": ["@oxlint-tsgolint/darwin-x64@0.18.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-LE7VW/T/VcKhl3Z1ev5BusrxdlQ3DWweSeOB+qpBeur2h8+vCWq+M7tCO29C7lveBDfx1+rNwj4aiUVlA+Qs+g=="],
|
"@oxlint-tsgolint/darwin-x64": ["@oxlint-tsgolint/darwin-x64@0.19.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-GakDTDACePvqOFq3N4oQCl8SyMMa7VBnqV0gDcXPuK50jdWCUqlxM9tgRJarjyIVvmDEJRGYOen+4uBtVwg4Aw=="],
|
||||||
|
|
||||||
"@oxlint-tsgolint/linux-arm64": ["@oxlint-tsgolint/linux-arm64@0.18.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-2AG8YIXVJJbnM0rcsJmzzWOjZXBu5REwowgUpbHZueF7OYM3wR7Xu8pXEpAojEHAtYYZ3X4rpPoetomkJx7kCw=="],
|
"@oxlint-tsgolint/linux-arm64": ["@oxlint-tsgolint/linux-arm64@0.19.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-Ya0R7somo+KDhhkPtENJ9Q28Fost+aqA3MPe86pEqgmukHFc/KO65PgShOSbIFjZNptELEQvsWL8gDxYZWhH3w=="],
|
||||||
|
|
||||||
"@oxlint-tsgolint/linux-x64": ["@oxlint-tsgolint/linux-x64@0.18.1", "", { "os": "linux", "cpu": "x64" }, "sha512-f8vDYPEdiwpA2JaDEkadTXfuqIgweQ8zcL4SX75EN2kkW2oAynjN7cd8m86uXDgB0JrcyOywbRtwnXdiIzXn2A=="],
|
"@oxlint-tsgolint/linux-x64": ["@oxlint-tsgolint/linux-x64@0.19.0", "", { "os": "linux", "cpu": "x64" }, "sha512-yFH378jWc1k/oJmpk+TKpWbKvFieJJvsOHxVMSNFc+ukqs44ZSHVt4HFfAhXAt/bzVK2f7EIDTGp8Hm1OjoJ6Q=="],
|
||||||
|
|
||||||
"@oxlint-tsgolint/win32-arm64": ["@oxlint-tsgolint/win32-arm64@0.18.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-fBdML05KMDAL9ebWeoHIzkyI86Eq6r9YH5UDRuXJ9vAIo1EnKo0ti7hLUxNdc2dy2FF/T4k98p5wkkXvLyXqfA=="],
|
"@oxlint-tsgolint/win32-arm64": ["@oxlint-tsgolint/win32-arm64@0.19.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-R6NyAtha7OWxh7NGBeFxqDTGAVl1Xj4xLa8Qj39PKbIDqBeVW8BIb+1nEnRp+Mo/VpRoeoFAcqlBsuMcUMd26Q=="],
|
||||||
|
|
||||||
"@oxlint-tsgolint/win32-x64": ["@oxlint-tsgolint/win32-x64@0.18.1", "", { "os": "win32", "cpu": "x64" }, "sha512-cYZMhNrsq9ZZ3OUWHyawqiS+c8HfieYG0zuZP2LbEuWWPfdZM/22iAlo608J+27G1s9RXQhvgX6VekwWbXbD7A=="],
|
"@oxlint-tsgolint/win32-x64": ["@oxlint-tsgolint/win32-x64@0.19.0", "", { "os": "win32", "cpu": "x64" }, "sha512-2ePvxcbS5tPOmrQvxR8Kc+IqzdTtlrGeMDv+jjTYfkTFPmh2rF9yxVchi/4WM6js3gt2UauQeMV/tfnZNemENQ=="],
|
||||||
|
|
||||||
"@oxlint/binding-android-arm-eabi": ["@oxlint/binding-android-arm-eabi@1.57.0", "", { "os": "android", "cpu": "arm" }, "sha512-C7EiyfAJG4B70496eV543nKiq5cH0o/xIh/ufbjQz3SIvHhlDDsyn+mRFh+aW8KskTyUpyH2LGWL8p2oN6bl1A=="],
|
"@oxlint/binding-android-arm-eabi": ["@oxlint/binding-android-arm-eabi@1.58.0", "", { "os": "android", "cpu": "arm" }, "sha512-1T7UN3SsWWxpWyWGn1cT3ASNJOo+pI3eUkmEl7HgtowapcV8kslYpFQcYn431VuxghXakPNlbjRwhqmR37PFOg=="],
|
||||||
|
|
||||||
"@oxlint/binding-android-arm64": ["@oxlint/binding-android-arm64@1.57.0", "", { "os": "android", "cpu": "arm64" }, "sha512-9i80AresjZ/FZf5xK8tKFbhQnijD4s1eOZw6/FHUwD59HEZbVLRc2C88ADYJfLZrF5XofWDiRX/Ja9KefCLy7w=="],
|
"@oxlint/binding-android-arm64": ["@oxlint/binding-android-arm64@1.58.0", "", { "os": "android", "cpu": "arm64" }, "sha512-GryzujxuiRv2YFF7bRy8mKcxlbuAN+euVUtGJt9KKbLT8JBUIosamVhcthLh+VEr6KE6cjeVMAQxKAzJcoN7dg=="],
|
||||||
|
|
||||||
"@oxlint/binding-darwin-arm64": ["@oxlint/binding-darwin-arm64@1.57.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-0eUfhRz5L2yKa9I8k3qpyl37XK3oBS5BvrgdVIx599WZK63P8sMbg+0s4IuxmIiZuBK68Ek+Z+gcKgeYf0otsg=="],
|
"@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-x64": ["@oxlint/binding-darwin-x64@1.57.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-UvrSuzBaYOue+QMAcuDITe0k/Vhj6KZGjfnI6x+NkxBTke/VoM7ZisaxgNY0LWuBkTnd1OmeQfEQdQ48fRjkQg=="],
|
"@oxlint/binding-darwin-x64": ["@oxlint/binding-darwin-x64@1.58.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-EqdtJSiHweS2vfILNrpyJ6HUwpEq2g7+4Zx1FPi4hu3Hu7tC3znF6ufbXO8Ub2LD4mGgznjI7kSdku9NDD1Mkg=="],
|
||||||
|
|
||||||
"@oxlint/binding-freebsd-x64": ["@oxlint/binding-freebsd-x64@1.57.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-wtQq0dCoiw4bUwlsNVDJJ3pxJA218fOezpgtLKrbQqUtQJcM9yP8z+I9fu14aHg0uyAxIY+99toL6uBa2r7nxA=="],
|
"@oxlint/binding-freebsd-x64": ["@oxlint/binding-freebsd-x64@1.58.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-VQt5TH4M42mY20F545G637RKxV/yjwVtKk2vfXuazfReSIiuvWBnv+FVSvIV5fKVTJNjt3GSJibh6JecbhGdBw=="],
|
||||||
|
|
||||||
"@oxlint/binding-linux-arm-gnueabihf": ["@oxlint/binding-linux-arm-gnueabihf@1.57.0", "", { "os": "linux", "cpu": "arm" }, "sha512-qxFWl2BBBFcT4djKa+OtMdnLgoHEJXpqjyGwz8OhW35ImoCwR5qtAGqApNYce5260FQqoAHW8S8eZTjiX67Tsg=="],
|
"@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-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.57.0", "", { "os": "linux", "cpu": "arm" }, "sha512-SQoIsBU7J0bDW15/f0/RvxHfY3Y0+eB/caKBQtNFbuerTiA6JCYx9P1MrrFTwY2dTm/lMgTSgskvCEYk2AtG/Q=="],
|
"@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.58.0", "", { "os": "linux", "cpu": "arm" }, "sha512-0BeuFfwlUHlJ1xpEdSD1YO3vByEFGPg36uLjK1JgFaxFb4W6w17F8ET8sz5cheZ4+x5f2xzdnRrrWv83E3Yd8g=="],
|
||||||
|
|
||||||
"@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.57.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-jqxYd1W6WMeozsCmqe9Rzbu3SRrGTyGDAipRlRggetyYbUksJqJKvUNTQtZR/KFoJPb+grnSm5SHhdWrywv3RQ=="],
|
"@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.58.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-TXlZgnPTlxrQzxG9ZXU7BNwx1Ilrr17P3GwZY0If2EzrinqRH3zXPc3HrRcBJgcsoZNMuNL5YivtkJYgp467UQ=="],
|
||||||
|
|
||||||
"@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.57.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-i66WyEPVEvq9bxRUCJ/MP5EBfnTDN3nhwEdFZFTO5MmLLvzngfWEG3NSdXQzTT3vk5B9i6C2XSIYBh+aG6uqyg=="],
|
"@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.58.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-zSoYRo5dxHLcUx93Stl2hW3hSNjPt99O70eRVWt5A1zwJ+FPjeCCANCD2a9R4JbHsdcl11TIQOjyigcRVOH2mw=="],
|
||||||
|
|
||||||
"@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.57.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-oMZDCwz4NobclZU3pH+V1/upVlJZiZvne4jQP+zhJwt+lmio4XXr4qG47CehvrW1Lx2YZiIHuxM2D4YpkG3KVA=="],
|
"@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.58.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-NQ0U/lqxH2/VxBYeAIvMNUK1y0a1bJ3ZicqkF2c6wfakbEciP9jvIE4yNzCFpZaqeIeRYaV7AVGqEO1yrfVPjA=="],
|
||||||
|
|
||||||
"@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.57.0", "", { "os": "linux", "cpu": "none" }, "sha512-uoBnjJ3MMEBbfnWC1jSFr7/nSCkcQYa72NYoNtLl1imshDnWSolYCjzb8LVCwYCCfLJXD+0gBLD7fyC14c0+0g=="],
|
"@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-musl": ["@oxlint/binding-linux-riscv64-musl@1.57.0", "", { "os": "linux", "cpu": "none" }, "sha512-BdrwD7haPZ8a9KrZhKJRSj6jwCor+Z8tHFZ3PT89Y3Jq5v3LfMfEePeAmD0LOTWpiTmzSzdmyw9ijneapiVHKQ=="],
|
"@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.58.0", "", { "os": "linux", "cpu": "none" }, "sha512-CDze3pi1OO3Wvb/QsXjmLEY4XPKGM6kIo82ssNOgmcl1IdndF9VSGAE38YLhADWmOac7fjqhBw82LozuUVxD0Q=="],
|
||||||
|
|
||||||
"@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.57.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-BNs+7ZNsRstVg2tpNxAXfMX/Iv5oZh204dVyb8Z37+/gCh+yZqNTlg6YwCLIMPSk5wLWIGOaQjT0GUOahKYImw=="],
|
"@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-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.57.0", "", { "os": "linux", "cpu": "x64" }, "sha512-AghS18w+XcENcAX0+BQGLiqjpqpaxKJa4cWWP0OWNLacs27vHBxu7TYkv9LUSGe5w8lOJHeMxcYfZNOAPqw2bg=="],
|
"@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.58.0", "", { "os": "linux", "cpu": "x64" }, "sha512-0/yYpkq9VJFCEcuRlrViGj8pJUFFvNS4EkEREaN7CB1EcLXJIaVSSa5eCihwBGXtOZxhnblWgxks9juRdNQI7w=="],
|
||||||
|
|
||||||
"@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.57.0", "", { "os": "linux", "cpu": "x64" }, "sha512-E/FV3GB8phu/Rpkhz5T96hAiJlGzn91qX5yj5gU754P5cmVGXY1Jw/VSjDSlZBCY3VHjsVLdzgdkJaomEmcNOg=="],
|
"@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.58.0", "", { "os": "linux", "cpu": "x64" }, "sha512-hr6FNvmcAXiH+JxSvaJ4SJ1HofkdqEElXICW9sm3/Rd5eC3t7kzvmLyRAB3NngKO2wzXRCAm4Z/mGWfrsS4X8w=="],
|
||||||
|
|
||||||
"@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.57.0", "", { "os": "none", "cpu": "arm64" }, "sha512-xvZ2yZt0nUVfU14iuGv3V25jpr9pov5N0Wr28RXnHFxHCRxNDMtYPHV61gGLhN9IlXM96gI4pyYpLSJC5ClLCQ=="],
|
"@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.58.0", "", { "os": "none", "cpu": "arm64" }, "sha512-R+O368VXgRql1K6Xar+FEo7NEwfo13EibPMoTv3sesYQedRXd6m30Dh/7lZMxnrQVFfeo4EOfYIP4FpcgWQNHg=="],
|
||||||
|
|
||||||
"@oxlint/binding-win32-arm64-msvc": ["@oxlint/binding-win32-arm64-msvc@1.57.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-Z4D8Pd0AyHBKeazhdIXeUUy5sIS3Mo0veOlzlDECg6PhRRKgEsBJCCV1n+keUZtQ04OP+i7+itS3kOykUyNhDg=="],
|
"@oxlint/binding-win32-arm64-msvc": ["@oxlint/binding-win32-arm64-msvc@1.58.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-Q0FZiAY/3c4YRj4z3h9K1PgaByrifrfbBoODSeX7gy97UtB7pySPUQfC2B/GbxWU6k7CzQrRy5gME10PltLAFQ=="],
|
||||||
|
|
||||||
"@oxlint/binding-win32-ia32-msvc": ["@oxlint/binding-win32-ia32-msvc@1.57.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-StOZ9nFMVKvevicbQfql6Pouu9pgbeQnu60Fvhz2S6yfMaii+wnueLnqQ5I1JPgNF0Syew4voBlAaHD13wH6tw=="],
|
"@oxlint/binding-win32-ia32-msvc": ["@oxlint/binding-win32-ia32-msvc@1.58.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-Y8FKBABrSPp9H0QkRLHDHOSUgM/309a3IvOVgPcVxYcX70wxJrk608CuTg7w+C6vEd724X5wJoNkBcGYfH7nNQ=="],
|
||||||
|
|
||||||
"@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.57.0", "", { "os": "win32", "cpu": "x64" }, "sha512-6PuxhYgth8TuW0+ABPOIkGdBYw+qYGxgIdXPHSVpiCDm+hqTTWCmC739St1Xni0DJBt8HnSHTG67i1y6gr8qrA=="],
|
"@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.58.0", "", { "os": "win32", "cpu": "x64" }, "sha512-bCn5rbiz5My+Bj7M09sDcnqW0QJyINRVxdZ65x1/Y2tGrMwherwK/lpk+HRQCKvXa8pcaQdF5KY5j54VGZLwNg=="],
|
||||||
|
|
||||||
"@pkgr/core": ["@pkgr/core@0.2.9", "", {}, "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA=="],
|
"@pkgr/core": ["@pkgr/core@0.2.9", "", {}, "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA=="],
|
||||||
|
|
||||||
|
|
@ -473,7 +484,7 @@
|
||||||
|
|
||||||
"escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="],
|
"escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="],
|
||||||
|
|
||||||
"escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],
|
"escape-string-regexp": ["escape-string-regexp@5.0.0", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="],
|
||||||
|
|
||||||
"eslint": ["eslint@10.1.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", "@eslint/config-array": "^0.23.3", "@eslint/config-helpers": "^0.5.3", "@eslint/core": "^1.1.1", "@eslint/plugin-kit": "^0.6.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.14.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^9.1.2", "eslint-visitor-keys": "^5.0.1", "espree": "^11.2.0", "esquery": "^1.7.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "minimatch": "^10.2.4", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-S9jlY/ELKEUwwQnqWDO+f+m6sercqOPSqXM5Go94l7DOmxHVDgmSFGWEzeE/gwgTAr0W103BWt0QLe/7mabIvA=="],
|
"eslint": ["eslint@10.1.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", "@eslint/config-array": "^0.23.3", "@eslint/config-helpers": "^0.5.3", "@eslint/core": "^1.1.1", "@eslint/plugin-kit": "^0.6.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.14.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^9.1.2", "eslint-visitor-keys": "^5.0.1", "espree": "^11.2.0", "esquery": "^1.7.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "minimatch": "^10.2.4", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-S9jlY/ELKEUwwQnqWDO+f+m6sercqOPSqXM5Go94l7DOmxHVDgmSFGWEzeE/gwgTAr0W103BWt0QLe/7mabIvA=="],
|
||||||
|
|
||||||
|
|
@ -667,7 +678,7 @@
|
||||||
|
|
||||||
"keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="],
|
"keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="],
|
||||||
|
|
||||||
"knip": ["knip@6.1.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-n5eVbJP7HXmwTsiJcELWJe2O1ESxyCTNxJzRTIECDYDTM465qnqk7fL2dv6ae3NUFvFWorZvGlh9mcwxwJ5Xgw=="],
|
"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=="],
|
||||||
|
|
||||||
"language-subtag-registry": ["language-subtag-registry@0.3.23", "", {}, "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ=="],
|
"language-subtag-registry": ["language-subtag-registry@0.3.23", "", {}, "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ=="],
|
||||||
|
|
||||||
|
|
@ -773,9 +784,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=="],
|
"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.57.0", "", { "optionalDependencies": { "@oxlint/binding-android-arm-eabi": "1.57.0", "@oxlint/binding-android-arm64": "1.57.0", "@oxlint/binding-darwin-arm64": "1.57.0", "@oxlint/binding-darwin-x64": "1.57.0", "@oxlint/binding-freebsd-x64": "1.57.0", "@oxlint/binding-linux-arm-gnueabihf": "1.57.0", "@oxlint/binding-linux-arm-musleabihf": "1.57.0", "@oxlint/binding-linux-arm64-gnu": "1.57.0", "@oxlint/binding-linux-arm64-musl": "1.57.0", "@oxlint/binding-linux-ppc64-gnu": "1.57.0", "@oxlint/binding-linux-riscv64-gnu": "1.57.0", "@oxlint/binding-linux-riscv64-musl": "1.57.0", "@oxlint/binding-linux-s390x-gnu": "1.57.0", "@oxlint/binding-linux-x64-gnu": "1.57.0", "@oxlint/binding-linux-x64-musl": "1.57.0", "@oxlint/binding-openharmony-arm64": "1.57.0", "@oxlint/binding-win32-arm64-msvc": "1.57.0", "@oxlint/binding-win32-ia32-msvc": "1.57.0", "@oxlint/binding-win32-x64-msvc": "1.57.0" }, "peerDependencies": { "oxlint-tsgolint": ">=0.15.0" }, "optionalPeers": ["oxlint-tsgolint"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-DGFsuBX5MFZX9yiDdtKjTrYPq45CZ8Fft6qCltJITYZxfwYjVdGf/6wycGYTACloauwIPxUnYhBVeZbHvleGhw=="],
|
"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-tsgolint": ["oxlint-tsgolint@0.18.1", "", { "optionalDependencies": { "@oxlint-tsgolint/darwin-arm64": "0.18.1", "@oxlint-tsgolint/darwin-x64": "0.18.1", "@oxlint-tsgolint/linux-arm64": "0.18.1", "@oxlint-tsgolint/linux-x64": "0.18.1", "@oxlint-tsgolint/win32-arm64": "0.18.1", "@oxlint-tsgolint/win32-x64": "0.18.1" }, "bin": { "tsgolint": "bin/tsgolint.js" } }, "sha512-Hgb0wMfuXBYL0ddY+1hAG8IIfC40ADwPnBuUaC6ENAuCtTF4dHwsy7mCYtQ2e7LoGvfoSJRY0+kqQRiembJ/jQ=="],
|
"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=="],
|
||||||
|
|
||||||
"p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="],
|
"p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="],
|
||||||
|
|
||||||
|
|
@ -1003,6 +1014,8 @@
|
||||||
|
|
||||||
"clean-regexp/escape-string-regexp": ["escape-string-regexp@1.0.5", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="],
|
"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=="],
|
||||||
|
|
||||||
"eslint/eslint-scope": ["eslint-scope@9.1.2", "", { "dependencies": { "@types/esrecurse": "^4.3.1", "@types/estree": "^1.0.8", "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ=="],
|
"eslint/eslint-scope": ["eslint-scope@9.1.2", "", { "dependencies": { "@types/esrecurse": "^4.3.1", "@types/estree": "^1.0.8", "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ=="],
|
||||||
|
|
||||||
"eslint/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="],
|
"eslint/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="],
|
||||||
|
|
@ -1013,7 +1026,7 @@
|
||||||
|
|
||||||
"eslint-plugin-astro/globals": ["globals@16.5.0", "", {}, "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ=="],
|
"eslint-plugin-astro/globals": ["globals@16.5.0", "", {}, "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ=="],
|
||||||
|
|
||||||
"eslint-plugin-functional/escape-string-regexp": ["escape-string-regexp@5.0.0", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="],
|
"eslint-plugin-jsdoc/escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],
|
||||||
|
|
||||||
"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-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=="],
|
||||||
|
|
||||||
|
|
|
||||||
998
dist/index.mjs
vendored
998
dist/index.mjs
vendored
File diff suppressed because it is too large
Load diff
771
index.ts
771
index.ts
|
|
@ -1,14 +1,22 @@
|
||||||
import { defineConfig } from "oxlint";
|
import { defineConfig } from "oxlint";
|
||||||
import type { OxlintConfig } 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";
|
||||||
|
|
||||||
const config: OxlintConfig = defineConfig({
|
const config: OxlintConfig = defineConfig({
|
||||||
categories: {
|
categories: {
|
||||||
correctness: "warn",
|
correctness: "off",
|
||||||
nursery: "warn",
|
nursery: "off",
|
||||||
pedantic: "warn",
|
pedantic: "off",
|
||||||
perf: "error",
|
perf: "off",
|
||||||
style: "error",
|
style: "off",
|
||||||
suspicious: "error",
|
suspicious: "off",
|
||||||
},
|
},
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
|
|
@ -16,754 +24,23 @@ const config: OxlintConfig = defineConfig({
|
||||||
es2026: true,
|
es2026: true,
|
||||||
node: true,
|
node: true,
|
||||||
},
|
},
|
||||||
ignorePatterns: ["dist/**/*"],
|
ignorePatterns: [".astro", ".cache", "dist/**/*"],
|
||||||
jsPlugins: ["eslint-plugin-functional", "eslint-plugin-sonarjs", "eslint-plugin-perfectionist"],
|
jsPlugins: ["eslint-plugin-functional", "eslint-plugin-perfectionist", "eslint-plugin-sonarjs"],
|
||||||
options: {
|
options: {
|
||||||
reportUnusedDisableDirectives: "warn",
|
reportUnusedDisableDirectives: "warn",
|
||||||
typeAware: true,
|
typeAware: true,
|
||||||
typeCheck: false,
|
typeCheck: false,
|
||||||
},
|
},
|
||||||
overrides: [
|
overrides: [astroConfig],
|
||||||
{
|
|
||||||
env: {
|
|
||||||
astro: true,
|
|
||||||
},
|
|
||||||
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/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/prefer-split-class-list": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
splitLiteral: false,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"astro/sort-attributes": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
ignoreCase: false,
|
|
||||||
order: "asc",
|
|
||||||
type: "alphabetical",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"astro/valid-compile": "error",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
plugins: ["import", "jsdoc", "node", "oxc", "promise", "typescript", "unicorn"],
|
plugins: ["import", "jsdoc", "node", "oxc", "promise", "typescript", "unicorn"],
|
||||||
rules: {
|
rules: {
|
||||||
"@typescript-eslint/adjacent-overload-signatures": "error",
|
...esLintRules,
|
||||||
"@typescript-eslint/array-type": [
|
...functionalRules,
|
||||||
"error",
|
...jsDocRules,
|
||||||
{
|
...sonarJsRules,
|
||||||
default: "generic",
|
...perfectionistRules,
|
||||||
readonly: "generic",
|
...typeScriptRules,
|
||||||
},
|
...unicornRules,
|
||||||
],
|
|
||||||
"@typescript-eslint/await-thenable": "error",
|
|
||||||
"@typescript-eslint/ban-ts-comment": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
minimumDescriptionLength: 10,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"@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",
|
|
||||||
{
|
|
||||||
allowAny: false,
|
|
||||||
allowBoolean: false,
|
|
||||||
allowNullish: false,
|
|
||||||
allowNumberAndString: false,
|
|
||||||
allowRegExp: false,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"@typescript-eslint/restrict-template-expressions": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
allowAny: false,
|
|
||||||
allowBoolean: false,
|
|
||||||
allowNever: false,
|
|
||||||
allowNullish: false,
|
|
||||||
allowNumber: false,
|
|
||||||
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",
|
|
||||||
"array-callback-return": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
allowVoid: true,
|
|
||||||
checkForEach: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"eslint/no-duplicate-imports": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
allowSeparateTypeImports: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
// Rentre en conflit avec perfectionnist.
|
|
||||||
"eslint/sort-imports": "off",
|
|
||||||
"for-direction": "error",
|
|
||||||
"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"],
|
|
||||||
"jsdoc/check-access": "warn",
|
|
||||||
"jsdoc/check-property-names": "warn",
|
|
||||||
"jsdoc/check-tag-names": [
|
|
||||||
"warn",
|
|
||||||
{
|
|
||||||
definedTags: ["link"],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"jsdoc/empty-tags": "warn",
|
|
||||||
"jsdoc/implements-on-classes": "warn",
|
|
||||||
"jsdoc/no-defaults": "warn",
|
|
||||||
"jsdoc/require-param": "warn",
|
|
||||||
"jsdoc/require-param-description": "warn",
|
|
||||||
"jsdoc/require-param-name": "warn",
|
|
||||||
"jsdoc/require-property": "warn",
|
|
||||||
"jsdoc/require-property-description": "warn",
|
|
||||||
"jsdoc/require-property-name": "warn",
|
|
||||||
"jsdoc/require-returns": "warn",
|
|
||||||
"jsdoc/require-returns-description": "warn",
|
|
||||||
"jsdoc/require-yields": "warn",
|
|
||||||
"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-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",
|
|
||||||
"perfectionist/sort-array-includes": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-classes": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-decorators": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-enums": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-export-attributes": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-exports": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-heritage-clauses": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-import-attributes": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-interfaces": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-intersection-types": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-jsx-props": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-maps": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-modules": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-named-exports": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-named-imports": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-object-types": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-objects": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-sets": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-switch-case": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-union-types": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"perfectionist/sort-variable-declarations": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
order: "asc",
|
|
||||||
type: "natural",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"prefer-const": "error",
|
|
||||||
"prefer-rest-params": "error",
|
|
||||||
"prefer-spread": "error",
|
|
||||||
"preserve-caught-error": "error",
|
|
||||||
"require-yield": "error",
|
|
||||||
"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",
|
|
||||||
"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",
|
|
||||||
"unicorn/explicit-length-check": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"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": "error",
|
|
||||||
"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",
|
|
||||||
"use-isnan": "error",
|
|
||||||
"valid-typeof": "error",
|
|
||||||
yoda: ["error", "never"],
|
|
||||||
},
|
},
|
||||||
settings: {},
|
settings: {},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
26
justfile
26
justfile
|
|
@ -15,16 +15,26 @@ format:
|
||||||
update:
|
update:
|
||||||
bun update --interactive
|
bun update --interactive
|
||||||
|
|
||||||
# Analyse le code TypeScript avec Oxlint.
|
# Reporte les soucis du code TypeScript avec Oxlint.
|
||||||
lint-js:
|
lint-js:
|
||||||
|
bun --bun oxlint \
|
||||||
|
--config cfg/oxlint.config.ts
|
||||||
|
|
||||||
|
# Fixe le code TypeScript avec Oxlint.
|
||||||
|
fix-js:
|
||||||
bun --bun oxlint \
|
bun --bun oxlint \
|
||||||
--config cfg/oxlint.config.ts \
|
--config cfg/oxlint.config.ts \
|
||||||
--fix-dangerously
|
--fix-dangerously
|
||||||
|
|
||||||
# Analyse le code mort et les dépendances inutilisées du projet.
|
# Analyse le code mort et les dépendances inutilisées du projet.
|
||||||
find-dead-code:
|
find-dead-code:
|
||||||
-bun --bun knip --cache --cache-location ".cache/knipcache" --strict
|
-bun --bun knip \
|
||||||
-bun --bun knip --cache --cache-location ".cache/knipcache" --production --strict
|
--cache --cache-location ".cache/knipcache" \
|
||||||
|
--strict
|
||||||
|
-bun --bun knip \
|
||||||
|
--cache --cache-location ".cache/knipcache" \
|
||||||
|
--production \
|
||||||
|
--strict
|
||||||
|
|
||||||
# Compile le projet.
|
# Compile le projet.
|
||||||
build:
|
build:
|
||||||
|
|
@ -32,17 +42,9 @@ build:
|
||||||
--config "cfg/tsdown.config.ts" \
|
--config "cfg/tsdown.config.ts" \
|
||||||
--attw --publint
|
--attw --publint
|
||||||
|
|
||||||
# Nettoie le dosiser de compilation.
|
# Nettoie le dossier de compilation.
|
||||||
clean:
|
clean:
|
||||||
rm -rf .cache/
|
rm -rf .cache/
|
||||||
rm -rf bun.lock
|
rm -rf bun.lock
|
||||||
rm -rf node_modules/
|
rm -rf node_modules/
|
||||||
rm -rfv dist/
|
rm -rfv dist/
|
||||||
|
|
||||||
# Nettoie le dossier de cache.
|
|
||||||
clean-cache:
|
|
||||||
rm -rf .cache/
|
|
||||||
|
|
||||||
# Publie le paquet sur le registre local.
|
|
||||||
publish:
|
|
||||||
npm publish --registry http://localhost:4873
|
|
||||||
|
|
|
||||||
14
package.json
14
package.json
|
|
@ -17,14 +17,14 @@
|
||||||
"eslint-plugin-jsx-a11y": "^6.10.2",
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
||||||
"eslint-plugin-perfectionist": "^5.7.0",
|
"eslint-plugin-perfectionist": "^5.7.0",
|
||||||
"eslint-plugin-sonarjs": "^4.0.2",
|
"eslint-plugin-sonarjs": "^4.0.2",
|
||||||
"oxlint": "^1.57.0",
|
"oxlint": "^1.58.0",
|
||||||
"oxlint-tsgolint": "^0.18.1",
|
"oxlint-tsgolint": "^0.19.0",
|
||||||
"typescript": "^6.0.2"
|
"typescript": "^6.0.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"globals": "^17.4.0",
|
"globals": "^17.4.0",
|
||||||
"oxlint": "^1.57.0",
|
"oxlint": "^1.58.0",
|
||||||
"oxlint-tsgolint": "^0.18.1"
|
"oxlint-tsgolint": "^0.19.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"eslint-plugin-astro": "^1.6.0"
|
"eslint-plugin-astro": "^1.6.0"
|
||||||
|
|
@ -36,7 +36,11 @@
|
||||||
"@types/bun": "^1.3.11",
|
"@types/bun": "^1.3.11",
|
||||||
"@types/node": "^25.5.0",
|
"@types/node": "^25.5.0",
|
||||||
"eslint-plugin-astro": "^1.6.0",
|
"eslint-plugin-astro": "^1.6.0",
|
||||||
"knip": "^6.1.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",
|
||||||
"prettier": "^3.8.1",
|
"prettier": "^3.8.1",
|
||||||
"publint": "^0.3.18",
|
"publint": "^0.3.18",
|
||||||
"tsdown": "^0.21.7",
|
"tsdown": "^0.21.7",
|
||||||
|
|
|
||||||
77
rules/astro.ts
Normal file
77
rules/astro.ts
Normal file
|
|
@ -0,0 +1,77 @@
|
||||||
|
import type { OxlintOverride } from "oxlint";
|
||||||
|
|
||||||
|
const astroConfig: OxlintOverride = {
|
||||||
|
env: {
|
||||||
|
astro: true,
|
||||||
|
},
|
||||||
|
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/prefer-split-class-list": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
splitLiteral: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"astro/sort-attributes": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
ignoreCase: false,
|
||||||
|
order: "asc",
|
||||||
|
type: "alphabetical",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"astro/valid-compile": "error",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default astroConfig;
|
||||||
379
rules/eslint.ts
Normal file
379
rules/eslint.ts
Normal file
|
|
@ -0,0 +1,379 @@
|
||||||
|
import type { DummyRuleMap } from "oxlint";
|
||||||
|
|
||||||
|
const esLintRules: DummyRuleMap = {
|
||||||
|
"eslint/accessor-pairs": ["deny", { enforceForTSTypes: true }],
|
||||||
|
"eslint/array-callback-return": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
checkForEach: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/arrow-body-style": [
|
||||||
|
"deny",
|
||||||
|
"as-needed",
|
||||||
|
{
|
||||||
|
requireReturnForObjectLiteral: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/block-scoped-var": "deny",
|
||||||
|
"eslint/capitalized-comments": [
|
||||||
|
"deny",
|
||||||
|
"always",
|
||||||
|
{
|
||||||
|
block: {
|
||||||
|
ignoreConsecutiveComments: true,
|
||||||
|
},
|
||||||
|
line: {
|
||||||
|
ignoreConsecutiveComments: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/constructor-super": "deny",
|
||||||
|
"eslint/curly": ["deny", "all"],
|
||||||
|
"eslint/default-case": "deny",
|
||||||
|
"eslint/default-case-last": "deny",
|
||||||
|
"eslint/default-param-last": "deny",
|
||||||
|
"eslint/eqeqeq": "deny",
|
||||||
|
"eslint/for-direction": "deny",
|
||||||
|
"eslint/func-names": "allow",
|
||||||
|
"eslint/func-style": [
|
||||||
|
"deny",
|
||||||
|
"expression",
|
||||||
|
{
|
||||||
|
allowArrowFunctions: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/getter-return": "deny",
|
||||||
|
"eslint/grouped-accessor-pairs": [
|
||||||
|
"deny",
|
||||||
|
"setBeforeGet",
|
||||||
|
{
|
||||||
|
enforceForTSTypes: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/guard-for-in": "deny",
|
||||||
|
"eslint/id-length": "deny",
|
||||||
|
"eslint/init-declarations": ["deny", "always"],
|
||||||
|
"eslint/new-cap": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
capIsNew: false,
|
||||||
|
newIsCap: true,
|
||||||
|
properties: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-alert": "deny",
|
||||||
|
"eslint/no-array-constructor": "deny",
|
||||||
|
"eslint/no-async-promise-executor": "deny",
|
||||||
|
"eslint/no-await-in-loop": "deny",
|
||||||
|
"eslint/no-bitwise": "deny",
|
||||||
|
"eslint/no-caller": "deny",
|
||||||
|
"eslint/no-case-declarations": "deny",
|
||||||
|
"eslint/no-class-assign": "deny",
|
||||||
|
"eslint/no-compare-neg-zero": "deny",
|
||||||
|
"eslint/no-cond-assign": "deny",
|
||||||
|
"eslint/no-console": "allow",
|
||||||
|
"eslint/no-const-assign": "deny",
|
||||||
|
"eslint/no-constant-binary-expression": "deny",
|
||||||
|
"eslint/no-constant-condition": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
checkLoops: "allExceptWhileTrue",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-constructor-return": "deny",
|
||||||
|
"eslint/no-continue": "allow",
|
||||||
|
"eslint/no-control-regex": "deny",
|
||||||
|
"eslint/no-debugger": "deny",
|
||||||
|
"eslint/no-delete-var": "deny",
|
||||||
|
"eslint/no-div-regex": "allow",
|
||||||
|
"eslint/no-dupe-class-members": "deny",
|
||||||
|
"eslint/no-dupe-else-if": "deny",
|
||||||
|
"eslint/no-dupe-keys": "deny",
|
||||||
|
"eslint/no-duplicate-case": "deny",
|
||||||
|
"eslint/no-duplicate-imports": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
allowSeparateTypeImports: true,
|
||||||
|
includeExports: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-else-return": "allow",
|
||||||
|
"eslint/no-empty": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
allowEmptyCatch: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-empty-character-class": "deny",
|
||||||
|
"eslint/no-empty-function": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
allow: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-empty-pattern": "deny",
|
||||||
|
"eslint/no-empty-static-block": "deny",
|
||||||
|
"eslint/no-eq-null": "deny",
|
||||||
|
"eslint/no-eval": "deny",
|
||||||
|
"eslint/no-ex-assign": "deny",
|
||||||
|
"eslint/no-extend-native": "deny",
|
||||||
|
"eslint/no-extra-bind": "deny",
|
||||||
|
"eslint/no-extra-boolean-cast": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
enforceForInnerExpressions: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-extra-label": "deny",
|
||||||
|
"eslint/no-fallthrough": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
allowEmptyCase: false,
|
||||||
|
reportUnusedFallthroughComment: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-func-assign": "deny",
|
||||||
|
"eslint/no-global-assign": "deny",
|
||||||
|
"eslint/no-implicit-coercion": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
allow: [],
|
||||||
|
boolean: true,
|
||||||
|
disallowTemplateShorthand: false,
|
||||||
|
number: true,
|
||||||
|
string: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-import-assign": "deny",
|
||||||
|
"eslint/no-inline-comments": "deny",
|
||||||
|
"eslint/no-inner-declarations": ["deny", "both", "disallow"],
|
||||||
|
"eslint/no-invalid-regexp": "deny",
|
||||||
|
"eslint/no-irregular-whitespace": "deny",
|
||||||
|
"eslint/no-iterator": "deny",
|
||||||
|
"eslint/no-label-var": "deny",
|
||||||
|
"eslint/no-labels": "deny",
|
||||||
|
"eslint/no-lone-blocks": "deny",
|
||||||
|
"eslint/no-lonely-if": "deny",
|
||||||
|
"eslint/no-loop-func": "deny",
|
||||||
|
"eslint/no-loss-of-precision": "deny",
|
||||||
|
"eslint/no-magic-numbers": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
detectObjects: true,
|
||||||
|
enforceConst: true,
|
||||||
|
ignoreEnums: true,
|
||||||
|
ignoreNumericLiteralTypes: true,
|
||||||
|
ignoreTypeIndexes: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-misleading-character-class": "deny",
|
||||||
|
"eslint/no-multi-assign": "deny",
|
||||||
|
"eslint/no-multi-str": "deny",
|
||||||
|
"eslint/no-negated-condition": "deny",
|
||||||
|
"eslint/no-nested-ternary": "deny",
|
||||||
|
"eslint/no-new": "deny",
|
||||||
|
"eslint/no-new-func": "deny",
|
||||||
|
"eslint/no-new-native-nonconstructor": "deny",
|
||||||
|
"eslint/no-new-wrappers": "deny",
|
||||||
|
"eslint/no-nonoctal-decimal-escape": "deny",
|
||||||
|
"eslint/no-obj-calls": "deny",
|
||||||
|
"eslint/no-object-constructor": "deny",
|
||||||
|
"eslint/no-param-reassign": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
// Sera mis à jour avec les propriétés concernées (p. ex. modifications d'objets DOM).
|
||||||
|
ignorePropertyModificationsFor: [],
|
||||||
|
props: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-plusplus": "deny",
|
||||||
|
"eslint/no-promise-executor-return": "deny",
|
||||||
|
"eslint/no-proto": "deny",
|
||||||
|
"eslint/no-prototype-builtins": "deny",
|
||||||
|
"eslint/no-redeclare": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
builtinGlobals: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-regex-spaces": "deny",
|
||||||
|
"eslint/no-return-assign": ["deny", "always"],
|
||||||
|
"eslint/no-script-url": "deny",
|
||||||
|
"eslint/no-self-assign": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
props: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-self-compare": "deny",
|
||||||
|
"eslint/no-sequences": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
allowInParentheses: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-setter-return": "deny",
|
||||||
|
"eslint/no-shadow": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
builtinGlobals: true,
|
||||||
|
hoist: "functions-and-types",
|
||||||
|
ignoreFunctionTypeParameterNameValueShadow: true,
|
||||||
|
ignoreOnInitialization: false,
|
||||||
|
ignoreTypeValueShadow: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-shadow-restricted-names": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
reportGlobalThis: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-sparse-arrays": "deny",
|
||||||
|
"eslint/no-template-curly-in-string": "deny",
|
||||||
|
"eslint/no-ternary": "deny",
|
||||||
|
"eslint/no-this-before-super": "deny",
|
||||||
|
// This rule has been deprecated, please instead use typescript/only-throw-error.
|
||||||
|
"eslint/no-throw-literal": "allow",
|
||||||
|
"eslint/no-unassigned-vars": "deny",
|
||||||
|
"eslint/no-undef": ["deny", { typeof: true }],
|
||||||
|
"eslint/no-undefined": "deny",
|
||||||
|
"eslint/no-unexpected-multiline": "deny",
|
||||||
|
"eslint/no-unmodified-loop-condition": "deny",
|
||||||
|
"eslint/no-unneeded-ternary": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
defaultAssignment: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-unreachable": "deny",
|
||||||
|
"eslint/no-unsafe-finally": "deny",
|
||||||
|
"eslint/no-unsafe-negation": ["deny", { enforceForOrderingRelations: true }],
|
||||||
|
"eslint/no-unsafe-optional-chaining": ["deny", { disallowArithmeticOperators: true }],
|
||||||
|
"eslint/no-unused-expressions": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
allowShortCircuit: false,
|
||||||
|
allowTaggedTemplates: false,
|
||||||
|
allowTernary: false,
|
||||||
|
enforceForJSX: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-unused-labels": "deny",
|
||||||
|
"eslint/no-unused-private-class-members": "deny",
|
||||||
|
"eslint/no-unused-vars": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
args: "all",
|
||||||
|
caughtErrors: "all",
|
||||||
|
fix: {
|
||||||
|
ignoreClassWithStaticInitBlock: false,
|
||||||
|
ignoreRestSiblings: false,
|
||||||
|
ignoreUsingDeclarations: false,
|
||||||
|
imports: "suggestion",
|
||||||
|
reportVarsOnlyUsedAsTypes: false,
|
||||||
|
variables: "suggestion",
|
||||||
|
vars: "all",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-use-before-define": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
allowNamedExports: false,
|
||||||
|
classes: true,
|
||||||
|
enums: true,
|
||||||
|
functions: true,
|
||||||
|
ignoreTypeReferences: true,
|
||||||
|
typedefs: true,
|
||||||
|
variables: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-useless-backreference": "deny",
|
||||||
|
"eslint/no-useless-call": "deny",
|
||||||
|
"eslint/no-useless-catch": "deny",
|
||||||
|
"eslint/no-useless-computed-key": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
enforceForClassMembers: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-useless-concat": "deny",
|
||||||
|
"eslint/no-useless-constructor": "deny",
|
||||||
|
"eslint/no-useless-escape": "deny",
|
||||||
|
"eslint/no-useless-rename": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
ignoreDestructuring: false,
|
||||||
|
ignoreExport: false,
|
||||||
|
ignoreImport: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/no-useless-return": "deny",
|
||||||
|
"eslint/no-var": "deny",
|
||||||
|
"eslint/no-void": ["deny", { allowAsStatement: false }],
|
||||||
|
"eslint/no-warning-comments": ["warn", { location: "anywhere" }],
|
||||||
|
"eslint/no-with": "deny",
|
||||||
|
"eslint/operator-assignment": ["deny", "never"],
|
||||||
|
"eslint/prefer-const": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
destructuring: "any",
|
||||||
|
ignoreReadBeforeAssign: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/prefer-destructuring": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
AssignmentExpression: {
|
||||||
|
array: true,
|
||||||
|
object: true,
|
||||||
|
},
|
||||||
|
enforceForRenamedProperties: false,
|
||||||
|
VariableDeclarator: {
|
||||||
|
array: true,
|
||||||
|
object: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/prefer-exponentiation-operator": "deny",
|
||||||
|
"eslint/prefer-numeric-literals": "deny",
|
||||||
|
"eslint/prefer-object-has-own": "deny",
|
||||||
|
"eslint/prefer-object-spread": "deny",
|
||||||
|
"eslint/prefer-promise-reject-errors": ["deny", { allowEmptyReject: false }],
|
||||||
|
"eslint/prefer-rest-params": "deny",
|
||||||
|
"eslint/prefer-spread": "deny",
|
||||||
|
"eslint/prefer-template": "deny",
|
||||||
|
// Pas forcément nécessaire.
|
||||||
|
"eslint/preserve-caught-error": "allow",
|
||||||
|
"eslint/radix": "deny",
|
||||||
|
// This rule is inferior to the accuracy of the type-aware typescript/require-await rule.
|
||||||
|
"eslint/require-await": "allow",
|
||||||
|
"eslint/require-yield": "deny",
|
||||||
|
// Rentre en conflit avec Perfectionnist.
|
||||||
|
"eslint/sort-imports": "allow",
|
||||||
|
// Rentre en conflit avec Perfectionnist.
|
||||||
|
"eslint/sort-keys": "allow",
|
||||||
|
"eslint/sort-vars": "allow",
|
||||||
|
"eslint/symbol-description": "deny",
|
||||||
|
"eslint/unicode-bom": ["deny", "never"],
|
||||||
|
"eslint/use-isnan": ["deny", { enforceForIndexOf: true, enforceForSwitchCase: true }],
|
||||||
|
"eslint/valid-typeof": [
|
||||||
|
"deny",
|
||||||
|
{
|
||||||
|
requireStringLiterals: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"eslint/vars-on-top": "deny",
|
||||||
|
"eslint/yoda": [
|
||||||
|
"deny",
|
||||||
|
"never",
|
||||||
|
{
|
||||||
|
exceptRange: false,
|
||||||
|
onlyEquality: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default esLintRules;
|
||||||
12
rules/functional.ts
Normal file
12
rules/functional.ts
Normal file
|
|
@ -0,0 +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"],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default functionalRules;
|
||||||
26
rules/jsdoc.ts
Normal file
26
rules/jsdoc.ts
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
import type { DummyRuleMap } from "oxlint";
|
||||||
|
|
||||||
|
const jsDocRules: DummyRuleMap = {
|
||||||
|
"jsdoc/check-access": "warn",
|
||||||
|
"jsdoc/check-property-names": "warn",
|
||||||
|
"jsdoc/check-tag-names": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
definedTags: ["link"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"jsdoc/empty-tags": "warn",
|
||||||
|
"jsdoc/implements-on-classes": "warn",
|
||||||
|
"jsdoc/no-defaults": "warn",
|
||||||
|
"jsdoc/require-param": "warn",
|
||||||
|
"jsdoc/require-param-description": "warn",
|
||||||
|
"jsdoc/require-param-name": "warn",
|
||||||
|
"jsdoc/require-property": "warn",
|
||||||
|
"jsdoc/require-property-description": "warn",
|
||||||
|
"jsdoc/require-property-name": "warn",
|
||||||
|
"jsdoc/require-returns": "warn",
|
||||||
|
"jsdoc/require-returns-description": "warn",
|
||||||
|
"jsdoc/require-yields": "warn",
|
||||||
|
};
|
||||||
|
|
||||||
|
export default jsDocRules;
|
||||||
87
rules/old-eslint.ts
Normal file
87
rules/old-eslint.ts
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
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;
|
||||||
153
rules/perfectionist.ts
Normal file
153
rules/perfectionist.ts
Normal file
|
|
@ -0,0 +1,153 @@
|
||||||
|
import type { DummyRuleMap } from "oxlint";
|
||||||
|
|
||||||
|
const perfectionistRules: DummyRuleMap = {
|
||||||
|
"perfectionist/sort-array-includes": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-classes": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-decorators": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-enums": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-export-attributes": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-exports": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-heritage-clauses": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-import-attributes": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-interfaces": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-intersection-types": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-jsx-props": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-maps": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-modules": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-named-exports": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-named-imports": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-object-types": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-objects": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-sets": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-switch-case": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-union-types": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"perfectionist/sort-variable-declarations": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
order: "asc",
|
||||||
|
type: "natural",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default perfectionistRules;
|
||||||
216
rules/sonarjs.ts
Normal file
216
rules/sonarjs.ts
Normal file
|
|
@ -0,0 +1,216 @@
|
||||||
|
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;
|
||||||
119
rules/typescript.ts
Normal file
119
rules/typescript.ts
Normal file
|
|
@ -0,0 +1,119 @@
|
||||||
|
import type { DummyRuleMap } from "oxlint";
|
||||||
|
|
||||||
|
const typeScriptRules: DummyRuleMap = {
|
||||||
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
||||||
|
"@typescript-eslint/array-type": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
default: "generic",
|
||||||
|
readonly: "generic",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/await-thenable": "error",
|
||||||
|
"@typescript-eslint/ban-ts-comment": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
minimumDescriptionLength: 10,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@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",
|
||||||
|
{
|
||||||
|
allowAny: false,
|
||||||
|
allowBoolean: false,
|
||||||
|
allowNullish: false,
|
||||||
|
allowNumberAndString: false,
|
||||||
|
allowRegExp: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/restrict-template-expressions": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
allowAny: false,
|
||||||
|
allowBoolean: false,
|
||||||
|
allowNever: false,
|
||||||
|
allowNullish: false,
|
||||||
|
allowNumber: false,
|
||||||
|
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",
|
||||||
|
};
|
||||||
|
|
||||||
|
export default typeScriptRules;
|
||||||
121
rules/unicorn.ts
Normal file
121
rules/unicorn.ts
Normal file
|
|
@ -0,0 +1,121 @@
|
||||||
|
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",
|
||||||
|
"unicorn/explicit-length-check": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"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",
|
||||||
|
};
|
||||||
|
|
||||||
|
export default unicornRules;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue