Bug 33625: Pretty .js files for vue
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 2 May 2023 08:32:37 +0000 (10:32 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 16 May 2023 09:38:04 +0000 (11:38 +0200)
commit1139972748b14e07e6b41539cda888dde20b3159
treeea70b4136a4723d23a91ad4ef146e4fe15bf5eee
parent0192bb0cb8d749913962cf47e6ade3ecb0b4f6c9
Bug 33625: Pretty .js files for vue

Test plan:
= Koha =
Apply the first patch, prove xt/vue_tidy.t and notice the failure
Apply this patch, now it passes

= QA test =
Apply the change to the merge request linked with this qa-test-tools' issue:
https://gitlab.com/koha-community/qa-test-tools/-/issues/62
inside your ktd container (at /kohadevbox/qa-test-tools/)
Edit a .js within koha-tmpl/intranet-tmpl/prog/js/vue and a .ts file
(cypress test) with something not pretty
Commit and run the QA script
=> It's failing!
Pretty the change, commit again, run the QA script
=> It's happy!

= KTD - git hook =
Go to the merge request linked with this ktd's issue:
https://gitlab.com/koha-community/koha-testing-docker/-/issues/374
Copy the modified git hook to .git/hooks/ktd/pre-commit
Edit a .js within koha-tmpl/intranet-tmpl/prog/js/vue and a .ts file
(cypress test) with something not pretty
Commit
=> Notice that the commit content is pretty!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
17 files changed:
koha-tmpl/intranet-tmpl/prog/js/vue/composables/datatables.js
koha-tmpl/intranet-tmpl/prog/js/vue/fetch/acquisition-api-client.js
koha-tmpl/intranet-tmpl/prog/js/vue/fetch/authorised-values.js
koha-tmpl/intranet-tmpl/prog/js/vue/fetch/http-client.js
koha-tmpl/intranet-tmpl/prog/js/vue/fetch/patron-api-client.js
koha-tmpl/intranet-tmpl/prog/js/vue/fetch/system-preferences-api-client.js
koha-tmpl/intranet-tmpl/prog/js/vue/messages.js
koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts
koha-tmpl/intranet-tmpl/prog/js/vue/stores/authorised-values.js
koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js
koha-tmpl/intranet-tmpl/prog/js/vue/stores/vendors.js
t/cypress/integration/ERM/Agreements_spec.ts
t/cypress/integration/ERM/Dialog_spec.ts
t/cypress/integration/ERM/Licenses_spec.ts
t/cypress/integration/ERM/Packages_spec.ts
t/cypress/integration/ERM/Searchbar_spec.ts
t/cypress/integration/ERM/Titles_spec.ts