diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 5d75a9e..93101fa 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -2,6 +2,8 @@ const { defineConfig } = require('eslint-define-config'); const { readGitignoreFiles } = require('eslint-gitignore'); +/// + module.exports = defineConfig({ ignorePatterns: [ ...readGitignoreFiles(), diff --git a/package.json b/package.json index 3055db7..1227482 100644 --- a/package.json +++ b/package.json @@ -15,15 +15,16 @@ "type": "module", "license": "MIT", "devDependencies": { - "@types/eslint": "~8.44.5", + "@eslint-types/typescript-eslint": "workspace:~", + "@types/eslint": "~8.44.6", "@types/json-schema": "~7.0.14", - "@types/node": "~20.8.7", - "@typescript-eslint/eslint-plugin": "~6.8.0", - "@typescript-eslint/parser": "~6.8.0", - "change-case": "~5.0.2", - "eslint": "~8.51.0", + "@types/node": "~20.8.8", + "@typescript-eslint/eslint-plugin": "~6.9.0", + "@typescript-eslint/parser": "~6.9.0", + "change-case": "~5.1.2", + "eslint": "~8.52.0", "eslint-config-prettier": "~9.0.0", - "eslint-define-config": "~1.24.1", + "eslint-define-config": "2.0.0-beta.1", "eslint-gitignore": "~0.1.0", "eslint-plugin-prettier": "~5.0.1", "eslint-plugin-unicorn": "~48.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bc5eb41..928b650 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,42 +8,45 @@ importers: .: devDependencies: + '@eslint-types/typescript-eslint': + specifier: workspace:~ + version: link:types/typescript-eslint '@types/eslint': - specifier: ~8.44.5 - version: 8.44.5 + specifier: ~8.44.6 + version: 8.44.6 '@types/json-schema': specifier: ~7.0.14 version: 7.0.14 '@types/node': - specifier: ~20.8.7 - version: 20.8.7 + specifier: ~20.8.8 + version: 20.8.8 '@typescript-eslint/eslint-plugin': - specifier: ~6.8.0 - version: 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) + specifier: ~6.9.0 + version: 6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2) '@typescript-eslint/parser': - specifier: ~6.8.0 - version: 6.8.0(eslint@8.51.0)(typescript@5.2.2) + specifier: ~6.9.0 + version: 6.9.0(eslint@8.52.0)(typescript@5.2.2) change-case: - specifier: ~5.0.2 - version: 5.0.2 + specifier: ~5.1.2 + version: 5.1.2 eslint: - specifier: ~8.51.0 - version: 8.51.0 + specifier: ~8.52.0 + version: 8.52.0 eslint-config-prettier: specifier: ~9.0.0 - version: 9.0.0(eslint@8.51.0) + version: 9.0.0(eslint@8.52.0) eslint-define-config: - specifier: ~1.24.1 - version: 1.24.1 + specifier: 2.0.0-beta.1 + version: 2.0.0-beta.1 eslint-gitignore: specifier: ~0.1.0 - version: 0.1.0(eslint@8.51.0) + version: 0.1.0(eslint@8.52.0) eslint-plugin-prettier: specifier: ~5.0.1 - version: 5.0.1(@types/eslint@8.44.5)(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3) + version: 5.0.1(@types/eslint@8.44.6)(eslint-config-prettier@9.0.0)(eslint@8.52.0)(prettier@3.0.3) eslint-plugin-unicorn: specifier: ~48.0.1 - version: 48.0.1(eslint@8.51.0) + version: 48.0.1(eslint@8.52.0) json-schema: specifier: ~0.4.0 version: 0.4.0 @@ -76,25 +79,25 @@ importers: devDependencies: eslint-plugin-deprecation: specifier: 2.0.0 - version: 2.0.0(eslint@8.51.0)(typescript@5.2.2) + version: 2.0.0(eslint@8.52.0)(typescript@5.2.2) types/import: devDependencies: eslint-plugin-import: specifier: 2.28.1 - version: 2.28.1(@typescript-eslint/parser@6.8.0)(eslint@8.51.0) + version: 2.28.1(@typescript-eslint/parser@6.9.0)(eslint@8.52.0) types/jsdoc: devDependencies: eslint-plugin-jsdoc: specifier: 46.8.2 - version: 46.8.2(eslint@8.51.0) + version: 46.8.2(eslint@8.52.0) types/typescript-eslint: devDependencies: '@typescript-eslint/eslint-plugin': specifier: 6.8.0 - version: 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) + version: 6.8.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2) packages: @@ -342,13 +345,13 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.51.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.52.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.51.0 + eslint: 8.52.0 eslint-visitor-keys: 3.4.3 dev: true @@ -374,16 +377,16 @@ packages: - supports-color dev: true - /@eslint/js@8.51.0: - resolution: {integrity: sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==} + /@eslint/js@8.52.0: + resolution: {integrity: sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@humanwhocodes/config-array@0.11.11: - resolution: {integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==} + /@humanwhocodes/config-array@0.11.13: + resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 1.2.1 + '@humanwhocodes/object-schema': 2.0.1 debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: @@ -395,8 +398,8 @@ packages: engines: {node: '>=12.22'} dev: true - /@humanwhocodes/object-schema@1.2.1: - resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + /@humanwhocodes/object-schema@2.0.1: + resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} dev: true /@isaacs/cliui@8.0.2: @@ -455,8 +458,8 @@ packages: tslib: 2.6.2 dev: true - /@types/eslint@8.44.5: - resolution: {integrity: sha512-Ol2eio8LtD/tGM4Ga7Jb83NuFwEv3NqvssSlifXL9xuFpSyQZw0ecmm2Kux6iU0KxQmp95hlPmGCzGJ0TCFeRA==} + /@types/eslint@8.44.6: + resolution: {integrity: sha512-P6bY56TVmX8y9J87jHNgQh43h6VVU+6H7oN7hgvivV81K2XY8qJZ5vqPy/HdUoVIelii2kChYVzQanlswPWVFw==} dependencies: '@types/estree': 1.0.3 '@types/json-schema': 7.0.14 @@ -470,7 +473,7 @@ packages: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.8.7 + '@types/node': 20.8.8 dev: true /@types/json-schema@7.0.14: @@ -489,8 +492,8 @@ packages: resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} dev: true - /@types/node@20.8.7: - resolution: {integrity: sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==} + /@types/node@20.8.8: + resolution: {integrity: sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ==} dependencies: undici-types: 5.25.3 dev: true @@ -507,7 +510,7 @@ packages: resolution: {integrity: sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==} dev: true - /@typescript-eslint/eslint-plugin@6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2): + /@typescript-eslint/eslint-plugin@6.8.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2): resolution: {integrity: sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -519,13 +522,13 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.9.1 - '@typescript-eslint/parser': 6.8.0(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.9.0(eslint@8.52.0)(typescript@5.2.2) '@typescript-eslint/scope-manager': 6.8.0 - '@typescript-eslint/type-utils': 6.8.0(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/utils': 6.8.0(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/type-utils': 6.8.0(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.8.0(eslint@8.52.0)(typescript@5.2.2) '@typescript-eslint/visitor-keys': 6.8.0 debug: 4.3.4 - eslint: 8.51.0 + eslint: 8.52.0 graphemer: 1.4.0 ignore: 5.2.4 natural-compare: 1.4.0 @@ -536,22 +539,51 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.8.0(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==} + /@typescript-eslint/eslint-plugin@6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2): + resolution: {integrity: sha512-lgX7F0azQwRPB7t7WAyeHWVfW1YJ9NIgd9mvGhfQpRY56X6AVf8mwM8Wol+0z4liE7XX3QOt8MN1rUKCfSjRIA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.8.0 - '@typescript-eslint/types': 6.8.0 - '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.8.0 + '@eslint-community/regexpp': 4.9.1 + '@typescript-eslint/parser': 6.9.0(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.9.0 + '@typescript-eslint/type-utils': 6.9.0(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.9.0(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.9.0 + debug: 4.3.4 + eslint: 8.52.0 + graphemer: 1.4.0 + ignore: 5.2.4 + natural-compare: 1.4.0 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/parser@6.9.0(eslint@8.52.0)(typescript@5.2.2): + resolution: {integrity: sha512-GZmjMh4AJ/5gaH4XF2eXA8tMnHWP+Pm1mjQR2QN4Iz+j/zO04b9TOvJYOX2sCNIQHtRStKTxRY1FX7LhpJT4Gw==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 6.9.0 + '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.9.0 debug: 4.3.4 - eslint: 8.51.0 + eslint: 8.52.0 typescript: 5.2.2 transitivePeerDependencies: - supports-color @@ -565,7 +597,15 @@ packages: '@typescript-eslint/visitor-keys': 6.8.0 dev: true - /@typescript-eslint/type-utils@6.8.0(eslint@8.51.0)(typescript@5.2.2): + /@typescript-eslint/scope-manager@6.9.0: + resolution: {integrity: sha512-1R8A9Mc39n4pCCz9o79qRO31HGNDvC7UhPhv26TovDsWPBDx+Sg3rOZdCELIA3ZmNoWAuxaMOT7aWtGRSYkQxw==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/visitor-keys': 6.9.0 + dev: true + + /@typescript-eslint/type-utils@6.8.0(eslint@8.52.0)(typescript@5.2.2): resolution: {integrity: sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -576,9 +616,29 @@ packages: optional: true dependencies: '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) - '@typescript-eslint/utils': 6.8.0(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.8.0(eslint@8.52.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.51.0 + eslint: 8.52.0 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/type-utils@6.9.0(eslint@8.52.0)(typescript@5.2.2): + resolution: {integrity: sha512-XXeahmfbpuhVbhSOROIzJ+b13krFmgtc4GlEuu1WBT+RpyGPIA4Y/eGnXzjbDj5gZLzpAXO/sj+IF/x2GtTMjQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.2.2) + '@typescript-eslint/utils': 6.9.0(eslint@8.52.0)(typescript@5.2.2) + debug: 4.3.4 + eslint: 8.52.0 ts-api-utils: 1.0.3(typescript@5.2.2) typescript: 5.2.2 transitivePeerDependencies: @@ -590,6 +650,11 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true + /@typescript-eslint/types@6.9.0: + resolution: {integrity: sha512-+KB0lbkpxBkBSiVCuQvduqMJy+I1FyDbdwSpM3IoBS7APl4Bu15lStPjgBIdykdRqQNYqYNMa8Kuidax6phaEw==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + /@typescript-eslint/typescript-estree@6.8.0(typescript@5.2.2): resolution: {integrity: sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -611,19 +676,59 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@6.8.0(eslint@8.51.0)(typescript@5.2.2): + /@typescript-eslint/typescript-estree@6.9.0(typescript@5.2.2): + resolution: {integrity: sha512-NJM2BnJFZBEAbCfBP00zONKXvMqihZCrmwCaik0UhLr0vAgb6oguXxLX1k00oQyD+vZZ+CJn3kocvv2yxm4awQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/visitor-keys': 6.9.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils@6.8.0(eslint@8.52.0)(typescript@5.2.2): resolution: {integrity: sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) '@types/json-schema': 7.0.14 '@types/semver': 7.5.3 '@typescript-eslint/scope-manager': 6.8.0 '@typescript-eslint/types': 6.8.0 '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) - eslint: 8.51.0 + eslint: 8.52.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/utils@6.9.0(eslint@8.52.0)(typescript@5.2.2): + resolution: {integrity: sha512-5Wf+Jsqya7WcCO8me504FBigeQKVLAMPmUzYgDbWchINNh1KJbxCgVya3EQ2MjvJMVeXl3pofRmprqX6mfQkjQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) + '@types/json-schema': 7.0.14 + '@types/semver': 7.5.3 + '@typescript-eslint/scope-manager': 6.9.0 + '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.2.2) + eslint: 8.52.0 semver: 7.5.4 transitivePeerDependencies: - supports-color @@ -638,6 +743,18 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@typescript-eslint/visitor-keys@6.9.0: + resolution: {integrity: sha512-dGtAfqjV6RFOtIP8I0B4ZTBRrlTT8NHHlZZSchQx3qReaoDeXhYM++M4So2AgFK9ZB0emRPA6JI1HkafzA2Ibg==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.9.0 + eslint-visitor-keys: 3.4.3 + dev: true + + /@ungap/structured-clone@1.2.0: + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + dev: true + /acorn-jsx@5.3.2(acorn@8.10.0): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -860,8 +977,8 @@ packages: supports-color: 7.2.0 dev: true - /change-case@5.0.2: - resolution: {integrity: sha512-tH6YZXViaeC2/Mnt8m4gSmbZfNorC2rhwCX2bXw8SYZWr8ljCPB7iA+1TLG9t7yroWBFauc63LlOZ1gucMVCWw==} + /change-case@5.1.2: + resolution: {integrity: sha512-CAtbGEDulyjzs05RXy3uKcwqeztz/dMEuAc1Xu9NQBsbrhuGMneL0u9Dj5SoutLKBFYun8txxYIwhjtLNfUmCA==} dev: true /ci-info@3.9.0: @@ -1183,21 +1300,21 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-prettier@9.0.0(eslint@8.51.0): + /eslint-config-prettier@9.0.0(eslint@8.52.0): resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.51.0 + eslint: 8.52.0 dev: true - /eslint-define-config@1.24.1: - resolution: {integrity: sha512-o36vBhPSWyIQlHoMqGhhcGmOOm2A2ccBVIdLTG/AWdm9YmjpsLpf+5ntf9LlHR6dduLREgxtGwvwPwSt7vnXJg==} - engines: {node: '>=18.0.0', npm: '>=9.0.0', pnpm: '>= 8.6.0'} + /eslint-define-config@2.0.0-beta.1: + resolution: {integrity: sha512-KoPw1VZYy/+ptQ9C/sC2iQCHre75ef0YCP0rWP2lmeaDxG4lXbPxVrmFXEOyQa7XeEya4uOvX9OHdrzOQxwCJQ==} + engines: {node: '>=18.0.0', npm: '>=9.0.0', pnpm: '>=8.6.0'} dev: true - /eslint-gitignore@0.1.0(eslint@8.51.0): + /eslint-gitignore@0.1.0(eslint@8.52.0): resolution: {integrity: sha512-VFvY5Wyjuz5xXDC/NeONHzsh4YQNok2Gzg4SftAAuhkbrdHv5CChjfiFyLKhRlgOdCJr5kBquaLXHtuDBTW2/Q==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -1205,7 +1322,7 @@ packages: dependencies: array.prototype.flatmap: 1.3.2 debug: 4.3.4 - eslint: 8.51.0 + eslint: 8.52.0 fast-glob: 3.3.1 transitivePeerDependencies: - supports-color @@ -1221,7 +1338,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-node@0.3.9)(eslint@8.51.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.9.0)(eslint-import-resolver-node@0.3.9)(eslint@8.52.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -1242,22 +1359,22 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.8.0(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.9.0(eslint@8.52.0)(typescript@5.2.2) debug: 3.2.7 - eslint: 8.51.0 + eslint: 8.52.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-deprecation@2.0.0(eslint@8.51.0)(typescript@5.2.2): + /eslint-plugin-deprecation@2.0.0(eslint@8.52.0)(typescript@5.2.2): resolution: {integrity: sha512-OAm9Ohzbj11/ZFyICyR5N6LbOIvQMp7ZU2zI7Ej0jIc8kiGUERXPNMfw2QqqHD1ZHtjMub3yPZILovYEYucgoQ==} peerDependencies: eslint: ^7.0.0 || ^8.0.0 typescript: ^4.2.4 || ^5.0.0 dependencies: - '@typescript-eslint/utils': 6.8.0(eslint@8.51.0)(typescript@5.2.2) - eslint: 8.51.0 + '@typescript-eslint/utils': 6.8.0(eslint@8.52.0)(typescript@5.2.2) + eslint: 8.52.0 tslib: 2.6.2 tsutils: 3.21.0(typescript@5.2.2) typescript: 5.2.2 @@ -1265,7 +1382,7 @@ packages: - supports-color dev: true - /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.8.0)(eslint@8.51.0): + /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.9.0)(eslint@8.52.0): resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} engines: {node: '>=4'} peerDependencies: @@ -1275,16 +1392,16 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.8.0(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.9.0(eslint@8.52.0)(typescript@5.2.2) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.51.0 + eslint: 8.52.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-node@0.3.9)(eslint@8.51.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.9.0)(eslint-import-resolver-node@0.3.9)(eslint@8.52.0) has: 1.0.4 is-core-module: 2.13.0 is-glob: 4.0.3 @@ -1300,7 +1417,7 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc@46.8.2(eslint@8.51.0): + /eslint-plugin-jsdoc@46.8.2(eslint@8.52.0): resolution: {integrity: sha512-5TSnD018f3tUJNne4s4gDWQflbsgOycIKEUBoCLn6XtBMgNHxQFmV8vVxUtiPxAQq8lrX85OaSG/2gnctxw9uQ==} engines: {node: '>=16'} peerDependencies: @@ -1311,7 +1428,7 @@ packages: comment-parser: 1.4.0 debug: 4.3.4 escape-string-regexp: 4.0.0 - eslint: 8.51.0 + eslint: 8.52.0 esquery: 1.5.0 is-builtin-module: 3.2.1 semver: 7.5.4 @@ -1320,7 +1437,7 @@ packages: - supports-color dev: true - /eslint-plugin-prettier@5.0.1(@types/eslint@8.44.5)(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3): + /eslint-plugin-prettier@5.0.1(@types/eslint@8.44.6)(eslint-config-prettier@9.0.0)(eslint@8.52.0)(prettier@3.0.3): resolution: {integrity: sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -1334,25 +1451,25 @@ packages: eslint-config-prettier: optional: true dependencies: - '@types/eslint': 8.44.5 - eslint: 8.51.0 - eslint-config-prettier: 9.0.0(eslint@8.51.0) + '@types/eslint': 8.44.6 + eslint: 8.52.0 + eslint-config-prettier: 9.0.0(eslint@8.52.0) prettier: 3.0.3 prettier-linter-helpers: 1.0.0 synckit: 0.8.5 dev: true - /eslint-plugin-unicorn@48.0.1(eslint@8.51.0): + /eslint-plugin-unicorn@48.0.1(eslint@8.52.0): resolution: {integrity: sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==} engines: {node: '>=16'} peerDependencies: eslint: '>=8.44.0' dependencies: '@babel/helper-validator-identifier': 7.22.20 - '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) ci-info: 3.9.0 clean-regexp: 1.0.0 - eslint: 8.51.0 + eslint: 8.52.0 esquery: 1.5.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 @@ -1379,18 +1496,19 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.51.0: - resolution: {integrity: sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA==} + /eslint@8.52.0: + resolution: {integrity: sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) '@eslint-community/regexpp': 4.9.1 '@eslint/eslintrc': 2.1.2 - '@eslint/js': 8.51.0 - '@humanwhocodes/config-array': 0.11.11 + '@eslint/js': 8.52.0 + '@humanwhocodes/config-array': 0.11.13 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 diff --git a/scripts/generate-plugin-dts.ts b/scripts/generate-plugin-dts.ts index c53be88..675be81 100644 --- a/scripts/generate-plugin-dts.ts +++ b/scripts/generate-plugin-dts.ts @@ -95,12 +95,17 @@ for (const workspace of workspaces) { }), ); + const optionTypes = options.map((_, index) => `Schema${index}?`); + const ruleOptionTypeValue = Array.isArray(meta.schema) + ? `[${optionTypes.join(', ')}]` + : meta.schema + ? 'Schema0' + : '[]'; + await writeFile( join(workspaceDirectory, 'rules', `${ruleName}.d.ts`), `${options.join('\n')} -export type ${pascalCase(ruleName)}RuleOptions = [${options - .map((_, index) => `Schema${index}?`) - .join(', ')}] +export type ${pascalCase(ruleName)}RuleOptions = ${ruleOptionTypeValue}; `, { encoding: 'utf8', diff --git a/types/import/rules/extensions.d.ts b/types/import/rules/extensions.d.ts index 2d0e534..b971839 100644 --- a/types/import/rules/extensions.d.ts +++ b/types/import/rules/extensions.d.ts @@ -48,4 +48,4 @@ export type Schema0 = }, ]; -export type ExtensionsRuleOptions = [Schema0?]; +export type ExtensionsRuleOptions = Schema0; diff --git a/types/import/rules/no-commonjs.d.ts b/types/import/rules/no-commonjs.d.ts index 1fca9f4..afc6fa4 100644 --- a/types/import/rules/no-commonjs.d.ts +++ b/types/import/rules/no-commonjs.d.ts @@ -9,4 +9,4 @@ export type Schema0 = }, ]; -export type NoCommonjsRuleOptions = [Schema0?]; +export type NoCommonjsRuleOptions = Schema0; diff --git a/types/typescript-eslint/rules/comma-dangle.d.ts b/types/typescript-eslint/rules/comma-dangle.d.ts index b55d9e8..58d5e02 100644 --- a/types/typescript-eslint/rules/comma-dangle.d.ts +++ b/types/typescript-eslint/rules/comma-dangle.d.ts @@ -21,4 +21,4 @@ export type ValueWithIgnore = | 'only-multiline' | 'ignore'; -export type CommaDangleRuleOptions = [Schema0?]; +export type CommaDangleRuleOptions = Schema0; diff --git a/types/typescript-eslint/rules/func-call-spacing.d.ts b/types/typescript-eslint/rules/func-call-spacing.d.ts index b0aea43..6599ed0 100644 --- a/types/typescript-eslint/rules/func-call-spacing.d.ts +++ b/types/typescript-eslint/rules/func-call-spacing.d.ts @@ -9,4 +9,4 @@ export type Schema0 = }, ]; -export type FuncCallSpacingRuleOptions = [Schema0?]; +export type FuncCallSpacingRuleOptions = Schema0; diff --git a/types/typescript-eslint/rules/init-declarations.d.ts b/types/typescript-eslint/rules/init-declarations.d.ts index eb30a23..44e2fed 100644 --- a/types/typescript-eslint/rules/init-declarations.d.ts +++ b/types/typescript-eslint/rules/init-declarations.d.ts @@ -9,4 +9,4 @@ export type Schema0 = }, ]; -export type InitDeclarationsRuleOptions = [Schema0?]; +export type InitDeclarationsRuleOptions = Schema0; diff --git a/types/typescript-eslint/rules/naming-convention.d.ts b/types/typescript-eslint/rules/naming-convention.d.ts index 07de29e..16add98 100644 --- a/types/typescript-eslint/rules/naming-convention.d.ts +++ b/types/typescript-eslint/rules/naming-convention.d.ts @@ -443,4 +443,4 @@ export interface MatchRegexConfig { regex: string; } -export type NamingConventionRuleOptions = [Schema0?]; +export type NamingConventionRuleOptions = Schema0; diff --git a/types/typescript-eslint/rules/no-extra-parens.d.ts b/types/typescript-eslint/rules/no-extra-parens.d.ts index 2c7f3dc..d9e7d0f 100644 --- a/types/typescript-eslint/rules/no-extra-parens.d.ts +++ b/types/typescript-eslint/rules/no-extra-parens.d.ts @@ -18,4 +18,4 @@ export type Schema0 = }, ]; -export type NoExtraParensRuleOptions = [Schema0?]; +export type NoExtraParensRuleOptions = Schema0; diff --git a/types/typescript-eslint/rules/no-restricted-imports.d.ts b/types/typescript-eslint/rules/no-restricted-imports.d.ts index f162a12..e944033 100644 --- a/types/typescript-eslint/rules/no-restricted-imports.d.ts +++ b/types/typescript-eslint/rules/no-restricted-imports.d.ts @@ -47,4 +47,4 @@ export type Schema0 = }, ]; -export type NoRestrictedImportsRuleOptions = [Schema0?]; +export type NoRestrictedImportsRuleOptions = Schema0; diff --git a/types/typescript-eslint/rules/padding-line-between-statements.d.ts b/types/typescript-eslint/rules/padding-line-between-statements.d.ts index 73a54ca..2c29e09 100644 --- a/types/typescript-eslint/rules/padding-line-between-statements.d.ts +++ b/types/typescript-eslint/rules/padding-line-between-statements.d.ts @@ -134,4 +134,4 @@ export type Schema0 = Array<{ next: StatementType; }>; -export type PaddingLineBetweenStatementsRuleOptions = [Schema0?]; +export type PaddingLineBetweenStatementsRuleOptions = Schema0; diff --git a/types/typescript-eslint/rules/semi.d.ts b/types/typescript-eslint/rules/semi.d.ts index a610b9e..a0d26dd 100644 --- a/types/typescript-eslint/rules/semi.d.ts +++ b/types/typescript-eslint/rules/semi.d.ts @@ -16,4 +16,4 @@ export type Schema0 = }, ]; -export type SemiRuleOptions = [Schema0?]; +export type SemiRuleOptions = Schema0;