Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Story #12110 Prettier #1628

Merged
merged 8 commits into from
Feb 1, 2024
Merged

Story #12110 Prettier #1628

merged 8 commits into from
Feb 1, 2024

Conversation

marob
Copy link
Contributor

@marob marob commented Jan 26, 2024

Description

Mise en place de Prettier :

  • documentation pour les IDEs
  • pre-commit hook
  • vérification dans la CI
  • application du formatage sur l'ensemble du projet

TODO :

  • Rebaser cette MR et rejouer les commandes suivantes dans ui-frontend et ui-frontend-common pour s'assurer que tous les fichiers ont bien été formatés, y compris ceux contenus dans les MR récemment mergées :
    • npm run prettier pour formater les fichier
    • npm run prettier:ci pour vérifier que tous les fichiers respectent le formatage après l'avoir appliqué (faire les dernières corrections à la main si nécessaire)
  • Backporter sur les anciennes branches pour faciliter les cherry pick. Il s'agit, sur chacune des branches, de backporter les commits de configuration et de rejouer le formatage automatique (ne pas backporter les fichiers formatés tels quels)

Type de changement:

  • Autre

Checklist:

Sélectionner les éléments de la checklist

[ ] Mon code suit le style de code de ce projet.

[ ] J'ai commenté mon code, en particulier dans les classes et les méthodes difficile à comprendre.

[ ] J'ai fait les changements correspondant dans la documentation RAML.

[ ] J'ai fait les changements correspondant dans la documentation Métier.

[ ] J'ai fait les changements correspondant dans la documentation Technique.

[ ] J'ai rajouté les tests unitaires vérifiant mes fonctionnalités.

[ ] J'ai rajouté les tests de non régression vérifiant mes fonctionnalités.

[ ] Les tests unitaires nouveaux et existants passent avec succès localement.

[ ] Toutes les dépendances ont été mergées en priorité

Contributeur

VAS (Vitam Accessible en Service)

@vitam-devops
Copy link
Collaborator

vitam-devops commented Jan 26, 2024

Logo
Checkmarx One – Scan Summary & Details2fd0747d-e880-4e5e-8add-db8a77717f11

New Issues

Severity Issue Source File / Package Checkmarx Insight
HIGH CVE-2019-15599 Npm-tree-kill-1.2.1 Vulnerable Package
HIGH CVE-2020-28502 Npm-xmlhttprequest-ssl-1.5.5 Vulnerable Package
HIGH CVE-2020-36048 Npm-engine.io-3.2.1 Vulnerable Package
HIGH CVE-2020-36049 Npm-socket.io-parser-3.2.0 Vulnerable Package
HIGH CVE-2020-7660 Npm-serialize-javascript-1.9.1 Vulnerable Package
HIGH CVE-2020-7788 Npm-ini-1.3.5 Vulnerable Package
HIGH CVE-2021-31597 Npm-xmlhttprequest-ssl-1.5.5 Vulnerable Package
HIGH CVE-2022-2421 Npm-socket.io-parser-3.2.0 Vulnerable Package
HIGH CVE-2023-32695 Npm-socket.io-parser-3.2.0 Vulnerable Package
MEDIUM CVE-2019-16769 Npm-serialize-javascript-1.9.1 Vulnerable Package
MEDIUM CVE-2020-15366 Npm-ajv-6.10.0 Vulnerable Package
MEDIUM CVE-2020-15366 Npm-ajv-5.5.2 Vulnerable Package
MEDIUM CVE-2020-28481 Npm-socket.io-2.1.1 Vulnerable Package
MEDIUM CVE-2020-7693 Npm-sockjs-0.3.19 Vulnerable Package
MEDIUM CVE-2021-23364 Npm-browserslist-4.5.5 Vulnerable Package
MEDIUM CVE-2021-23495 Npm-karma-4.1.0 Vulnerable Package
MEDIUM CVE-2022-0437 Npm-karma-4.1.0 Vulnerable Package
MEDIUM CVE-2022-21704 Npm-log4js-4.5.1 Vulnerable Package
MEDIUM CVE-2022-41940 Npm-engine.io-3.2.1 Vulnerable Package
LOW Angular_Usage_of_Unsafe_DOM_Sanitizer /ui/ui-frontend-common/src/app/modules/error-dialog/error-dialog.component.ts: 57 Attack Vector
LOW Angular_Usage_of_Unsafe_DOM_Sanitizer /ui/ui-frontend-common/src/app/modules/components/navbar/navbar.component.ts: 87 Attack Vector
LOW Angular_Usage_of_Unsafe_DOM_Sanitizer /ui/ui-frontend-common/src/app/modules/components/navbar/navbar.component.ts: 81 Attack Vector
LOW Client_DOM_Open_Redirect /ui/ui-frontend-common/src/app/modules/components/vitamui-content-breadcrumb/vitamui-title-breadcrumb/vitamui-title-breadcrumb.component.ts: 58 Attack Vector
LOW Client_DOM_Open_Redirect /ui/ui-frontend/projects/pastis/src/app/shared/pastis-popup-option/pastis-popup-option.component.ts: 105 Attack Vector
LOW Client_DOM_Open_Redirect /ui/ui-frontend/projects/pastis/src/app/shared/pastis-breadcrumb-components/pastis-title-breadcrumb/pastis-title-breadcrumb.component.ts: 55 Attack Vector
LOW Unsafe_Use_Of_Target_blank /ui/ui-frontend/projects/pastis/src/app/app.component.html: 16 Attack Vector
LOW Use_Of_Hardcoded_Password /ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/sso-tab.component.spec.ts: 140 Attack Vector
LOW Use_Of_Hardcoded_Password /ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/sso-tab.component.spec.ts: 141 Attack Vector

