Skip to content

Commit

Permalink
Add lint config and remove ownCloud text from header
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasHirt committed Aug 26, 2020
1 parent 261270f commit f764550
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 34 deletions.
3 changes: 3 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
22 changes: 22 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
root: true,
env: {
node: true
},
extends: ['plugin:vue/recommended', 'eslint:recommended', '@vue/prettier'],
parserOptions: {
parser: 'babel-eslint'
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
},
overrides: [
{
files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'],
env: {
jest: true
}
}
]
}
25 changes: 3 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
release/*

**/l10n/locale
**/l10n/template.pot

apps/*
!apps/draw-io
!apps/files
!apps/markdown-editor
!apps/media-viewer
!apps/pdf-viewer

build/version.json

/hugo

.idea
*.bundle.js
*.bundle.js.map
*.chunk.js
*.chunk.js.map

config.json
package-lock.json

node_modules
Expand All @@ -30,9 +14,6 @@ dist
.DS_Store
.envrc

tests/reports
tests/acceptance/filesForUpload
tests/ocis
tests/testing-app

file-picker/public/file-picker-config.json
public/file-picker-config.json
public/demo.html
public/file-picker.js
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 100,
"semi": false,
"singleQuote": true
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"vue-virtual-scroller": "^1.0.10"
},
"devDependencies": {
"@babel/polyfill": "^7.10.4",
"@vue/cli-plugin-babel": "^4.4.0",
"@vue/cli-plugin-eslint": "^4.4.0",
"@vue/cli-plugin-unit-jest": "^4.4.0",
Expand Down
4 changes: 2 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
</div>
<login v-if="state === 'unauthorized'" key="login-form" @login="authenticate" />
<file-picker
class="uk-height-1-1"
key="file-picker"
v-if="state === 'authorized'"
key="file-picker"
class="uk-height-1-1"
:variation="variation"
@selectResources="selectResources"
/>
Expand Down
17 changes: 10 additions & 7 deletions src/components/ListHeader.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<template>
<header class="uk-background-primary uk-padding-small uk-flex uk-flex-middle uk-flex-between">
<div>
<h1 class="uk-margin-small-bottom oc-light">ownCloud</h1>
<oc-breadcrumb class="oc-light" :items="breadcrumbsItems" />
</div>
<!-- TODO: Use icon instead of "Home" text -->
<oc-breadcrumb class="oc-light" :items="breadcrumbsItems" />
<div>
<oc-button
variation="primary"
Expand All @@ -26,7 +24,8 @@ export default {
props: {
currentFolder: {
type: Object,
required: false
required: false,
default: () => null
},
isSelectBtnEnabled: {
type: Boolean,
Expand Down Expand Up @@ -92,7 +91,11 @@ export default {
</script>

<style>
.oc-light .oc-breadcrumb-list-item > a {
color: white;
/* TODO: Move to ODS */
.oc-light .oc-breadcrumb-list-item > a,
.oc-light .oc-breadcrumb-list-item .oc-icon > svg,
.oc-light .oc-breadcrumb-list-item::before {
color: white !important;
fill: white;
}
</style>
3 changes: 2 additions & 1 deletion src/components/Resource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
/>
</div>
<div class="uk-text-meta">
{{ getResourceSize(item.size) }} - Last modified {{ formDateFromNow(item.mdate) }}
{{ getResourceSize(item.size) }} - Last modified
{{ formDateFromNow(item.mdate) }}
</div>
</div>
</div>
Expand Down
12 changes: 10 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,14 @@
"@babel/helper-create-regexp-features-plugin" "^7.10.4"
"@babel/helper-plugin-utils" "^7.10.4"

"@babel/polyfill@^7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.10.4.tgz#915e5bfe61490ac0199008e35ca9d7d151a8e45a"
integrity sha512-8BYcnVqQ5kMD2HXoHInBH7H1b/uP3KdnwCYXOqFnXqguOyuu443WXusbIUbWEfY3Z0Txk0M1uG/8YuAMhNl6zg==
dependencies:
core-js "^2.6.5"
regenerator-runtime "^0.13.4"

"@babel/preset-env@^7.9.6":
version "7.11.0"
resolved "https://registry.npm.taobao.org/@babel/preset-env/download/@babel/preset-env-7.11.0.tgz?cache=0&sync_timestamp=1596143136483&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fpreset-env%2Fdownload%2F%40babel%2Fpreset-env-7.11.0.tgz#860ee38f2ce17ad60480c2021ba9689393efb796"
Expand Down Expand Up @@ -3034,7 +3042,7 @@ core-js-compat@^3.6.2, core-js-compat@^3.6.5:
browserslist "^4.8.5"
semver "7.0.0"

core-js@^2.4.0, core-js@^2.6.4:
core-js@^2.4.0, core-js@^2.6.4, core-js@^2.6.5:
version "2.6.11"
resolved "https://registry.npm.taobao.org/core-js/download/core-js-2.6.11.tgz?cache=0&sync_timestamp=1586450269267&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c"
integrity sha1-OIMUafmSK97Y7iHJ3EaYXgOZMIw=
Expand Down Expand Up @@ -9841,7 +9849,7 @@ vue@^2.6.11:
resolved "https://registry.npm.taobao.org/vue/download/vue-2.6.11.tgz?cache=0&sync_timestamp=1595984285481&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue%2Fdownload%2Fvue-2.6.11.tgz#76594d877d4b12234406e84e35275c6d514125c5"
integrity sha1-dllNh31LEiNEBuhONSdcbVFBJcU=

vuex@^3.1.1, vuex@^3.5.1:
vuex@^3.1.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.5.1.tgz#f1b8dcea649bc25254cf4f4358081dbf5da18b3d"
integrity sha512-w7oJzmHQs0FM9LXodfskhw9wgKBiaB+totOdb8sNzbTB2KDCEEwEs29NzBZFh/lmEK1t5tDmM1vtsO7ubG1DFw==
Expand Down

0 comments on commit f764550

Please sign in to comment.