From cf1d48ea7a84affb8a07bdeb67d9122896ef8513 Mon Sep 17 00:00:00 2001 From: CzBiX Date: Mon, 16 Sep 2019 00:09:45 +0800 Subject: [PATCH] Fix lint --- .eslintrc.js | 1 + .travis.yml | 14 ++--- src/Api.ts | 2 +- src/components/AddForm.vue | 2 +- src/components/Drawer.vue | 2 +- src/components/Torrents.vue | 24 ++++--- .../dialogs/ConfirmDeleteDialog.vue | 2 +- .../dialogs/ConfirmSetCategoryDialog.vue | 2 +- src/components/dialogs/EditTrackerDialog.vue | 28 +++++---- src/components/dialogs/TorrentContent.vue | 20 +++--- src/components/dialogs/TorrentInfo.vue | 63 ++++++++++--------- src/utils.ts | 6 +- 12 files changed, 90 insertions(+), 76 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 4955070..e218bef 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -15,6 +15,7 @@ module.exports = { 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'no-restricted-syntax': 'off', + 'no-await-in-loop': 'off', 'no-plusplus': 'off', 'no-continue': 'off', 'func-names': ['warn', 'as-needed'], diff --git a/.travis.yml b/.travis.yml index 9270a29..d9ab1e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,18 @@ language: node_js node_js: lts/* -branches: - only: - - master - before_install: - export TZ=Asia/Shanghai COMMIT_ID=${TRAVIS_COMMIT::6} -script: npm run build; [ -d dist/public ] +script: + - npm run lint + - npm run build; [ -d dist/public ] before_deploy: # Add tag if missing - if [ -z "$TRAVIS_TAG" ]; then - export TRAVIS_TAG=nightly-$COMMIT_ID RELEASE_TITLE=$(date +'%Y%m%d')-$COMMIT_ID; - git tag $TRAVIS_TAG; + export TRAVIS_TAG=nightly-$COMMIT_ID RELEASE_TITLE=$(date +'%Y%m%d')-$COMMIT_ID && + git tag $TRAVIS_TAG && echo tagged as $TRAVIS_TAG; fi # Pack for release @@ -31,3 +29,5 @@ deploy: overwrite: true prerelease: true name: $RELEASE_TITLE + on: + branch: master diff --git a/src/Api.ts b/src/Api.ts index b31ef10..efdd3d9 100644 --- a/src/Api.ts +++ b/src/Api.ts @@ -136,7 +136,7 @@ class Api { params, }).then(Api.handleResponse); } - + public editTracker(hash: string, origUrl: string, newUrl: string) { const params = { hash, diff --git a/src/components/AddForm.vue b/src/components/AddForm.vue index 60dbe14..5ef2ed2 100644 --- a/src/components/AddForm.vue +++ b/src/components/AddForm.vue @@ -161,7 +161,7 @@ export default Vue.extend({ ...mapState({ prefs: 'preferences', categories(state, getters) { - return getters.allCategories.map(c => ({text: c.name, value: c.key})); + return getters.allCategories.map(c => ({ text: c.name, value: c.key })); }, }), params() { diff --git a/src/components/Drawer.vue b/src/components/Drawer.vue index 0a1f860..7e0b67f 100644 --- a/src/components/Drawer.vue +++ b/src/components/Drawer.vue @@ -264,4 +264,4 @@ export default { .drawer .v-list-item__icon { margin-left: 8px; } - \ No newline at end of file + diff --git a/src/components/Torrents.vue b/src/components/Torrents.vue index d6164e9..14bcb83 100644 --- a/src/components/Torrents.vue +++ b/src/components/Torrents.vue @@ -10,23 +10,25 @@ height="40px" class="elevation-2" > - + mdi-delete - + mdi-play - + mdi-pause - + mdi-alert-circle @@ -141,7 +143,9 @@ - + import _ from 'lodash'; import Vue from 'vue'; -import api from '@/Api'; import { mapGetters } from 'vuex'; +import api from '@/Api'; import { getSameNamedTorrents } from '@/utils'; export default Vue.extend({ diff --git a/src/components/dialogs/ConfirmSetCategoryDialog.vue b/src/components/dialogs/ConfirmSetCategoryDialog.vue index 7005ed0..7ffc8cc 100644 --- a/src/components/dialogs/ConfirmSetCategoryDialog.vue +++ b/src/components/dialogs/ConfirmSetCategoryDialog.vue @@ -47,8 +47,8 @@