From 031053d03c608cb8b97662f783a45458fb1b3c60 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Mon, 23 Sep 2024 19:18:57 -0300 Subject: [PATCH 1/2] chore: update eslint rules Signed-off-by: Vitor Mattos --- .eslintrc.js | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 66eb669f3f..ff9fa2bb73 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -9,6 +9,58 @@ module.exports = { // production only 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn', 'vue/no-unused-components': process.env.NODE_ENV === 'production' ? 'error' : 'warn', + 'import/order': [ + 'error', + { + groups: ['builtin', 'external', 'internal', ['parent', 'sibling', 'index'], 'unknown'], + pathGroups: [ + { + // group all style imports at the end + pattern: '{*.css,*.scss}', + patternOptions: { matchBase: true }, + group: 'unknown', + position: 'after', + }, + { + // group material design icons + pattern: 'vue-material-design-icons/**', + group: 'external', + position: 'after', + }, + { + // group @nextcloud imports + pattern: '@nextcloud/{!(vue),!(vue)/**}', + group: 'external', + position: 'after', + }, + { + // group @nextcloud/vue imports + pattern: '{@nextcloud/vue,@nextcloud/vue/**}', + group: 'external', + position: 'after', + }, + { + // group project components + pattern: '*.vue', + patternOptions: { matchBase: true }, + group: 'parent', + position: 'before', + }, + ], + pathGroupsExcludedImportTypes: ['@nextcloud', 'vue-material-design-icons'], + 'newlines-between': 'always', + alphabetize: { + order: 'asc', + caseInsensitive: true, + }, + warnOnUnassignedImports: true, + }, + ], + 'import/no-unresolved': ['error', { + // Ignore Webpack query parameters, not supported by eslint-plugin-import + // https://github.com/import-js/eslint-plugin-import/issues/2562 + ignore: ['\\?raw$'], + }], }, overrides: [ { From 5239bceaec342bb7d787d500e4d4046c21c3c88d Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Mon, 23 Sep 2024 19:29:24 -0300 Subject: [PATCH 2/2] chore: apply lint:fix Signed-off-by: Vitor Mattos --- src/App.vue | 6 +++-- src/Components/Draw/Draw.vue | 13 ++++++---- src/Components/Draw/Editor.vue | 12 ++++++--- src/Components/Draw/FileUpload.vue | 12 ++++++--- src/Components/Draw/TextInput.vue | 10 +++++--- src/Components/File/File.vue | 2 ++ src/Components/LeftSidebar/LeftSidebar.vue | 16 +++++++----- src/Components/PdfEditor/PdfEditor.vue | 1 + src/Components/PdfEditor/Signature.vue | 3 ++- .../PreviewSignature/PreviewSignature.vue | 3 ++- src/Components/Request/AccountOrEmail.vue | 6 +++-- src/Components/Request/IdentifySigner.vue | 7 ++++-- .../SignDetail/partials/PageNavigation.vue | 3 ++- .../Request/SignDetail/partials/SignerRow.vue | 7 +++--- src/Components/Request/VisibleElements.vue | 21 +++++++++------- src/Components/RightSidebar/AppFilesTab.vue | 1 + .../RightSidebar/RequestSignatureTab.vue | 20 +++++++++------ src/Components/RightSidebar/RightSidebar.vue | 4 ++- src/Components/RightSidebar/SignTab.vue | 5 ++-- src/Components/Signers/Signer.vue | 10 +++++--- src/Components/Signers/Signers.vue | 1 + src/Components/TopBar/SidebarToggle.vue | 2 ++ src/actions/openInLibreSignAction.js | 3 ++- src/domains/files/service.js | 8 +++--- src/domains/settings/service.js | 6 +++-- src/external.js | 13 +++++----- src/helpers/SelectAction.js | 1 + src/helpers/certification.js | 1 + src/main.js | 16 ++++++------ src/router/router.js | 6 +++-- src/settings.js | 3 ++- src/store/configureCheck.js | 3 ++- src/store/files.js | 8 +++--- src/store/index.js | 3 ++- src/store/modules/settings.js | 3 ++- src/store/sign.js | 2 ++ src/store/signatureElements.js | 5 ++-- src/tab.js | 8 +++--- src/validation.js | 6 +++-- src/views/Account/Account.vue | 5 ++-- src/views/Account/partials/Documents.vue | 6 +++-- src/views/Account/partials/ManagePassword.vue | 12 ++++++--- src/views/Account/partials/Signature.vue | 12 ++++++--- src/views/CreateAccount.vue | 19 +++++++------- src/views/CreatePassword.vue | 12 +++++---- src/views/DefaultPageError.vue | 3 ++- src/views/Documents/AccountValidation.vue | 5 ++-- src/views/IncompleteCertification.vue | 5 +++- src/views/ReadCertificate.vue | 10 +++++--- src/views/RenewEmail.vue | 10 +++++--- src/views/Request.vue | 22 +++++++++------- src/views/ResetPassword.vue | 12 +++++---- src/views/Settings/AllowedGroups.vue | 10 +++++--- .../Settings/CertificateCustonOptions.vue | 11 ++++---- src/views/Settings/CertificateEngine.vue | 8 +++--- src/views/Settings/CollectMetadata.vue | 7 +++--- src/views/Settings/ConfigureCheck.vue | 2 ++ src/views/Settings/DefaultUserFolder.vue | 7 +++--- src/views/Settings/DownloadBinaries.vue | 11 +++++--- src/views/Settings/ExpirationRules.vue | 8 +++--- .../Settings/IdentificationDocuments.vue | 7 +++--- src/views/Settings/IdentificationFactors.vue | 8 +++--- src/views/Settings/LegalInformation.vue | 5 ++-- src/views/Settings/RootCertificateCfssl.vue | 17 +++++++------ src/views/Settings/RootCertificateOpenSsl.vue | 17 +++++++------ src/views/Settings/Settings.vue | 17 +++++++------ src/views/Settings/Validation.vue | 8 +++--- src/views/SignPDF/SignPDF.vue | 6 +++-- .../SignPDF/_partials/ModalEmailManager.vue | 22 +++++++++------- .../SignPDF/_partials/ModalSMSManager.vue | 12 +++++---- src/views/SignPDF/_partials/Sign.vue | 25 +++++++++++-------- src/views/Timeline/Timeline.vue | 7 ++++-- src/views/Validation.vue | 21 +++++++++------- 73 files changed, 387 insertions(+), 242 deletions(-) diff --git a/src/App.vue b/src/App.vue index c691d11266..3ceff73bda 100644 --- a/src/App.vue +++ b/src/App.vue @@ -37,13 +37,15 @@