Compare commits
No commits in common. "dd42bc778ac33780a1ec5f82886c3601782c7816" and "18d605339f26774f882830b7b00bf1d3c1d7aa2b" have entirely different histories.
dd42bc778a
...
18d605339f
17 changed files with 40 additions and 139 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1 @@
|
|||
.cache
|
||||
node_modules
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
.cache
|
||||
bun.lock
|
||||
dist
|
||||
node_modules
|
||||
|
|
|
|||
|
|
@ -1,5 +1 @@
|
|||
# configuration-eslint
|
||||
|
||||
## Inspirations
|
||||
|
||||
- [eslint-config-tamia](https://github.com/sapegin/eslint-config-tamia).
|
||||
|
|
|
|||
47
bun.lock
47
bun.lock
|
|
@ -5,18 +5,15 @@
|
|||
"name": "configuration-eslint",
|
||||
"dependencies": {
|
||||
"@eslint/js": "^9.36.0",
|
||||
"eslint": "^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-dprint": "file:../configuration-dprint",
|
||||
"@gcch/configuration-prettier": "file:../configuration-prettier",
|
||||
"@gcch/configuration-prettier": "^0.0.6",
|
||||
"knip": "^5.64.1",
|
||||
"prettier": "^4.0.0-alpha.12",
|
||||
"prettier-plugin-curly": "^0.3.2",
|
||||
|
|
@ -83,11 +80,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-dprint": ["@gcch/configuration-dprint@file:../configuration-dprint", { "dependencies": { "@gcch/configuration-eslint": "^0.0.4" }, "devDependencies": { "@arethetypeswrong/core": "^0.18.2", "@gcch/configuration-prettier": "file:../configuration-prettier", "@types/node": "^24.6.2", "prettier": "^4.0.0-alpha.12", "prettier-plugin-curly": "^0.3.2", "prettier-plugin-jsdoc": "^1.3.3", "prettier-plugin-sh": "^0.18.0", "publint": "^0.3.13", "tsdown": "^0.15.6", "typescript": "^6.0.0-dev.20251002" } }],
|
||||
|
||||
"@gcch/configuration-eslint": ["@gcch/configuration-eslint@0.0.4", "http://localhost:4873/@gcch/configuration-eslint/-/configuration-eslint-0.0.4.tgz", { "dependencies": { "@eslint/js": "^9.36.0", "eslint-plugin-functional": "^9.0.2", "eslint-plugin-perfectionist": "^4.15.0", "eslint-plugin-unicorn": "^61.0.2", "globals": "^16.4.0", "typescript-eslint": "^8.45.0" }, "peerDependencies": { "eslint": "^9.36.0", "typescript": "next" } }, "sha512-skjlwNxTB8Zp8S6O8Gl1HhFqiJimhSkNzNTP8CYsB9FwkaiZbk4eEKyNMDCwov3gVVBCerZub/KOIbHxQzAyOA=="],
|
||||
|
||||
"@gcch/configuration-prettier": ["@gcch/configuration-prettier@file:../configuration-prettier", { "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" }, "devDependencies": { "@arethetypeswrong/core": "^0.18.2", "@gcch/configuration-eslint": "file:../configuration-eslint", "eslint": "^9.36.0", "knip": "^5.64.1", "publint": "^0.3.13", "tsdown": "^0.15.6", "typescript": "^6.0.0-dev.20251001" }, "peerDependencies": { "prettier": "^4.0.0-alpha.12" } }],
|
||||
"@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=="],
|
||||
|
||||
"@humanfs/core": ["@humanfs/core@0.19.1", "http://localhost:4873/@humanfs/core/-/core-0.19.1.tgz", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="],
|
||||
|
||||
|
|
@ -211,7 +204,7 @@
|
|||
|
||||
"@types/ms": ["@types/ms@2.1.0", "http://localhost:4873/@types/ms/-/ms-2.1.0.tgz", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
|
||||
|
||||
"@types/node": ["@types/node@24.6.2", "http://localhost:4873/@types/node/-/node-24.6.2.tgz", { "dependencies": { "undici-types": "~7.13.0" } }, "sha512-d2L25Y4j+W3ZlNAeMKcy7yDsK425ibcAOO2t7aPTz6gNMH0z2GThtwENCDc0d/Pw9wgyRqE5Px1wkV7naz8ang=="],
|
||||
"@types/node": ["@types/node@24.6.1", "http://localhost:4873/@types/node/-/node-24.6.1.tgz", { "dependencies": { "undici-types": "~7.13.0" } }, "sha512-ljvjjs3DNXummeIaooB4cLBKg2U6SPI6Hjra/9rRIy7CpM0HpLtG9HptkMKAb4HYWy5S7HUvJEuWgr/y0U8SHw=="],
|
||||
|
||||
"@types/unist": ["@types/unist@3.0.3", "http://localhost:4873/@types/unist/-/unist-3.0.3.tgz", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
|
||||
|
||||
|
|
@ -273,9 +266,7 @@
|
|||
|
||||
"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@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=="],
|
||||
"builtin-modules": ["builtin-modules@5.0.0", "http://localhost:4873/builtin-modules/-/builtin-modules-5.0.0.tgz", {}, "sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg=="],
|
||||
|
||||
"cac": ["cac@6.7.14", "http://localhost:4873/cac/-/cac-6.7.14.tgz", {}, "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ=="],
|
||||
|
||||
|
|
@ -339,7 +330,7 @@
|
|||
|
||||
"escalade": ["escalade@3.2.0", "http://localhost:4873/escalade/-/escalade-3.2.0.tgz", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="],
|
||||
|
||||
"escape-string-regexp": ["escape-string-regexp@4.0.0", "http://localhost:4873/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],
|
||||
"escape-string-regexp": ["escape-string-regexp@5.0.0", "http://localhost:4873/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="],
|
||||
|
||||
"eslint": ["eslint@9.36.0", "http://localhost:4873/eslint/-/eslint-9.36.0.tgz", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.0", "@eslint/config-helpers": "^0.3.1", "@eslint/core": "^0.15.2", "@eslint/eslintrc": "^3.3.1", "@eslint/js": "9.36.0", "@eslint/plugin-kit": "^0.3.5", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.4.0", "eslint-visitor-keys": "^4.2.1", "espree": "^10.4.0", "esquery": "^1.5.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", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-hB4FIzXovouYzwzECDcUkJ4OcfOEkXTv2zRY6B9bkwjx/cprAq0uvm1nl7zvQ0/TsUk0zQiN4uPfJpB9m+rPMQ=="],
|
||||
|
||||
|
|
@ -347,8 +338,6 @@
|
|||
|
||||
"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=="],
|
||||
|
|
@ -409,8 +398,6 @@
|
|||
|
||||
"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=="],
|
||||
|
|
@ -473,8 +460,6 @@
|
|||
|
||||
"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=="],
|
||||
|
|
@ -619,10 +604,6 @@
|
|||
|
||||
"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=="],
|
||||
|
|
@ -643,8 +624,6 @@
|
|||
|
||||
"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=="],
|
||||
|
|
@ -711,7 +690,7 @@
|
|||
|
||||
"type-check": ["type-check@0.4.0", "http://localhost:4873/type-check/-/type-check-0.4.0.tgz", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="],
|
||||
|
||||
"typescript": ["typescript@6.0.0-dev.20251002", "http://localhost:4873/typescript/-/typescript-6.0.0-dev.20251002.tgz", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-Js9dMmEF5AeAGSK8Wbb5JvzSwWb0jiwA5BdHp3ko8OC5ssRvzcp5m4OTo/jUY7+mILVfpQZYUHYySGyfUYceAA=="],
|
||||
"typescript": ["typescript@6.0.0-dev.20251001", "http://localhost:4873/typescript/-/typescript-6.0.0-dev.20251001.tgz", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-FwticMnSAyRGVO2htUy3PKk7Q80NwX+bdysyyxzbx9Bs90efZ/UrXSJp+jdQqzFcrx/0Pf3lQV3IGz+Aoz1xMw=="],
|
||||
|
||||
"typescript-eslint": ["typescript-eslint@8.45.0", "http://localhost:4873/typescript-eslint/-/typescript-eslint-8.45.0.tgz", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.45.0", "@typescript-eslint/parser": "8.45.0", "@typescript-eslint/typescript-estree": "8.45.0", "@typescript-eslint/utils": "8.45.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-qzDmZw/Z5beNLUrXfd0HIW6MzIaAV5WNDxmMs9/3ojGOpYavofgNAAD/nC6tGV2PczIi0iw8vot2eAe/sBn7zg=="],
|
||||
|
||||
|
|
@ -769,10 +748,6 @@
|
|||
|
||||
"@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=="],
|
||||
|
||||
"@gcch/configuration-dprint/@gcch/configuration-prettier": ["@gcch/configuration-prettier@file:../configuration-prettier", {}],
|
||||
|
||||
"@gcch/configuration-prettier/@gcch/configuration-eslint": ["@gcch/configuration-eslint@file:.", {}],
|
||||
|
||||
"@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=="],
|
||||
|
||||
"@typescript-eslint/eslint-plugin/@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.45.0", "http://localhost:4873/@typescript-eslint/type-utils/-/type-utils-8.45.0.tgz", { "dependencies": { "@typescript-eslint/types": "8.45.0", "@typescript-eslint/typescript-estree": "8.45.0", "@typescript-eslint/utils": "8.45.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-bpjepLlHceKgyMEPglAeULX1vixJDgaKocp0RVJ5u4wLJIMNuKtUXIczpJCPcn2waII0yuvks/5m5/h3ZQKs0A=="],
|
||||
|
|
@ -801,16 +776,10 @@
|
|||
|
||||
"clean-regexp/escape-string-regexp": ["escape-string-regexp@1.0.5", "http://localhost:4873/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="],
|
||||
|
||||
"eslint-plugin-functional/escape-string-regexp": ["escape-string-regexp@5.0.0", "http://localhost:4873/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="],
|
||||
|
||||
"eslint-plugin-sonarjs/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-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=="],
|
||||
"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=="],
|
||||
|
||||
"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=="],
|
||||
|
|
@ -847,8 +816,6 @@
|
|||
|
||||
"@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-plugin-sonarjs/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/@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=="],
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"dictionaries": ["fr-fr", "en-gb"],
|
||||
"words": ["Navigateur", "tsdown", "publint", "sonarjs"]
|
||||
"words": ["Navigateur", "tsdown"]
|
||||
}
|
||||
|
|
|
|||
2
dist/index.js
vendored
2
dist/index.js
vendored
|
|
@ -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-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};
|
||||
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};
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"extends": "node_modules/@gcch/configuration-dprint/dprint.json"
|
||||
}
|
||||
2
index.ts
2
index.ts
|
|
@ -4,7 +4,6 @@ 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";
|
||||
|
|
@ -32,6 +31,5 @@ export const configTypescriptNavigateur: ReadonlyArray<Linter.Config> = defineCo
|
|||
règlesTypeScript,
|
||||
règlesProgrammationFonctionnelle,
|
||||
règlesUnicorn,
|
||||
règlesSonarJs,
|
||||
règlesTri,
|
||||
]);
|
||||
|
|
|
|||
2
justfile
2
justfile
|
|
@ -2,7 +2,7 @@ set shell := ["/usr/bin/fish", "-c"]
|
|||
|
||||
# Formate le code.
|
||||
formate:
|
||||
bun prettier --cache --cache-location ".cache/prettiercache" --ignore-unknown --parallel-workers 8 --write .
|
||||
bun prettier -uw .
|
||||
dprint fmt
|
||||
|
||||
# Met à jour les dépendances NPM.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
{
|
||||
"name": "@gcch/configuration-eslint",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.4",
|
||||
"type": "module",
|
||||
"description": "Configuration dprint partageable pour gcch.",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"module": "./dist/index.js",
|
||||
|
|
@ -19,18 +18,15 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@eslint/js": "^9.36.0",
|
||||
"eslint": "^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-dprint": "file:../configuration-dprint",
|
||||
"@gcch/configuration-prettier": "file:../configuration-prettier",
|
||||
"@gcch/configuration-prettier": "^0.0.6",
|
||||
"knip": "^5.64.1",
|
||||
"prettier": "^4.0.0-alpha.12",
|
||||
"prettier-plugin-curly": "^0.3.2",
|
||||
|
|
|
|||
|
|
@ -13,6 +13,12 @@ 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",
|
||||
/**
|
||||
|
|
@ -36,13 +42,11 @@ export const règlesJavaScript: Readonly<Linter.Config> = {
|
|||
*/
|
||||
"no-unreachable-loop": "error",
|
||||
/**
|
||||
* 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.
|
||||
* Interdit l'usage de variables non définies.
|
||||
*
|
||||
* @link [ESLint](https://eslint.org/docs/latest/rules/no-use-before-define)
|
||||
*/
|
||||
"no-use-before-define": "off",
|
||||
"no-use-before-define": "error",
|
||||
/**
|
||||
* 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.
|
||||
|
|
|
|||
|
|
@ -13,13 +13,27 @@ 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 et réduit la lisibilité du code.
|
||||
"functional/prefer-immutable-types": "off",
|
||||
// L'imposition d'une immutabilité plus importante est extrêmement contraignante.
|
||||
"functional/prefer-immutable-types": ["error", { enforcement: "ReadonlyShallow" }],
|
||||
// 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 et réduit la lisibilité du code.
|
||||
"functional/type-declaration-immutability": "off",
|
||||
// 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,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
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,
|
||||
},
|
||||
};
|
||||
|
|
@ -3,7 +3,6 @@ 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 ?? {},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,50 +29,5 @@ 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",
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -32,24 +32,12 @@ 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",
|
||||
/**
|
||||
* 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",
|
||||
"unicorn/no-nested-ternary": ["error"],
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { defineConfig } from "tsdown";
|
|||
|
||||
export default defineConfig({
|
||||
clean: true,
|
||||
dts: { oxc: true, parallel: true },
|
||||
dts: true,
|
||||
entry: ["./index.ts"],
|
||||
minify: true,
|
||||
platform: "node",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue