diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index fc4367e..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,43 +0,0 @@ -/** @type {import('eslint').ESLint.ConfigData} */ -module.exports = { - env: { - node: true, - }, - extends: [ - 'eslint:recommended', - 'plugin:import/errors', - 'plugin:import/warnings', - 'plugin:import/typescript', - 'plugin:jest/recommended', - 'plugin:jest/style', - 'plugin:promise/recommended', - 'prettier', - ], - parserOptions: { - ecmaVersion: 2020, - }, - rules: { - camelcase: 0, - 'no-param-reassign': 'warn', - 'require-await': 'error', - 'no-use-before-define': 0, - 'no-restricted-syntax': 0, - 'no-await-in-loop': 0, - 'prefer-template': 'off', - 'promise/always-return': 'error', - 'promise/no-return-wrap': 'error', - 'promise/param-names': 'error', - 'promise/catch-or-return': 'error', - 'promise/no-native': 'off', - 'promise/no-nesting': 'warn', - 'promise/no-promise-in-callback': 'warn', - 'promise/no-callback-in-promise': 'warn', - 'promise/avoid-new': 'warn', - }, - overrides: [ - { - // files to check, so no `--ext` is required - files: ['**/*.{js,mjs,cjs}'], - }, - ], -}; diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..d3b3a3e --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,119 @@ +/* eslint-disable import/no-named-as-default-member */ +import eslintContainerbase from '@containerbase/eslint-plugin'; +import js from '@eslint/js'; +import eslintConfigPrettier from 'eslint-config-prettier'; +import eslintPluginImport from 'eslint-plugin-import'; +import pluginPromise from 'eslint-plugin-promise'; +import globals from 'globals'; +import tseslint from 'typescript-eslint'; +import eslintJestPlugin from 'eslint-plugin-jest'; + +export default tseslint.config( + { + ignores: [ + '**/.git/', + '**/.vscode', + '**/node_modules/', + '**/dist/', + '**/coverage/', + '**/__fixtures__/**/*', + '**/__mocks__/**/*', + '**/*.d.ts', + '**/*.generated.ts', + 'tools/dist', + 'patches', + ], + }, + { + linterOptions: { + reportUnusedDisableDirectives: true, + }, + }, + js.configs.recommended, + ...tseslint.configs.recommendedTypeChecked.map((config) => ({ + ...config, + files: ['**/*.{ts,js,mjs,cjs}'], + })), + ...tseslint.configs.stylisticTypeChecked.map((config) => ({ + ...config, + files: ['**/*.{ts,js,mjs,cjs}'], + })), + eslintPluginImport.flatConfigs.errors, + eslintPluginImport.flatConfigs.warnings, + eslintPluginImport.flatConfigs.recommended, + eslintPluginImport.flatConfigs.typescript, + eslintJestPlugin.configs['flat/recommended'], + eslintJestPlugin.configs['flat/style'], + pluginPromise.configs['flat/recommended'], + eslintContainerbase.configs.all, + eslintConfigPrettier, + { + files: ['**/*.{ts,js,mjs,cjs}'], + + languageOptions: { + globals: { + ...globals.node, + }, + ecmaVersion: 'latest', + sourceType: 'module', + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + + settings: { + 'import/resolver': { + typescript: { + alwaysTryTypes: true, + }, + }, + }, + }, + { + files: ['**/*.{ts,js,mjs,cjs}'], + rules: { + camelcase: 0, + 'no-param-reassign': 'warn', + 'require-await': 'error', + 'no-use-before-define': 0, + 'no-restricted-syntax': 0, + 'no-await-in-loop': 0, + 'prefer-template': 'off', + 'promise/always-return': 'error', + 'promise/no-return-wrap': 'error', + 'promise/param-names': 'error', + 'promise/catch-or-return': 'error', + 'promise/no-native': 'off', + 'promise/no-nesting': 'warn', + 'promise/no-promise-in-callback': 'warn', + 'promise/no-callback-in-promise': 'warn', + 'promise/avoid-new': 'warn', + + // TODO: fixme + '@typescript-eslint/no-require-imports': 0, + '@typescript-eslint/no-unsafe-assignment': 0, + '@typescript-eslint/no-unsafe-argument': 0, + '@typescript-eslint/no-unsafe-call': 0, + '@typescript-eslint/no-unsafe-member-access': 0, + '@typescript-eslint/no-unsafe-return': 0, + '@typescript-eslint/prefer-nullish-coalescing': 0, + '@typescript-eslint/prefer-optional-chain': 0, + '@typescript-eslint/restrict-template-expressions': 0, + }, + }, + { + files: ['test/**/*.{ts,js,mjs,cjs}'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + rules: { + 'prefer-destructuring': 0, + 'prefer-promise-reject-errors': 0, + 'import/no-extraneous-dependencies': 0, + 'global-require': 0, + }, + }, +); diff --git a/package.json b/package.json index f80a5f0..795ad69 100644 --- a/package.json +++ b/package.json @@ -35,13 +35,20 @@ "test": "run-s prettier eslint markdown-lint jest" }, "devDependencies": { + "@containerbase/eslint-plugin": "1.1.0", + "@eslint/js": "9.14.0", + "@types/eslint-config-prettier": "6.11.3", + "@types/jest": "29.5.14", + "@types/node": "20.17.5", "conventional-changelog-conventionalcommits": "8.0.0", "eslint": "9.14.0", "eslint-config-prettier": "9.1.0", "eslint-formatter-gha": "1.5.1", + "eslint-import-resolver-typescript": "3.6.3", "eslint-plugin-import": "2.31.0", "eslint-plugin-jest": "28.9.0", "eslint-plugin-promise": "7.1.0", + "globals": "15.12.0", "husky": "9.1.6", "jest": "29.7.0", "lint-staged": "15.2.10", @@ -49,7 +56,8 @@ "npm-run-all2": "7.0.1", "prettier": "3.3.3", "prettier-plugin-packagejson": "2.5.3", - "semantic-release": "24.2.0" + "semantic-release": "24.2.0", + "typescript-eslint": "8.14.0" }, "packageManager": "pnpm@9.12.3", "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f35bf21..d478c7e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,21 @@ importers: .: devDependencies: + '@containerbase/eslint-plugin': + specifier: 1.1.0 + version: 1.1.0(eslint-plugin-import@2.31.0)(eslint-plugin-promise@7.1.0(eslint@9.14.0))(eslint@9.14.0) + '@eslint/js': + specifier: 9.14.0 + version: 9.14.0 + '@types/eslint-config-prettier': + specifier: 6.11.3 + version: 6.11.3 + '@types/jest': + specifier: 29.5.14 + version: 29.5.14 + '@types/node': + specifier: 20.17.5 + version: 20.17.5 conventional-changelog-conventionalcommits: specifier: 8.0.0 version: 8.0.0 @@ -20,21 +35,27 @@ importers: eslint-formatter-gha: specifier: 1.5.1 version: 1.5.1 + eslint-import-resolver-typescript: + specifier: 3.6.3 + version: 3.6.3(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@9.14.0) eslint-plugin-import: specifier: 2.31.0 - version: 2.31.0(eslint@9.14.0) + version: 2.31.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3)(eslint@9.14.0) eslint-plugin-jest: specifier: 28.9.0 - version: 28.9.0(eslint@9.14.0)(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3) + version: 28.9.0(@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(jest@29.7.0(@types/node@20.17.5))(typescript@5.6.3) eslint-plugin-promise: specifier: 7.1.0 version: 7.1.0(eslint@9.14.0) + globals: + specifier: 15.12.0 + version: 15.12.0 husky: specifier: 9.1.6 version: 9.1.6 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.9.0) + version: 29.7.0(@types/node@20.17.5) lint-staged: specifier: 15.2.10 version: 15.2.10 @@ -53,6 +74,9 @@ importers: semantic-release: specifier: 24.2.0 version: 24.2.0(typescript@5.6.3) + typescript-eslint: + specifier: 8.14.0 + version: 8.14.0(eslint@9.14.0)(typescript@5.6.3) packages: @@ -225,6 +249,14 @@ packages: resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} + '@containerbase/eslint-plugin@1.1.0': + resolution: {integrity: sha512-XLwOvyTq5ds8LER9Ou+7aj1hoXwgIedHlAw2efQzF0R65nOmK5xs0o0s0Od4ZKXg9BYs61OGpo+pDaBLdTPiFQ==} + engines: {node: ^20.9.0 || ^22.11.0, pnpm: ^9.0.0} + peerDependencies: + eslint: ^9.0.0 + eslint-plugin-import: ^2.31.0 + eslint-plugin-promise: ^7.0.0 + '@eslint-community/eslint-utils@4.4.1': resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -383,6 +415,10 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@nolyfill/is-core-module@1.0.39': + resolution: {integrity: sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==} + engines: {node: '>=12.4.0'} + '@octokit/auth-token@5.1.1': resolution: {integrity: sha512-rh3G3wDO8J9wSjfI436JUKzHIxq8NaiL0tVeB2aXmG6p/9859aUOAjA9pmSPNGGZxfwmaJ9ozOJImuNVJdpvbA==} engines: {node: '>= 18'} @@ -514,6 +550,9 @@ packages: '@types/babel__traverse@7.20.6': resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + '@types/eslint-config-prettier@6.11.3': + resolution: {integrity: sha512-3wXCiM8croUnhg9LdtZUJQwNcQYGWxxdOWDjPe1ykCqJFPVpzAKfs/2dgSoCtAvdPeaponcWPI7mPcGGp9dkKQ==} + '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} @@ -529,14 +568,17 @@ packages: '@types/istanbul-reports@3.0.4': resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} + '@types/jest@29.5.14': + resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} + '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - '@types/node@22.9.0': - resolution: {integrity: sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==} + '@types/node@20.17.5': + resolution: {integrity: sha512-n8FYY/pRxu496441gIcAQFZPKXbhsd6VZygcq+PTSZ75eMh/Ke0hCAROdUa21qiFqKNsPPYic46yXDO1JGiPBQ==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -553,10 +595,40 @@ packages: '@types/yargs@17.0.33': resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} + '@typescript-eslint/eslint-plugin@8.14.0': + resolution: {integrity: sha512-tqp8H7UWFaZj0yNO6bycd5YjMwxa6wIHOLZvWPkidwbgLCsBMetQoGj7DPuAlWa2yGO3H48xmPwjhsSPPCGU5w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/parser@8.14.0': + resolution: {integrity: sha512-2p82Yn9juUJq0XynBXtFCyrBDb6/dJombnz6vbo6mgQEtWHfvHbQuEa9kAOVIt1c9YFwi7H6WxtPj1kg+80+RA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/scope-manager@8.14.0': resolution: {integrity: sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.14.0': + resolution: {integrity: sha512-Xcz9qOtZuGusVOH5Uk07NGs39wrKkf3AxlkK79RBK6aJC1l03CobXjJbwBPSidetAOV+5rEVuiT1VSBUOAsanQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/types@8.14.0': resolution: {integrity: sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -998,6 +1070,10 @@ packages: emojilib@2.4.0: resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==} + enhanced-resolve@5.17.1: + resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} + engines: {node: '>=10.13.0'} + entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} @@ -1084,6 +1160,19 @@ packages: eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} + eslint-import-resolver-typescript@3.6.3: + resolution: {integrity: sha512-ud9aw4szY9cCT1EWWdGv1L1XR6hh2PaRWif0j2QjQ0pgTY/69iw+W0Z4qZv5wHahOl8isEr+k/JnyAqNQkLkIA==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + eslint: '*' + eslint-plugin-import: '*' + eslint-plugin-import-x: '*' + peerDependenciesMeta: + eslint-plugin-import: + optional: true + eslint-plugin-import-x: + optional: true + eslint-module-utils@2.12.0: resolution: {integrity: sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==} engines: {node: '>=4'} @@ -1342,6 +1431,9 @@ packages: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} + get-tsconfig@4.8.1: + resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} + git-hooks-list@3.1.0: resolution: {integrity: sha512-LF8VeHeR7v+wAbXqfgRlTSX/1BJR9Q1vEMR8JAz1cEg6GX07+zyj3sAdDvYjj/xnlIfVuGgj4qBei1K3hKH+PA==} @@ -1368,6 +1460,10 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} + globals@15.12.0: + resolution: {integrity: sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==} + engines: {node: '>=18'} + globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -1389,6 +1485,9 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + handlebars@4.7.8: resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} engines: {node: '>=0.4.7'} @@ -1531,6 +1630,9 @@ packages: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} + is-bun-module@1.2.1: + resolution: {integrity: sha512-AmidtEM6D6NmUiLOvvU7+IePxjEjOzra2h0pSrsfSAcXwl/83zLLXDByafUJy9k/rKK0pvXMLdwKwGHlX2Ke6Q==} + is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -2442,6 +2544,9 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + resolve.exports@2.0.2: resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} engines: {node: '>=10'} @@ -2694,6 +2799,10 @@ packages: resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} engines: {node: ^14.18.0 || >=16.0.0} + tapable@2.2.1: + resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + engines: {node: '>=6'} + temp-dir@3.0.0: resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==} engines: {node: '>=14.16'} @@ -2786,6 +2895,15 @@ packages: resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} engines: {node: '>= 0.4'} + typescript-eslint@8.14.0: + resolution: {integrity: sha512-K8fBJHxVL3kxMmwByvz8hNdBJ8a0YqKzKDX6jRlrjMuNXyd5T2V02HIq37+OiWXvUUOXgOOGiSSOh26Mh8pC3w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + typescript@5.6.3: resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} engines: {node: '>=14.17'} @@ -3130,6 +3248,12 @@ snapshots: '@colors/colors@1.5.0': optional: true + '@containerbase/eslint-plugin@1.1.0(eslint-plugin-import@2.31.0)(eslint-plugin-promise@7.1.0(eslint@9.14.0))(eslint@9.14.0)': + dependencies: + eslint: 9.14.0 + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3)(eslint@9.14.0) + eslint-plugin-promise: 7.1.0(eslint@9.14.0) + '@eslint-community/eslint-utils@4.4.1(eslint@9.14.0)': dependencies: eslint: 9.14.0 @@ -3195,7 +3319,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 20.17.5 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -3208,14 +3332,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 20.17.5 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.9.0) + jest-config: 29.7.0(@types/node@20.17.5) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -3240,7 +3364,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 20.17.5 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -3258,7 +3382,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.9.0 + '@types/node': 20.17.5 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -3280,7 +3404,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.9.0 + '@types/node': 20.17.5 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -3350,7 +3474,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.9.0 + '@types/node': 20.17.5 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -3383,6 +3507,8 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 + '@nolyfill/is-core-module@1.0.39': {} + '@octokit/auth-token@5.1.1': {} '@octokit/core@6.1.2': @@ -3567,11 +3693,13 @@ snapshots: dependencies: '@babel/types': 7.26.0 + '@types/eslint-config-prettier@6.11.3': {} + '@types/estree@1.0.6': {} '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.9.0 + '@types/node': 20.17.5 '@types/istanbul-lib-coverage@2.0.6': {} @@ -3583,11 +3711,16 @@ snapshots: dependencies: '@types/istanbul-lib-report': 3.0.3 + '@types/jest@29.5.14': + dependencies: + expect: 29.7.0 + pretty-format: 29.7.0 + '@types/json-schema@7.0.15': {} '@types/json5@0.0.29': {} - '@types/node@22.9.0': + '@types/node@20.17.5': dependencies: undici-types: 6.19.8 @@ -3603,11 +3736,54 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 + '@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.14.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.14.0 + '@typescript-eslint/type-utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.14.0 + eslint: 9.14.0 + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 1.4.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.14.0 + '@typescript-eslint/types': 8.14.0 + '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.14.0 + debug: 4.3.7 + eslint: 9.14.0 + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/scope-manager@8.14.0': dependencies: '@typescript-eslint/types': 8.14.0 '@typescript-eslint/visitor-keys': 8.14.0 + '@typescript-eslint/type-utils@8.14.0(eslint@9.14.0)(typescript@5.6.3)': + dependencies: + '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) + '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) + debug: 4.3.7 + ts-api-utils: 1.4.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - eslint + - supports-color + '@typescript-eslint/types@8.14.0': {} '@typescript-eslint/typescript-estree@8.14.0(typescript@5.6.3)': @@ -3989,13 +4165,13 @@ snapshots: optionalDependencies: typescript: 5.6.3 - create-jest@29.7.0(@types/node@22.9.0): + create-jest@29.7.0(@types/node@20.17.5): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.9.0) + jest-config: 29.7.0(@types/node@20.17.5) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -4094,6 +4270,11 @@ snapshots: emojilib@2.4.0: {} + enhanced-resolve@5.17.1: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.2.1 + entities@4.5.0: {} env-ci@11.1.0: @@ -4219,16 +4400,37 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(eslint-import-resolver-node@0.3.9)(eslint@9.14.0): + eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@9.14.0): + dependencies: + '@nolyfill/is-core-module': 1.0.39 + debug: 4.3.7 + enhanced-resolve: 5.17.1 + eslint: 9.14.0 + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@9.14.0) + fast-glob: 3.3.2 + get-tsconfig: 4.8.1 + is-bun-module: 1.2.1 + is-glob: 4.0.3 + optionalDependencies: + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3)(eslint@9.14.0) + transitivePeerDependencies: + - '@typescript-eslint/parser' + - eslint-import-resolver-node + - eslint-import-resolver-webpack + - supports-color + + eslint-module-utils@2.12.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@9.14.0): dependencies: debug: 3.2.7 optionalDependencies: + '@typescript-eslint/parser': 8.14.0(eslint@9.14.0)(typescript@5.6.3) eslint: 9.14.0 eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint-plugin-import@2.31.0)(eslint@9.14.0) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.31.0(eslint@9.14.0): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.3)(eslint@9.14.0): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -4239,7 +4441,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.14.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(eslint-import-resolver-node@0.3.9)(eslint@9.14.0) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@9.14.0) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -4250,17 +4452,20 @@ snapshots: semver: 6.3.1 string.prototype.trimend: 1.0.8 tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 8.14.0(eslint@9.14.0)(typescript@5.6.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.9.0(eslint@9.14.0)(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3): + eslint-plugin-jest@28.9.0(@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(jest@29.7.0(@types/node@20.17.5))(typescript@5.6.3): dependencies: '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) eslint: 9.14.0 optionalDependencies: - jest: 29.7.0(@types/node@22.9.0) + '@typescript-eslint/eslint-plugin': 8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) + jest: 29.7.0(@types/node@20.17.5) transitivePeerDependencies: - supports-color - typescript @@ -4523,6 +4728,10 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.2.4 + get-tsconfig@4.8.1: + dependencies: + resolve-pkg-maps: 1.0.0 + git-hooks-list@3.1.0: {} git-log-parser@1.2.1: @@ -4555,6 +4764,8 @@ snapshots: globals@14.0.0: {} + globals@15.12.0: {} + globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -4585,6 +4796,8 @@ snapshots: graceful-fs@4.2.11: {} + graphemer@1.4.0: {} + handlebars@4.7.8: dependencies: minimist: 1.2.8 @@ -4715,6 +4928,10 @@ snapshots: call-bind: 1.0.7 has-tostringtag: 1.0.2 + is-bun-module@1.2.1: + dependencies: + semver: 7.6.3 + is-callable@1.2.7: {} is-core-module@2.15.1: @@ -4861,7 +5078,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 20.17.5 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -4881,16 +5098,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.9.0): + jest-cli@29.7.0(@types/node@20.17.5): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.9.0) + create-jest: 29.7.0(@types/node@20.17.5) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.9.0) + jest-config: 29.7.0(@types/node@20.17.5) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -4900,7 +5117,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.9.0): + jest-config@29.7.0(@types/node@20.17.5): dependencies: '@babel/core': 7.26.0 '@jest/test-sequencer': 29.7.0 @@ -4925,7 +5142,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.9.0 + '@types/node': 20.17.5 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -4954,7 +5171,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 20.17.5 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -4964,7 +5181,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.9.0 + '@types/node': 20.17.5 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -5003,7 +5220,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 20.17.5 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -5038,7 +5255,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 20.17.5 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -5066,7 +5283,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 20.17.5 chalk: 4.1.2 cjs-module-lexer: 1.4.1 collect-v8-coverage: 1.0.2 @@ -5112,7 +5329,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 20.17.5 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -5131,7 +5348,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 20.17.5 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -5140,17 +5357,17 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 22.9.0 + '@types/node': 20.17.5 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.9.0): + jest@29.7.0(@types/node@20.17.5): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.9.0) + jest-cli: 29.7.0(@types/node@20.17.5) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -5698,6 +5915,8 @@ snapshots: resolve-from@5.0.0: {} + resolve-pkg-maps@1.0.0: {} + resolve.exports@2.0.2: {} resolve@1.22.8: @@ -5986,6 +6205,8 @@ snapshots: '@pkgr/core': 0.1.1 tslib: 2.8.1 + tapable@2.2.1: {} + temp-dir@3.0.0: {} tempy@3.1.0: @@ -6087,6 +6308,17 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 + typescript-eslint@8.14.0(eslint@9.14.0)(typescript@5.6.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.14.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - eslint + - supports-color + typescript@5.6.3: {} uc.micro@2.1.0: {} diff --git a/test/.eslintrc.js b/test/.eslintrc.js deleted file mode 100644 index 017c815..0000000 --- a/test/.eslintrc.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - env: { - jest: true, - }, - rules: { - 'prefer-destructuring': 0, - 'prefer-promise-reject-errors': 0, - 'import/no-extraneous-dependencies': 0, - 'global-require': 0, - }, -}; diff --git a/tsconfig.json b/tsconfig.json index b3f0fd7..181d565 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,6 @@ { "compilerOptions": { - "declaration": true, - "declarationDir": "./dist", + "allowJs": true, "module": "commonjs", "noImplicitAny": true, "lib": ["ES2023"], @@ -9,7 +8,8 @@ /* https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping */ "target": "ES2022", "moduleResolution": "node", - "importHelpers": true + "importHelpers": true, + "noEmit": true }, "exclude": ["node_modules", "dist"] } diff --git a/tsconfig.lint.json b/tsconfig.lint.json deleted file mode 100644 index 8565ac3..0000000 --- a/tsconfig.lint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig", - "include": [".eslintrc.js", "**/*.ts", "**/*.js", "**/*.mjs"] -}