From 8b5ae8917e4568cd73f10bba568c82620afec951 Mon Sep 17 00:00:00 2001 From: David Requeno Date: Tue, 22 Sep 2026 22:22:34 -0600 Subject: [PATCH 1/3] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7acd3e068..6a98d5965a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Migrated the ESLint configuration to the flat config without `FlatCompat` and replaced the direct dependencies `@eslint/eslintrc` and `@eslint/js` with `typescript-eslint` - Upgraded `bull-board` from version `9.9.0` to `9.10.1` - Upgraded `zod` from version `4.5.4` to `4.6.5` From 197f28e05844f7723c5396d6d9c83462ae9dba78 Mon Sep 17 00:00:00 2001 From: David Requeno Date: Tue, 22 Sep 2026 22:25:47 -0600 Subject: [PATCH 2/3] Task/migrate ESLint configuration to flat config without FlatCompat --- .../allocations/allocations-page.component.ts | 4 +- eslint.config.cjs | 291 ++++++++---------- package-lock.json | 27 +- package.json | 3 +- 4 files changed, 158 insertions(+), 167 deletions(-) diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts index ceda1d4c07..ed37e23188 100644 --- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts +++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts @@ -398,10 +398,10 @@ export class GfAllocationsPageComponent implements OnInit { this.holdings[assetProfileIdentifier] = { assetClass: - position.assetProfile.assetClass || (UNKNOWN_KEY as AssetClass), + position.assetProfile.assetClass ?? (UNKNOWN_KEY as AssetClass), assetClassLabel: position.assetProfile.assetClassLabel ?? UNKNOWN_KEY, assetSubClass: - position.assetProfile.assetSubClass || (UNKNOWN_KEY as AssetSubClass), + position.assetProfile.assetSubClass ?? (UNKNOWN_KEY as AssetSubClass), assetSubClassLabel: position.assetProfile.assetSubClassLabel ?? UNKNOWN_KEY, currency: this.extractCurrency(position.assetProfile), diff --git a/eslint.config.cjs b/eslint.config.cjs index 76d627d182..857d1063e2 100644 --- a/eslint.config.cjs +++ b/eslint.config.cjs @@ -1,19 +1,14 @@ -const { FlatCompat } = require('@eslint/eslintrc'); -const js = require('@eslint/js'); const nxEslintPlugin = require('@nx/eslint-plugin'); +const importPlugin = require('eslint-plugin-import'); const storybook = require('eslint-plugin-storybook'); - -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended -}); +const typescriptEslint = require('typescript-eslint'); module.exports = [ { ignores: ['**/dist'] }, ...storybook.configs['flat/recommended'], - { plugins: { '@nx': nxEslintPlugin } }, + { plugins: { '@nx': nxEslintPlugin, import: importPlugin } }, { files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], rules: { @@ -35,160 +30,134 @@ module.exports = [ 'no-extra-semi': 'off' } }, - ...compat - .config({ - extends: ['plugin:@nx/typescript'] - }) - .map((config) => ({ - ...config, - files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'], - rules: { - ...config.rules - } - })), - ...compat - .config({ - extends: ['plugin:@nx/javascript'] - }) - .map((config) => ({ - ...config, - files: ['**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs'], - rules: { - ...config.rules - } - })), - ...compat - .config({ - plugins: ['eslint-plugin-import', '@typescript-eslint'], - extends: [ - 'plugin:@typescript-eslint/recommended-type-checked', - 'plugin:@typescript-eslint/stylistic-type-checked' - ] - }) - .map((config) => ({ - ...config, - files: ['**/*.ts'], - rules: { - ...config.rules, - '@typescript-eslint/consistent-indexed-object-style': 'off', - '@typescript-eslint/dot-notation': 'off', - '@typescript-eslint/explicit-member-accessibility': [ - 'off', - { - accessibility: 'explicit' - } - ], - '@typescript-eslint/member-ordering': 'warn', - '@typescript-eslint/naming-convention': [ - 'off', - { - selector: 'default', - format: ['camelCase'], - leadingUnderscore: 'allow', - trailingUnderscore: 'allow' - }, - { - selector: ['variable', 'classProperty', 'typeProperty'], - format: ['camelCase', 'UPPER_CASE'], - leadingUnderscore: 'allow', - trailingUnderscore: 'allow' - }, - { - selector: 'objectLiteralProperty', - format: null - }, - { - selector: 'enumMember', - format: ['camelCase', 'UPPER_CASE', 'PascalCase'] - }, - { - selector: 'typeLike', - format: ['PascalCase'] - } - ], - '@typescript-eslint/no-empty-interface': 'warn', - '@typescript-eslint/no-inferrable-types': [ - 'warn', - { - ignoreParameters: true - } - ], - '@typescript-eslint/no-non-null-assertion': 'warn', - '@typescript-eslint/no-shadow': [ - 'warn', - { - hoist: 'all' - } - ], - '@typescript-eslint/unified-signatures': 'error', - '@typescript-eslint/no-loss-of-precision': 'warn', - '@typescript-eslint/no-var-requires': 'warn', - 'arrow-body-style': 'off', - 'constructor-super': 'error', - eqeqeq: ['error', 'smart'], - 'guard-for-in': 'warn', - 'id-blacklist': 'off', - 'id-match': 'off', - 'import/no-deprecated': 'warn', - 'no-bitwise': 'error', - 'no-caller': 'error', - 'no-debugger': 'error', - 'no-empty': 'off', - 'no-eval': 'error', - 'no-fallthrough': 'error', - 'no-new-wrappers': 'error', - 'no-restricted-imports': ['error', 'rxjs/Rx'], - 'no-undef-init': 'error', - 'no-underscore-dangle': 'off', - 'no-var': 'error', - radix: 'error', - 'no-unsafe-optional-chaining': 'warn', - 'no-extra-boolean-cast': 'warn', - 'no-empty-pattern': 'warn', - 'no-useless-catch': 'warn', - 'no-unsafe-finally': 'warn', - 'no-prototype-builtins': 'warn', - 'no-async-promise-executor': 'warn', - 'no-constant-condition': 'warn', + ...nxEslintPlugin.configs['flat/typescript'], + ...nxEslintPlugin.configs['flat/javascript'], + ...typescriptEslint.config({ + files: ['**/*.ts'], + extends: [ + typescriptEslint.configs.recommendedTypeChecked, + typescriptEslint.configs.stylisticTypeChecked + ], + rules: { + '@typescript-eslint/consistent-indexed-object-style': 'off', + '@typescript-eslint/dot-notation': 'off', + '@typescript-eslint/explicit-member-accessibility': [ + 'off', + { + accessibility: 'explicit' + } + ], + '@typescript-eslint/member-ordering': 'warn', + '@typescript-eslint/naming-convention': [ + 'off', + { + selector: 'default', + format: ['camelCase'], + leadingUnderscore: 'allow', + trailingUnderscore: 'allow' + }, + { + selector: ['variable', 'classProperty', 'typeProperty'], + format: ['camelCase', 'UPPER_CASE'], + leadingUnderscore: 'allow', + trailingUnderscore: 'allow' + }, + { + selector: 'objectLiteralProperty', + format: null + }, + { + selector: 'enumMember', + format: ['camelCase', 'UPPER_CASE', 'PascalCase'] + }, + { + selector: 'typeLike', + format: ['PascalCase'] + } + ], + '@typescript-eslint/no-empty-interface': 'warn', + '@typescript-eslint/no-inferrable-types': [ + 'warn', + { + ignoreParameters: true + } + ], + '@typescript-eslint/no-non-null-assertion': 'warn', + '@typescript-eslint/no-shadow': [ + 'warn', + { + hoist: 'all' + } + ], + '@typescript-eslint/unified-signatures': 'error', + '@typescript-eslint/no-loss-of-precision': 'warn', + '@typescript-eslint/no-var-requires': 'warn', + 'arrow-body-style': 'off', + 'constructor-super': 'error', + eqeqeq: ['error', 'smart'], + 'guard-for-in': 'warn', + 'id-blacklist': 'off', + 'id-match': 'off', + 'import/no-deprecated': 'warn', + 'no-bitwise': 'error', + 'no-caller': 'error', + 'no-debugger': 'error', + 'no-empty': 'off', + 'no-eval': 'error', + 'no-fallthrough': 'error', + 'no-new-wrappers': 'error', + 'no-restricted-imports': ['error', 'rxjs/Rx'], + 'no-undef-init': 'error', + 'no-underscore-dangle': 'off', + 'no-var': 'error', + radix: 'error', + 'no-unsafe-optional-chaining': 'warn', + 'no-extra-boolean-cast': 'warn', + 'no-empty-pattern': 'warn', + 'no-useless-catch': 'warn', + 'no-unsafe-finally': 'warn', + 'no-prototype-builtins': 'warn', + 'no-async-promise-executor': 'warn', + 'no-constant-condition': 'warn', - // The following rules are part of eslint:recommended - // and can be remove once solved - 'no-loss-of-precision': 'warn', + // The following rules are part of eslint:recommended + // and can be remove once solved + 'no-loss-of-precision': 'warn', - // The following rules are part of @typescript-eslint/recommended-type-checked - // and can be remove once solved - '@typescript-eslint/await-thenable': 'warn', - '@typescript-eslint/ban-ts-comment': 'warn', - '@typescript-eslint/no-base-to-string': 'warn', - '@typescript-eslint/no-empty-object-type': 'warn', - '@typescript-eslint/no-explicit-any': 'warn', - '@typescript-eslint/no-floating-promises': 'warn', - '@typescript-eslint/no-misused-promises': 'warn', - '@typescript-eslint/no-redundant-type-constituents': 'warn', - '@typescript-eslint/no-require-imports': 'warn', - '@typescript-eslint/no-unnecessary-type-assertion': 'warn', - '@typescript-eslint/no-unsafe-argument': 'warn', - '@typescript-eslint/no-unsafe-assignment': 'warn', - '@typescript-eslint/no-unsafe-enum-comparison': 'warn', - '@typescript-eslint/no-unsafe-member-access': 'warn', - '@typescript-eslint/no-unsafe-return': 'warn', - '@typescript-eslint/no-unsafe-call': 'warn', - '@typescript-eslint/no-unused-vars': [ - 'error', - { - caughtErrors: 'none' - } - ], - '@typescript-eslint/no-wrapper-object-types': 'warn', - '@typescript-eslint/only-throw-error': 'warn', - '@typescript-eslint/prefer-promise-reject-errors': 'warn', - '@typescript-eslint/require-await': 'warn', - '@typescript-eslint/restrict-template-expressions': 'warn', - '@typescript-eslint/unbound-method': 'warn', + // The following rules are part of @typescript-eslint/recommended-type-checked + // and can be remove once solved + '@typescript-eslint/await-thenable': 'warn', + '@typescript-eslint/ban-ts-comment': 'warn', + '@typescript-eslint/no-base-to-string': 'warn', + '@typescript-eslint/no-empty-object-type': 'warn', + '@typescript-eslint/no-explicit-any': 'warn', + '@typescript-eslint/no-floating-promises': 'warn', + '@typescript-eslint/no-misused-promises': 'warn', + '@typescript-eslint/no-redundant-type-constituents': 'warn', + '@typescript-eslint/no-require-imports': 'warn', + '@typescript-eslint/no-unnecessary-type-assertion': 'warn', + '@typescript-eslint/no-unsafe-argument': 'warn', + '@typescript-eslint/no-unsafe-assignment': 'warn', + '@typescript-eslint/no-unsafe-enum-comparison': 'warn', + '@typescript-eslint/no-unsafe-member-access': 'warn', + '@typescript-eslint/no-unsafe-return': 'warn', + '@typescript-eslint/no-unsafe-call': 'warn', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + caughtErrors: 'none' + } + ], + '@typescript-eslint/no-wrapper-object-types': 'warn', + '@typescript-eslint/only-throw-error': 'warn', + '@typescript-eslint/prefer-promise-reject-errors': 'warn', + '@typescript-eslint/require-await': 'warn', + '@typescript-eslint/restrict-template-expressions': 'warn', + '@typescript-eslint/unbound-method': 'warn', - // The following rules are part of @typescript-eslint/stylistic-type-checked - // and can be remove once solved - '@typescript-eslint/prefer-nullish-coalescing': 'warn' // TODO: Requires strictNullChecks: true - } - })) + // The following rules are part of @typescript-eslint/stylistic-type-checked + // and can be remove once solved + '@typescript-eslint/prefer-nullish-coalescing': 'warn' // TODO: Requires strictNullChecks: true + } + }) ]; diff --git a/package-lock.json b/package-lock.json index 9ed3b35966..3420b5c66b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -122,8 +122,6 @@ "@angular/language-service": "22.1.2", "@angular/localize": "22.1.2", "@angular/pwa": "22.1.4", - "@eslint/eslintrc": "3.3.1", - "@eslint/js": "9.35.0", "@nestjs/schematics": "11.1.0", "@nestjs/testing": "11.2.3", "@nx/angular": "23.1.1", @@ -177,6 +175,7 @@ "ts-node": "10.9.2", "tslib": "2.8.1", "typescript": "6.0.3", + "typescript-eslint": "8.67.0", "webpack-cli": "7.1.0" }, "engines": { @@ -34881,6 +34880,30 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.67.0.tgz", + "integrity": "sha512-S2udFs8tCKEKffuJ4TB1idGUZiXdCPGi3IPBGWXarbLQ5UPXORV8QEVzJ4gCRduURMb5EkpNCdjbk0eDIuI8Yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.67.0", + "@typescript-eslint/parser": "8.67.0", + "@typescript-eslint/typescript-estree": "8.67.0", + "@typescript-eslint/utils": "8.67.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 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, "node_modules/uglify-js": { "version": "3.19.3", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", diff --git a/package.json b/package.json index 83aff10108..d85ead2c37 100644 --- a/package.json +++ b/package.json @@ -166,8 +166,6 @@ "@angular/language-service": "22.1.2", "@angular/localize": "22.1.2", "@angular/pwa": "22.1.4", - "@eslint/eslintrc": "3.3.1", - "@eslint/js": "9.35.0", "@nestjs/schematics": "11.1.0", "@nestjs/testing": "11.2.3", "@nx/angular": "23.1.1", @@ -221,6 +219,7 @@ "ts-node": "10.9.2", "tslib": "2.8.1", "typescript": "6.0.3", + "typescript-eslint": "8.67.0", "webpack-cli": "7.1.0" }, "engines": { From e970d39554351f1ce964135ce204d2fadb6a565c Mon Sep 17 00:00:00 2001 From: David Requeno Date: Sun, 27 Sep 2026 21:07:34 -0600 Subject: [PATCH 3/3] Adjust ESLint flat config dependencies and plugin scope --- CHANGELOG.md | 2 +- eslint.config.cjs | 3 ++- package-lock.json | 1 + package.json | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a98d5965a..9640a793b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Migrated the ESLint configuration to the flat config without `FlatCompat` and replaced the direct dependencies `@eslint/eslintrc` and `@eslint/js` with `typescript-eslint` +- Migrated the _ESLint_ configuration to the flat config format without `FlatCompat` - Upgraded `bull-board` from version `9.9.0` to `9.10.1` - Upgraded `zod` from version `4.5.4` to `4.6.5` diff --git a/eslint.config.cjs b/eslint.config.cjs index 857d1063e2..9c1b2024b6 100644 --- a/eslint.config.cjs +++ b/eslint.config.cjs @@ -8,7 +8,7 @@ module.exports = [ ignores: ['**/dist'] }, ...storybook.configs['flat/recommended'], - { plugins: { '@nx': nxEslintPlugin, import: importPlugin } }, + { plugins: { '@nx': nxEslintPlugin } }, { files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], rules: { @@ -34,6 +34,7 @@ module.exports = [ ...nxEslintPlugin.configs['flat/javascript'], ...typescriptEslint.config({ files: ['**/*.ts'], + plugins: { import: importPlugin }, extends: [ typescriptEslint.configs.recommendedTypeChecked, typescriptEslint.configs.stylisticTypeChecked diff --git a/package-lock.json b/package-lock.json index 3420b5c66b..c80d9a09d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -122,6 +122,7 @@ "@angular/language-service": "22.1.2", "@angular/localize": "22.1.2", "@angular/pwa": "22.1.4", + "@eslint/js": "9.35.0", "@nestjs/schematics": "11.1.0", "@nestjs/testing": "11.2.3", "@nx/angular": "23.1.1", diff --git a/package.json b/package.json index d85ead2c37..24d3a897eb 100644 --- a/package.json +++ b/package.json @@ -166,6 +166,7 @@ "@angular/language-service": "22.1.2", "@angular/localize": "22.1.2", "@angular/pwa": "22.1.4", + "@eslint/js": "9.35.0", "@nestjs/schematics": "11.1.0", "@nestjs/testing": "11.2.3", "@nx/angular": "23.1.1",