Browse Source

Merge 458ffba9cb into 82cee20f2d

pull/7938/merge
David Requeno 12 hours ago
committed by GitHub
parent
commit
d8599c15bc
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 4
      apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
  3. 290
      eslint.config.cjs
  4. 26
      package-lock.json
  5. 2
      package.json

1
CHANGELOG.md

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Migrated the _ESLint_ configuration to the flat config format without `FlatCompat`
- Simplified the portfolio summary by hiding the currency on mobile - Simplified the portfolio summary by hiding the currency on mobile
- Improved the performance of the logo endpoints by enabling the browser cache - Improved the performance of the logo endpoints by enabling the browser cache
- Improved the language localization for Catalan (`ca`) - Improved the language localization for Catalan (`ca`)

4
apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts

@ -398,10 +398,10 @@ export class GfAllocationsPageComponent implements OnInit {
this.holdings[assetProfileIdentifier] = { this.holdings[assetProfileIdentifier] = {
assetClass: assetClass:
position.assetProfile.assetClass || (UNKNOWN_KEY as AssetClass), position.assetProfile.assetClass ?? (UNKNOWN_KEY as AssetClass),
assetClassLabel: position.assetProfile.assetClassLabel ?? UNKNOWN_KEY, assetClassLabel: position.assetProfile.assetClassLabel ?? UNKNOWN_KEY,
assetSubClass: assetSubClass:
position.assetProfile.assetSubClass || (UNKNOWN_KEY as AssetSubClass), position.assetProfile.assetSubClass ?? (UNKNOWN_KEY as AssetSubClass),
assetSubClassLabel: assetSubClassLabel:
position.assetProfile.assetSubClassLabel ?? UNKNOWN_KEY, position.assetProfile.assetSubClassLabel ?? UNKNOWN_KEY,
currency: this.extractCurrency(position.assetProfile), currency: this.extractCurrency(position.assetProfile),

290
eslint.config.cjs

@ -1,12 +1,7 @@
const { FlatCompat } = require('@eslint/eslintrc');
const js = require('@eslint/js');
const nxEslintPlugin = require('@nx/eslint-plugin'); const nxEslintPlugin = require('@nx/eslint-plugin');
const importPlugin = require('eslint-plugin-import');
const storybook = require('eslint-plugin-storybook'); const storybook = require('eslint-plugin-storybook');
const typescriptEslint = require('typescript-eslint');
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended
});
module.exports = [ module.exports = [
{ {
@ -35,160 +30,135 @@ module.exports = [
'no-extra-semi': 'off' 'no-extra-semi': 'off'
} }
}, },
...compat ...nxEslintPlugin.configs['flat/typescript'],
.config({ ...nxEslintPlugin.configs['flat/javascript'],
extends: ['plugin:@nx/typescript'] ...typescriptEslint.config({
}) files: ['**/*.ts'],
.map((config) => ({ plugins: { import: importPlugin },
...config, extends: [
files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'], typescriptEslint.configs.recommendedTypeChecked,
rules: { typescriptEslint.configs.stylisticTypeChecked
...config.rules ],
} rules: {
})), '@typescript-eslint/consistent-indexed-object-style': 'off',
...compat '@typescript-eslint/dot-notation': 'off',
.config({ '@typescript-eslint/explicit-member-accessibility': [
extends: ['plugin:@nx/javascript'] 'off',
}) {
.map((config) => ({ accessibility: 'explicit'
...config, }
files: ['**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs'], ],
rules: { '@typescript-eslint/member-ordering': 'warn',
...config.rules '@typescript-eslint/naming-convention': [
} 'off',
})), {
...compat selector: 'default',
.config({ format: ['camelCase'],
plugins: ['eslint-plugin-import', '@typescript-eslint'], leadingUnderscore: 'allow',
extends: [ trailingUnderscore: 'allow'
'plugin:@typescript-eslint/recommended-type-checked', },
'plugin:@typescript-eslint/stylistic-type-checked' {
] selector: ['variable', 'classProperty', 'typeProperty'],
}) format: ['camelCase', 'UPPER_CASE'],
.map((config) => ({ leadingUnderscore: 'allow',
...config, trailingUnderscore: 'allow'
files: ['**/*.ts'], },
rules: { {
...config.rules, selector: 'objectLiteralProperty',
'@typescript-eslint/consistent-indexed-object-style': 'off', format: null
'@typescript-eslint/dot-notation': 'off', },
'@typescript-eslint/explicit-member-accessibility': [ {
'off', selector: 'enumMember',
{ format: ['camelCase', 'UPPER_CASE', 'PascalCase']
accessibility: 'explicit' },
} {
], selector: 'typeLike',
'@typescript-eslint/member-ordering': 'warn', format: ['PascalCase']
'@typescript-eslint/naming-convention': [ }
'off', ],
{ '@typescript-eslint/no-empty-interface': 'warn',
selector: 'default', '@typescript-eslint/no-inferrable-types': [
format: ['camelCase'], 'warn',
leadingUnderscore: 'allow', {
trailingUnderscore: 'allow' ignoreParameters: true
}, }
{ ],
selector: ['variable', 'classProperty', 'typeProperty'], '@typescript-eslint/no-non-null-assertion': 'warn',
format: ['camelCase', 'UPPER_CASE'], '@typescript-eslint/no-shadow': [
leadingUnderscore: 'allow', 'warn',
trailingUnderscore: 'allow' {
}, hoist: 'all'
{ }
selector: 'objectLiteralProperty', ],
format: null '@typescript-eslint/unified-signatures': 'error',
}, '@typescript-eslint/no-loss-of-precision': 'warn',
{ '@typescript-eslint/no-var-requires': 'warn',
selector: 'enumMember', 'arrow-body-style': 'off',
format: ['camelCase', 'UPPER_CASE', 'PascalCase'] 'constructor-super': 'error',
}, eqeqeq: ['error', 'smart'],
{ 'guard-for-in': 'warn',
selector: 'typeLike', 'id-blacklist': 'off',
format: ['PascalCase'] 'id-match': 'off',
} 'import/no-deprecated': 'warn',
], 'no-bitwise': 'error',
'@typescript-eslint/no-empty-interface': 'warn', 'no-caller': 'error',
'@typescript-eslint/no-inferrable-types': [ 'no-debugger': 'error',
'warn', 'no-empty': 'off',
{ 'no-eval': 'error',
ignoreParameters: true 'no-fallthrough': 'error',
} 'no-new-wrappers': 'error',
], 'no-restricted-imports': ['error', 'rxjs/Rx'],
'@typescript-eslint/no-non-null-assertion': 'warn', 'no-undef-init': 'error',
'@typescript-eslint/no-shadow': [ 'no-underscore-dangle': 'off',
'warn', 'no-var': 'error',
{ radix: 'error',
hoist: 'all' 'no-unsafe-optional-chaining': 'warn',
} 'no-extra-boolean-cast': 'warn',
], 'no-empty-pattern': 'warn',
'@typescript-eslint/unified-signatures': 'error', 'no-useless-catch': 'warn',
'@typescript-eslint/no-loss-of-precision': 'warn', 'no-unsafe-finally': 'warn',
'@typescript-eslint/no-var-requires': 'warn', 'no-prototype-builtins': 'warn',
'arrow-body-style': 'off', 'no-async-promise-executor': 'warn',
'constructor-super': 'error', 'no-constant-condition': 'warn',
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 // The following rules are part of eslint:recommended
// and can be remove once solved // and can be remove once solved
'no-loss-of-precision': 'warn', 'no-loss-of-precision': 'warn',
// The following rules are part of @typescript-eslint/recommended-type-checked // The following rules are part of @typescript-eslint/recommended-type-checked
// and can be remove once solved // and can be remove once solved
'@typescript-eslint/await-thenable': 'warn', '@typescript-eslint/await-thenable': 'warn',
'@typescript-eslint/ban-ts-comment': 'warn', '@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/no-base-to-string': 'warn', '@typescript-eslint/no-base-to-string': 'warn',
'@typescript-eslint/no-empty-object-type': 'warn', '@typescript-eslint/no-empty-object-type': 'warn',
'@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-floating-promises': 'warn', '@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/no-misused-promises': 'warn', '@typescript-eslint/no-misused-promises': 'warn',
'@typescript-eslint/no-redundant-type-constituents': 'warn', '@typescript-eslint/no-redundant-type-constituents': 'warn',
'@typescript-eslint/no-require-imports': 'warn', '@typescript-eslint/no-require-imports': 'warn',
'@typescript-eslint/no-unnecessary-type-assertion': 'warn', '@typescript-eslint/no-unnecessary-type-assertion': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn', '@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn', '@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-enum-comparison': 'warn', '@typescript-eslint/no-unsafe-enum-comparison': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn', '@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn', '@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn', '@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unused-vars': [ '@typescript-eslint/no-unused-vars': [
'error', 'error',
{ {
caughtErrors: 'none' caughtErrors: 'none'
} }
], ],
'@typescript-eslint/no-wrapper-object-types': 'warn', '@typescript-eslint/no-wrapper-object-types': 'warn',
'@typescript-eslint/only-throw-error': 'warn', '@typescript-eslint/only-throw-error': 'warn',
'@typescript-eslint/prefer-promise-reject-errors': 'warn', '@typescript-eslint/prefer-promise-reject-errors': 'warn',
'@typescript-eslint/require-await': 'warn', '@typescript-eslint/require-await': 'warn',
'@typescript-eslint/restrict-template-expressions': 'warn', '@typescript-eslint/restrict-template-expressions': 'warn',
'@typescript-eslint/unbound-method': 'warn', '@typescript-eslint/unbound-method': 'warn',
// The following rules are part of @typescript-eslint/stylistic-type-checked // The following rules are part of @typescript-eslint/stylistic-type-checked
// and can be remove once solved // and can be remove once solved
'@typescript-eslint/prefer-nullish-coalescing': 'warn' // TODO: Requires strictNullChecks: true '@typescript-eslint/prefer-nullish-coalescing': 'warn' // TODO: Requires strictNullChecks: true
} }
})) })
]; ];

26
package-lock.json

@ -122,7 +122,6 @@
"@angular/language-service": "22.1.2", "@angular/language-service": "22.1.2",
"@angular/localize": "22.1.2", "@angular/localize": "22.1.2",
"@angular/pwa": "22.1.4", "@angular/pwa": "22.1.4",
"@eslint/eslintrc": "3.3.1",
"@eslint/js": "9.35.0", "@eslint/js": "9.35.0",
"@nestjs/schematics": "11.1.0", "@nestjs/schematics": "11.1.0",
"@nestjs/testing": "11.2.3", "@nestjs/testing": "11.2.3",
@ -177,6 +176,7 @@
"ts-node": "10.9.2", "ts-node": "10.9.2",
"tslib": "2.8.1", "tslib": "2.8.1",
"typescript": "6.0.3", "typescript": "6.0.3",
"typescript-eslint": "8.67.0",
"webpack-cli": "7.1.0" "webpack-cli": "7.1.0"
}, },
"engines": { "engines": {
@ -34933,6 +34933,30 @@
"node": ">=14.17" "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": { "node_modules/uglify-js": {
"version": "3.19.3", "version": "3.19.3",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz",

2
package.json

@ -166,7 +166,6 @@
"@angular/language-service": "22.1.2", "@angular/language-service": "22.1.2",
"@angular/localize": "22.1.2", "@angular/localize": "22.1.2",
"@angular/pwa": "22.1.4", "@angular/pwa": "22.1.4",
"@eslint/eslintrc": "3.3.1",
"@eslint/js": "9.35.0", "@eslint/js": "9.35.0",
"@nestjs/schematics": "11.1.0", "@nestjs/schematics": "11.1.0",
"@nestjs/testing": "11.2.3", "@nestjs/testing": "11.2.3",
@ -221,6 +220,7 @@
"ts-node": "10.9.2", "ts-node": "10.9.2",
"tslib": "2.8.1", "tslib": "2.8.1",
"typescript": "6.0.3", "typescript": "6.0.3",
"typescript-eslint": "8.67.0",
"webpack-cli": "7.1.0" "webpack-cli": "7.1.0"
}, },
"engines": { "engines": {

Loading…
Cancel
Save