This commit is contained in:
gcch 2025-10-01 14:37:12 +02:00
commit 268cf80769
14 changed files with 126 additions and 48 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
node_modules
.cache

View file

@ -1 +1,5 @@
# configuration-eslint
## Inspirations
- [eslint-config-tamia](https://github.com/sapegin/eslint-config-tamia).

View file

@ -7,13 +7,14 @@
"@eslint/js": "^9.36.0",
"eslint-plugin-functional": "^9.0.2",
"eslint-plugin-perfectionist": "^4.15.0",
"eslint-plugin-sonarjs": "^3.0.5",
"eslint-plugin-unicorn": "^61.0.2",
"globals": "^16.4.0",
"typescript-eslint": "^8.45.0",
},
"devDependencies": {
"@arethetypeswrong/core": "^0.18.2",
"@gcch/configuration-prettier": "^0.0.6",
"@gcch/configuration-prettier": "^0.0.7",
"knip": "^5.64.1",
"prettier": "^4.0.0-alpha.12",
"prettier-plugin-curly": "^0.3.2",
@ -80,7 +81,7 @@
"@eslint/plugin-kit": ["@eslint/plugin-kit@0.3.5", "http://localhost:4873/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", { "dependencies": { "@eslint/core": "^0.15.2", "levn": "^0.4.1" } }, "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w=="],
"@gcch/configuration-prettier": ["@gcch/configuration-prettier@0.0.6", "http://localhost:4873/@gcch/configuration-prettier/-/configuration-prettier-0.0.6.tgz", { "dependencies": { "@prettier/plugin-php": "^0.24.0", "@prettier/plugin-xml": "^3.4.2", "prettier-plugin-curly": "^0.3.2", "prettier-plugin-jsdoc": "^1.3.3", "prettier-plugin-pkg": "^0.21.2", "prettier-plugin-sh": "^0.18.0" }, "peerDependencies": { "prettier": "^4.0.0-alpha.12" } }, "sha512-Lnge5iwMHUupPfghPVj6qIiZO2ghpwxhOGorG+3cMwjlQQwrc6bpjvDOTDU3PToP6E5MlwRv9HRJZqwBxNocpg=="],
"@gcch/configuration-prettier": ["@gcch/configuration-prettier@0.0.7", "http://localhost:4873/@gcch/configuration-prettier/-/configuration-prettier-0.0.7.tgz", { "dependencies": { "@prettier/plugin-php": "^0.24.0", "@prettier/plugin-xml": "^3.4.2", "prettier": "^4.0.0-alpha.12", "prettier-plugin-curly": "^0.3.2", "prettier-plugin-jsdoc": "^1.3.3", "prettier-plugin-pkg": "^0.21.2", "prettier-plugin-sh": "^0.18.0" } }, "sha512-V1edIUZociHH/6M+SQTewjjnE8KBN60oZ5Z08qe2RrILdgSZMAVCXVIBcCGZJfwdObakN5mVAabDur2J303LeA=="],
"@humanfs/core": ["@humanfs/core@0.19.1", "http://localhost:4873/@humanfs/core/-/core-0.19.1.tgz", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="],
@ -260,13 +261,15 @@
"birpc": ["birpc@2.6.1", "http://localhost:4873/birpc/-/birpc-2.6.1.tgz", {}, "sha512-LPnFhlDpdSH6FJhJyn4M0kFO7vtQ5iPw24FnG0y21q09xC7e8+1LeR31S1MAIrDAHp4m7aas4bEkTDTvMAtebQ=="],
"brace-expansion": ["brace-expansion@1.1.12", "http://localhost:4873/brace-expansion/-/brace-expansion-1.1.12.tgz", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="],
"brace-expansion": ["brace-expansion@2.0.2", "http://localhost:4873/brace-expansion/-/brace-expansion-2.0.2.tgz", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
"braces": ["braces@3.0.3", "http://localhost:4873/braces/-/braces-3.0.3.tgz", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],
"browserslist": ["browserslist@4.26.2", "http://localhost:4873/browserslist/-/browserslist-4.26.2.tgz", { "dependencies": { "baseline-browser-mapping": "^2.8.3", "caniuse-lite": "^1.0.30001741", "electron-to-chromium": "^1.5.218", "node-releases": "^2.0.21", "update-browserslist-db": "^1.1.3" }, "bin": { "browserslist": "cli.js" } }, "sha512-ECFzp6uFOSB+dcZ5BK/IBaGWssbSYBHvuMeMt3MMFyhI0Z8SqGgEkBLARgpRH3hutIgPVsALcMwbDrJqPxQ65A=="],
"builtin-modules": ["builtin-modules@5.0.0", "http://localhost:4873/builtin-modules/-/builtin-modules-5.0.0.tgz", {}, "sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg=="],
"builtin-modules": ["builtin-modules@3.3.0", "http://localhost:4873/builtin-modules/-/builtin-modules-3.3.0.tgz", {}, "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw=="],
"bytes": ["bytes@3.1.2", "http://localhost:4873/bytes/-/bytes-3.1.2.tgz", {}, "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="],
"cac": ["cac@6.7.14", "http://localhost:4873/cac/-/cac-6.7.14.tgz", {}, "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ=="],
@ -338,6 +341,8 @@
"eslint-plugin-perfectionist": ["eslint-plugin-perfectionist@4.15.0", "http://localhost:4873/eslint-plugin-perfectionist/-/eslint-plugin-perfectionist-4.15.0.tgz", { "dependencies": { "@typescript-eslint/types": "^8.34.1", "@typescript-eslint/utils": "^8.34.1", "natural-orderby": "^5.0.0" }, "peerDependencies": { "eslint": ">=8.45.0" } }, "sha512-pC7PgoXyDnEXe14xvRUhBII8A3zRgggKqJFx2a82fjrItDs1BSI7zdZnQtM2yQvcyod6/ujmzb7ejKPx8lZTnw=="],
"eslint-plugin-sonarjs": ["eslint-plugin-sonarjs@3.0.5", "http://localhost:4873/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-3.0.5.tgz", { "dependencies": { "@eslint-community/regexpp": "4.12.1", "builtin-modules": "3.3.0", "bytes": "3.1.2", "functional-red-black-tree": "1.0.1", "jsx-ast-utils-x": "0.1.0", "lodash.merge": "4.6.2", "minimatch": "9.0.5", "scslre": "0.3.0", "semver": "7.7.2", "typescript": ">=5" }, "peerDependencies": { "eslint": "^8.0.0 || ^9.0.0" } }, "sha512-dI62Ff3zMezUToi161hs2i1HX1ie8Ia2hO0jtNBfdgRBicAG4ydy2WPt0rMTrAe3ZrlqhpAO3w1jcQEdneYoFA=="],
"eslint-plugin-unicorn": ["eslint-plugin-unicorn@61.0.2", "http://localhost:4873/eslint-plugin-unicorn/-/eslint-plugin-unicorn-61.0.2.tgz", { "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "@eslint-community/eslint-utils": "^4.7.0", "@eslint/plugin-kit": "^0.3.3", "change-case": "^5.4.4", "ci-info": "^4.3.0", "clean-regexp": "^1.0.0", "core-js-compat": "^3.44.0", "esquery": "^1.6.0", "find-up-simple": "^1.0.1", "globals": "^16.3.0", "indent-string": "^5.0.0", "is-builtin-module": "^5.0.0", "jsesc": "^3.1.0", "pluralize": "^8.0.0", "regexp-tree": "^0.1.27", "regjsparser": "^0.12.0", "semver": "^7.7.2", "strip-indent": "^4.0.0" }, "peerDependencies": { "eslint": ">=9.29.0" } }, "sha512-zLihukvneYT7f74GNbVJXfWIiNQmkc/a9vYBTE4qPkQZswolWNdu+Wsp9sIXno1JOzdn6OUwLPd19ekXVkahRA=="],
"eslint-scope": ["eslint-scope@8.4.0", "http://localhost:4873/eslint-scope/-/eslint-scope-8.4.0.tgz", { "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg=="],
@ -398,6 +403,8 @@
"function-once": ["function-once@3.0.1", "http://localhost:4873/function-once/-/function-once-3.0.1.tgz", {}, "sha512-bE3E8REk4jANDot3l0sLFkXgywBwzFKsmbwdnVHLJUnt/3kV6dNG0oJJqoRBuS1Z9Lr4ZoQgwV0ZNLDgWDbv7Q=="],
"functional-red-black-tree": ["functional-red-black-tree@1.0.1", "http://localhost:4873/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", {}, "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g=="],
"get-current-package": ["get-current-package@1.0.1", "http://localhost:4873/get-current-package/-/get-current-package-1.0.1.tgz", { "dependencies": { "find-up-json": "^2.0.5" } }, "sha512-c/Rw5ByDQ+zg+Lh/emBWv0bDpugEFdmXPR6/srIemVtIvol0XbT0JAr8Db0cX+Jj/xY9wj1wdjeq2qNB35Tayg=="],
"get-tsconfig": ["get-tsconfig@4.10.1", "http://localhost:4873/get-tsconfig/-/get-tsconfig-4.10.1.tgz", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ=="],
@ -460,6 +467,8 @@
"json5": ["json5@2.2.3", "http://localhost:4873/json5/-/json5-2.2.3.tgz", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="],
"jsx-ast-utils-x": ["jsx-ast-utils-x@0.1.0", "http://localhost:4873/jsx-ast-utils-x/-/jsx-ast-utils-x-0.1.0.tgz", {}, "sha512-eQQBjBnsVtGacsG9uJNB8qOr3yA8rga4wAaGG1qRcBzSIvfhERLrWxMAM1hp5fcS6Abo8M4+bUBTekYR0qTPQw=="],
"kasi": ["kasi@1.1.1", "http://localhost:4873/kasi/-/kasi-1.1.1.tgz", {}, "sha512-pzBwGWFIjf84T/8aD0XzMli1T3Ckr/jVLh6v0Jskwiv5ehmcgDM+vpYFSk8WzGn4ed4HqgaifTgQUHzzZHa+Qw=="],
"keyv": ["keyv@4.5.4", "http://localhost:4873/keyv/-/keyv-4.5.4.tgz", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="],
@ -530,7 +539,7 @@
"micromatch": ["micromatch@4.0.8", "http://localhost:4873/micromatch/-/micromatch-4.0.8.tgz", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="],
"minimatch": ["minimatch@3.1.2", "http://localhost:4873/minimatch/-/minimatch-3.1.2.tgz", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="],
"minimatch": ["minimatch@9.0.5", "http://localhost:4873/minimatch/-/minimatch-9.0.5.tgz", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
"minimist": ["minimist@1.2.8", "http://localhost:4873/minimist/-/minimist-1.2.8.tgz", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
@ -604,6 +613,10 @@
"readdirp": ["readdirp@4.1.2", "http://localhost:4873/readdirp/-/readdirp-4.1.2.tgz", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="],
"refa": ["refa@0.12.1", "http://localhost:4873/refa/-/refa-0.12.1.tgz", { "dependencies": { "@eslint-community/regexpp": "^4.8.0" } }, "sha512-J8rn6v4DBb2nnFqkqwy6/NnTYMcgLA+sLr0iIO41qpv0n+ngb7ksag2tMRl0inb1bbO/esUwzW1vbJi7K0sI0g=="],
"regexp-ast-analysis": ["regexp-ast-analysis@0.7.1", "http://localhost:4873/regexp-ast-analysis/-/regexp-ast-analysis-0.7.1.tgz", { "dependencies": { "@eslint-community/regexpp": "^4.8.0", "refa": "^0.12.1" } }, "sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A=="],
"regexp-to-ast": ["regexp-to-ast@0.5.0", "http://localhost:4873/regexp-to-ast/-/regexp-to-ast-0.5.0.tgz", {}, "sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw=="],
"regexp-tree": ["regexp-tree@0.1.27", "http://localhost:4873/regexp-tree/-/regexp-tree-0.1.27.tgz", { "bin": { "regexp-tree": "bin/regexp-tree" } }, "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA=="],
@ -624,6 +637,8 @@
"sade": ["sade@1.8.1", "http://localhost:4873/sade/-/sade-1.8.1.tgz", { "dependencies": { "mri": "^1.1.0" } }, "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A=="],
"scslre": ["scslre@0.3.0", "http://localhost:4873/scslre/-/scslre-0.3.0.tgz", { "dependencies": { "@eslint-community/regexpp": "^4.8.0", "refa": "^0.12.0", "regexp-ast-analysis": "^0.7.0" } }, "sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ=="],
"semver": ["semver@7.7.2", "http://localhost:4873/semver/-/semver-7.7.2.tgz", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
"sh-syntax": ["sh-syntax@0.5.8", "http://localhost:4873/sh-syntax/-/sh-syntax-0.5.8.tgz", { "dependencies": { "tslib": "^2.8.1" } }, "sha512-JfVoxf4FxQI5qpsPbkHhZo+n6N9YMJobyl4oGEUBb/31oQYlgTjkXQD8PBiafS2UbWoxrTO0Z5PJUBXEPAG1Zw=="],
@ -744,8 +759,12 @@
"@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "http://localhost:4873/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="],
"@eslint/config-array/minimatch": ["minimatch@3.1.2", "http://localhost:4873/minimatch/-/minimatch-3.1.2.tgz", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="],
"@eslint/eslintrc/globals": ["globals@14.0.0", "http://localhost:4873/globals/-/globals-14.0.0.tgz", {}, "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ=="],
"@eslint/eslintrc/minimatch": ["minimatch@3.1.2", "http://localhost:4873/minimatch/-/minimatch-3.1.2.tgz", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="],
"@eslint/eslintrc/strip-json-comments": ["strip-json-comments@3.1.1", "http://localhost:4873/strip-json-comments/-/strip-json-comments-3.1.1.tgz", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="],
"@typescript-eslint/eslint-plugin/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.45.0", "http://localhost:4873/@typescript-eslint/scope-manager/-/scope-manager-8.45.0.tgz", { "dependencies": { "@typescript-eslint/types": "8.45.0", "@typescript-eslint/visitor-keys": "8.45.0" } }, "sha512-clmm8XSNj/1dGvJeO6VGH7EUSeA0FMs+5au/u3lrA3KfG8iJ4u8ym9/j2tTEoacAffdW1TVUzXO30W1JTJS7dA=="],
@ -768,8 +787,6 @@
"@typescript-eslint/typescript-estree/@typescript-eslint/types": ["@typescript-eslint/types@8.45.0", "http://localhost:4873/@typescript-eslint/types/-/types-8.45.0.tgz", {}, "sha512-WugXLuOIq67BMgQInIxxnsSyRLFxdkJEJu8r4ngLR56q/4Q5LrbfkFRH27vMTjxEK8Pyz7QfzuZe/G15qQnVRA=="],
"@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "http://localhost:4873/minimatch/-/minimatch-9.0.5.tgz", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
"@typescript-eslint/utils/@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.44.1", "http://localhost:4873/@typescript-eslint/typescript-estree/-/typescript-estree-8.44.1.tgz", { "dependencies": { "@typescript-eslint/project-service": "8.44.1", "@typescript-eslint/tsconfig-utils": "8.44.1", "@typescript-eslint/types": "8.44.1", "@typescript-eslint/visitor-keys": "8.44.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-qnQJ+mVa7szevdEyvfItbO5Vo+GfZ4/GZWWDRRLjrxYPkhM+6zYB2vRYwCsoJLzqFCdZT4mEqyJoyzkunsZ96A=="],
"@typescript-eslint/visitor-keys/@typescript-eslint/types": ["@typescript-eslint/types@8.45.0", "http://localhost:4873/@typescript-eslint/types/-/types-8.45.0.tgz", {}, "sha512-WugXLuOIq67BMgQInIxxnsSyRLFxdkJEJu8r4ngLR56q/4Q5LrbfkFRH27vMTjxEK8Pyz7QfzuZe/G15qQnVRA=="],
@ -778,8 +795,14 @@
"eslint/escape-string-regexp": ["escape-string-regexp@4.0.0", "http://localhost:4873/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],
"eslint/minimatch": ["minimatch@3.1.2", "http://localhost:4873/minimatch/-/minimatch-3.1.2.tgz", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="],
"eslint-plugin-sonarjs/typescript": ["typescript@5.9.3", "http://localhost:4873/typescript/-/typescript-5.9.3.tgz", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
"fast-glob/glob-parent": ["glob-parent@5.1.2", "http://localhost:4873/glob-parent/-/glob-parent-5.1.2.tgz", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],
"is-builtin-module/builtin-modules": ["builtin-modules@5.0.0", "http://localhost:4873/builtin-modules/-/builtin-modules-5.0.0.tgz", {}, "sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg=="],
"micromatch/picomatch": ["picomatch@2.3.1", "http://localhost:4873/picomatch/-/picomatch-2.3.1.tgz", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
"promise-make-counter/promise-make-naked": ["promise-make-naked@3.0.2", "http://localhost:4873/promise-make-naked/-/promise-make-naked-3.0.2.tgz", {}, "sha512-B+b+kQ1YrYS7zO7P7bQcoqqMUizP06BOyNSBEnB5VJKDSWo8fsVuDkfSmwdjF0JsRtaNh83so5MMFJ95soH5jg=="],
@ -792,6 +815,10 @@
"typescript-eslint/@typescript-eslint/utils": ["@typescript-eslint/utils@8.45.0", "http://localhost:4873/@typescript-eslint/utils/-/utils-8.45.0.tgz", { "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", "@typescript-eslint/scope-manager": "8.45.0", "@typescript-eslint/types": "8.45.0", "@typescript-eslint/typescript-estree": "8.45.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-bxi1ht+tLYg4+XV2knz/F7RVhU0k6VrSMc9sb8DQ6fyCTrGQLHfo7lDtN0QJjZjKkLA2ThrKuCdHEvLReqtIGg=="],
"@eslint/config-array/minimatch/brace-expansion": ["brace-expansion@1.1.12", "http://localhost:4873/brace-expansion/-/brace-expansion-1.1.12.tgz", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="],
"@eslint/eslintrc/minimatch/brace-expansion": ["brace-expansion@1.1.12", "http://localhost:4873/brace-expansion/-/brace-expansion-1.1.12.tgz", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="],
"@typescript-eslint/eslint-plugin/@typescript-eslint/scope-manager/@typescript-eslint/types": ["@typescript-eslint/types@8.45.0", "http://localhost:4873/@typescript-eslint/types/-/types-8.45.0.tgz", {}, "sha512-WugXLuOIq67BMgQInIxxnsSyRLFxdkJEJu8r4ngLR56q/4Q5LrbfkFRH27vMTjxEK8Pyz7QfzuZe/G15qQnVRA=="],
"@typescript-eslint/eslint-plugin/@typescript-eslint/type-utils/@typescript-eslint/types": ["@typescript-eslint/types@8.45.0", "http://localhost:4873/@typescript-eslint/types/-/types-8.45.0.tgz", {}, "sha512-WugXLuOIq67BMgQInIxxnsSyRLFxdkJEJu8r4ngLR56q/4Q5LrbfkFRH27vMTjxEK8Pyz7QfzuZe/G15qQnVRA=="],
@ -804,24 +831,16 @@
"@typescript-eslint/type-utils/@typescript-eslint/typescript-estree/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.44.1", "http://localhost:4873/@typescript-eslint/visitor-keys/-/visitor-keys-8.44.1.tgz", { "dependencies": { "@typescript-eslint/types": "8.44.1", "eslint-visitor-keys": "^4.2.1" } }, "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw=="],
"@typescript-eslint/type-utils/@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "http://localhost:4873/minimatch/-/minimatch-9.0.5.tgz", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
"@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.2", "http://localhost:4873/brace-expansion/-/brace-expansion-2.0.2.tgz", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
"@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.44.1", "http://localhost:4873/@typescript-eslint/project-service/-/project-service-8.44.1.tgz", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.44.1", "@typescript-eslint/types": "^8.44.1", "debug": "^4.3.4" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-ycSa60eGg8GWAkVsKV4E6Nz33h+HjTXbsDT4FILyL8Obk5/mx4tbvCNsLf9zret3ipSumAOG89UcCs/KRaKYrA=="],
"@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.44.1", "http://localhost:4873/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.44.1.tgz", { "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-B5OyACouEjuIvof3o86lRMvyDsFwZm+4fBOqFHccIctYgBjqR3qT39FBYGN87khcgf0ExpdCBeGKpKRhSFTjKQ=="],
"@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.44.1", "http://localhost:4873/@typescript-eslint/visitor-keys/-/visitor-keys-8.44.1.tgz", { "dependencies": { "@typescript-eslint/types": "8.44.1", "eslint-visitor-keys": "^4.2.1" } }, "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw=="],
"@typescript-eslint/utils/@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "http://localhost:4873/minimatch/-/minimatch-9.0.5.tgz", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
"eslint/minimatch/brace-expansion": ["brace-expansion@1.1.12", "http://localhost:4873/brace-expansion/-/brace-expansion-1.1.12.tgz", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="],
"typescript-eslint/@typescript-eslint/utils/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.45.0", "http://localhost:4873/@typescript-eslint/scope-manager/-/scope-manager-8.45.0.tgz", { "dependencies": { "@typescript-eslint/types": "8.45.0", "@typescript-eslint/visitor-keys": "8.45.0" } }, "sha512-clmm8XSNj/1dGvJeO6VGH7EUSeA0FMs+5au/u3lrA3KfG8iJ4u8ym9/j2tTEoacAffdW1TVUzXO30W1JTJS7dA=="],
"typescript-eslint/@typescript-eslint/utils/@typescript-eslint/types": ["@typescript-eslint/types@8.45.0", "http://localhost:4873/@typescript-eslint/types/-/types-8.45.0.tgz", {}, "sha512-WugXLuOIq67BMgQInIxxnsSyRLFxdkJEJu8r4ngLR56q/4Q5LrbfkFRH27vMTjxEK8Pyz7QfzuZe/G15qQnVRA=="],
"@typescript-eslint/type-utils/@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.2", "http://localhost:4873/brace-expansion/-/brace-expansion-2.0.2.tgz", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
"@typescript-eslint/utils/@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.2", "http://localhost:4873/brace-expansion/-/brace-expansion-2.0.2.tgz", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
}
}

View file

@ -1,4 +1,4 @@
{
"dictionaries": ["fr-fr", "en-gb"],
"words": ["Navigateur", "tsdown"]
"words": ["Navigateur", "tsdown", "publint", "sonarjs"]
}

2
dist/index.js vendored
View file

@ -1 +1 @@
import{Linter as e}from"eslint";import{defineConfig as t,globalIgnores as n}from"eslint/config";import r from"globals";import i from"@eslint/js";import a from"eslint-plugin-functional";import o from"typescript-eslint";import s from"eslint-plugin-perfectionist";import c from"eslint-plugin-unicorn";const l={name:`JavaScript`,rules:{...i.configs.recommended.rules,"array-callback-return":[`error`,{allowVoid:!0,checkForEach:!0}],"max-params":[`error`,{max:3}],"no-nested-ternary":`off`,"no-unassigned-vars":`error`,"no-unneeded-ternary":[`error`,{defaultAssignment:!1}],"no-unreachable-loop":`error`,"no-use-before-define":`error`,"no-useless-assignment":`error`,yoda:[`error`,`never`]}},u={name:`Programmation fonctionnelle`,plugins:{functional:a},rules:{...a.configs.noExceptions.rules,...a.configs.noMutations.rules,...a.configs.externalTypeScriptRecommended.rules,...a.configs.stylistic.rules,"@typescript-eslint/array-type":[`error`,{default:`generic`,readonly:`generic`}],"functional/prefer-immutable-types":[`error`,{enforcement:`ReadonlyShallow`}],"functional/prefer-tacit":`off`,"functional/readonly-type":[`error`,`generic`],"functional/type-declaration-immutability":[`error`,{ignoreInterfaces:!1,rules:[{comparator:`AtLeast`,fixer:!1,identifiers:`^(?!I?Mutable).+`,immutability:`ReadonlyShallow`,suggestions:!1}]}]}},d={plugins:s.configs[`recommended-natural`].plugins??{},rules:s.configs[`recommended-natural`].rules??{}},f=(e,t)=>e.find(e=>e.name===t)??{},p=f(o.configs.strictTypeChecked,`typescript-eslint/base`),m=f(o.configs.strictTypeChecked,`typescript-eslint/eslint-recommended`),h=f(o.configs.strictTypeChecked,`typescript-eslint/strict-type-checked`),g=f(o.configs.stylisticTypeChecked,`typescript-eslint/stylistic-type-checked`),_={languageOptions:p.languageOptions??{},name:`TypeScript`,plugins:p.plugins??{},rules:{...m.rules,...h.rules,...g.rules}},v={name:`Unicorn`,plugins:{unicorn:c},rules:{...c.configs.unopinionated.rules,"unicorn/catch-error-name":[`error`],"unicorn/consistent-empty-array-spread":[`error`],"unicorn/custom-error-definition":[`error`],"unicorn/explicit-length-check":[`error`,{"non-zero":`not-equal`}],"unicorn/no-nested-ternary":[`error`]}},y=t([n([`dist/**/*`],`Ignore le dossier de compilation`),{files:[`**/*.js`,`**/*.ts`],name:`Fichiers à analyser`},{languageOptions:{ecmaVersion:`latest`,globals:{...r.browser,...r.builtin,...r.es2026,...r.node},parserOptions:{ecmaVersion:`latest`,projectService:!0,sourceType:`module`,tsconfigRootDir:import.meta.dirname}},name:`Configuration du projet`},l,_,u,v,d]);export{y as configTypescriptNavigateur};
import{Linter as e}from"eslint";import{defineConfig as t,globalIgnores as n}from"eslint/config";import r from"globals";import i from"@eslint/js";import a from"eslint-plugin-functional";import o from"typescript-eslint";import s from"eslint-plugin-sonarjs";import c from"eslint-plugin-perfectionist";import l from"eslint-plugin-unicorn";const u={name:`JavaScript`,rules:{...i.configs.recommended.rules,"array-callback-return":[`error`,{allowVoid:!0,checkForEach:!0}],"no-nested-ternary":`off`,"no-unassigned-vars":`error`,"no-unneeded-ternary":[`error`,{defaultAssignment:!1}],"no-unreachable-loop":`error`,"no-use-before-define":`off`,"no-useless-assignment":`error`,yoda:[`error`,`never`]}},d={name:`Programmation fonctionnelle`,plugins:{functional:a},rules:{...a.configs.noExceptions.rules,...a.configs.noMutations.rules,...a.configs.externalTypeScriptRecommended.rules,...a.configs.stylistic.rules,"@typescript-eslint/array-type":[`error`,{default:`generic`,readonly:`generic`}],"functional/prefer-immutable-types":`off`,"functional/prefer-tacit":`off`,"functional/readonly-type":[`error`,`generic`],"functional/type-declaration-immutability":`off`}},f={name:`SonarJS`,plugins:s.configs.recommended.plugins??{},rules:{...s.configs.recommended.rules}},p={name:`Tri`,plugins:c.configs[`recommended-natural`].plugins??{},rules:c.configs[`recommended-natural`].rules??{}},m=(e,t)=>e.find(e=>e.name===t)??{},h=m(o.configs.strictTypeChecked,`typescript-eslint/base`),g=m(o.configs.strictTypeChecked,`typescript-eslint/eslint-recommended`),_=m(o.configs.strictTypeChecked,`typescript-eslint/strict-type-checked`),v=m(o.configs.stylisticTypeChecked,`typescript-eslint/stylistic-type-checked`),y={languageOptions:h.languageOptions??{},name:`TypeScript`,plugins:h.plugins??{},rules:{...g.rules,..._.rules,...v.rules,"@typescript-eslint/consistent-type-definitions":[`error`,`type`],"@typescript-eslint/max-params":[`error`,{max:3}],"@typescript-eslint/method-signature-style":[`off`,`property`],"@typescript-eslint/no-magic-numbers":`off`,"@typescript-eslint/no-unnecessary-boolean-literal-compare":`off`,"@typescript-eslint/no-unnecessary-type-parameters":`off`}},b={name:`Unicorn`,plugins:{unicorn:l},rules:{...l.configs.unopinionated.rules,"unicorn/catch-error-name":[`error`],"unicorn/consistent-empty-array-spread":[`error`],"unicorn/custom-error-definition":[`error`],"unicorn/explicit-length-check":[`error`,{"non-zero":`not-equal`}],"unicorn/no-negated-condition":`error`,"unicorn/no-nested-ternary":`error`,"unicorn/no-null":`error`}},x=t([n([`dist/**/*`],`Ignore le dossier de compilation`),{files:[`**/*.js`,`**/*.ts`],name:`Fichiers à analyser`},{languageOptions:{ecmaVersion:`latest`,globals:{...r.browser,...r.builtin,...r.es2026,...r.node},parserOptions:{ecmaVersion:`latest`,projectService:!0,sourceType:`module`,tsconfigRootDir:import.meta.dirname}},name:`Configuration du projet`},u,y,d,b,f,p]);export{x as configTypescriptNavigateur};

View file

@ -4,6 +4,7 @@ import globals from "globals";
import { règlesJavaScript } from "./règles/javascript.ts";
import { règlesProgrammationFonctionnelle } from "./règles/programmation-fonctionnelle.ts";
import { règlesSonarJs } from "./règles/sonarjs.ts";
import { règlesTri } from "./règles/tri.ts";
import { règlesTypeScript } from "./règles/typescript.ts";
import { règlesUnicorn } from "./règles/unicorn.ts";
@ -31,5 +32,6 @@ export const configTypescriptNavigateur: ReadonlyArray<Linter.Config> = defineCo
règlesTypeScript,
règlesProgrammationFonctionnelle,
règlesUnicorn,
règlesSonarJs,
règlesTri,
]);

View file

@ -1,6 +1,6 @@
{
"name": "@gcch/configuration-eslint",
"version": "0.0.4",
"version": "0.0.5",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@ -20,13 +20,14 @@
"@eslint/js": "^9.36.0",
"eslint-plugin-functional": "^9.0.2",
"eslint-plugin-perfectionist": "^4.15.0",
"eslint-plugin-sonarjs": "^3.0.5",
"eslint-plugin-unicorn": "^61.0.2",
"globals": "^16.4.0",
"typescript-eslint": "^8.45.0"
},
"devDependencies": {
"@arethetypeswrong/core": "^0.18.2",
"@gcch/configuration-prettier": "^0.0.6",
"@gcch/configuration-prettier": "^0.0.7",
"knip": "^5.64.1",
"prettier": "^4.0.0-alpha.12",
"prettier-plugin-curly": "^0.3.2",

View file

@ -13,12 +13,6 @@ export const règlesJavaScript: Readonly<Linter.Config> = {
* @link [ESLint](https://eslint.org/docs/latest/rules/array-callback-return)
*/
"array-callback-return": ["error", { allowVoid: true, checkForEach: true }],
/**
* Interdit la définition de fonctions avec plus de 3 paramètres.
*
* @link [ESLint](https://eslint.org/docs/latest/rules/max-params#max)
*/
"max-params": ["error", { max: 3 }],
/** Surchargé par une meilleur version présente dans le plugin _Unicorn_. */
"no-nested-ternary": "off",
/**
@ -42,11 +36,13 @@ export const règlesJavaScript: Readonly<Linter.Config> = {
*/
"no-unreachable-loop": "error",
/**
* Interdit l'usage de variables non définies.
* Interdit l'utilisation d'une variable avant sa définition.
*
* La règle est désactivée ici pour que l'ordre de déclaration au sein d'un module n'ait pas d'importance.
*
* @link [ESLint](https://eslint.org/docs/latest/rules/no-use-before-define)
*/
"no-use-before-define": "error",
"no-use-before-define": "off",
/**
* Interdit l'assignation de variables non utilisées. Par la nature de l'analyse statique de code, certains cas
* peuvent ne pas être détectées.

View file

@ -13,27 +13,13 @@ export const règlesProgrammationFonctionnelle: Readonly<Linter.Config> = {
...functional.configs.stylistic.rules,
// Choix stylistique.
"@typescript-eslint/array-type": ["error", { default: "generic", readonly: "generic" }],
// L'imposition d'une immutabilité plus importante est extrêmement contraignante.
"functional/prefer-immutable-types": ["error", { enforcement: "ReadonlyShallow" }],
// L'imposition d'une immutabilité plus importante est extrêmement contraignante et réduit la lisibilité du code.
"functional/prefer-immutable-types": "off",
// Le style tacite complique la lecture du code.
"functional/prefer-tacit": "off",
// Choix stylistique.
"functional/readonly-type": ["error", "generic"],
// L'imposition d'une immutabilité plus importante est extrêmement contraignante.
"functional/type-declaration-immutability": [
"error",
{
ignoreInterfaces: false,
rules: [
{
comparator: "AtLeast",
fixer: false,
identifiers: "^(?!I?Mutable).+",
immutability: "ReadonlyShallow",
suggestions: false,
},
],
},
],
// L'imposition d'une immutabilité plus importante est extrêmement contraignante et réduit la lisibilité du code.
"functional/type-declaration-immutability": "off",
},
};

11
règles/sonarjs.ts Normal file
View file

@ -0,0 +1,11 @@
import type { Linter } from "eslint";
import sonarJs from "eslint-plugin-sonarjs";
export const règlesSonarJs: Readonly<Linter.Config> = {
name: "SonarJS",
plugins: sonarJs.configs.recommended.plugins ?? {},
rules: {
...sonarJs.configs.recommended.rules,
},
};

View file

@ -3,6 +3,7 @@ import type { Linter } from "eslint";
import perfectionist from "eslint-plugin-perfectionist";
export const règlesTri: Readonly<Linter.Config> = {
name: "Tri",
plugins: perfectionist.configs["recommended-natural"].plugins ?? {},
rules: perfectionist.configs["recommended-natural"].rules ?? {},
};

View file

@ -29,5 +29,50 @@ export const règlesTypeScript: Readonly<Linter.Config> = {
...desactivationsJavaScript.rules,
...strictTypeChecked.rules,
...stylisticTypeChecked.rules,
/**
* Impose un usage consistant entre interfaces et types. Ici préfère les déclarations de types.
*
* @link [typescript-eslint](https://typescript-eslint.io/rules/consistent-type-definitions)
*/
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
/**
* Interdit la définition de fonctions avec plus de 3 paramètres.
*
* @link [typescript-eslint](https://eslint.org/docs/latest/rules/max-params)
*/
"@typescript-eslint/max-params": ["error", { max: 3 }],
/**
* Impose une syntaxe particulière pour les signatures de méthodes au sein d'interfaces et types. Ici utilise la
* syntaxe « propriété ».
*
* ```typescript
* interface Exemple {
* func: (arg: string) => number;
* }
* ```
*
* @link [typescript-eslint](https://typescript-eslint.io/rules/method-signature-style/)
*/
"@typescript-eslint/method-signature-style": ["off", "property"],
/**
* Interdit l'usage de nombres magiques. Cette règle étend
* [no-magic-numbers](https://eslint.org/docs/latest/rules/no-magic-numbers) de la configuration de base _ESLint_.
*
* @link [typescript-eslint](https://eslint.org/docs/latest/rules/no-magic-numbers)
*/
"@typescript-eslint/no-magic-numbers": "off",
/**
* Autorise ici la comparaison avec des littéraux booléens. La désactivation de cette règle permet des comparaisons
* plus claires qu'avec l'opérateur de négation `!`.
*
* @link [typescript-eslint](https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare)
*/
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
/**
* Interdit l'usage de paramètres de types non utilisés plusieurs fois. Désactivé ici à cause de faux positifs.
*
* @link [typescript-eslint](https://typescript-eslint.io/rules/no-unnecessary-type-parameters)
*/
"@typescript-eslint/no-unnecessary-type-parameters": "off",
},
};

View file

@ -32,12 +32,24 @@ export const règlesUnicorn: Readonly<Linter.Config> = {
* @link [GitHub](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/explicit-length-check.md)
*/
"unicorn/explicit-length-check": ["error", { "non-zero": "not-equal" }],
/**
* Interdit l'usage de conditions négatives pour la clarté du code.
*
* @link [GitHub](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negated-condition.md)
*/
"unicorn/no-negated-condition": "error",
/**
* Interdit l'usage d'opérateurs ternaires imbriqués. Cette règle remplace celle présente par défaut dans _ESLint_
* avec le même nom.
*
* @link [GitHub](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-nested-ternary.md)
*/
"unicorn/no-nested-ternary": ["error"],
"unicorn/no-nested-ternary": "error",
/**
* Interdit l'usage de `null`.
*
* @link [GitHub](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-null.md)
*/
"unicorn/no-null": "error",
},
};

View file

@ -2,7 +2,7 @@ import { defineConfig } from "tsdown";
export default defineConfig({
clean: true,
dts: true,
dts: { oxc: true, parallel: true },
entry: ["./index.ts"],
minify: true,
platform: "node",