diff --git a/.eslintrc.js b/.eslintrc.js index a5b82de4..340cc1cf 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,3 +1,67 @@ module.exports = { - "extends": "standard" -}; \ No newline at end of file + root: true, + env: { + browser: true, + es6: true, + node: true, + jest: true + }, + globals: { + t: true, + n: true, + OC: true, + OCA: true, + Vue: true, + VueRouter: true + }, + parserOptions: { + parser: 'babel-eslint', + ecmaVersion: 6 + }, + 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 have the operator in front + 'operator-linebreak': ['error', 'before'], + // ternary on multiline + 'multiline-ternary': ['error', 'always-multiline'], + // es6 import/export and require + 'node/no-unpublished-require': ['off'], + 'node/no-unsupported-features/es-syntax': ['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 + } + } + ] + } +} diff --git a/src/App.vue b/src/App.vue index 805193f7..afb45277 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,10 @@ - - + + - + @@ -15,133 +15,136 @@ } - diff --git a/src/components/ProfileInfo.vue b/src/components/ProfileInfo.vue index 745be39c..9e82656e 100644 --- a/src/components/ProfileInfo.vue +++ b/src/components/ProfileInfo.vue @@ -21,20 +21,19 @@ --> - + - + {{ displayName }} {{ accountInfo.cloudId }} - Website: {{accountInfo.website.value}} + Website: {{ accountInfo.website.value }} Follow this user - - {{ accountInfo.posts }} posts + {{ accountInfo.posts }} posts {{ accountInfo.following }} following @@ -81,32 +80,36 @@ diff --git a/src/components/TimelineEntry.vue b/src/components/TimelineEntry.vue index 899861d1..69c96371 100644 --- a/src/components/TimelineEntry.vue +++ b/src/components/TimelineEntry.vue @@ -11,8 +11,7 @@ {{ item.authorId }} - - + {{ item.timestamp }} @@ -20,27 +19,29 @@ - diff --git a/src/views/ProfileFollowers.vue b/src/views/ProfileFollowers.vue index a90390b5..a84a63a1 100644 --- a/src/views/ProfileFollowers.vue +++ b/src/views/ProfileFollowers.vue @@ -35,19 +35,18 @@ } - diff --git a/src/views/ProfileTimeline.vue b/src/views/ProfileTimeline.vue index 29d79df5..38ae09b4 100644 --- a/src/views/ProfileTimeline.vue +++ b/src/views/ProfileTimeline.vue @@ -22,7 +22,7 @@ - + @@ -33,19 +33,18 @@ } - diff --git a/src/views/Timeline.vue b/src/views/Timeline.vue index 503e34bf..c3a163e7 100644 --- a/src/views/Timeline.vue +++ b/src/views/Timeline.vue @@ -1,8 +1,8 @@ - - Close + + Close 🎉{{ t('social', 'Nextcloud becomes part of the federated social networks!') }} {{ t('social', 'We have automatically created a social account for you. Your social id is the same as the federated cloud id:') }} @@ -12,19 +12,20 @@ - + {{ currentUser.displayName }} {{ socialId }} - - - + + + - + @@ -116,110 +117,108 @@ -
{{ accountInfo.cloudId }}
Website: {{accountInfo.website.value}}
Website: {{ accountInfo.website.value }}
{{ t('social', 'We have automatically created a social account for you. Your social id is the same as the federated cloud id:') }} @@ -12,19 +12,20 @@