diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 01f5ef7d..00000000 --- a/.eslintrc +++ /dev/null @@ -1,55 +0,0 @@ -{ - "root": true, - "ignorePatterns": [ - "projects/**/*", - "dist/**/*", - "node_modules/**/*", - "**/*.js" - ], - "overrides": [ - { - "files": [ - "*.ts" - ], - "parserOptions": { - "project": [ - "tsconfig.json", - "e2e/tsconfig.json" - ], - "createDefaultProgram": true - }, - "extends": [ - "plugin:@angular-eslint/recommended", - "plugin:@angular-eslint/template/process-inline-templates" - ], - "rules": { - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": "app", - "style": "camelCase" - } - ], - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "app", - "style": "kebab-case" - } - ], - "dot-notation": "off" - } - }, - { - "files": [ - "*.html" - ], - "extends": [ - "plugin:@angular-eslint/template/recommended" - ], - "rules": {} - } - ] -} diff --git a/.yarn/cache/@eslint-js-npm-9.10.0-faaae041c9-cbda2bf268.zip b/.yarn/cache/@eslint-js-npm-9.10.0-faaae041c9-cbda2bf268.zip new file mode 100644 index 00000000..a7358455 Binary files /dev/null and b/.yarn/cache/@eslint-js-npm-9.10.0-faaae041c9-cbda2bf268.zip differ diff --git a/.yarn/cache/@types-jasmine-npm-4.3.1-879d605fca-64a29c568d.zip b/.yarn/cache/@types-jasmine-npm-4.3.1-879d605fca-64a29c568d.zip deleted file mode 100644 index 919735c0..00000000 Binary files a/.yarn/cache/@types-jasmine-npm-4.3.1-879d605fca-64a29c568d.zip and /dev/null differ diff --git a/.yarn/cache/@types-jasminewd2-npm-2.0.10-6775929c4c-ba1615c073.zip b/.yarn/cache/@types-jasminewd2-npm-2.0.10-6775929c4c-ba1615c073.zip deleted file mode 100644 index 291eed83..00000000 Binary files a/.yarn/cache/@types-jasminewd2-npm-2.0.10-6775929c4c-ba1615c073.zip and /dev/null differ diff --git a/.yarn/cache/@types-node-npm-16.18.23-ba8d2c5452-83f9a08ae3.zip b/.yarn/cache/@types-node-npm-16.18.23-ba8d2c5452-83f9a08ae3.zip deleted file mode 100644 index 4b7d20c5..00000000 Binary files a/.yarn/cache/@types-node-npm-16.18.23-ba8d2c5452-83f9a08ae3.zip and /dev/null differ diff --git a/.yarn/cache/@types-node-npm-20.16.5-fd6c27be3b-39a8457149.zip b/.yarn/cache/@types-node-npm-20.16.5-fd6c27be3b-39a8457149.zip new file mode 100644 index 00000000..e98e649c Binary files /dev/null and b/.yarn/cache/@types-node-npm-20.16.5-fd6c27be3b-39a8457149.zip differ diff --git a/.yarn/cache/colors-npm-1.4.0-7e2cf12234-90b2d54651.zip b/.yarn/cache/colors-npm-1.4.0-7e2cf12234-90b2d54651.zip deleted file mode 100644 index dfb00fb9..00000000 Binary files a/.yarn/cache/colors-npm-1.4.0-7e2cf12234-90b2d54651.zip and /dev/null differ diff --git a/.yarn/cache/istanbul-lib-coverage-npm-2.0.5-cccbc9487c-57b7d67dd0.zip b/.yarn/cache/istanbul-lib-coverage-npm-2.0.5-cccbc9487c-57b7d67dd0.zip deleted file mode 100644 index 8e4d5bf9..00000000 Binary files a/.yarn/cache/istanbul-lib-coverage-npm-2.0.5-cccbc9487c-57b7d67dd0.zip and /dev/null differ diff --git a/.yarn/cache/istanbul-lib-source-maps-npm-3.0.6-79bc2d73b8-194db47a08.zip b/.yarn/cache/istanbul-lib-source-maps-npm-3.0.6-79bc2d73b8-194db47a08.zip deleted file mode 100644 index bae30f85..00000000 Binary files a/.yarn/cache/istanbul-lib-source-maps-npm-3.0.6-79bc2d73b8-194db47a08.zip and /dev/null differ diff --git a/.yarn/cache/istanbul-reports-npm-3.1.5-fb11324e3e-1fc20a133f.zip b/.yarn/cache/istanbul-reports-npm-3.1.5-fb11324e3e-1fc20a133f.zip deleted file mode 100644 index 6d12a74f..00000000 Binary files a/.yarn/cache/istanbul-reports-npm-3.1.5-fb11324e3e-1fc20a133f.zip and /dev/null differ diff --git a/.yarn/cache/jasmine-core-npm-3.6.0-d7dae6e721-b3a1cfafd0.zip b/.yarn/cache/jasmine-core-npm-3.6.0-d7dae6e721-b3a1cfafd0.zip deleted file mode 100644 index 9b704e3a..00000000 Binary files a/.yarn/cache/jasmine-core-npm-3.6.0-d7dae6e721-b3a1cfafd0.zip and /dev/null differ diff --git a/.yarn/cache/jasmine-spec-reporter-npm-5.0.2-ad40599df5-87c3185079.zip b/.yarn/cache/jasmine-spec-reporter-npm-5.0.2-ad40599df5-87c3185079.zip deleted file mode 100644 index ec0dfeb1..00000000 Binary files a/.yarn/cache/jasmine-spec-reporter-npm-5.0.2-ad40599df5-87c3185079.zip and /dev/null differ diff --git a/.yarn/cache/karma-coverage-istanbul-reporter-npm-3.0.3-8b4837d97b-8bbde57d63.zip b/.yarn/cache/karma-coverage-istanbul-reporter-npm-3.0.3-8b4837d97b-8bbde57d63.zip deleted file mode 100644 index 91e3bbdc..00000000 Binary files a/.yarn/cache/karma-coverage-istanbul-reporter-npm-3.0.3-8b4837d97b-8bbde57d63.zip and /dev/null differ diff --git a/.yarn/cache/tslib-npm-2.7.0-21668f5c21-9a5b47ddac.zip b/.yarn/cache/tslib-npm-2.7.0-21668f5c21-9a5b47ddac.zip new file mode 100644 index 00000000..accaebc0 Binary files /dev/null and b/.yarn/cache/tslib-npm-2.7.0-21668f5c21-9a5b47ddac.zip differ diff --git a/.yarn/cache/typescript-npm-5.4.5-8568a42232-d04a9e27e6.zip b/.yarn/cache/typescript-npm-5.4.5-8568a42232-d04a9e27e6.zip deleted file mode 100644 index bb766b3d..00000000 Binary files a/.yarn/cache/typescript-npm-5.4.5-8568a42232-d04a9e27e6.zip and /dev/null differ diff --git a/.yarn/cache/typescript-npm-5.5.4-79ce5f60f7-1689ccafef.zip b/.yarn/cache/typescript-npm-5.5.4-79ce5f60f7-1689ccafef.zip new file mode 100644 index 00000000..0f260d38 Binary files /dev/null and b/.yarn/cache/typescript-npm-5.5.4-79ce5f60f7-1689ccafef.zip differ diff --git a/.yarn/cache/typescript-patch-6e159bfddb-760f7d92fb.zip b/.yarn/cache/typescript-patch-6e159bfddb-760f7d92fb.zip deleted file mode 100644 index af3fc0ca..00000000 Binary files a/.yarn/cache/typescript-patch-6e159bfddb-760f7d92fb.zip and /dev/null differ diff --git a/.yarn/cache/typescript-patch-fe43cd9db9-746fdd0865.zip b/.yarn/cache/typescript-patch-fe43cd9db9-746fdd0865.zip new file mode 100644 index 00000000..1c79d511 Binary files /dev/null and b/.yarn/cache/typescript-patch-fe43cd9db9-746fdd0865.zip differ diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index 7a135036..2567fe93 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/esbuild/plugins.ts b/esbuild/plugins.ts index b42d43b1..04ef3bdc 100644 --- a/esbuild/plugins.ts +++ b/esbuild/plugins.ts @@ -3,6 +3,7 @@ import { Plugin } from 'esbuild'; import { definePlugin } from 'esbuild-plugin-define'; import { config } from 'dotenv'; + const { PROD } = process.env; if (PROD !== 'true') { config({ diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..280cb3dd --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,56 @@ +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import js from "@eslint/js"; +import { FlatCompat } from "@eslint/eslintrc"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all +}); + +export default [{ + ignores: ["projects/**/*", "dist/**/*", "node_modules/**/*", "**/*.js"], +}, ...compat.extends( + "plugin:@angular-eslint/recommended", + "plugin:@angular-eslint/template/process-inline-templates", +).map(config => ({ + ...config, + files: ["**/*.ts"], +})), { + files: ["**/*.ts"], + + languageOptions: { + ecmaVersion: 5, + sourceType: "script", + + parserOptions: { + project: ["tsconfig.json", "e2e/tsconfig.json"], + createDefaultProgram: true, + }, + }, + + rules: { + "@angular-eslint/directive-selector": ["error", { + type: "attribute", + prefix: "app", + style: "camelCase", + }], + + "@angular-eslint/component-selector": ["error", { + type: "element", + prefix: "app", + style: "kebab-case", + }], + + "dot-notation": "off", + }, +}, ...compat.extends("plugin:@angular-eslint/template/recommended").map(config => ({ + ...config, + files: ["**/*.html"], +})), { + files: ["**/*.html"], + rules: {}, +}]; \ No newline at end of file diff --git a/package.json b/package.json index ee144603..3908e7f3 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "helmet": "^7.1.0", "rxjs": "~7.5.0", "socket.io-client": "^4.7.5", - "tslib": "^2.3.1", + "tslib": "^2.6.3", "utf-8-validate": "^5.0.9", "zone.js": "~0.14.10" }, @@ -54,25 +54,23 @@ "@angular/cli": "^18.2.2", "@angular/compiler-cli": "^18.2.2", "@angular/language-service": "^18.2.2", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "^9.10.0", "@types/express": "^4.17.11", - "@types/jasminewd2": "~2.0.8", "@types/jest": "^29.5.12", - "@types/node": "^16.18.23", + "@types/node": "^20.16.0", "@typescript-eslint/eslint-plugin": "^7.2.0", "@typescript-eslint/parser": "^7.2.0", "browser-sync": "^3.0.2", "dotenv": "^16.4.5", "esbuild-plugin-define": "^0.5.0", "eslint": "^9.0.0", - "jasmine-core": "~3.6.0", - "jasmine-spec-reporter": "~5.0.0", "jest": "^29.7.0", "jest-preset-angular": "^14.2.2", - "karma-coverage-istanbul-reporter": "~3.0.2", "protractor": "~7.0.0", "socket.io": "^4.7.5", "ts-node": "~8.3.0", - "typescript": "~5.4.5" + "typescript": "~5.5.4" }, "packageManager": "yarn@4.4.1" } diff --git a/yarn.lock b/yarn.lock index d593c482..c3760b77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2660,6 +2660,13 @@ __metadata: languageName: node linkType: hard +"@eslint/js@npm:^9.10.0": + version: 9.10.0 + resolution: "@eslint/js@npm:9.10.0" + checksum: 10/cbda2bf268c8ac7a2b2493aaaa0113a78165a576ee5178b9fbdaf245c3d40ffaf41d006f75afab5718f68d816f00319e267b4c88ead100b19022fe491f9e0175 + languageName: node + linkType: hard + "@eslint/object-schema@npm:^2.1.4": version: 2.1.4 resolution: "@eslint/object-schema@npm:2.1.4" @@ -4096,22 +4103,6 @@ __metadata: languageName: node linkType: hard -"@types/jasmine@npm:*": - version: 4.3.1 - resolution: "@types/jasmine@npm:4.3.1" - checksum: 10/64a29c568dfe4aad2756594d1b16f9a3dd2cfe9a5fa6f947c98895ac05950a19838aa832df32cfe4d416cebfe8ffea41621ee0a94b31303627954a6bb483683f - languageName: node - linkType: hard - -"@types/jasminewd2@npm:~2.0.8": - version: 2.0.10 - resolution: "@types/jasminewd2@npm:2.0.10" - dependencies: - "@types/jasmine": "npm:*" - checksum: 10/ba1615c07301fde9ba72a1201f26609abd2e03bb4199145d4b2cc0cb707d222ef32bf02eba66047482aaacf434b502b238e15289d55f59b1f18f9562cfbae368 - languageName: node - linkType: hard - "@types/jest@npm:^29.5.12": version: 29.5.12 resolution: "@types/jest@npm:29.5.12" @@ -4179,10 +4170,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^16.18.23": - version: 16.18.23 - resolution: "@types/node@npm:16.18.23" - checksum: 10/83f9a08ae3b46e3b05afb4a3cccd551e335391ee1b9f879448415740444aad5911bfa23ac35f7a91e91683e813a34187e10c29b40ebdf19d6d1ede44d5247fe0 +"@types/node@npm:^20.16.0": + version: 20.16.5 + resolution: "@types/node@npm:20.16.5" + dependencies: + undici-types: "npm:~6.19.2" + checksum: 10/39a8457149dc17cdea57afc90d4da53182fdb8b958d5bb065a15d123d81d4efa6b51a0de92428d05ead2e63ce07195586f71083401b99cdbcd04662344fbf7a1 languageName: node linkType: hard @@ -5930,13 +5923,6 @@ __metadata: languageName: node linkType: hard -"colors@npm:1.4.0": - version: 1.4.0 - resolution: "colors@npm:1.4.0" - checksum: 10/90b2d5465159813a3983ea72ca8cff75f784824ad70f2cc2b32c233e95bcfbcda101ebc6d6766bc50f57263792629bfb4f1f8a4dfbd1d240f229fc7f69b785fc - languageName: node - linkType: hard - "combined-stream@npm:^1.0.6, combined-stream@npm:^1.0.8, combined-stream@npm:~1.0.6": version: 1.0.8 resolution: "combined-stream@npm:1.0.8" @@ -8832,13 +8818,6 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-coverage@npm:^2.0.5": - version: 2.0.5 - resolution: "istanbul-lib-coverage@npm:2.0.5" - checksum: 10/57b7d67dd004977e9b3b1ab9584cea06d7359cb6fa85570880e35b3db8ed04bf60ffd3a4a0067c79d7105f8b0935334315e38b9bb47f4192b5c4727659c6a575 - languageName: node - linkType: hard - "istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": version: 3.2.0 resolution: "istanbul-lib-coverage@npm:3.2.0" @@ -8883,19 +8862,6 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-source-maps@npm:^3.0.6": - version: 3.0.6 - resolution: "istanbul-lib-source-maps@npm:3.0.6" - dependencies: - debug: "npm:^4.1.1" - istanbul-lib-coverage: "npm:^2.0.5" - make-dir: "npm:^2.1.0" - rimraf: "npm:^2.6.3" - source-map: "npm:^0.6.1" - checksum: 10/194db47a08f29b2cf20f6d628df83fdd561a16fdeccb2f1a283e804f9d1bb60897bf1ff0d9f6018399f28def8442089df409b0836bb915913df002884ca811c1 - languageName: node - linkType: hard - "istanbul-lib-source-maps@npm:^4.0.0": version: 4.0.1 resolution: "istanbul-lib-source-maps@npm:4.0.1" @@ -8907,16 +8873,6 @@ __metadata: languageName: node linkType: hard -"istanbul-reports@npm:^3.0.2": - version: 3.1.5 - resolution: "istanbul-reports@npm:3.1.5" - dependencies: - html-escaper: "npm:^2.0.0" - istanbul-lib-report: "npm:^3.0.0" - checksum: 10/1fc20a133f6dbd846e7bf3dc6d85edf2b3c047c47142cd796c38717aef976195d2c0fb0399dd609c3ffac2ca43244dc15ce4ac34064d21e2d34d387df747dafb - languageName: node - linkType: hard - "istanbul-reports@npm:^3.1.3": version: 3.1.7 resolution: "istanbul-reports@npm:3.1.7" @@ -8961,22 +8917,6 @@ __metadata: languageName: node linkType: hard -"jasmine-core@npm:~3.6.0": - version: 3.6.0 - resolution: "jasmine-core@npm:3.6.0" - checksum: 10/b3a1cfafd09d8d27f5b3acfa280760076b934135774c58765cf110fbbb07cf48500cd829f6c80bec9b6e507d1f937b55b0352991ef3d6d52b91c366b82464b50 - languageName: node - linkType: hard - -"jasmine-spec-reporter@npm:~5.0.0": - version: 5.0.2 - resolution: "jasmine-spec-reporter@npm:5.0.2" - dependencies: - colors: "npm:1.4.0" - checksum: 10/87c3185079164eb88ac341cb0e0390f8d069f17b5b261549b6dc9809f78c32fbcfb33487e757041a3e98bb17e8108b0c832f9ec20b05f962546434da67eb8220 - languageName: node - linkType: hard - "jasmine@npm:2.8.0": version: 2.8.0 resolution: "jasmine@npm:2.8.0" @@ -9743,19 +9683,6 @@ __metadata: languageName: node linkType: hard -"karma-coverage-istanbul-reporter@npm:~3.0.2": - version: 3.0.3 - resolution: "karma-coverage-istanbul-reporter@npm:3.0.3" - dependencies: - istanbul-lib-coverage: "npm:^3.0.0" - istanbul-lib-report: "npm:^3.0.0" - istanbul-lib-source-maps: "npm:^3.0.6" - istanbul-reports: "npm:^3.0.2" - minimatch: "npm:^3.0.4" - checksum: 10/8bbde57d635207156f8aac56e720c4f19a9e9c53440c2df26cccd4d705c57d8877a07d16714d16985310bb1978b4869d706f629701307b82b4a760a81c7ad34e - languageName: node - linkType: hard - "karma-source-map-support@npm:1.4.0": version: 1.4.0 resolution: "karma-source-map-support@npm:1.4.0" @@ -9928,11 +9855,12 @@ __metadata: "@angular/platform-server": "npm:^18.2.2" "@angular/router": "npm:^18.2.2" "@angular/ssr": "npm:^18.2.2" + "@eslint/eslintrc": "npm:^3.1.0" + "@eslint/js": "npm:^9.10.0" "@snyk/protect": "npm:^1.1293.0" "@types/express": "npm:^4.17.11" - "@types/jasminewd2": "npm:~2.0.8" "@types/jest": "npm:^29.5.12" - "@types/node": "npm:^16.18.23" + "@types/node": "npm:^20.16.0" "@typescript-eslint/eslint-plugin": "npm:^7.2.0" "@typescript-eslint/parser": "npm:^7.2.0" angular-feather: "npm:^6.5.1" @@ -9944,18 +9872,15 @@ __metadata: eslint: "npm:^9.0.0" express: "npm:^4.19.2" helmet: "npm:^7.1.0" - jasmine-core: "npm:~3.6.0" - jasmine-spec-reporter: "npm:~5.0.0" jest: "npm:^29.7.0" jest-preset-angular: "npm:^14.2.2" - karma-coverage-istanbul-reporter: "npm:~3.0.2" protractor: "npm:~7.0.0" rxjs: "npm:~7.5.0" socket.io: "npm:^4.7.5" socket.io-client: "npm:^4.7.5" ts-node: "npm:~8.3.0" - tslib: "npm:^2.3.1" - typescript: "npm:~5.4.5" + tslib: "npm:^2.6.3" + typescript: "npm:~5.5.4" utf-8-validate: "npm:^5.0.9" zone.js: "npm:~0.14.10" languageName: unknown @@ -11986,7 +11911,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^2.2.8, rimraf@npm:^2.5.2, rimraf@npm:^2.5.4, rimraf@npm:^2.6.3": +"rimraf@npm:^2.2.8, rimraf@npm:^2.5.2, rimraf@npm:^2.5.4": version: 2.7.1 resolution: "rimraf@npm:2.7.1" dependencies: @@ -13415,13 +13340,20 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.0, tslib@npm:^2.1.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1": +"tslib@npm:^2.0.0, tslib@npm:^2.1.0, tslib@npm:^2.3.0": version: 2.5.0 resolution: "tslib@npm:2.5.0" checksum: 10/ea556fbdf396fe15dbd45e242754e86e7c36e0dce8644404a7c8a81ae1e940744dc639569aeca1ae370a7f804d82872f3fd8564eb23be9adb7618201d0314dac languageName: node linkType: hard +"tslib@npm:^2.6.3": + version: 2.7.0 + resolution: "tslib@npm:2.7.0" + checksum: 10/9a5b47ddac65874fa011c20ff76db69f97cf90c78cff5934799ab8894a5342db2d17b4e7613a087046bc1d133d21547ddff87ac558abeec31ffa929c88b7fce6 + languageName: node + linkType: hard + "tuf-js@npm:^2.2.1": version: 2.2.1 resolution: "tuf-js@npm:2.2.1" @@ -13489,23 +13421,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~5.4.5": - version: 5.4.5 - resolution: "typescript@npm:5.4.5" +"typescript@npm:~5.5.4": + version: 5.5.4 + resolution: "typescript@npm:5.5.4" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10/d04a9e27e6d83861f2126665aa8d84847e8ebabcea9125b9ebc30370b98cb38b5dff2508d74e2326a744938191a83a69aa9fddab41f193ffa43eabfdf3f190a5 + checksum: 10/1689ccafef894825481fc3d856b4834ba3cc185a9c2878f3c76a9a1ef81af04194849840f3c69e7961e2312771471bb3b460ca92561e1d87599b26c37d0ffb6f languageName: node linkType: hard -"typescript@patch:typescript@npm%3A~5.4.5#optional!builtin": - version: 5.4.5 - resolution: "typescript@patch:typescript@npm%3A5.4.5#optional!builtin::version=5.4.5&hash=5adc0c" +"typescript@patch:typescript@npm%3A~5.5.4#optional!builtin": + version: 5.5.4 + resolution: "typescript@patch:typescript@npm%3A5.5.4#optional!builtin::version=5.5.4&hash=379a07" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10/760f7d92fb383dbf7dee2443bf902f4365db2117f96f875cf809167f6103d55064de973db9f78fe8f31ec08fff52b2c969aee0d310939c0a3798ec75d0bca2e1 + checksum: 10/746fdd0865c5ce4f15e494c57ede03a9e12ede59cfdb40da3a281807853fe63b00ef1c912d7222143499aa82f18b8b472baa1830df8804746d09b55f6cf5b1cc languageName: node linkType: hard