Fixed Issues

Severity Issue Source File / Package
HIGH Missing User Instruction /Dockerfile: 11
HIGH Missing User Instruction /Dockerfile: 10
HIGH Missing User Instruction /Dockerfile: 10
HIGH Missing User Instruction /Dockerfile: 10
HIGH No New Privileges Not Set /vitam-recette.yml: 54
HIGH No New Privileges Not Set /docker-compose.yml: 10
HIGH No New Privileges Not Set /vitam-recette.yml: 17
HIGH No New Privileges Not Set /vitam-dev.yml: 19
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 114
HIGH Passwords And Secrets - Generic Password /application.yml: 28
HIGH Passwords And Secrets - Generic Password /application-recette.yml: 21
HIGH Passwords And Secrets - Generic Password /application.yml: 46
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 78
HIGH Passwords And Secrets - Generic Password /application-recette.yml: 96
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 101
HIGH Passwords And Secrets - Generic Password /mongo_vars_dev.yml: 36
HIGH Passwords And Secrets - Generic Password /cas-server-application-dev.yml: 58
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 35
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 26
HIGH Passwords And Secrets - Generic Password /application.yml: 52
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 20
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 22
HIGH Passwords And Secrets - Generic Password /cas-server-application-recette.yml: 37
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 62
HIGH Passwords And Secrets - Generic Password /application.yml: 27
HIGH Passwords And Secrets - Generic Password /application.yml: 57
HIGH Passwords And Secrets - Generic Password /application.yml: 77
HIGH Passwords And Secrets - Generic Password /application-recette.yml: 52
HIGH Passwords And Secrets - Generic Password /application.yml: 51
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 60
HIGH Passwords And Secrets - Generic Password /application-integration.yml: 66
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 62
HIGH Passwords And Secrets - Generic Password /application-recette.yml: 22
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 30
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 40
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 32
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 124
HIGH Passwords And Secrets - Generic Password /mongo_vars_dev.yml: 41
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 89
HIGH Passwords And Secrets - Generic Password /application.yml: 77
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 36
HIGH Passwords And Secrets - Generic Password /application-recette.yml: 91
HIGH Passwords And Secrets - Generic Password /application.yml: 81
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 132
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 50
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 66
HIGH Passwords And Secrets - Generic Password /application.yml: 76
HIGH Passwords And Secrets - Generic Password /application.yml: 44
HIGH Passwords And Secrets - Generic Password /application.yml: 97
HIGH Passwords And Secrets - Generic Password /application.yml: 42
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 68
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 47
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 32
HIGH Passwords And Secrets - Generic Password /Dockerfile: 67
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 24
HIGH Passwords And Secrets - Generic Password /logstash.yml: 244
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 115
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 108
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 74
HIGH Passwords And Secrets - Generic Password /application.yml: 44
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 46
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 9
HIGH Passwords And Secrets - Generic Password /cas-server-application-dev.yml: 15
HIGH Passwords And Secrets - Generic Password /application-recette.yml: 22
HIGH Passwords And Secrets - Generic Password /application.yml: 40
HIGH Passwords And Secrets - Generic Password /application.yml: 42
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 52
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 93
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 75
HIGH Passwords And Secrets - Generic Password /logstash.yml: 242
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 149
HIGH Passwords And Secrets - Generic Password /mongo_vars_dev.yml: 57
HIGH Passwords And Secrets - Generic Password /application.yml: 41
HIGH Passwords And Secrets - Generic Password /cas-server-application-dev.yml: 19
HIGH Passwords And Secrets - Generic Password /application.yml: 47
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 29
HIGH Passwords And Secrets - Generic Password /application.yml: 65
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 56
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 99
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 62
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 47
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 34
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 91
HIGH Passwords And Secrets - Generic Password /application.yml: 85
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 25
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 64
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 87
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 33
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 19
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 91
HIGH Passwords And Secrets - Generic Password /application.yml: 41
HIGH Passwords And Secrets - Generic Password /cas-server-application-recette.yml: 14
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 141
HIGH Passwords And Secrets - Generic Password /application.yml: 31
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 72
HIGH Passwords And Secrets - Generic Password /application.yml: 29
HIGH Passwords And Secrets - Generic Password /application.yml: 96
HIGH Passwords And Secrets - Generic Password /application-recette.yml: 48
HIGH Passwords And Secrets - Generic Password /logstash.yml: 221
HIGH Passwords And Secrets - Generic Password /application.yml: 53
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 58
HIGH Passwords And Secrets - Generic Password /application-recette.yml: 59
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 60
HIGH Passwords And Secrets - Generic Password /application.yml: 30
HIGH Passwords And Secrets - Generic Password /application.yml: 53
HIGH Passwords And Secrets - Generic Password /application-recette.yml: 21
HIGH Passwords And Secrets - Generic Password /mongo_vars_dev.yml: 51
HIGH Passwords And Secrets - Generic Password /application.yml: 27
HIGH Passwords And Secrets - Generic Password /application.yml: 76
HIGH Passwords And Secrets - Generic Password /application.yml: 54
HIGH Passwords And Secrets - Generic Password /application.yml: 77
HIGH Passwords And Secrets - Generic Password /application.yml: 76
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 90
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 87
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 30
HIGH Passwords And Secrets - Generic Password /logstash.yml: 227
HIGH Passwords And Secrets - Generic Password /application.yml: 39
HIGH Passwords And Secrets - Generic Password /application.yml: 97
HIGH Passwords And Secrets - Generic Password /logstash.yml: 238
HIGH Passwords And Secrets - Generic Password /application-recette.yml: 52
HIGH Passwords And Secrets - Generic Password /application-recette.yml: 22
HIGH Passwords And Secrets - Generic Password /application.yml: 44
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 80
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 75
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 23
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 77
HIGH Passwords And Secrets - Generic Password /cas-server-application-recette.yml: 180
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 6
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 5
HIGH Passwords And Secrets - Generic Password /application.yml: 75
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 38
HIGH Passwords And Secrets - Generic Password /application-recette.yml: 21
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 82
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 58
HIGH Passwords And Secrets - Generic Password /cas-server-application-recette.yml: 33
HIGH Passwords And Secrets - Generic Password /cas-server-application-dev.yml: 133
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 118
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 73
HIGH Passwords And Secrets - Generic Password /cas-server-application-dev.yml: 14
HIGH Passwords And Secrets - Generic Password /application-recette.yml: 91
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 23
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 23
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 12
HIGH Passwords And Secrets - Generic Password /application.yml: 30
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 71
HIGH Passwords And Secrets - Generic Password /mongo_cluster.yml: 34
HIGH Passwords And Secrets - Generic Password /mongo_vars_dev.yml: 31
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 71
HIGH Passwords And Secrets - Generic Password /vitamui_vars.yml: 301
HIGH Passwords And Secrets - Generic Password /cas-server-application-dev.yml: 221
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 104
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 22
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 71
HIGH Passwords And Secrets - Generic Password /cas-server-application-recette.yml: 13
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 27
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 32
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 50
HIGH Passwords And Secrets - Generic Password /application-integration.yml: 50
HIGH Passwords And Secrets - Generic Password /application-integration.yml: 12
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 64
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 76
HIGH Passwords And Secrets - Generic Password /mongo_vars_dev.yml: 62
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 31
HIGH Passwords And Secrets - Generic Password /application.yml: 39
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 128
HIGH Passwords And Secrets - Generic Password /application.yml: 27
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 49
HIGH Passwords And Secrets - Generic Password /application.yml: 33
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 119
HIGH Passwords And Secrets - Generic Password /cas-server-application-recette.yml: 103
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 105
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 54
HIGH Passwords And Secrets - Generic Password /application.yml: 31
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 100
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 33
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 22
HIGH Passwords And Secrets - Generic Password /application-recette.yml: 48
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 33
HIGH Passwords And Secrets - Generic Password /application.yml: 42
HIGH Passwords And Secrets - Generic Password /application.yml: 97
HIGH Passwords And Secrets - Generic Password /application.yml: 31
HIGH Passwords And Secrets - Generic Password /application.yml: 40
HIGH Passwords And Secrets - Generic Password /application-integration.yml: 47
HIGH Passwords And Secrets - Generic Password /application.yml: 40
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 29
HIGH Passwords And Secrets - Generic Password /application.yml: 64
HIGH Passwords And Secrets - Generic Password /application-dev.yml: 113
HIGH Passwords And Secrets - Generic Password

More results are available on AST platform

@marob marob force-pushed the story_12110_prettier branch 5 times, most recently from 016764a to f5a7b5d Compare January 29, 2024 10:51
Copy link
Contributor

@ebernard ebernard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sous réserve d'avoir testé l'escaping de { et } dans customer-list.component.html

C'est bon.

@marob marob force-pushed the story_12110_prettier branch from f5a7b5d to e3041d4 Compare January 30, 2024 15:38
@marob marob force-pushed the story_12110_prettier branch from e3041d4 to 19ddfd5 Compare February 1, 2024 10:18
@marob marob added javascript Pull requests that update Javascript code VAS VAS contribution clean Code Clean Code VitamUI labels Feb 1, 2024
@marob marob merged commit 946e8c6 into develop Feb 1, 2024
2 checks passed
@marob marob deleted the story_12110_prettier branch February 1, 2024 13:56
@GiooDev GiooDev added this to the IT 131 milestone Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean Code Clean Code VitamUI javascript Pull requests that update Javascript code VAS VAS contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants