diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 8948f5e..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,14 +0,0 @@ -// eslint-disable-next-line no-undef -module.exports = { - root: true, - extends: ['@shiftcode/recommended'], - - parserOptions: { - sourceType: 'module', - ecmaVersion: 2023, - project: [ - './tsconfig.json', - './tsconfig.jest.json', - ], - }, -} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 1cbc2d4..8f16397 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,9 +17,10 @@ "@commitlint/cli": "^19.3.0", "@commitlint/config-angular": "^19.3.0", "@commitlint/prompt-cli": "^19.3.1", + "@jest/globals": "^29.5.0", "@types/jest": "^29.5.12", "@types/node": "^22.15.0", - "eslint": "^8.56.0", + "eslint": "^9.36.0", "husky": "^9.0.11", "jest": "^29.7.0", "lint-staged": "^15.2.7", @@ -45,6 +46,368 @@ "node": ">=6.0.0" } }, + "node_modules/@angular-devkit/architect": { + "version": "0.2003.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.2003.8.tgz", + "integrity": "sha512-pbXQ2NlZQwzjsSIEoRQMGB1WrgZFCyM0zoD9h+rDjyR8PEB1Evl4evZ4Q5CJzjEBxC8IEG61PHKHjh8GdLb+sg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "20.3.8", + "rxjs": "7.8.2" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/core": { + "version": "20.3.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-20.3.8.tgz", + "integrity": "sha512-+YFpJdvlL4gxnMm/++8rseE7ZNRHlYPmOqpoiXSuP5eGPSmdklEoQGTQvpMw42S3bll1g6/029DmV2FCZ/dtEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "8.17.1", + "ajv-formats": "3.0.1", + "jsonc-parser": "3.3.1", + "picomatch": "4.0.3", + "rxjs": "7.8.2", + "source-map": "0.7.6" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "chokidar": "^4.0.0" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/core/node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@angular-devkit/core/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@angular-devkit/core/node_modules/source-map": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", + "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 12" + } + }, + "node_modules/@angular-devkit/schematics": { + "version": "20.3.8", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-20.3.8.tgz", + "integrity": "sha512-Ymv7nWLTDB1gBh2laRveO912eUpQ/rUIzKRr8VQFMVG/wNipL88vzyrlKhJa7WhQ3CdKxLD7kplFIjdev7XUVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "20.3.8", + "jsonc-parser": "3.3.1", + "magic-string": "0.30.17", + "ora": "8.2.0", + "rxjs": "7.8.2" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@angular-devkit/schematics/node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/is-unicode-supported": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@angular-devkit/schematics/node_modules/log-symbols": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", + "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "is-unicode-supported": "^1.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/log-symbols/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/ora": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz", + "integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "cli-cursor": "^5.0.0", + "cli-spinners": "^2.9.2", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^2.0.0", + "log-symbols": "^6.0.0", + "stdin-discarder": "^0.2.2", + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@angular-eslint/builder": { + "version": "20.5.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-20.5.1.tgz", + "integrity": "sha512-jUnqrMbMQ/UR8xPncg3NW3I18dlnV68V0HHozZgX3rjHuDOa7Yq4jwjFaaxfaId5KsNDoEGtjZCAz1lgw/+4Gw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/architect": ">= 0.2000.0 < 0.2100.0", + "@angular-devkit/core": ">= 20.0.0 < 21.0.0" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": "*" + } + }, + "node_modules/@angular-eslint/bundled-angular-compiler": { + "version": "20.5.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-20.5.1.tgz", + "integrity": "sha512-0VroIEZzTBFB9B7Ws6xU5X3X9RoOSBVUcFbMs+UqfNoxHdZd5ToU5nwbImQg3hyFF0zdAjffoW3wW00qiC3L+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@angular-eslint/eslint-plugin": { + "version": "20.5.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-20.5.1.tgz", + "integrity": "sha512-We7vkqRypa4+TPFMy1VSJkNSTIezRYbDS3YuzycNT5G6fhY3nn4WMa3ejsID/llcvptWyTKSZXZ/rJ+Zvo8xuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-eslint/bundled-angular-compiler": "20.5.1", + "@angular-eslint/utils": "20.5.1", + "ts-api-utils": "^2.1.0" + }, + "peerDependencies": { + "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": "*" + } + }, + "node_modules/@angular-eslint/eslint-plugin-template": { + "version": "20.5.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-20.5.1.tgz", + "integrity": "sha512-J3efFHXACo84vT80p4Jq/rKeI1NwWru7qe9U6hCZetKbXz0dGgcGgh4gN8lWGtCqw1Gsi+xzpEGiHS1BWDDvmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-eslint/bundled-angular-compiler": "20.5.1", + "@angular-eslint/utils": "20.5.1", + "aria-query": "5.3.2", + "axobject-query": "4.1.0" + }, + "peerDependencies": { + "@angular-eslint/template-parser": "20.5.1", + "@typescript-eslint/types": "^7.11.0 || ^8.0.0", + "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": "*" + } + }, + "node_modules/@angular-eslint/schematics": { + "version": "20.5.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-20.5.1.tgz", + "integrity": "sha512-pPVbgiCCRDRKC2E3AeS0H3gC++azLarpYVTbOJS7vIGpmYqy++rKy5egXoECjHWQza/sXHJjUuHRpGhh/FN0og==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": ">= 20.0.0 < 21.0.0", + "@angular-devkit/schematics": ">= 20.0.0 < 21.0.0", + "@angular-eslint/eslint-plugin": "20.5.1", + "@angular-eslint/eslint-plugin-template": "20.5.1", + "ignore": "7.0.5", + "semver": "7.7.3", + "strip-json-comments": "3.1.1" + } + }, + "node_modules/@angular-eslint/schematics/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@angular-eslint/template-parser": { + "version": "20.5.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-20.5.1.tgz", + "integrity": "sha512-XIXf5zt7AurD1kjSAoMadLLB7VGuwg4+ln4JHfPN9MYwcIqJGZMt0brBkkFV7ed2M4167uT03yyfyTK8Ijl6qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-eslint/bundled-angular-compiler": "20.5.1", + "eslint-scope": "^8.0.2" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": "*" + } + }, + "node_modules/@angular-eslint/utils": { + "version": "20.5.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-20.5.1.tgz", + "integrity": "sha512-6Zf9EBzW8eBTDxqgzBqKD4a9IH0uAVZFX9zgASipk8m5sO6YkjaS+auplmEac3ESzVCh9AzwNDFD68JAE0ugLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-eslint/bundled-angular-compiler": "20.5.1" + }, + "peerDependencies": { + "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": "*" + } + }, "node_modules/@babel/code-frame": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", @@ -829,9 +1192,10 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", - "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.4.3" }, @@ -853,15 +1217,54 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", + "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.0.tgz", + "integrity": "sha512-WUFvV4WoIwW8Bv0KeKCIIEgdSiFOsulyN0xrMu+7z43q/hkOLXjvb5u7UC9jDxvRzcrbEmuZBX5yJZz1741jog==", + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.16.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz", + "integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==", + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -869,7 +1272,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -879,6 +1282,7 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -893,28 +1297,63 @@ "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "license": "MIT" }, "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "version": "9.37.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.37.0.tgz", + "integrity": "sha512-jaS+NJ+hximswBG6pjNX0uEJZkrT0zwpVi3BA3vX22aFGjJjmgSTSmPpZCRKmoBL5VY/M6p0xsSJx7rk7sy5gg==", + "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.0.tgz", + "integrity": "sha512-sB5uyeq+dwCWyPi31B2gQlVlo+j5brPlWx4yZBrEaRo/nhdDE8Xke1gsGgtiBdaBTxuTkceLVuVt/pclrasb0A==", + "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@eslint/core": "^0.16.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" }, "engines": { - "node": ">=10.10.0" + "node": ">=18.18.0" } }, "node_modules/@humanwhocodes/module-importer": { @@ -929,11 +1368,18 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead" + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@hutson/parse-repository-url": { "version": "3.0.2", @@ -3016,6 +3462,12 @@ "@types/node": "*" } }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "license": "MIT" + }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", @@ -3059,6 +3511,12 @@ "pretty-format": "^29.0.0" } }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "license": "MIT" + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -3111,15 +3569,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.32.1.tgz", - "integrity": "sha512-6u6Plg9nP/J1GRpe/vcjjabo6Uc5YQPAMxsgQyGC/I0RuukiG1wIe3+Vtg3IrSCVJDmqK3j8adrtzXSENRtFgg==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.0.tgz", + "integrity": "sha512-hA8gxBq4ukonVXPy0OKhiaUh/68D0E88GSmtC1iAEnGaieuDi38LhS7jdCHRLi6ErJBNDGCzvh5EnzdPwUc0DA==", + "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.32.1", - "@typescript-eslint/type-utils": "8.32.1", - "@typescript-eslint/utils": "8.32.1", - "@typescript-eslint/visitor-keys": "8.32.1", + "@typescript-eslint/scope-manager": "8.46.0", + "@typescript-eslint/type-utils": "8.46.0", + "@typescript-eslint/utils": "8.46.0", + "@typescript-eslint/visitor-keys": "8.46.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -3133,9 +3592,9 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "@typescript-eslint/parser": "^8.46.0", "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { @@ -3146,15 +3605,38 @@ "node": ">= 4" } }, - "node_modules/@typescript-eslint/parser": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.32.1.tgz", - "integrity": "sha512-LKMrmwCPoLhM45Z00O1ulb6jwyVr2kr3XJp+G+tSEZcbauNnScewcQwtJqXDhXeYPDEjZ8C1SjXm015CirEmGg==", - "dependencies": { - "@typescript-eslint/scope-manager": "8.32.1", - "@typescript-eslint/types": "8.32.1", - "@typescript-eslint/typescript-estree": "8.32.1", - "@typescript-eslint/visitor-keys": "8.32.1", + "node_modules/@typescript-eslint/parser": { + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.0.tgz", + "integrity": "sha512-n1H6IcDhmmUEG7TNVSspGmiHHutt7iVKtZwRppD7e04wha5MrkV1h3pti9xQLcCMt6YWsncpoT0HMjkH1FNwWQ==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.46.0", + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/typescript-estree": "8.46.0", + "@typescript-eslint/visitor-keys": "8.46.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.0.tgz", + "integrity": "sha512-OEhec0mH+U5Je2NZOeK1AbVCdm0ChyapAyTeXVIYTPXDJ3F07+cu87PPXcGoYqZ7M9YJVvFnfpGg1UmCIqM+QQ==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.46.0", + "@typescript-eslint/types": "^8.46.0", "debug": "^4.3.4" }, "engines": { @@ -3165,19 +3647,19 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/rule-tester": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-8.32.1.tgz", - "integrity": "sha512-XUCGJUbBBn6HNFnihX2bm50F4J1LndwdzTlw7kfSnqukXoRkW/SEwMIhDLSiTcSPXZPVbO8R/Aw35J9zm4kD4w==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-8.46.0.tgz", + "integrity": "sha512-cIz9Z9BeL8YHKPVAHaFoSX4H359UPtbl93kRVS+Kx94HtFP48JXKmmUOBGRT/WdRQtpliu7U9pKGbCXYjv2byg==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/parser": "8.32.1", - "@typescript-eslint/typescript-estree": "8.32.1", - "@typescript-eslint/utils": "8.32.1", + "@typescript-eslint/parser": "8.46.0", + "@typescript-eslint/typescript-estree": "8.46.0", + "@typescript-eslint/utils": "8.46.0", "ajv": "^6.12.6", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "4.6.2", @@ -3217,28 +3699,47 @@ "dev": true }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.32.1.tgz", - "integrity": "sha512-7IsIaIDeZn7kffk7qXC3o6Z4UblZJKV3UBpkvRNpr5NSyLji7tvTcvmnMNYuYLyh26mN8W723xpo3i4MlD33vA==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.0.tgz", + "integrity": "sha512-lWETPa9XGcBes4jqAMYD9fW0j4n6hrPtTJwWDmtqgFO/4HF4jmdH/Q6wggTw5qIT5TXjKzbt7GsZUBnWoO3dqw==", + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.1", - "@typescript-eslint/visitor-keys": "8.32.1" + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/visitor-keys": "8.46.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.0.tgz", + "integrity": "sha512-WrYXKGAHY836/N7zoK/kzi6p8tXFhasHh8ocFL9VZSAkvH956gfeRfcnhs3xzRy8qQ/dq3q44v1jvQieMFg2cw==", + "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.32.1.tgz", - "integrity": "sha512-mv9YpQGA8iIsl5KyUPi+FGLm7+bA4fgXaeRcFKRDRwDMu4iwrSHeDPipwueNXhdIIZltwCJv+NkxftECbIZWfA==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.0.tgz", + "integrity": "sha512-hy+lvYV1lZpVs2jRaEYvgCblZxUoJiPyCemwbQZ+NGulWkQRy0HRPYAoef/CNSzaLt+MLvMptZsHXHlkEilaeg==", + "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.32.1", - "@typescript-eslint/utils": "8.32.1", + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/typescript-estree": "8.46.0", + "@typescript-eslint/utils": "8.46.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -3251,13 +3752,14 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.32.1.tgz", - "integrity": "sha512-YmybwXUJcgGqgAp6bEsgpPXEg6dcCyPyCSr0CAAueacR/CCBi25G3V8gGQ2kRzQRBNol7VQknxMs9HvVa9Rvfg==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.0.tgz", + "integrity": "sha512-bHGGJyVjSE4dJJIO5yyEWt/cHyNwga/zXGJbJJ8TiO01aVREK6gCTu3L+5wrkb1FbDkQ+TKjMNe9R/QQQP9+rA==", + "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -3267,12 +3769,15 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.32.1.tgz", - "integrity": "sha512-Y3AP9EIfYwBb4kWGb+simvPaqQoT5oJuzzj9m0i6FCY6SPvlomY2Ei4UEMm7+FXtlNJbor80ximyslzaQF6xhg==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.0.tgz", + "integrity": "sha512-ekDCUfVpAKWJbRfm8T1YRrCot1KFxZn21oV76v5Fj4tr7ELyk84OS+ouvYdcDAwZL89WpEkEj2DKQ+qg//+ucg==", + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.1", - "@typescript-eslint/visitor-keys": "8.32.1", + "@typescript-eslint/project-service": "8.46.0", + "@typescript-eslint/tsconfig-utils": "8.46.0", + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/visitor-keys": "8.46.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -3288,13 +3793,14 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -3303,6 +3809,7 @@ "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -3314,14 +3821,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.32.1.tgz", - "integrity": "sha512-DsSFNIgLSrc89gpq1LJB7Hm1YpuhK086DRDJSNrewcGvYloWW1vZLHBTIvarKZDcAORIy/uWNx8Gad+4oMpkSA==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.0.tgz", + "integrity": "sha512-nD6yGWPj1xiOm4Gk0k6hLSZz2XkNXhuYmyIrOWcHoPuAhjT9i5bAG+xbWPgFeNR8HPHHtpNKdYUXJl/D3x7f5g==", + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.32.1", - "@typescript-eslint/types": "8.32.1", - "@typescript-eslint/typescript-estree": "8.32.1" + "@typescript-eslint/scope-manager": "8.46.0", + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/typescript-estree": "8.46.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3332,16 +3840,17 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.32.1.tgz", - "integrity": "sha512-ar0tjQfObzhSaW3C3QNmTc5ofj0hDoNQ5XWrCy6zDyabdr0TWhCkClp+rywGNj/odAFBVzzJrK4tEq5M4Hmu4w==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.0.tgz", + "integrity": "sha512-FrvMpAK+hTbFy7vH5j1+tMYHMSKLE6RzluFJlkFNKD0p9YsUT75JlBSmr5so3QRzvMwU5/bIEdeNrxm8du8l3Q==", + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.1", - "eslint-visitor-keys": "^4.2.0" + "@typescript-eslint/types": "8.46.0", + "eslint-visitor-keys": "^4.2.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3352,9 +3861,10 @@ } }, "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -3362,11 +3872,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==" - }, "node_modules/@yarnpkg/lockfile": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", @@ -3429,9 +3934,10 @@ } }, "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -3443,6 +3949,7 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -3488,6 +3995,47 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/angular-eslint": { + "version": "20.5.1", + "resolved": "https://registry.npmjs.org/angular-eslint/-/angular-eslint-20.5.1.tgz", + "integrity": "sha512-7Vx2Vs4u5KO7Kxzo8kMAZnpubtHxK/wBWhBmHrKz/GRsrRQw2aIO13eCH6RU200EssNWpZ2OADIK0vlR9J0T0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": ">= 20.0.0 < 21.0.0", + "@angular-devkit/schematics": ">= 20.0.0 < 21.0.0", + "@angular-eslint/builder": "20.5.1", + "@angular-eslint/eslint-plugin": "20.5.1", + "@angular-eslint/eslint-plugin-template": "20.5.1", + "@angular-eslint/schematics": "20.5.1", + "@angular-eslint/template-parser": "20.5.1", + "@typescript-eslint/types": "^8.0.0", + "@typescript-eslint/utils": "^8.0.0" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": "*", + "typescript-eslint": "^8.0.0" + } + }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -3563,6 +4111,16 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "node_modules/aria-query": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", + "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/array-buffer-byte-length": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", @@ -3592,16 +4150,19 @@ "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==" }, "node_modules/array-includes": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", - "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", + "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "is-string": "^1.0.7" + "es-abstract": "^1.24.0", + "es-object-atoms": "^1.1.1", + "get-intrinsic": "^1.3.0", + "is-string": "^1.1.1", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -3742,6 +4303,16 @@ "proxy-from-env": "^1.1.0" } }, + "node_modules/axobject-query": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -5841,17 +6412,6 @@ "node": ">=8" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dot-prop": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", @@ -6033,26 +6593,27 @@ } }, "node_modules/es-abstract": { - "version": "1.23.9", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz", - "integrity": "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", + "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", + "license": "MIT", "dependencies": { "array-buffer-byte-length": "^1.0.2", "arraybuffer.prototype.slice": "^1.0.4", "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.8", - "call-bound": "^1.0.3", + "call-bound": "^1.0.4", "data-view-buffer": "^1.0.2", "data-view-byte-length": "^1.0.2", "data-view-byte-offset": "^1.0.1", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", + "es-object-atoms": "^1.1.1", "es-set-tostringtag": "^2.1.0", "es-to-primitive": "^1.3.0", "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.0", + "get-intrinsic": "^1.3.0", + "get-proto": "^1.0.1", "get-symbol-description": "^1.1.0", "globalthis": "^1.0.4", "gopd": "^1.2.0", @@ -6064,21 +6625,24 @@ "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", "is-data-view": "^1.0.2", + "is-negative-zero": "^2.0.3", "is-regex": "^1.2.1", + "is-set": "^2.0.3", "is-shared-array-buffer": "^1.0.4", "is-string": "^1.1.1", "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.0", + "is-weakref": "^1.1.1", "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.3", + "object-inspect": "^1.13.4", "object-keys": "^1.1.1", "object.assign": "^4.1.7", "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.3", + "regexp.prototype.flags": "^1.5.4", "safe-array-concat": "^1.1.3", "safe-push-apply": "^1.0.0", "safe-regex-test": "^1.1.0", "set-proto": "^1.0.0", + "stop-iteration-iterator": "^1.1.0", "string.prototype.trim": "^1.2.10", "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", @@ -6087,7 +6651,7 @@ "typed-array-byte-offset": "^1.0.4", "typed-array-length": "^1.0.7", "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.18" + "which-typed-array": "^1.1.19" }, "engines": { "node": ">= 0.4" @@ -6184,67 +6748,76 @@ } }, "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "version": "9.37.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.37.0.tgz", + "integrity": "sha512-XyLmROnACWqSxiGYArdef1fItQd47weqB7iwtfr9JHwRrqIXZdcFMvvEcL9xHCmL0SNsOvF0c42lWyM1U5dgig==", + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.4.0", + "@eslint/core": "^0.16.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.37.0", + "@eslint/plugin-kit": "^0.4.0", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@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.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "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": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-config-prettier": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", - "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "version": "10.1.8", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", + "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", + "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, + "funding": { + "url": "https://opencollective.com/eslint-config-prettier" + }, "peerDependencies": { "eslint": ">=7.0.0" } @@ -6268,9 +6841,10 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", - "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz", + "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==", + "license": "MIT", "dependencies": { "debug": "^3.2.7" }, @@ -6287,33 +6861,35 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "license": "MIT", "dependencies": { "ms": "^2.1.1" } }, "node_modules/eslint-plugin-import": { - "version": "2.31.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", - "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", + "version": "2.32.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz", + "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", + "license": "MIT", "dependencies": { "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.8", - "array.prototype.findlastindex": "^1.2.5", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", + "array-includes": "^3.1.9", + "array.prototype.findlastindex": "^1.2.6", + "array.prototype.flat": "^1.3.3", + "array.prototype.flatmap": "^1.3.3", "debug": "^3.2.7", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.0", + "eslint-module-utils": "^2.12.1", "hasown": "^2.0.2", - "is-core-module": "^2.15.1", + "is-core-module": "^2.16.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", "object.fromentries": "^2.0.8", "object.groupby": "^1.0.3", - "object.values": "^1.2.0", + "object.values": "^1.2.1", "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.8", + "string.prototype.trimend": "^1.0.9", "tsconfig-paths": "^3.15.0" }, "engines": { @@ -6380,10 +6956,20 @@ "strip-bom": "^3.0.0" } }, + "node_modules/eslint-plugin-simple-import-sort": { + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.1.1.tgz", + "integrity": "sha512-6nuzu4xwQtE3332Uz0to+TxDQYRLTKRESSc2hefVT48Zc8JthmN23Gx9lnYhu0FtkRSL1oxny3kJ2aveVhmOVA==", + "license": "MIT", + "peerDependencies": { + "eslint": ">=5.0.0" + } + }, "node_modules/eslint-plugin-unused-imports": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz", - "integrity": "sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.2.0.tgz", + "integrity": "sha512-hLbJ2/wnjKq4kGA9AUaExVFIbNzyxYdVo49QZmKCnhk5pc9wcYRbfgLHvWJ8tnsdcseGhoUAddm9gn/lt+d74w==", + "license": "MIT", "peerDependencies": { "@typescript-eslint/eslint-plugin": "^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0", "eslint": "^9.0.0 || ^8.0.0" @@ -6395,15 +6981,16 @@ } }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -6464,6 +7051,18 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint/node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -6521,16 +7120,29 @@ } }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -6563,6 +7175,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -6755,14 +7368,15 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/filelist": { @@ -6829,22 +7443,23 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==" + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "license": "ISC" }, "node_modules/follow-redirects": { "version": "1.15.9", @@ -7574,6 +8189,7 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -7616,14 +8232,12 @@ } }, "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dependencies": { - "type-fest": "^0.20.2" - }, + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -8015,6 +8629,7 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -8343,6 +8958,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -8374,14 +9001,6 @@ "node": ">=8" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-obj": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", @@ -9719,7 +10338,7 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", - "dev": true, + "devOptional": true, "bin": { "jiti": "lib/jiti-cli.mjs" } @@ -9760,7 +10379,8 @@ "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "license": "MIT" }, "node_modules/json-parse-better-errors": { "version": "1.0.2", @@ -9863,6 +10483,7 @@ "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "license": "MIT", "dependencies": { "json-buffer": "3.0.1" } @@ -10910,6 +11531,16 @@ "yallist": "^3.0.2" } }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, "node_modules/make-dir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", @@ -12263,6 +12894,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -13011,21 +13643,6 @@ "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", "dev": true }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/run-async": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", @@ -13149,9 +13766,10 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -13562,6 +14180,32 @@ "node": ">=8" } }, + "node_modules/stdin-discarder": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", + "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stop-iteration-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", + "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "internal-slot": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -13887,11 +14531,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" - }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -14161,17 +14800,6 @@ "node": ">=4" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/typed-array-buffer": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", @@ -14259,6 +14887,29 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.46.0.tgz", + "integrity": "sha512-6+ZrB6y2bT2DX3K+Qd9vn7OFOJR+xSLDj+Aw/N3zBwUt27uTw2sw2TE2+UcY1RiyBZkaGbTkVg9SSdPNUG6aUw==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.46.0", + "@typescript-eslint/parser": "8.46.0", + "@typescript-eslint/typescript-estree": "8.46.0", + "@typescript-eslint/utils": "8.46.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, "node_modules/uglify-js": { "version": "3.19.3", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", @@ -14836,7 +15487,7 @@ }, "packages/branch-utilities": { "name": "@shiftcode/branch-utilities", - "version": "5.0.2", + "version": "5.1.0-pr26.15", "license": "MIT", "engines": { "node": "^20.0.0 || ^22.0.0" @@ -14847,70 +15498,57 @@ }, "packages/eslint-config-recommended": { "name": "@shiftcode/eslint-config-recommended", - "version": "5.0.1", + "version": "6.0.0-pr26.12", "license": "UNLICENSED", "dependencies": { - "@shiftcode/eslint-plugin-rules": "^4.0.1", - "@typescript-eslint/eslint-plugin": "^8.18.0", - "@typescript-eslint/parser": "^8.18.0", - "eslint": "^8.56.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-unused-imports": "^4.1.4" + "@eslint/js": "^9.37.0", + "@shiftcode/eslint-plugin-rules": "^5.0.0-pr26.12", + "eslint": "^9.37.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-import": "^2.32.0", + "eslint-plugin-simple-import-sort": "^12.1.1", + "eslint-plugin-unused-imports": "^4.2.0", + "typescript-eslint": "8.46.0" + }, + "devDependencies": { + "angular-eslint": "^20.5.1" }, "engines": { "node": "^20.0.0 || ^22.0.0" }, "peerDependencies": { - "@angular-eslint/builder": "^20.0.0", - "@angular-eslint/eslint-plugin": "^20.0.0", - "@angular-eslint/eslint-plugin-template": "^20.0.0", - "@angular-eslint/schematics": "^20.0.0", - "@angular-eslint/template-parser": "^20.0.0" + "angular-eslint": "^20.5.1" }, "peerDependenciesMeta": { - "@angular-eslint/builder": { - "optional": true - }, - "@angular-eslint/eslint-plugin": { - "optional": true - }, - "@angular-eslint/eslint-plugin-template": { - "optional": true - }, - "@angular-eslint/schematics": { - "optional": true - }, - "@angular-eslint/template-parser": { + "angular-eslint": { "optional": true } } }, "packages/eslint-plugin-rules": { "name": "@shiftcode/eslint-plugin-rules", - "version": "4.0.1", + "version": "5.0.0-pr26.12", "license": "UNLICENSED", "dependencies": { - "@eslint/eslintrc": "^2.1.4", - "@typescript-eslint/utils": "^8.18.0" + "@typescript-eslint/utils": "^8.46.0" }, "devDependencies": { - "@typescript-eslint/parser": "^8.18.0", - "@typescript-eslint/rule-tester": "^8.18.0" + "@typescript-eslint/parser": "^8.46.0", + "@typescript-eslint/rule-tester": "^8.46.0" }, "engines": { "node": "^20.0.0 || ^22.0.0" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^9.37.0" } }, "packages/logger": { "name": "@shiftcode/logger", - "version": "3.0.2", + "version": "3.0.3-pr26.15", "license": "UNLICENSED", "devDependencies": { - "@shiftcode/utilities": "^4.2.0" + "@shiftcode/utilities": "^4.3.0-pr26.15" }, "engines": { "node": "^20.0.0 || ^22.0.0" @@ -14921,7 +15559,7 @@ }, "packages/publish-helper": { "name": "@shiftcode/publish-helper", - "version": "4.1.2", + "version": "4.2.0-pr26.15", "license": "MIT", "dependencies": { "conventional-changelog-angular": "^8.0.0", @@ -14932,7 +15570,7 @@ "publish-lib": "dist/publish-lib.js" }, "devDependencies": { - "@shiftcode/branch-utilities": "^5.0.2", + "@shiftcode/branch-utilities": "^5.1.0-pr26.15", "@types/yargs": "^17.0.32" }, "engines": { @@ -14957,7 +15595,7 @@ }, "packages/utilities": { "name": "@shiftcode/utilities", - "version": "4.2.0", + "version": "4.3.0-pr26.15", "license": "MIT", "engines": { "node": "^20.0.0 || ^22.0.0" diff --git a/package.json b/package.json index 1b203e0..1e1abcc 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ ], "scripts": { "build:ci": "lerna run build", - "build:lint:ci": "lerna run build:lint:ci", + "build:lint:ci": "lerna run build --scope @shiftcode/eslint-plugin-rules && lerna run build --scope @shiftcode/eslint-config-recommended", "format": "lerna run format", "format:ci": "lerna run format:ci", "lint:ci": "lerna run lint:ci", @@ -26,9 +26,10 @@ "@commitlint/cli": "^19.3.0", "@commitlint/config-angular": "^19.3.0", "@commitlint/prompt-cli": "^19.3.1", + "@jest/globals": "^29.5.0", "@types/jest": "^29.5.12", "@types/node": "^22.15.0", - "eslint": "^8.56.0", + "eslint": "^9.36.0", "husky": "^9.0.11", "jest": "^29.7.0", "lint-staged": "^15.2.7", diff --git a/packages/branch-utilities/.eslintrc.cjs b/packages/branch-utilities/.eslintrc.cjs deleted file mode 100644 index 9538cb6..0000000 --- a/packages/branch-utilities/.eslintrc.cjs +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-env node */ -module.exports = { - parserOptions: { - project: [ - './tsconfig.json', - './tsconfig.jest.json', - ], - }, -} diff --git a/packages/branch-utilities/eslint-suppressions.json b/packages/branch-utilities/eslint-suppressions.json new file mode 100644 index 0000000..e01fb4b --- /dev/null +++ b/packages/branch-utilities/eslint-suppressions.json @@ -0,0 +1,12 @@ +{ + "src/lib/base.utils.ts": { + "@typescript-eslint/no-unsafe-return": { + "count": 1 + } + }, + "src/lib/github.utils.ts": { + "@typescript-eslint/no-unsafe-member-access": { + "count": 1 + } + } +} diff --git a/packages/branch-utilities/eslint.config.mjs b/packages/branch-utilities/eslint.config.mjs new file mode 100644 index 0000000..834468a --- /dev/null +++ b/packages/branch-utilities/eslint.config.mjs @@ -0,0 +1,5 @@ +import { defineScTsConfig } from '@shiftcode/eslint-config-recommended' + +export default defineScTsConfig({ + languageOptions: { parserOptions: { project: ['./tsconfig.lint.json'] } }, +}) diff --git a/packages/branch-utilities/jest.config.js b/packages/branch-utilities/jest.config.js index 684e4a1..1ccdde9 100644 --- a/packages/branch-utilities/jest.config.js +++ b/packages/branch-utilities/jest.config.js @@ -1,18 +1,15 @@ /* eslint-env node,es2023 */ -/* eslint-disable import/no-extraneous-dependencies */ import { pathsToModuleNameMapper } from 'ts-jest' -import { readFileSync } from 'node:fs' - -const tsConfig = JSON.parse(readFileSync('./tsconfig.jest.json', 'utf-8')) +import tsConfig from './tsconfig.jest.json' with { type: 'json' } export default { testEnvironment: 'node', extensionsToTreatAsEsm: ['.ts'], transform: { - '^.+\\.ts$': ['ts-jest', {tsconfig: 'tsconfig.jest.json', useESM: true}] + '^.+\\.ts$': ['ts-jest', { tsconfig: 'tsconfig.jest.json', useESM: true }], }, moduleNameMapper: { '^(\\.{1,2}/.*)\\.js$': '$1', - ...pathsToModuleNameMapper(tsConfig.compilerOptions.paths ?? {}) - } + ...pathsToModuleNameMapper(tsConfig.compilerOptions.paths ?? {}), + }, } diff --git a/packages/branch-utilities/package.json b/packages/branch-utilities/package.json index 0501f73..eb1b511 100644 --- a/packages/branch-utilities/package.json +++ b/packages/branch-utilities/package.json @@ -1,6 +1,6 @@ { "name": "@shiftcode/branch-utilities", - "version": "5.0.2", + "version": "5.1.0-pr26.15", "description": "Utilities for local and ci to get branch name and stage", "repository": "https://github.com/shiftcode/sc-commons-public", "license": "MIT", @@ -20,10 +20,8 @@ "format:base": "prettier --config ../../.prettierrc.yml '{src,e2e,test}/**/*.ts'", "format:ci": "npm run format:base -- --check", "format:staged": "prettier --write --config ../../.prettierrc.yml", - "lint": "npm run lint:src:fix", - "lint:ci": "npm run lint:src", - "lint:src": "eslint ./src", - "lint:src:fix": "eslint ./src --cache --fix", + "lint": "eslint --fix --cache ./src", + "lint:ci": "eslint ./src", "lint:staged": "eslint --fix --cache", "prepublish": "node ../publish-helper/dist/prepare-dist.js", "test": "NODE_OPTIONS=\"--experimental-vm-modules --trace-warnings\" npx jest --config jest.config.js", diff --git a/packages/branch-utilities/tsconfig.jest.json b/packages/branch-utilities/tsconfig.jest.json index 7235cf6..406accb 100644 --- a/packages/branch-utilities/tsconfig.jest.json +++ b/packages/branch-utilities/tsconfig.jest.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.jest.json", "compilerOptions": { - "baseUrl": "./", - "paths": {} + "baseUrl": "./" }, "include": [ "src/**/*.spec.ts", diff --git a/packages/branch-utilities/tsconfig.lint.json b/packages/branch-utilities/tsconfig.lint.json new file mode 100644 index 0000000..5b8b248 --- /dev/null +++ b/packages/branch-utilities/tsconfig.lint.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./", + "types": ["jest", "node"] + }, + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [] +} + diff --git a/packages/eslint-config-recommended/.eslintrc.cjs b/packages/eslint-config-recommended/.eslintrc.cjs deleted file mode 100644 index 9538cb6..0000000 --- a/packages/eslint-config-recommended/.eslintrc.cjs +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-env node */ -module.exports = { - parserOptions: { - project: [ - './tsconfig.json', - './tsconfig.jest.json', - ], - }, -} diff --git a/packages/eslint-config-recommended/README.md b/packages/eslint-config-recommended/README.md index f46cf22..5a83bfc 100644 --- a/packages/eslint-config-recommended/README.md +++ b/packages/eslint-config-recommended/README.md @@ -2,50 +2,65 @@ > 🎯 Target runtime: es2023 ([Node >= 20](https://node.green/#ES2023)) -> ⚠️ This module exports code using CommonJS This module provides an eslint default rule-set configuration for shiftcode projects. ### remark - -by using this module, the [@shiftcode/eslint-plugin-rules](../eslint-plugin-rules) module will be automatically included too. +By using this module, the [@shiftcode/eslint-plugin-rules](../eslint-plugin-rules) module will be automatically installed +as dependency. ## usage +the module only exports a single function `defineScTsConfig` which can be used to create the eslint configuration. +it is basically a wrapper around the new eslint `defineConfig` function but already includes the setup for typescript, +some rules with default configurations and will ensure the prettier rules (disabling formatting rules) are included at last. -sample .eslintrc.js file: - -```javascript -module.exports = { - // ... - - // all child eslintrc configs from workspace packages inherit this extension - extends: [ - '^shiftcode', - ], - - // ... -} -``` +sample `eslint.config.mjs`: -## provided configurations +```js +import { defineScTsConfig } from '@shiftcode/eslint-config-recommended' -the following provided configurations might be included: +export default defineScTsConfig( + { + languageOptions: { + ecmaVersion: 2023, + sourceType: 'module', + parserOptions: { project: ['./tsconfig.json', './tsconfig.spec.json'] }, + }, + }, + { + files: ['**/*.ts'], + rules: { + '@typescript-eslint/explicit-function-return-type': 'error', + }, + } +) +``` -- ``@shiftcode/recommended``: rule-set for common javascript and typescript files -- ``@shiftcode/recommended/ng-config``: angular-specific rule-set for angular apps +## Additional configurations -## Optional Peer Dependencies -All the optional peer dependencies (`@angular-eslint/*`) are only required if the [ng-config](./src/ng-config/index.ts) -is used +Additionally on the submodule `/angular` the `defineScAngularConfig` function is exported +which includes angular-specific rules and configurations. -## Ideas +```js +import { defineScAngularConfig } from '@shiftcode/eslint-config-recommended/angular' -it could be useful to create another configuration (i.e. ``shiftcode/node-config``) -used within services/backend workspaces, because the naming conventions aren't really the same as for a client workspace. +export default defineScAngularConfig( + { + languageOptions: { + ecmaVersion: 2022, + sourceType: 'module', + parserOptions: { + project: ['./tsconfig.app.json', './tsconfig.spec.json'], + }, + }, + }, + { + files: ['**/*.ts'], + rules: { + '@angular-eslint/component-selector': ['error', { type: 'element', prefix: 'gf', style: 'kebab-case' }], + }, + } +) +``` -Examples: -- const PEdgeLabel = ... -- export const JwtGuardConfig = ... -- const { TextP } = process -- export function VersionedITOf { ... } -- etc. +when using the angular configuration, the peer dependency `angular-eslint` is required. diff --git a/packages/eslint-config-recommended/docs/README.md b/packages/eslint-config-recommended/docs/README.md deleted file mode 100644 index 87f85ab..0000000 --- a/packages/eslint-config-recommended/docs/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# TSLint to ESLint mapping - - -### `tslint-to-eslint-mapping.ts` - -this file contains all rules which are contained within `tslint:recommended` and `tslint:latest`, mapped -to their appropriate ESLint rule (whereas they are split into a block of generally applicable JS rules and -TS-specific rules). - - -### `base_eslintrc.cjs` - -contains the configuration for transforming tslint.yml into eslintrc configuration. - -> Note: file is outdated in comparison to current @shiftcode/eslint-config-recommended. diff --git a/packages/eslint-config-recommended/docs/base_eslintrc.cjs b/packages/eslint-config-recommended/docs/base_eslintrc.cjs deleted file mode 100644 index 5c3cec9..0000000 --- a/packages/eslint-config-recommended/docs/base_eslintrc.cjs +++ /dev/null @@ -1,83 +0,0 @@ -import { - TSLINT_ORIGINATED_GENERALLY_APPLICABLE_RULES, - TSLINT_ORIGINATED_TS_SPECIFIC_RULES, -} from './tslint-to-eslint-mapping' - -module.exports = { - /* - * note: "root" is explicitly not set: this has to be defined by the consuming eslintrc declaration - */ - parser: '@typescript-eslint/parser', - plugins: [ - '@typescript-eslint', - 'eslint-plugin-import', - 'eslint-plugin-prefer-arrow', - 'jsdoc', - ], - overrides: [ - /* - * Generally applicable JS + TS rules (based on former TSLint config) - */ - { - files: ['*.js', '*.cjs', '*.mjs', '*.jsx', '*.ts', '*.cts', '*.mts', '*.tsx'], - extends: [ - 'eslint:recommended', // catching common JS problems - ], - rules: { - ...TSLINT_ORIGINATED_GENERALLY_APPLICABLE_RULES, - - /* - * Rule overrides (or additional rules) - */ - 'no-empty': 'off', // TSLint: "no-empty" (override "eslint/recommended") - 'no-fallthrough': 'off', // override "eslint:recommended" rule - - /* - * rules that are covered by ESLint plugins - */ - 'import/no-deprecated': 'warn', // TSLint: "deprecation" - 'jsdoc/no-types': 'error', // TSLint: "no-redundant-jsdoc" - }, - }, - - /* - * TS-specific rules - */ - { - files: ['*.ts', '*.cts', '*.mts', '*.tsx'], - extends: [ - 'plugin:@typescript-eslint/recommended', - 'plugin:@typescript-eslint/recommended-requiring-type-checking', // includes "eslint-recommended" ruleset - ], - rules: { - ...TSLINT_ORIGINATED_TS_SPECIFIC_RULES, - - '@typescript-eslint/array-type': 'off', // TSLint: "array-type" - '@typescript-eslint/consistent-type-assertions': 'off', // TSLint: "no-angle-bracket-type-assertion", "no-object-literal-type-assertion" - '@typescript-eslint/dot-notation': 'off', // TSLint: "no-string-literal" - '@typescript-eslint/explicit-member-accessibility': [ // TSLint: "member-access" - 'error', - { accessibility: 'no-public' }, - ], - - // fixme: order is slightly different to our configured order - '@typescript-eslint/member-ordering': 'error', // TSLint: "member-ordering" - - '@typescript-eslint/no-inferrable-types': [ // override "@typescript-eslint/recommended" - 'error', - { ignoreParameters: true }, - ], - '@typescript-eslint/no-non-null-assertion': 'error', // override "recommended" with severity "error" - '@typescript-eslint/no-unused-vars': [ // override "recommended" with severity "error" - 'error', - { varsIgnorePattern: '^_' }, - ], - }, - }, - ], - - /* - * NOTE: parserOptions always have to be set by specific consuming config. - * (defining a project like ["./tsconfig.json"] would look up the file inside this sc-commons-public/eslint-config-recommended package) - */ -} diff --git a/packages/eslint-config-recommended/docs/tslint-to-eslint-mapping.ts b/packages/eslint-config-recommended/docs/tslint-to-eslint-mapping.ts deleted file mode 100644 index 5c0f03c..0000000 --- a/packages/eslint-config-recommended/docs/tslint-to-eslint-mapping.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Links to TSLint rule-sets: - * - https://github.com/palantir/tslint/blob/master/src/configs/recommended.ts - * - https://github.com/palantir/tslint/blob/master/src/configs/latest.ts - */ - -/* - * rules from: "tslint:recommended" (applicable both for JS + TS) - */ -export const TSLINT_ORIGINATED_GENERALLY_APPLICABLE_RULES = { - 'guard-for-in': 'error', // TSLint: "forin" - 'no-caller': 'error', // TSLint: "no-arg" - 'no-bitwise': 'error', // TSLint: "no-bitwise" - 'no-console': 'error', // TSLint: "no-console" - 'no-new-wrappers': 'error', // TSLint: "no-construct" - 'no-eval': 'error', // TSLint: "no-eval" - 'no-throw-literal': 'error', // TSLint: "no-string-throw" - 'one-var': ['error', 'never'], // TSLint: "one-variable-per-declaration" - radix: 'error', // TSLint: "radix" - eqeqeq: ['error', 'smart'], // TSLint: "triple-equals" - 'id-match': 'error', // TSLint: "variable-name" (partial coverage) - 'id-denylist': [ - // TSLint: "variable-name" (partial coverage) - 'error', - 'any', - 'number', - 'Number', - 'string', - 'String', - 'boolean', - 'Boolean', - 'undefined', - 'Undefined', - ], - - /* - * rules that are covered within additional ESLint plugins - */ - 'jsdoc/check-alignment': 'error', // TSLint: "jsdoc-format" - 'jsdoc/check-indentation': 'error', // TSLint: "jsdoc-format" - 'jsdoc/newline-after-description': 'error', // TSLint: "jsdoc-format" - 'jsdoc/multiline-blocks': 'error', // TSLint: "jsdoc-format", ruleArg: "check-multiline-start" -} - -/* - * rules from: - * - "tslint:recommended" (specific for TS) - * - "tslint:latest" (specific for TS) - */ -export const TSLINT_ORIGINATED_TS_SPECIFIC_RULES = { - 'max-classes-per-file': ['error', 1], // TSLint: "max-classes-per-file": { options: 1 } - 'no-duplicate-imports': 'error', // TSLint: "no-duplicate-imports" - 'no-extra-bind': 'error', // TSLint: "unnecessary-bind" - 'no-new-func': 'error', // TSLint: "function-constructor" - 'no-return-await': 'error', // TSLint: "no-return-await" - 'no-sequences': 'error', // TSLint: "ban-comma-operator" - 'no-template-curly-in-string': 'error', // TSLint: "no-invalid-template-strings" - 'no-undef-init': 'error', // TSLint: "no-unnecessary-initializer" - 'object-shorthand': 'error', // TSLint: "object-literal-shorthand" - 'prefer-object-spread': 'error', // TSLint: "prefer-object-spread" - - '@typescript-eslint/array-type': [ - // TSLint: "array-type": { options: ["array"] } - 'error', - { default: 'array-simple' }, - ], - '@typescript-eslint/consistent-type-assertions': 'error', // TSLint: "no-angle-bracket-type-assertion" - '@typescript-eslint/prefer-for-of': 'error', // TSLint: "prefer-for-of" - '@typescript-eslint/prefer-function-type': 'error', // TSLint: "callable-types" - 'spaced-comment': [ - // TSLint: "comment-format" - 'error', - 'always', - { markers: ['/'] }, - ], - '@typescript-eslint/unified-signatures': 'error', // TSLint: "unified-signatures" - '@typescript-eslint/naming-convention': [ - // TSLint: "class-name", "interface-name" - 'error', - { - // START naming-convention default options - selector: 'default', - format: ['camelCase'], - leadingUnderscore: 'allow', - trailingUnderscore: 'allow', - }, - { - selector: 'variable', - format: ['camelCase', 'UPPER_CASE'], - leadingUnderscore: 'allow', - trailingUnderscore: 'allow', - }, - { - selector: 'typeLike', - format: ['PascalCase'], - }, // END naming-convention default options - { - // add another option to allow upper-case enum member names - selector: 'enumMember', - format: ['PascalCase', 'UPPER_CASE'], - }, - ], - - /* - * combinations of disabled ESLint rules in favour to a newer "@typescript-eslint" rule - */ - '@typescript-eslint/no-unused-expressions': 'error', // TSLint: "no-unused-expression" - 'no-unused-expressions': 'off', // in combination with "@typescript-eslint/no-unused-expressions" - - '@typescript-eslint/dot-notation': 'error', // TSLint: "no-string-literal" - 'dot-notation': 'off', // in combination with '@typescript-eslint/dot-notation' - - '@typescript-eslint/no-shadow': [ - // TSLint: "no-shadowed-variable" - 'error', - { hoist: 'all' }, - ], - 'no-shadow': 'off', // in combination with '@typescript-eslint/no-shadow' - - /* - * rules that are covered within additional ESLint plugins - */ - 'prefer-arrow/prefer-arrow-functions': 'error', // TSLint: "only-arrow-functions" (Plugin: "eslint-plugin-prefer-arrow") - 'import/no-internal-modules': 'error', // TSLint: "no-submodule-imports" - 'import/no-extraneous-dependencies': 'error', // TSLint: "no-implicit-dependencies" -} diff --git a/packages/eslint-config-recommended/eslint.config.mjs b/packages/eslint-config-recommended/eslint.config.mjs new file mode 100644 index 0000000..834468a --- /dev/null +++ b/packages/eslint-config-recommended/eslint.config.mjs @@ -0,0 +1,5 @@ +import { defineScTsConfig } from '@shiftcode/eslint-config-recommended' + +export default defineScTsConfig({ + languageOptions: { parserOptions: { project: ['./tsconfig.lint.json'] } }, +}) diff --git a/packages/eslint-config-recommended/ng-config/package.json b/packages/eslint-config-recommended/ng-config/package.json deleted file mode 100644 index 4eeadb8..0000000 --- a/packages/eslint-config-recommended/ng-config/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "@shiftcode/recommended/ng-config", - "main": "./index.js", - "sideEffects": false -} diff --git a/packages/eslint-config-recommended/package.json b/packages/eslint-config-recommended/package.json index a058d9e..52d32e2 100644 --- a/packages/eslint-config-recommended/package.json +++ b/packages/eslint-config-recommended/package.json @@ -1,25 +1,22 @@ { "name": "@shiftcode/eslint-config-recommended", - "version": "5.0.1", + "version": "6.0.0-pr26.12", "description": "default shiftcode config for eslint", "repository": "https://github.com/shiftcode/sc-commons-public", "license": "UNLICENSED", "author": "shiftcode GmbH ", "sideEffects": false, - "type": "commonjs", + "type": "module", "exports": { ".": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }, - "./ng-config": { - "types": "./dist/ng-config/index.d.ts", - "default": "./dist/ng-config/index.js" + "./angular": { + "types": "./dist/angular/index.d.ts", + "default": "./dist/angular/index.js" } }, - "main": "./dist/index.js", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", "scripts": { "prebuild": "rm -rf ./dist", "build": "tsc", @@ -28,45 +25,31 @@ "format:base": "prettier --config ../../.prettierrc.yml '{src,e2e,test}/**/*.ts'", "format:ci": "npm run format:base -- --check", "format:staged": "prettier --write --config ../../.prettierrc.yml", - "lint": "npm run lint:src:fix", - "lint:ci": "npm run lint:src", - "lint:src": "eslint ./src", - "lint:src:fix": "eslint ./src --cache --fix", + "lint": "eslint --fix --cache ./src", + "lint:ci": "eslint ./src", "lint:staged": "eslint --fix --cache", "prepublish": "node ../publish-helper/dist/prepare-dist.js", "test": "echo 'Error: no test specificed'", "test:ci": "npm run test" }, "dependencies": { - "@shiftcode/eslint-plugin-rules": "^4.0.1", - "@typescript-eslint/eslint-plugin": "^8.18.0", - "@typescript-eslint/parser": "^8.18.0", - "eslint": "^8.56.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-unused-imports": "^4.1.4" + "@eslint/js": "^9.37.0", + "@shiftcode/eslint-plugin-rules": "^5.0.0-pr26.12", + "eslint": "^9.37.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-import": "^2.32.0", + "eslint-plugin-simple-import-sort": "^12.1.1", + "eslint-plugin-unused-imports": "^4.2.0", + "typescript-eslint": "8.46.0" + }, + "devDependencies": { + "angular-eslint": "^20.5.1" }, "peerDependencies": { - "@angular-eslint/builder": "^20.0.0", - "@angular-eslint/eslint-plugin": "^20.0.0", - "@angular-eslint/eslint-plugin-template": "^20.0.0", - "@angular-eslint/schematics": "^20.0.0", - "@angular-eslint/template-parser": "^20.0.0" + "angular-eslint": "^20.5.1" }, "peerDependenciesMeta": { - "@angular-eslint/builder": { - "optional": true - }, - "@angular-eslint/eslint-plugin": { - "optional": true - }, - "@angular-eslint/eslint-plugin-template": { - "optional": true - }, - "@angular-eslint/schematics": { - "optional": true - }, - "@angular-eslint/template-parser": { + "angular-eslint": { "optional": true } }, diff --git a/packages/eslint-config-recommended/src/angular/index.ts b/packages/eslint-config-recommended/src/angular/index.ts new file mode 100644 index 0000000..7abac7d --- /dev/null +++ b/packages/eslint-config-recommended/src/angular/index.ts @@ -0,0 +1,108 @@ +import eslintAngular from 'angular-eslint' +import { defineConfig } from 'eslint/config' + +import { defineScTsConfig } from '../index.js' + +/** + * define the shiftcode eslint config for angular. + * the function wraps given configs with some common settings and rules and adds prettier rules at the end. + * all that's left for you is to define the `languageOptions` and rules you want to override/add + * like e.g. Component and Directive Selectors. + * + * @example ```ts + * import { defineScAngularConfig } from '@shiftcode/eslint-config-recommended/angular' + * + * export default defineScAngularConfig( + * { + * languageOptions: { + * parserOptions: { + * project: ['./tsconfig.app.json', './tsconfig.spec.json'], + * }, + * }, + * }, + * { + * files: ['**\/*.ts'], + * rules: { + * '@angular-eslint/component-selector': ['error', { type: 'element', prefix: 'gf', style: 'kebab-case' }], + * '@angular-eslint/directive-selector': ['error', { type: 'attribute', prefix: 'gf', style: 'camelCase' }], + * '@angular-eslint/prefer-inject': 'error', + * '@angular-eslint/prefer-signals': 'error', + * } + * } + * ) + * ``` + */ +export function defineScAngularConfig(...configs: Parameters): ReturnType { + return defineScTsConfig( + { + files: ['**/*.ts'], + // @ts-expect-error angular fck it up + extends: [eslintAngular.configs.tsRecommended], + processor: eslintAngular.processInlineTemplates, + rules: { + '@angular-eslint/no-async-lifecycle-method': 'error', + '@angular-eslint/prefer-standalone': 'error', + '@angular-eslint/sort-lifecycle-methods': 'error', + '@angular-eslint/no-lifecycle-call': 'error', + '@angular-eslint/prefer-output-readonly': 'error', + '@angular-eslint/no-host-metadata-property': 'off', + '@angular-eslint/prefer-host-metadata-property': 'error', + '@angular-eslint/no-queries-metadata-property': 'error', + + '@angular-eslint/use-lifecycle-interface': 'error', + '@angular-eslint/use-pipe-transform-interface': 'error', + + // default grouping extended with our internal app/... (tsconfig.path) imports as a seperate group + // default group definition copied from: https://github.com/lydell/eslint-plugin-simple-import-sort/blob/main/src/imports.js#L5 + 'simple-import-sort/imports': [ + 'error', + { + groups: [ + // Side effect imports. + ['^\\u0000'], + // Node.js builtins prefixed with `node:`. + ['^node:'], + // Packages. + // Things that start with a letter (or digit or underscore), or `@` followed by a letter. + ['^@?\\w'], + // Internal packages exposed trough tsconfig.path tha use app/ or @/ as shortcut. (like app/shared, or @/shared) + ['^(@|app)(/.*|$)'], + // Absolute imports and other imports such as Vue-style `@/foo`. + // Anything not matched in another group. + ['^'], + // Relative imports. + // Anything that starts with a dot. + ['^\\.'], + ], + }, + ], + }, + }, + + { + files: ['**/*.html'], + extends: [...eslintAngular.configs.templateRecommended], + rules: { + '@angular-eslint/template/no-inline-styles': 'off', // also disallows custom properties like style="--my-prop: value". + + '@angular-eslint/template/no-duplicate-attributes': 'error', + '@angular-eslint/template/button-has-type': 'error', + '@angular-eslint/template/prefer-control-flow': 'error', + '@angular-eslint/template/prefer-self-closing-tags': 'error', + '@angular-eslint/template/prefer-static-string-properties': 'error', + '@angular-eslint/template/no-negated-async': 'error', + '@angular-eslint/template/no-empty-control-flow': 'error', + '@angular-eslint/template/prefer-at-empty': 'error', + + // some very basic a11y rules + '@angular-eslint/template/elements-content': 'error', + '@angular-eslint/template/interactive-supports-focus': 'error', + '@angular-eslint/template/label-has-associated-control': 'error', + '@angular-eslint/template/no-positive-tabindex': 'error', + '@angular-eslint/template/role-has-required-aria': 'error', + '@angular-eslint/template/table-scope': 'error', + }, + }, + ...configs, + ) +} diff --git a/packages/eslint-config-recommended/src/index.ts b/packages/eslint-config-recommended/src/index.ts index 1bc6a64..833af3b 100644 --- a/packages/eslint-config-recommended/src/index.ts +++ b/packages/eslint-config-recommended/src/index.ts @@ -1,57 +1,64 @@ -module.exports = { - /* - * note: "root" is explicitly not set: this has to be defined by the consuming eslintrc declaration - */ - - /* - * If we move those generally applicable rules directly to the "modules.export" object, it will generate errors - * for .html files in the consuming project because "eslint:recommended" is not applicable to them. - * - * Besides that, concerning to angular-eslint documentation, it is strongly recommended to configure all rules - * within appropriate file-types-filtered overrides blocks and not directly inside the module. - */ - overrides: [ +import eslint from '@eslint/js' +import eslintScPlugin from '@shiftcode/eslint-plugin-rules' +import { defineConfig } from 'eslint/config' +import eslintPrettier from 'eslint-config-prettier' +import eslintPluginImport from 'eslint-plugin-import' +import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort' +import eslintPluginUnusedImports from 'eslint-plugin-unused-imports' +import eslintTs from 'typescript-eslint' + +/** + * define the shiftcode eslint config for typescript. + * the function wraps given configs with some common settings and adds prettier rules at the end. + * all that's left for you is to define the `languageOptions` and potential rules you want to override/add. + + * @example ```ts + * import { defineScTsConfig } from '@shiftcode/eslint-config-recommended' + * export default defineScTsConfig( + * { + * languageOptions: { + * parserOptions: { + * project: ['./tsconfig.json', './tsconfig.spec.json'], + * }, + * } + * }, + * { + * files: ['**\/*.ts'], + * rules: { + * '@typescript-eslint/explicit-function-return-type': 'error', + * } + * } + * ) + * ``` + */ +export function defineScTsConfig(...configs: Parameters): ReturnType { + return defineConfig( { - files: ['*.ts', '*.cts', '*.mts', '*.tsx', '*.js', '*.cjs', '*.mjs', '*.jsx'], - plugins: ['eslint-plugin-import'], - extends: [ - 'eslint:recommended', // catching common JS problems - 'prettier', // disable rules that will be auto fixed by prettier - ], + files: ['**/*.{ts,mts,cts,js,mjs,cjs}'], + extends: [eslint.configs.recommended], + plugins: { + 'simple-import-sort': eslintPluginSimpleImportSort, + }, rules: { - 'no-console': 'error', // TSLint: "no-console" - 'max-classes-per-file': 'error', // TSLint: "max-classes-per-file" - 'import/no-deprecated': 'error', // TSLint: "deprecation" - 'import/no-extraneous-dependencies': 'error', // TSLint: "no-implicit-dependencies" - 'import/no-internal-modules': 'error', // TSLint: "no-submodule-imports" - curly: 'error', // TSLint: "curly" - eqeqeq: 'error', // TSLint: "triple-equals" - '@typescript-eslint/ban-tslint-comment': 'error', // TSLint: "ban" + 'simple-import-sort/imports': 'error', + 'simple-import-sort/exports': 'error', + 'no-console': 'error', + 'max-classes-per-file': 'error', + curly: 'error', + eqeqeq: 'error', }, }, + { - files: ['*.ts', '*.cts', '*.mts', '*.tsx'], - parser: '@typescript-eslint/parser', - plugins: ['@shiftcode/rules', '@typescript-eslint', 'unused-imports'], - extends: [ - 'plugin:@typescript-eslint/recommended', - 'plugin:@typescript-eslint/recommended-requiring-type-checking', // includes "eslint-recommended" ruleset - ], + files: ['**/*.{ts,mts,cts}'], + extends: [eslintTs.configs.recommendedTypeChecked, eslintScPlugin.configs.recommended], rules: { - /* - * additional rules that are not contained within the both extensions configured above - */ - '@shiftcode/rules/deny-parent-index-file-import': 'error', - '@shiftcode/rules/prefix-builtin-module-import': 'error', - '@typescript-eslint/array-type': ['error', { default: 'array-simple' }], '@typescript-eslint/explicit-member-accessibility': [ - // TSLint: "member-access" 'error', { accessibility: 'no-public' }, // override default accessibility configuration ('explicit') ], '@typescript-eslint/member-ordering': [ - // TSLint: "member-ordering" 'error', { default: [ @@ -77,6 +84,7 @@ module.exports = { ], }, ], + '@typescript-eslint/switch-exhaustiveness-check': 'error', /* * the rule sorts selectors in the following priority: @@ -93,7 +101,6 @@ module.exports = { * Link: https://typescript-eslint.io/rules/naming-convention/#how-does-the-rule-automatically-order-selectors */ '@typescript-eslint/naming-convention': [ - // TSLint: "class-name", "interface-name" 'error', /* * NO NOT USE GROUP SELECTORS AS THEY MAKE IT FAR MORE COMPLICATED TO READ/UNDERSTAND. @@ -184,14 +191,7 @@ module.exports = { */ '@typescript-eslint/no-non-null-assertion': 'error', // override "recommended" (severity: "warn") - // no-unused-vars does not support a fixer for "unused imports" which is highly shitty. - // therefore we use another plugin which can splits up the unused-vars rule into two rules with a fixer for unused imports - '@typescript-eslint/no-unused-vars': 'off', - 'unused-imports/no-unused-imports': 'error', - 'unused-imports/no-unused-vars': [ - 'error', - { vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' }, - ], + '@typescript-eslint/ban-ts-comment': ['error', { 'ts-expect-error': 'allow-with-description' }], /* * disabling rules from extensions @@ -199,28 +199,66 @@ module.exports = { '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-unsafe-argument': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/unbound-method': 'off', '@typescript-eslint/no-unsafe-enum-comparison': 'off', - 'no-case-declarations': 'off', // TS marks as error anyway ("TS2454: Variable is used before being assigned.") + // not a ts rule but useless for ts files: TS marks as error "TS2454: Variable is used before being assigned." + 'no-case-declarations': 'off', + }, + }, + + // this config is for js and ts but needs to override the upper ones + { + files: ['**/*.{ts,mts,cts,js,mjs,cjs}'], + plugins: { + import: eslintPluginImport, + 'unused-imports': eslintPluginUnusedImports, + }, + rules: { + 'import/order': 'off', // handled by simple-import-sort + 'import/no-deprecated': 'error', + 'import/first': 'error', + 'import/no-extraneous-dependencies': 'error', + 'import/newline-after-import': ['error', { count: 1 }], // do not change count - only works with prettier when 1 + 'import/no-internal-modules': ['error', { allow: ['aws-cdk-lib/*', '@aws-cdk/*'] }], + + // no-unused-vars does not support a fixer for "unused imports" which is highly shitty. + // therefore we use another plugin "unused-imports" which can splits up the unused-vars rule into two rules + // with a fixer for unused imports. + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'off', + 'unused-imports/no-unused-imports': 'error', + 'unused-imports/no-unused-vars': [ + 'error', + { vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' }, + ], }, }, + /* * allow some commonly used patterns for testing to pass eslint */ { - files: ['**/test/**/*.ts', '*.spec.ts', '*.test.ts'], + files: ['**/test/**/*.ts', '**/*.spec.ts', '**/*.test.ts'], rules: { 'no-console': 'off', - 'max-classes-per-file': 'off', // TSLint: "max-classes-per-file" + 'max-classes-per-file': 'off', '@typescript-eslint/no-non-null-assertion': 'off', '@typescript-eslint/no-empty-function': 'off', - // it's ok to define dependencies also in the root package.json (eg. @jest/globals, ...) + }, + }, + + // for files which are not part of the src/ folder and for test files + // it is ok to use dependencies that are listed inside the root package.json (e.g. @shiftcode/eslint-config-recommended) + { + files: ['!**/src/**', '**/*.spec.ts', '**/*.test.ts'], + rules: { 'import/no-extraneous-dependencies': ['error', { packageDir: ['.', '../..'] }], }, }, - ], + + ...configs, + + eslintPrettier, + ) } diff --git a/packages/eslint-config-recommended/src/ng-config/index.ts b/packages/eslint-config-recommended/src/ng-config/index.ts deleted file mode 100644 index 72a50d6..0000000 --- a/packages/eslint-config-recommended/src/ng-config/index.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Base configuration for es-linting an angular project. - * - * Note that rules that need project-specific configuration (i.e. @angular-eslint/component-selector) must - * be configured within the consuming project itself. - */ -module.exports = { - overrides: [ - { - files: ['*.ts', '*.cts', '*.mts', '*.tsx'], - extends: ['plugin:@angular-eslint/recommended', 'plugin:@angular-eslint/template/process-inline-templates'], - rules: { - '@shiftcode/rules/import-denylist': [ - // TSLint: "import-blacklist" - 'error', - { - patterns: [ - /\.\/(core|models|shared|static)\/.*/, // use app/* instead - ], - }, - ], - - /* - * We frequently apply classes (within some conditions, i.e. key-values.component) - * via component host property. - * Angular styleguide, in comparison, recommends to apply classes/attributes via @HostListener or @HostBinding: - * https://angular.io/guide/styleguide#style-06-03 - */ - '@angular-eslint/no-host-metadata-property': 'off', - }, - }, - { - files: ['*.html'], - extends: [ - 'plugin:@angular-eslint/template/recommended', - 'prettier', // disable rules that will be auto fixed by prettier - ], - rules: {}, - }, - ], -} diff --git a/packages/eslint-config-recommended/tsconfig.jest.json b/packages/eslint-config-recommended/tsconfig.jest.json deleted file mode 100644 index 406accb..0000000 --- a/packages/eslint-config-recommended/tsconfig.jest.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../../tsconfig.jest.json", - "compilerOptions": { - "baseUrl": "./" - }, - "include": [ - "src/**/*.spec.ts", - "test/**/*.ts" - ] -} - diff --git a/packages/eslint-config-recommended/tsconfig.json b/packages/eslint-config-recommended/tsconfig.json index 0b6551f..fedb240 100644 --- a/packages/eslint-config-recommended/tsconfig.json +++ b/packages/eslint-config-recommended/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": "./", "outDir": "./dist", "declarationDir": "./dist", - "strictPropertyInitialization": false, "types": ["node"] }, "include": [ diff --git a/packages/eslint-config-recommended/tsconfig.lint.json b/packages/eslint-config-recommended/tsconfig.lint.json new file mode 100644 index 0000000..fd36dc4 --- /dev/null +++ b/packages/eslint-config-recommended/tsconfig.lint.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./", + "types": ["jest", "node"], + "paths": { + "@shiftcode/eslint-plugin-rules": ["../eslint-plugin-rules/src/index.ts"] + } + }, + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [] +} + diff --git a/packages/eslint-plugin-rules/.eslintrc.cjs b/packages/eslint-plugin-rules/.eslintrc.cjs deleted file mode 100644 index 3a13796..0000000 --- a/packages/eslint-plugin-rules/.eslintrc.cjs +++ /dev/null @@ -1,15 +0,0 @@ -/* eslint-env node */ -module.exports = { - overrides: [ - { - files: ['*.ts'], - rules: { - 'import/no-extraneous-dependencies': ['error', { devDependencies: true }], - }, - }, - ], - - parserOptions: { - project: ['./tsconfig.json', './tsconfig.jest.json'], - }, -} diff --git a/packages/eslint-plugin-rules/README.md b/packages/eslint-plugin-rules/README.md index 240b16a..641ff32 100644 --- a/packages/eslint-plugin-rules/README.md +++ b/packages/eslint-plugin-rules/README.md @@ -2,25 +2,23 @@ > 🎯 Target runtime: es2023 ([Node >= 20](https://node.green/#ES2023)) -> ⚠️ This module exports code using CommonJS - This module holds some custom eslint plugins written in typescript. See [doc](https://typescript-eslint.io/custom-rules) for instructions on how to create custom plugins using `typescript-eslint`. ## usage -sample .eslintrc.js file: +sample `eslint.config.msj` file: ```javascript -module.exports = { - // ... +import eslintScPlugin from '@shiftcode/eslint-plugin-rules' - overrides: [ +export default defineConfig( + // ... { - plugins: ['@shiftcode/rules'], files: ['*.ts'], + extends: [eslintScPlugin.configs.recommended], rules: { - '@shiftcode/rules/import-denylist': [ // former TSLint rule: "import-blacklist" + '@shiftcode/import-denylist': [ // former TSLint rule: "import-blacklist" 'error', { patterns: [ @@ -30,29 +28,62 @@ module.exports = { /^somewhat\/.*/, // import filename must never start with "somewhat" /example$/, // import filename must never end with "example" // etc ... - ] - } + ], + }, ], }, }, - ], // ... -} +) +``` + +alternative you can configure the plugin like this: + +```js +import eslintScPlugin from '@shiftcode/eslint-plugin-rules' + +export default defineConfig({ + files: ['**/*.ts'], + plugins: { + '@shiftcode': eslintScPlugin + }, + rules: { + '@shiftcode/prefix-builtin-module-import': 'error', + // ... + } +}) ``` -### provided rules +## Rules the following custom rules are provided within this module: -> deny-parent-index-file-import +### deny-parent-index-file-import -- imports from parent index files are not allowed; i.e. ``import { stuff } from '..'`` +- imports from parent index files are not allowed; i.e. `import { stuff } from '..'` - note: this rule is already included by [@shiftcode/eslint-config-recommended](../eslint-config-recommended) -> import-denylist +### import-denylist This can potentially be replaced by using [no-restricted-imports](https://eslint.org/docs/latest/rules/no-restricted-imports) -- rule accepts a config-object with a ``patterns`` regexp array and is the pendant of the former tslint rule "import-blacklist". +- rule accepts a config-object with a `patterns` regexp array and is the pendant of the former tslint rule "import-blacklist". - example configuration: see above + +### prefix-builtin-module-import +This rule ensures all node builtin modules are imported with the `node:` prefix. + +- note: this rule is already included by [@shiftcode/eslint-config-recommended](../eslint-config-recommended) + + +✅ Correct +```js +import { writeFile } from 'node:fs/promises' +import crypto from 'node:crypto' +``` +❌ Incorrect +```js +import { writeFile } from 'fs/promises' +import crypto from 'crypto' +``` diff --git a/packages/eslint-plugin-rules/eslint-suppressions.json b/packages/eslint-plugin-rules/eslint-suppressions.json new file mode 100644 index 0000000..8aa6721 --- /dev/null +++ b/packages/eslint-plugin-rules/eslint-suppressions.json @@ -0,0 +1,17 @@ +{ + "src/rules/deny-parent-index-file-import.ts": { + "@typescript-eslint/no-unsafe-member-access": { + "count": 2 + } + }, + "src/rules/import-denylist.ts": { + "@typescript-eslint/no-unsafe-member-access": { + "count": 3 + } + }, + "src/rules/prefix-builtin-module-import.ts": { + "@typescript-eslint/no-unsafe-member-access": { + "count": 2 + } + } +} \ No newline at end of file diff --git a/packages/eslint-plugin-rules/eslint.config.mjs b/packages/eslint-plugin-rules/eslint.config.mjs new file mode 100644 index 0000000..834468a --- /dev/null +++ b/packages/eslint-plugin-rules/eslint.config.mjs @@ -0,0 +1,5 @@ +import { defineScTsConfig } from '@shiftcode/eslint-config-recommended' + +export default defineScTsConfig({ + languageOptions: { parserOptions: { project: ['./tsconfig.lint.json'] } }, +}) diff --git a/packages/eslint-plugin-rules/jest.config.js b/packages/eslint-plugin-rules/jest.config.js index f68f64a..7687c57 100644 --- a/packages/eslint-plugin-rules/jest.config.js +++ b/packages/eslint-plugin-rules/jest.config.js @@ -1,9 +1,8 @@ /* eslint-env node,es2023 */ -// eslint-disable-next-line import/no-extraneous-dependencies -const pathsToModuleNameMapper = require('ts-jest').pathsToModuleNameMapper -const tsConfig = require('./tsconfig.jest.json') +import { pathsToModuleNameMapper } from 'ts-jest' +import tsConfig from './tsconfig.jest.json' with { type: 'json' } -module.exports = { +export default { testEnvironment: 'node', extensionsToTreatAsEsm: ['.ts'], transform: { diff --git a/packages/eslint-plugin-rules/package.json b/packages/eslint-plugin-rules/package.json index 024ec5b..40a862a 100644 --- a/packages/eslint-plugin-rules/package.json +++ b/packages/eslint-plugin-rules/package.json @@ -1,15 +1,18 @@ { "name": "@shiftcode/eslint-plugin-rules", - "version": "4.0.1", + "version": "5.0.0-pr26.12", "description": "eslint-rules for shiftcode-specific eslint rules", "repository": "https://github.com/shiftcode/sc-commons-public", "license": "UNLICENSED", "author": "shiftcode GmbH ", "sideEffects": false, - "type": "commonjs", - "main": "./dist/index.js", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", + "type": "module", + "exports": { + ".": { + "default": "./dist/index.js", + "types": "./dist/index.d.ts" + } + }, "scripts": { "prebuild": "rm -rf ./dist", "build": "tsc", @@ -18,25 +21,22 @@ "format:base": "prettier --config ../../.prettierrc.yml '{src,e2e,test}/**/*.ts'", "format:ci": "npm run format:base -- --check", "format:staged": "prettier --write --config ../../.prettierrc.yml", - "lint": "npm run lint:src:fix", - "lint:ci": "npm run lint:src", - "lint:src": "eslint ./src", - "lint:src:fix": "eslint ./src --cache --fix", + "lint": "eslint --fix --cache ./src", + "lint:ci": "eslint ./src", "lint:staged": "eslint --fix --cache", "prepublish": "node ../publish-helper/dist/prepare-dist.js", "test": "jest", "test:ci": "npm run test" }, "dependencies": { - "@eslint/eslintrc": "^2.1.4", - "@typescript-eslint/utils": "^8.18.0" + "@typescript-eslint/utils": "^8.46.0" }, "devDependencies": { - "@typescript-eslint/parser": "^8.18.0", - "@typescript-eslint/rule-tester": "^8.18.0" + "@typescript-eslint/parser": "^8.46.0", + "@typescript-eslint/rule-tester": "^8.46.0" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^9.37.0" }, "engines": { "node": "^20.0.0 || ^22.0.0" diff --git a/packages/eslint-plugin-rules/src/index.ts b/packages/eslint-plugin-rules/src/index.ts index 1d16ccc..dd36eaf 100644 --- a/packages/eslint-plugin-rules/src/index.ts +++ b/packages/eslint-plugin-rules/src/index.ts @@ -1,11 +1,34 @@ -import { denyParentIndexFileImportRule } from './rules/deny-parent-index-file-import' -import { importDenyListRule } from './rules/import-denylist' -import { prefixBuiltinModuleImportRule } from './rules/prefix-builtin-module-import' - -module.exports = { - rules: { - 'deny-parent-index-file-import': denyParentIndexFileImportRule, - 'import-denylist': importDenyListRule, - 'prefix-builtin-module-import': prefixBuiltinModuleImportRule, +import { ConfigObject, Plugin, RuleDefinition } from '@eslint/core' + +import { denyParentIndexFileImportRule } from './rules/deny-parent-index-file-import.js' +import { importDenyListRule } from './rules/import-denylist.js' +import { prefixBuiltinModuleImportRule } from './rules/prefix-builtin-module-import.js' + +const DEFAULT_RULE_NS = `@shiftcode` + +const meta = { name: '@shiftcode/eslint-plugin-rules' } satisfies Plugin['meta'] + +const rules: Record = { + 'deny-parent-index-file-import': denyParentIndexFileImportRule, + 'prefix-builtin-module-import': prefixBuiltinModuleImportRule, + 'import-denylist': importDenyListRule, +} as Record + +const configs = { + recommended: { + name: 'recommended', + plugins: { + [DEFAULT_RULE_NS]: { meta, rules }, + }, + rules: { + [`${DEFAULT_RULE_NS}/deny-parent-index-file-import`]: 'error', + [`${DEFAULT_RULE_NS}/prefix-builtin-module-import`]: 'error', + }, }, +} satisfies Record + +export default { + meta, + rules, + configs, } diff --git a/packages/eslint-plugin-rules/src/rules/create-rule.function.ts b/packages/eslint-plugin-rules/src/rules/create-rule.function.ts new file mode 100644 index 0000000..3423810 --- /dev/null +++ b/packages/eslint-plugin-rules/src/rules/create-rule.function.ts @@ -0,0 +1,5 @@ +import { ESLintUtils } from '@typescript-eslint/utils' + +export const createScRule = ESLintUtils.RuleCreator( + (name) => `https://github.com/shiftcode/sc-commons-public/blob/main/packages/eslint-plugin-rules/README.md#${name}`, +) diff --git a/packages/eslint-plugin-rules/src/rules/deny-parent-index-file-import.spec.ts b/packages/eslint-plugin-rules/src/rules/deny-parent-index-file-import.spec.ts index 650dd21..f08d354 100644 --- a/packages/eslint-plugin-rules/src/rules/deny-parent-index-file-import.spec.ts +++ b/packages/eslint-plugin-rules/src/rules/deny-parent-index-file-import.spec.ts @@ -1,5 +1,5 @@ -import { createRuleTester } from '../utils/rule-tester' -import { DenyParentIndexFileImportMessageIds, denyParentIndexFileImportRule } from './deny-parent-index-file-import' +import { createRuleTester } from '../utils/rule-tester.js' +import { DenyParentIndexFileImportMessageIds, denyParentIndexFileImportRule } from './deny-parent-index-file-import.js' const ruleTester = createRuleTester() diff --git a/packages/eslint-plugin-rules/src/rules/deny-parent-index-file-import.ts b/packages/eslint-plugin-rules/src/rules/deny-parent-index-file-import.ts index 87a8142..4c808c1 100644 --- a/packages/eslint-plugin-rules/src/rules/deny-parent-index-file-import.ts +++ b/packages/eslint-plugin-rules/src/rules/deny-parent-index-file-import.ts @@ -1,18 +1,16 @@ // ------------------------------------------------------------------------------ // Rule Definition // ------------------------------------------------------------------------------ -import { ESLintUtils, TSESTree } from '@typescript-eslint/utils' +import { TSESTree } from '@typescript-eslint/utils' import { RuleContext } from '@typescript-eslint/utils/ts-eslint' +import { createScRule } from './create-rule.function.js' + export enum DenyParentIndexFileImportMessageIds { DENIED_IMPORT = 'deniedImport', } -const createRule = ESLintUtils.RuleCreator( - () => 'https://github.com/shiftcode/sc-commons-public/blob/master/README.md#sc-commons-public', -) - -export const denyParentIndexFileImportRule = createRule({ +export const denyParentIndexFileImportRule = createScRule({ create(context: Readonly>) { const indexFileRegExp = new RegExp(/^\.[\.\/\.]*\.$/) // eslint-disable-line no-useless-escape diff --git a/packages/eslint-plugin-rules/src/rules/import-denylist.spec.ts b/packages/eslint-plugin-rules/src/rules/import-denylist.spec.ts index ef0c2ab..93b7813 100644 --- a/packages/eslint-plugin-rules/src/rules/import-denylist.spec.ts +++ b/packages/eslint-plugin-rules/src/rules/import-denylist.spec.ts @@ -1,5 +1,5 @@ -import { createRuleTester } from '../utils/rule-tester' -import { ImportDenylistMessageIds, importDenyListRule } from './import-denylist' +import { createRuleTester } from '../utils/rule-tester.js' +import { ImportDenylistMessageIds, importDenyListRule } from './import-denylist.js' const ruleTester = createRuleTester() diff --git a/packages/eslint-plugin-rules/src/rules/import-denylist.ts b/packages/eslint-plugin-rules/src/rules/import-denylist.ts index ebfa641..077b801 100644 --- a/packages/eslint-plugin-rules/src/rules/import-denylist.ts +++ b/packages/eslint-plugin-rules/src/rules/import-denylist.ts @@ -1,17 +1,14 @@ // ------------------------------------------------------------------------------ // Rule Definition // ------------------------------------------------------------------------------ -import { ESLintUtils } from '@typescript-eslint/utils' import { RuleContext } from '@typescript-eslint/utils/ts-eslint' -const createRule = ESLintUtils.RuleCreator( - () => 'https://github.com/shiftcode/sc-commons-public/blob/master/README.md#sc-commons-public', -) +import { createScRule } from './create-rule.function.js' export enum ImportDenylistMessageIds { DENIED_PATH = 'deniedPath', } -export const importDenyListRule = createRule({ +export const importDenyListRule = createScRule({ create(context: Readonly }>>>) { const patterns: Array = context.options?.[0]?.patterns ?? [] diff --git a/packages/eslint-plugin-rules/src/rules/prefix-builtin-module-import.spec.ts b/packages/eslint-plugin-rules/src/rules/prefix-builtin-module-import.spec.ts index 271f42c..69467b9 100644 --- a/packages/eslint-plugin-rules/src/rules/prefix-builtin-module-import.spec.ts +++ b/packages/eslint-plugin-rules/src/rules/prefix-builtin-module-import.spec.ts @@ -1,5 +1,5 @@ -import { createRuleTester } from '../utils/rule-tester' -import { prefixBuiltinModuleImportRule, PrefixNodeModuleImportMessageIds } from './prefix-builtin-module-import' +import { createRuleTester } from '../utils/rule-tester.js' +import { prefixBuiltinModuleImportRule, PrefixNodeModuleImportMessageIds } from './prefix-builtin-module-import.js' const ruleTester = createRuleTester() @@ -8,7 +8,7 @@ ruleTester.run('prefix-builtin-module-import', prefixBuiltinModuleImportRule, { { code: ` import { writeFile } from 'node:fs/promises' - import { verify } from 'node:crypto' + import crypto from 'node:crypto' `, }, { @@ -32,7 +32,7 @@ ruleTester.run('prefix-builtin-module-import', prefixBuiltinModuleImportRule, { code: ` import { writeFileSync } from 'node:fs' import { writeFile } from 'fs/promises' - import { verify } from 'crypto' + import crypto from 'crypto' `, errors: [ { @@ -47,7 +47,7 @@ ruleTester.run('prefix-builtin-module-import', prefixBuiltinModuleImportRule, { output: ` import { writeFileSync } from 'node:fs' import { writeFile } from 'node:fs/promises' - import { verify } from 'node:crypto' + import crypto from 'node:crypto' `, }, { diff --git a/packages/eslint-plugin-rules/src/rules/prefix-builtin-module-import.ts b/packages/eslint-plugin-rules/src/rules/prefix-builtin-module-import.ts index 63d4fe5..70cbbf8 100644 --- a/packages/eslint-plugin-rules/src/rules/prefix-builtin-module-import.ts +++ b/packages/eslint-plugin-rules/src/rules/prefix-builtin-module-import.ts @@ -1,6 +1,9 @@ -import { ESLintUtils, TSESTree } from '@typescript-eslint/utils' -import { RuleContext } from '@typescript-eslint/utils/ts-eslint' import { builtinModules } from 'node:module' + +import { TSESTree } from '@typescript-eslint/utils' +import { RuleContext } from '@typescript-eslint/utils/ts-eslint' + +import { createScRule } from './create-rule.function.js' // ------------------------------------------------------------------------------ // Rule Definition // ------------------------------------------------------------------------------ @@ -9,13 +12,9 @@ export enum PrefixNodeModuleImportMessageIds { USE_NODE_PREFIX_FOR_BUILTIN_MODULE = 'useNotePrefixForBuiltinModule', } -const createRule = ESLintUtils.RuleCreator( - () => 'https://github.com/shiftcode/sc-commons-public/blob/master/README.md#sc-commons-public', -) - -export const prefixBuiltinModuleImportRule = createRule({ +export const prefixBuiltinModuleImportRule = createScRule({ create(context: Readonly>) { - const testAndReportModulPathOnNode = (node: TSESTree.Node, path: string) => { + const testAndReportModulePathOnNode = (node: TSESTree.Node, path: string) => { if (builtinModules.includes(path)) { context.report({ node: node, @@ -28,7 +27,7 @@ export const prefixBuiltinModuleImportRule = createRule({ return { ImportDeclaration(node: TSESTree.ImportDeclaration) { - testAndReportModulPathOnNode(node.source, node.source.value) + testAndReportModulePathOnNode(node.source, node.source.value) }, CallExpression(node: TSESTree.CallExpression) { if ((node.callee as any).name !== 'require') { @@ -40,7 +39,7 @@ export const prefixBuiltinModuleImportRule = createRule({ return } - testAndReportModulPathOnNode(node.arguments[0], arg0) + testAndReportModulePathOnNode(node.arguments[0], arg0) }, } }, diff --git a/packages/eslint-plugin-rules/src/utils/rule-tester.ts b/packages/eslint-plugin-rules/src/utils/rule-tester.ts index e396bfa..d698a11 100644 --- a/packages/eslint-plugin-rules/src/utils/rule-tester.ts +++ b/packages/eslint-plugin-rules/src/utils/rule-tester.ts @@ -1,6 +1,7 @@ -import { RuleTester } from '@typescript-eslint/rule-tester' import { join } from 'node:path' + import * as parser from '@typescript-eslint/parser' +import { RuleTester } from '@typescript-eslint/rule-tester' const tsRootDirectory = join(__dirname, '../..', 'test') diff --git a/packages/eslint-plugin-rules/tsconfig.jest.json b/packages/eslint-plugin-rules/tsconfig.jest.json index 1b33449..406accb 100644 --- a/packages/eslint-plugin-rules/tsconfig.jest.json +++ b/packages/eslint-plugin-rules/tsconfig.jest.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.jest.json", "compilerOptions": { - "baseUrl": ".", - "paths": {} + "baseUrl": "./" }, "include": [ "src/**/*.spec.ts", diff --git a/packages/eslint-plugin-rules/tsconfig.json b/packages/eslint-plugin-rules/tsconfig.json index 4d18383..7d37ed2 100644 --- a/packages/eslint-plugin-rules/tsconfig.json +++ b/packages/eslint-plugin-rules/tsconfig.json @@ -4,7 +4,6 @@ "baseUrl": "./", "outDir": "./dist", "declarationDir": "./dist", - "strictPropertyInitialization": false, "types": ["node"], }, "include": [ diff --git a/packages/eslint-plugin-rules/tsconfig.lint.json b/packages/eslint-plugin-rules/tsconfig.lint.json new file mode 100644 index 0000000..b17fb76 --- /dev/null +++ b/packages/eslint-plugin-rules/tsconfig.lint.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./" + }, + "types": ["jest", "node"], + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [] +} + diff --git a/packages/logger/.eslintrc.cjs b/packages/logger/.eslintrc.cjs deleted file mode 100644 index 9538cb6..0000000 --- a/packages/logger/.eslintrc.cjs +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-env node */ -module.exports = { - parserOptions: { - project: [ - './tsconfig.json', - './tsconfig.jest.json', - ], - }, -} diff --git a/packages/logger/eslint.config.mjs b/packages/logger/eslint.config.mjs new file mode 100644 index 0000000..834468a --- /dev/null +++ b/packages/logger/eslint.config.mjs @@ -0,0 +1,5 @@ +import { defineScTsConfig } from '@shiftcode/eslint-config-recommended' + +export default defineScTsConfig({ + languageOptions: { parserOptions: { project: ['./tsconfig.lint.json'] } }, +}) diff --git a/packages/logger/jest.config.js b/packages/logger/jest.config.js index bf4a5d7..7687c57 100644 --- a/packages/logger/jest.config.js +++ b/packages/logger/jest.config.js @@ -1,9 +1,6 @@ /* eslint-env node,es2023 */ -/* eslint-disable import/no-extraneous-dependencies */ import { pathsToModuleNameMapper } from 'ts-jest' -import { readFileSync } from 'node:fs' - -const tsConfig = JSON.parse(readFileSync('./tsconfig.jest.json', 'utf-8')) +import tsConfig from './tsconfig.jest.json' with { type: 'json' } export default { testEnvironment: 'node', diff --git a/packages/logger/package.json b/packages/logger/package.json index b781cc5..c9e75fd 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -1,6 +1,6 @@ { "name": "@shiftcode/logger", - "version": "3.0.2", + "version": "3.0.3-pr26.15", "description": "logger for local and aws lambda execution", "repository": "https://github.com/shiftcode/sc-commons-public", "license": "UNLICENSED", @@ -24,20 +24,16 @@ "format:base": "prettier --config ../../.prettierrc.yml '{src,e2e,test}/**/*.ts'", "format:ci": "npm run format:base -- --check", "format:staged": "prettier --write --config ../../.prettierrc.yml", - "lint": "npm run lint:src:fix && npm run lint:test:fix", - "lint:ci": "npm run lint:src && npm run lint:test", - "lint:src": "eslint ./src", - "lint:src:fix": "eslint ./src --cache --fix", - "lint:staged": "npm run lint", - "lint:test": "eslint ./test", - "lint:test:fix": "eslint ./test --cache --fix", + "lint": "eslint --fix --cache ./src ./test", + "lint:ci": "eslint ./src ./test", + "lint:staged": "eslint --fix --cache", "prepublish": "node ../publish-helper/dist/prepare-dist.js", "test": "NODE_OPTIONS=\"--experimental-vm-modules --trace-warnings\" npx jest --config jest.config.js", "test:ci": "npm run test", "test:watch": "npm run test -- --watch" }, "devDependencies": { - "@shiftcode/utilities": "^4.2.0" + "@shiftcode/utilities": "^4.3.0-pr26.15" }, "peerDependencies": { "@shiftcode/utilities": "^4.0.0 || ^4.0.0-pr53" diff --git a/packages/logger/src/index.ts b/packages/logger/src/index.ts index 9482b16..55ed705 100644 --- a/packages/logger/src/index.ts +++ b/packages/logger/src/index.ts @@ -1,9 +1,7 @@ -export * from './model/logger.js' +export * from './model/json-log-object-data.js' +export * from './model/json-log-transport.js' export * from './model/log-level.enum.js' export * from './model/log-transport.js' -export * from './model/json-log-transport.js' -export * from './model/json-log-object-data.js' - +export * from './model/logger.js' export * from './services/base-logger.service.js' - export * from './utils/logger-helper.js' diff --git a/packages/logger/src/model/json-log-object-data.ts b/packages/logger/src/model/json-log-object-data.ts index aceae3d..38ade41 100644 --- a/packages/logger/src/model/json-log-object-data.ts +++ b/packages/logger/src/model/json-log-object-data.ts @@ -1,4 +1,5 @@ import { getEnumKeyFromNum } from '@shiftcode/utilities' + import { LogLevel } from './log-level.enum.js' export interface JsonLogObjectData { diff --git a/packages/logger/src/model/json-log-transport.ts b/packages/logger/src/model/json-log-transport.ts index 43a3812..ca3f24d 100644 --- a/packages/logger/src/model/json-log-transport.ts +++ b/packages/logger/src/model/json-log-transport.ts @@ -1,6 +1,6 @@ -import { LogTransport } from './log-transport.js' -import { LogLevel } from './log-level.enum.js' import { createJsonLogObjectData, JsonLogObjectData } from './json-log-object-data.js' +import { LogLevel } from './log-level.enum.js' +import { LogTransport } from './log-transport.js' export abstract class JsonLogTransport extends LogTransport { protected constructor(logLevel: LogLevel) { diff --git a/packages/logger/src/model/log-transport.spec.ts b/packages/logger/src/model/log-transport.spec.ts index f2bbfdb..3b0944c 100644 --- a/packages/logger/src/model/log-transport.spec.ts +++ b/packages/logger/src/model/log-transport.spec.ts @@ -1,5 +1,5 @@ -import { LogLevel } from '../index.js' import { SpyLogTransport } from '../../test/spy-log.transport.js' +import { LogLevel } from '../index.js' import { stringToColor } from '../utils/logger-helper.js' describe('respects the configured level', () => { diff --git a/packages/logger/src/model/logger.spec.ts b/packages/logger/src/model/logger.spec.ts index e372951..345fc03 100644 --- a/packages/logger/src/model/logger.spec.ts +++ b/packages/logger/src/model/logger.spec.ts @@ -1,5 +1,5 @@ -import { Logger, LogLevel } from '../index.js' import { SpyLogTransport } from '../../test/spy-log.transport.js' +import { Logger, LogLevel } from '../index.js' import { stringToColor } from '../utils/logger-helper.js' describe('Logger behavior', () => { diff --git a/packages/logger/src/model/logger.ts b/packages/logger/src/model/logger.ts index 137d4fe..4ed6285 100644 --- a/packages/logger/src/model/logger.ts +++ b/packages/logger/src/model/logger.ts @@ -1,5 +1,5 @@ -import { LogTransport } from './log-transport.js' import { LogLevel } from './log-level.enum.js' +import { LogTransport } from './log-transport.js' export class Logger { constructor( diff --git a/packages/logger/src/services/base-logger.service.spec.ts b/packages/logger/src/services/base-logger.service.spec.ts index d553317..c4943c8 100644 --- a/packages/logger/src/services/base-logger.service.spec.ts +++ b/packages/logger/src/services/base-logger.service.spec.ts @@ -1,7 +1,7 @@ import { SpyLogTransport } from '../../test/spy-log.transport.js' -import { BaseLoggerService } from './base-logger.service.js' import { LogLevel } from '../model/log-level.enum.js' import { Logger } from '../model/logger.js' +import { BaseLoggerService } from './base-logger.service.js' describe('BaseLoggerService with SpyLogTransport', () => { it('should use the spy log transport', () => { diff --git a/packages/logger/src/services/base-logger.service.ts b/packages/logger/src/services/base-logger.service.ts index 1c576d2..9139d7e 100644 --- a/packages/logger/src/services/base-logger.service.ts +++ b/packages/logger/src/services/base-logger.service.ts @@ -1,6 +1,6 @@ +import { LogTransport } from '../model/log-transport.js' import { Logger } from '../model/logger.js' import { stringToColor } from '../utils/logger-helper.js' -import { LogTransport } from '../model/log-transport.js' export class BaseLoggerService { private loggers = new Map() diff --git a/packages/logger/test/spy-log.transport.ts b/packages/logger/test/spy-log.transport.ts index e99e44c..30fbd5a 100644 --- a/packages/logger/test/spy-log.transport.ts +++ b/packages/logger/test/spy-log.transport.ts @@ -1,7 +1,7 @@ -import { LogLevel, LogTransport } from '../src/index.js' -// eslint-disable-next-line import/no-extraneous-dependencies import { jest } from '@jest/globals' +import { LogLevel, LogTransport } from '../src/index.js' + export class SpyLogTransport extends LogTransport { private logMock = jest.fn() diff --git a/packages/logger/tsconfig.json b/packages/logger/tsconfig.json index 7d0e9d0..1c18066 100644 --- a/packages/logger/tsconfig.json +++ b/packages/logger/tsconfig.json @@ -1,9 +1,9 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "baseUrl": ".", + "baseUrl": "./", "outDir": "./dist", - "declarationDir": "./dist", + "declarationDir": "./dist" }, "include": ["src/**/*.ts"] } diff --git a/packages/logger/tsconfig.lint.json b/packages/logger/tsconfig.lint.json new file mode 100644 index 0000000..e0154de --- /dev/null +++ b/packages/logger/tsconfig.lint.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./", + "types": ["jest", "node"], + "paths": { + "@shiftcode/utilities": ["../utilities/src/index.ts"] + } + }, + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [], +} diff --git a/packages/publish-helper/.eslintrc.cjs b/packages/publish-helper/.eslintrc.cjs deleted file mode 100644 index 9538cb6..0000000 --- a/packages/publish-helper/.eslintrc.cjs +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-env node */ -module.exports = { - parserOptions: { - project: [ - './tsconfig.json', - './tsconfig.jest.json', - ], - }, -} diff --git a/packages/publish-helper/eslint-suppressions.json b/packages/publish-helper/eslint-suppressions.json new file mode 100644 index 0000000..42268be --- /dev/null +++ b/packages/publish-helper/eslint-suppressions.json @@ -0,0 +1,18 @@ +{ + "src/helpers.ts": { + "@typescript-eslint/no-unsafe-call": { + "count": 1 + }, + "@typescript-eslint/no-unsafe-member-access": { + "count": 1 + }, + "@typescript-eslint/no-unsafe-return": { + "count": 1 + } + }, + "src/prepare-dist.ts": { + "@typescript-eslint/no-unsafe-member-access": { + "count": 2 + } + } +} \ No newline at end of file diff --git a/packages/publish-helper/eslint.config.mjs b/packages/publish-helper/eslint.config.mjs new file mode 100644 index 0000000..834468a --- /dev/null +++ b/packages/publish-helper/eslint.config.mjs @@ -0,0 +1,5 @@ +import { defineScTsConfig } from '@shiftcode/eslint-config-recommended' + +export default defineScTsConfig({ + languageOptions: { parserOptions: { project: ['./tsconfig.lint.json'] } }, +}) diff --git a/packages/publish-helper/jest.config.js b/packages/publish-helper/jest.config.js index 2d5dba7..1ccdde9 100644 --- a/packages/publish-helper/jest.config.js +++ b/packages/publish-helper/jest.config.js @@ -1,18 +1,15 @@ /* eslint-env node,es2023 */ -/* eslint-disable import/no-extraneous-dependencies */ import { pathsToModuleNameMapper } from 'ts-jest' -import { readFileSync } from 'node:fs' - -const tsConfig = JSON.parse(readFileSync('./tsconfig.jest.json', 'utf-8')) +import tsConfig from './tsconfig.jest.json' with { type: 'json' } export default { testEnvironment: 'node', extensionsToTreatAsEsm: ['.ts'], transform: { - '^.+\\.ts$': ['ts-jest', {tsconfig: 'tsconfig.jest.json', useESM: true}] + '^.+\\.ts$': ['ts-jest', { tsconfig: 'tsconfig.jest.json', useESM: true }], }, moduleNameMapper: { '^(\\.{1,2}/.*)\\.js$': '$1', - ...pathsToModuleNameMapper(tsConfig.compilerOptions.paths ?? {}) - } -} \ No newline at end of file + ...pathsToModuleNameMapper(tsConfig.compilerOptions.paths ?? {}), + }, +} diff --git a/packages/publish-helper/package.json b/packages/publish-helper/package.json index e579be3..8575c03 100644 --- a/packages/publish-helper/package.json +++ b/packages/publish-helper/package.json @@ -1,6 +1,6 @@ { "name": "@shiftcode/publish-helper", - "version": "4.1.2", + "version": "4.2.0-pr26.15", "description": "scripts for conventional (pre)releases", "repository": "https://github.com/shiftcode/sc-commons-public", "license": "MIT", @@ -17,10 +17,8 @@ "format:base": "prettier --config ../../.prettierrc.yml '{src,e2e,test}/**/*.ts'", "format:ci": "npm run format:base -- --check", "format:staged": "prettier --write --config ../../.prettierrc.yml", - "lint": "npm run lint:src:fix", - "lint:ci": "npm run lint:src", - "lint:src": "eslint ./src", - "lint:src:fix": "eslint ./src --cache --fix", + "lint": "eslint --fix --cache ./src", + "lint:ci": "eslint ./src", "lint:staged": "eslint --fix --cache", "prepublish": "node ./dist/prepare-dist.js", "test": "NODE_OPTIONS=\"--experimental-vm-modules --trace-warnings\" npx jest --config jest.config.js --passWithNoTests", @@ -32,7 +30,7 @@ "yargs": "^17.7.2" }, "devDependencies": { - "@shiftcode/branch-utilities": "^5.0.2", + "@shiftcode/branch-utilities": "^5.1.0-pr26.15", "@types/yargs": "^17.0.32" }, "peerDependencies": { diff --git a/packages/publish-helper/src/prepare-dist.ts b/packages/publish-helper/src/prepare-dist.ts index 2685a5e..ca3da2b 100644 --- a/packages/publish-helper/src/prepare-dist.ts +++ b/packages/publish-helper/src/prepare-dist.ts @@ -3,9 +3,11 @@ import fs from 'node:fs' import { dirname, normalize as normalizePath } from 'node:path' import process from 'node:process' + import yargs from 'yargs' // eslint-disable-next-line import/no-internal-modules import { hideBin } from 'yargs/helpers' + import { ensureDir, fixPackageJsonPaths, PCKG_JSON } from './helpers.js' const FILES_TO_CP = /(README|CHANGES|CHANGELOG|HISTORY|LICENSE|LICENCE|NOTICE')/i diff --git a/packages/publish-helper/src/publish-lib.ts b/packages/publish-helper/src/publish-lib.ts index 030ad5d..aec4752 100644 --- a/packages/publish-helper/src/publish-lib.ts +++ b/packages/publish-helper/src/publish-lib.ts @@ -1,5 +1,7 @@ #!/usr/bin/env node /* eslint-disable no-console */ +import * as process from 'node:process' + import { BranchInfo, getBranchInfo, @@ -9,10 +11,10 @@ import { hasGithubContext, isGithubWorkflow, } from '@shiftcode/branch-utilities' -import * as process from 'node:process' import yargs from 'yargs' // eslint-disable-next-line import/no-internal-modules import { hideBin } from 'yargs/helpers' + import { exec } from './helpers.js' interface Options { diff --git a/packages/publish-helper/tsconfig.jest.json b/packages/publish-helper/tsconfig.jest.json index 406accb..60ebfcd 100644 --- a/packages/publish-helper/tsconfig.jest.json +++ b/packages/publish-helper/tsconfig.jest.json @@ -1,7 +1,10 @@ { "extends": "../../tsconfig.jest.json", "compilerOptions": { - "baseUrl": "./" + "baseUrl": "./", + "paths": { + "@shiftcode/branch-utilities": ["../branch-utilities/src/index.ts"] + } }, "include": [ "src/**/*.spec.ts", diff --git a/packages/publish-helper/tsconfig.lint.json b/packages/publish-helper/tsconfig.lint.json new file mode 100644 index 0000000..3c672cc --- /dev/null +++ b/packages/publish-helper/tsconfig.lint.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./", + "types": ["jest", "node"], + "paths": { + "@shiftcode/branch-utilities": ["../branch-utilities/src/index.ts"], + } + }, + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [] +} + diff --git a/packages/utilities/.eslintrc.cjs b/packages/utilities/.eslintrc.cjs deleted file mode 100644 index 9538cb6..0000000 --- a/packages/utilities/.eslintrc.cjs +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-env node */ -module.exports = { - parserOptions: { - project: [ - './tsconfig.json', - './tsconfig.jest.json', - ], - }, -} diff --git a/packages/utilities/eslint-suppressions.json b/packages/utilities/eslint-suppressions.json new file mode 100644 index 0000000..63f73d1 --- /dev/null +++ b/packages/utilities/eslint-suppressions.json @@ -0,0 +1,50 @@ +{ + "src/lib/compare-with/compare-with.ts": { + "@typescript-eslint/no-unsafe-call": { + "count": 2 + }, + "@typescript-eslint/no-unsafe-member-access": { + "count": 4 + } + }, + "src/lib/enum/enum.ts": { + "@typescript-eslint/no-unsafe-member-access": { + "count": 3 + } + }, + "src/lib/group-by/group-by.ts": { + "@typescript-eslint/no-unsafe-member-access": { + "count": 3 + } + }, + "src/lib/json-stringify-replacer/json-stringify-replacer.function.ts": { + "@typescript-eslint/no-unsafe-return": { + "count": 1 + } + }, + "src/lib/map-values-deep/map-values-deep.spec.ts": { + "@typescript-eslint/no-unsafe-member-access": { + "count": 2 + } + }, + "src/lib/map-values-deep/map-values-deep.ts": { + "@typescript-eslint/no-unsafe-member-access": { + "count": 2 + } + }, + "src/lib/object/omit-props.function.ts": { + "@typescript-eslint/no-unsafe-return": { + "count": 1 + } + }, + "src/lib/object/pick-props-assert-defined.function.ts": { + "@typescript-eslint/no-unsafe-return": { + "count": 1 + } + }, + "src/lib/object/pick-props.function.ts": { + "@typescript-eslint/no-unsafe-return": { + "count": 1 + } + } +} \ No newline at end of file diff --git a/packages/utilities/eslint.config.mjs b/packages/utilities/eslint.config.mjs new file mode 100644 index 0000000..834468a --- /dev/null +++ b/packages/utilities/eslint.config.mjs @@ -0,0 +1,5 @@ +import { defineScTsConfig } from '@shiftcode/eslint-config-recommended' + +export default defineScTsConfig({ + languageOptions: { parserOptions: { project: ['./tsconfig.lint.json'] } }, +}) diff --git a/packages/utilities/jest.config.js b/packages/utilities/jest.config.js index ffa6f9c..1ccdde9 100644 --- a/packages/utilities/jest.config.js +++ b/packages/utilities/jest.config.js @@ -1,18 +1,15 @@ /* eslint-env node,es2023 */ -/* eslint-disable import/no-extraneous-dependencies */ import { pathsToModuleNameMapper } from 'ts-jest' -import { readFileSync } from 'node:fs' - -const tsConfig = JSON.parse(readFileSync('./tsconfig.jest.json', 'utf-8')) +import tsConfig from './tsconfig.jest.json' with { type: 'json' } export default { - testEnvironment: 'node', - extensionsToTreatAsEsm: ['.ts'], - transform: { - '^.+\\.ts$': ['ts-jest', {tsconfig: 'tsconfig.jest.json', useESM: true}] - }, - moduleNameMapper: { - '^(\\.{1,2}/.*)\\.js$': '$1', - ...pathsToModuleNameMapper(tsConfig.compilerOptions.paths ?? {}) - } + testEnvironment: 'node', + extensionsToTreatAsEsm: ['.ts'], + transform: { + '^.+\\.ts$': ['ts-jest', { tsconfig: 'tsconfig.jest.json', useESM: true }], + }, + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + ...pathsToModuleNameMapper(tsConfig.compilerOptions.paths ?? {}), + }, } diff --git a/packages/utilities/package.json b/packages/utilities/package.json index a030610..f266521 100644 --- a/packages/utilities/package.json +++ b/packages/utilities/package.json @@ -1,6 +1,6 @@ { "name": "@shiftcode/utilities", - "version": "4.2.0", + "version": "4.3.0-pr26.15", "description": "Contains some utilities", "repository": "https://github.com/shiftcode/sc-commons-public", "license": "MIT", @@ -20,10 +20,8 @@ "format:base": "prettier --config ../../.prettierrc.yml '{src,e2e,test}/**/*.ts'", "format:ci": "npm run format:base -- --check", "format:staged": "prettier --write --config ../../.prettierrc.yml", - "lint": "npm run lint:src:fix", - "lint:ci": "npm run lint:src", - "lint:src": "eslint ./src", - "lint:src:fix": "eslint ./src --cache --fix", + "lint": "eslint --fix --cache ./src", + "lint:ci": "eslint ./src", "lint:staged": "eslint --fix --cache", "prepublish": "node ../publish-helper/dist/prepare-dist.js", "test": "NODE_OPTIONS=\"--experimental-vm-modules --trace-warnings\" npx jest --config jest.config.js", diff --git a/packages/utilities/src/index.ts b/packages/utilities/src/index.ts index 10ba7f4..13ba254 100644 --- a/packages/utilities/src/index.ts +++ b/packages/utilities/src/index.ts @@ -1,5 +1,5 @@ -export * from './lib/color-utils/hex-to-rgb.function.js' export * from './lib/color-utils/colorize-for-console.function.js' +export * from './lib/color-utils/hex-to-rgb.function.js' export * from './lib/compare-with/compare-with.js' export * from './lib/cookie/parse-cookies.function.js' export * from './lib/enum/enum.js' @@ -7,20 +7,17 @@ export * from './lib/group-by/group-by.js' export * from './lib/http/http-constants.js' export * from './lib/json-stringify-replacer/json-stringify-replacer.function.js' export * from './lib/map-values-deep/map-values-deep.js' +export * from './lib/math/clamp.function.js' +export * from './lib/math/random-int.js' export * from './lib/object/get-value-assert-defined.function.js' export * from './lib/object/omit-props.function.js' export * from './lib/object/pick-props.function.js' export * from './lib/object/pick-props-assert-defined.function.js' export * from './lib/promise/make-deferred.function.js' -export * from './lib/math/clamp.function.js' -export * from './lib/math/random-int.js' +export * from './lib/string/capitalize.function.js' +export * from './lib/string/words.js' export * from './lib/tag/get-tag.function.js' export * from './lib/tag/tag.enum.js' -export * from './lib/type-utils/allowed-names.type.js' -export * from './lib/type-utils/nullable.type.js' -export * from './lib/type-utils/union-to-intersection.type.js' -export * from './lib/string/words.js' -export * from './lib/string/capitalize.function.js' export * from './lib/ts-guards/is-array.js' export * from './lib/ts-guards/is-boolean.js' export * from './lib/ts-guards/is-class.js' @@ -28,3 +25,6 @@ export * from './lib/ts-guards/is-date.js' export * from './lib/ts-guards/is-defined.js' export * from './lib/ts-guards/is-number.js' export * from './lib/ts-guards/is-string.js' +export * from './lib/type-utils/allowed-names.type.js' +export * from './lib/type-utils/nullable.type.js' +export * from './lib/type-utils/union-to-intersection.type.js' diff --git a/packages/utilities/src/lib/map-values-deep/map-values-deep.spec.ts b/packages/utilities/src/lib/map-values-deep/map-values-deep.spec.ts index 0fde501..0feaa36 100644 --- a/packages/utilities/src/lib/map-values-deep/map-values-deep.spec.ts +++ b/packages/utilities/src/lib/map-values-deep/map-values-deep.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unsafe-return */ import { mapValuesDeep } from './map-values-deep.js' describe('map values deep', () => { diff --git a/packages/utilities/src/lib/map-values-deep/map-values-deep.ts b/packages/utilities/src/lib/map-values-deep/map-values-deep.ts index db10891..259c131 100644 --- a/packages/utilities/src/lib/map-values-deep/map-values-deep.ts +++ b/packages/utilities/src/lib/map-values-deep/map-values-deep.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unsafe-return */ import { getTag } from '../tag/get-tag.function.js' import { Tag } from '../tag/tag.enum.js' diff --git a/packages/utilities/tsconfig.jest.json b/packages/utilities/tsconfig.jest.json index 802d7c3..911257b 100644 --- a/packages/utilities/tsconfig.jest.json +++ b/packages/utilities/tsconfig.jest.json @@ -1,11 +1,10 @@ { "extends": "../../tsconfig.jest.json", "compilerOptions": { - "baseUrl": "./", - "paths": {} + "baseUrl": "./" }, "include": [ "src/**/*.spec.ts", "test/**/*.ts" ] -} \ No newline at end of file +} diff --git a/packages/utilities/tsconfig.lint.json b/packages/utilities/tsconfig.lint.json new file mode 100644 index 0000000..5b8b248 --- /dev/null +++ b/packages/utilities/tsconfig.lint.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./", + "types": ["jest", "node"] + }, + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [] +} +