From 62322a722d4af5fb88ad4c651052c96d3603d22a Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Sat, 19 Oct 2019 13:51:18 +0200 Subject: [PATCH] use eslint-config-nextcloud Signed-off-by: Georg Ehrke --- .eslintrc.js | 77 +------------ css/app-sidebar.scss | 36 +++--- package-lock.json | 21 ++++ package.json | 2 + .../AppNavigationHeaderDatePicker.vue | 14 +-- .../AppNavigationHeaderTodayButton.vue | 3 +- src/components/AppNavigation/CalendarList.vue | 46 ++++---- .../CalendarList/CalendarListItem.vue | 63 +++++----- .../CalendarListItemSharingPublishItem.vue | 57 ++++----- .../CalendarListItemSharingSearch.vue | 13 ++- .../CalendarListItemSharingShareItem.vue | 13 +-- .../CalendarList/CalendarListNew.vue | 8 +- .../CalendarList/PublicCalendarListItem.vue | 28 ++--- .../CalendarList/SubscriptionListNew.vue | 6 +- .../AppNavigation/EmbedTopNavigation.vue | 8 +- src/components/AppNavigation/Settings.vue | 18 ++- .../AppNavigation/Settings/ImportScreen.vue | 8 +- .../Settings/ImportScreenRow.vue | 18 ++- .../Settings/SettingsImportSection.vue | 13 +-- .../Settings/SettingsTimezoneSelect.vue | 9 +- src/components/Editor/Alarm/AlarmList.vue | 17 ++- src/components/Editor/Alarm/AlarmListItem.vue | 64 ++++------- src/components/Editor/Alarm/AlarmListNew.vue | 3 +- .../Editor/Alarm/AlarmTimeUnitSelect.vue | 3 +- .../Invitees/AvatarParticipationStatus.vue | 3 +- .../Editor/Invitees/InviteesList.vue | 22 ++-- .../Editor/Invitees/InviteesListItem.vue | 27 ++--- .../Editor/Invitees/InviteesListSearch.vue | 9 +- .../Editor/Invitees/OrganizerListItem.vue | 11 +- .../Properties/PropertyCalendarPicker.vue | 22 ++-- .../Editor/Properties/PropertySelect.vue | 20 ++-- .../Editor/Properties/PropertyText.vue | 14 +-- .../Editor/Properties/PropertyTitle.vue | 10 +- .../Properties/PropertyTitleTimePicker.vue | 68 +++-------- src/components/Editor/Repeat/Repeat.vue | 39 +++---- .../Editor/Repeat/RepeatEndRepeat.vue | 14 +-- .../Editor/Repeat/RepeatFirstLastSelect.vue | 3 +- .../Editor/Repeat/RepeatFreqInterval.vue | 8 +- .../Repeat/RepeatFreqMonthlyOptions.vue | 21 ++-- .../Editor/Repeat/RepeatFreqSelect.vue | 3 +- .../Editor/Repeat/RepeatFreqWeeklyOptions.vue | 5 +- .../Editor/Repeat/RepeatFreqYearlyOptions.vue | 18 ++- .../Editor/Repeat/RepeatOnTheSelect.vue | 23 ++-- src/components/Editor/SaveButtons.vue | 17 +-- src/components/Shared/CalendarPicker.vue | 13 +-- .../Shared/CalendarPickerOption.vue | 6 +- src/components/Shared/TimezoneSelect.vue | 5 +- src/fullcalendar/duration.js | 2 +- src/fullcalendar/eventClick.js | 2 +- src/fullcalendar/select.js | 2 +- src/main.js | 21 +--- src/mixins/PropertyMixin.js | 2 +- src/models/calendar.js | 2 +- src/models/calendarObjectInstance.js | 2 +- src/models/principal.js | 2 +- src/models/rfcProps.js | 12 +- src/router.js | 36 +++--- src/store/calendarObjectInstance.js | 2 +- src/store/calendarObjects.js | 2 +- src/store/calendars.js | 2 +- src/store/importFiles.js | 2 +- src/store/importState.js | 2 +- src/store/index.js | 2 +- src/store/principals.js | 2 +- src/utils/illustration.js | 108 +++++++++--------- src/views/Calendar.vue | 14 +-- src/views/EditSidebar.vue | 101 +++++++--------- src/views/EditSimple.vue | 43 +++---- 68 files changed, 511 insertions(+), 781 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index d01b545ec..3a676f5dc 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,78 +1,5 @@ module.exports = { - root: true, - env: { - browser: true, - es6: true, - node: true, - jest: true - }, - globals: { - dayNames: true, - dayNamesMin: true, - monthNames: true, - monthNamesShort: true, - }, - parserOptions: { - parser: 'babel-eslint' - }, extends: [ - 'eslint:recommended', - 'plugin:node/recommended', - 'plugin:vue/essential', - 'plugin:vue/recommended', - 'standard' - ], - plugins: ['vue', 'node'], - rules: { - // space before function () - 'space-before-function-paren': ['error', 'never'], - // curly braces always space - 'object-curly-spacing': ['error', 'always'], - // stay consistent with array brackets - 'array-bracket-newline': ['error', 'consistent'], - // 1tbs brace style - 'brace-style': 'error', - // tabs only - indent: ['error', 'tab'], - 'no-tabs': 0, - 'vue/html-indent': ['error', 'tab'], - // only debug console - 'no-console': ['error', { allow: ['error', 'warn', 'debug'] }], - // classes blocks - 'padded-blocks': ['error', { classes: 'always' }], - // always add a trailing comma, for diff readability - 'comma-dangle': ["error", "only-multiline"], - // always have the operator in front - 'operator-linebreak': ['error', 'before'], - // ternary on multiline - 'multiline-ternary': ['error', 'always-multiline'], - // force proper JSDocs - 'valid-jsdoc': [2, { - 'prefer': { - 'return': 'returns' - }, - 'requireReturn': false, - 'requireReturnDescription': false - }], - // es6 import/export and require - 'node/no-unpublished-require': ['off'], - 'node/no-unsupported-features/es-syntax': ['off'], - 'node/no-unsupported-features/es-builtins': ['off'], - // space before self-closing elements - 'vue/html-closing-bracket-spacing': 'error', - // code spacing with attributes - 'vue/max-attributes-per-line': [ - 'error', - { - singleline: 3, - multiline: { - max: 3, - allowFirstLine: true - } - } - ], - "node/no-missing-import": ["error", { - "tryExtensions": [".js", ".vue"] - }] - } + 'nextcloud' + ] }; diff --git a/css/app-sidebar.scss b/css/app-sidebar.scss index 3d6d8ce12..3dca86c13 100644 --- a/css/app-sidebar.scss +++ b/css/app-sidebar.scss @@ -491,24 +491,6 @@ } } - .calendar-picker-option { - width: 100%; - display: flex; - align-items: center; - - &__color-indicator { - width: 12px; - height: 12px; - border-radius: 50%; - border: none; - margin-right: 8px; - } - - &__avatar { - margin-left: auto; - } - } - .illustration-header { max-height: 150px; height: 150px; @@ -601,3 +583,21 @@ border-bottom-color: var(--color-background-dark); } } + +.calendar-picker-option { + width: 100%; + display: flex; + align-items: center; + + &__color-indicator { + width: 12px; + height: 12px; + border-radius: 50%; + border: none; + margin-right: 8px; + } + + &__avatar { + margin-left: auto; + } +} diff --git a/package-lock.json b/package-lock.json index ae8a9628b..aeccbdd48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6400,6 +6400,12 @@ } } }, + "eslint-config-nextcloud": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/eslint-config-nextcloud/-/eslint-config-nextcloud-0.0.6.tgz", + "integrity": "sha512-ktCzXVA8GrqZVljutkBKOq2hgKvzKyLhNCAB5bCjdmMo7DIky2ZYeMtDmiEUZCPoXbSJY0kyvnZPbcN4VYzyCg==", + "dev": true + }, "eslint-config-standard": { "version": "12.0.0", "resolved": "http://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz", @@ -6689,6 +6695,15 @@ } } }, + "eslint-plugin-nextcloud": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-nextcloud/-/eslint-plugin-nextcloud-0.3.0.tgz", + "integrity": "sha512-LUD2qdirGL0BRt4uaMDGxen17mWVq9JwuGDt7P7Celz7bzdu0X48RrS8mhXn9e0w78+nYN5kPoULG2Bw04r4HA==", + "dev": true, + "requires": { + "requireindex": "~1.2.0" + } + }, "eslint-plugin-node": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz", @@ -12392,6 +12407,12 @@ "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=", "dev": true }, + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, "resolve": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", diff --git a/package.json b/package.json index 659ded1a2..d326df69a 100644 --- a/package.json +++ b/package.json @@ -83,10 +83,12 @@ "browserslist-config-nextcloud": "0.0.1", "css-loader": "^3.2.0", "eslint": "^5.16.0", + "eslint-config-nextcloud": "0.0.6", "eslint-config-standard": "^12.0.0", "eslint-friendly-formatter": "^4.0.1", "eslint-loader": "^3.0.2", "eslint-plugin-import": "^2.18.2", + "eslint-plugin-nextcloud": "^0.3.0", "eslint-plugin-node": "^10.0.0", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.1", diff --git a/src/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderDatePicker.vue b/src/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderDatePicker.vue index c75c2ff81..b2f00b9e8 100644 --- a/src/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderDatePicker.vue +++ b/src/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderDatePicker.vue @@ -27,17 +27,15 @@ class="datepicker-button-section__previous button icon icon-leftarrow" :title="previousLabel" type="button" - @click="navigateToPreviousTimeRange" - /> + @click="navigateToPreviousTimeRange" /> -