From bbaa48c1eccb04a0334c700f58b45968f773bb94 Mon Sep 17 00:00:00 2001 From: Liyas Thomas Date: Fri, 24 Jan 2020 17:50:30 +0530 Subject: [PATCH 1/2] :rotating_light: Removing linter warnings --- assets/css/styles.scss | 1 - components/collections/addCollection.vue | 2 +- components/collections/editCollection.vue | 2 +- components/graphql/queryeditor.vue | 23 +++++++++++------------ functions/utils/debounce.js | 14 +++++++------- layouts/default.vue | 5 ++--- pages/graphql.vue | 2 -- 7 files changed, 22 insertions(+), 27 deletions(-) diff --git a/assets/css/styles.scss b/assets/css/styles.scss index 574f57c94..7f6c9d5ec 100644 --- a/assets/css/styles.scss +++ b/assets/css/styles.scss @@ -592,7 +592,6 @@ pre { select { height: 37px; - background-color: var(--bg-dark-color); cursor: pointer; -webkit-appearance: none; -moz-appearance: none; diff --git a/components/collections/addCollection.vue b/components/collections/addCollection.vue index c39b7b257..39b7a7675 100644 --- a/components/collections/addCollection.vue +++ b/components/collections/addCollection.vue @@ -57,7 +57,7 @@ export default { methods: { addNewCollection() { if (!this.$data.name) { - this.$toast.info('Please provide a valid name for the collection') + this.$toast.info("Please provide a valid name for the collection"); return; } this.$store.commit("postwoman/addNewCollection", { diff --git a/components/collections/editCollection.vue b/components/collections/editCollection.vue index 98c9154be..084bb78bf 100644 --- a/components/collections/editCollection.vue +++ b/components/collections/editCollection.vue @@ -60,7 +60,7 @@ export default { methods: { saveCollection() { if (!this.$data.name) { - this.$toast.info('Please provide a valid name for the collection'); + this.$toast.info("Please provide a valid name for the collection"); return; } const collectionUpdated = { diff --git a/components/graphql/queryeditor.vue b/components/graphql/queryeditor.vue index 7f1084b85..7a4e90c65 100644 --- a/components/graphql/queryeditor.vue +++ b/components/graphql/queryeditor.vue @@ -34,7 +34,7 @@ export default { return { editor: null, cacheValue: "", - validationSchema: null + validationSchema: null }; }, @@ -88,7 +88,7 @@ export default { ); } }, - + setValidationSchema(schema) { this.validationSchema = schema; this.parseContents(this.cacheValue); @@ -101,16 +101,15 @@ export default { if (this.validationSchema) { this.editor.session.setAnnotations( - gql.validate(this.validationSchema, doc) - .map((err) => { - return { - row: err.locations[0].line - 1, - column: err.locations[0].column - 1, - text: err.message, - type: "error" - } - }) - ) + gql.validate(this.validationSchema, doc).map(err => { + return { + row: err.locations[0].line - 1, + column: err.locations[0].column - 1, + text: err.message, + type: "error" + }; + }) + ); } } catch (e) { this.editor.session.setAnnotations([ diff --git a/functions/utils/debounce.js b/functions/utils/debounce.js index 09acda07d..dffe3f098 100644 --- a/functions/utils/debounce.js +++ b/functions/utils/debounce.js @@ -3,13 +3,13 @@ // functions which might be called frequently // NOTE : Don't use lambda functions as this doesn't get bound properly in them, use the 'function (args) {}' format const debounce = (func, delay) => { - let inDebounce + let inDebounce; return function() { - const context = this - const args = arguments - clearTimeout(inDebounce) - inDebounce = setTimeout(() => func.apply(context, args), delay) - } -} + const context = this; + const args = arguments; + clearTimeout(inDebounce); + inDebounce = setTimeout(() => func.apply(context, args), delay); + }; +}; export default debounce; diff --git a/layouts/default.vue b/layouts/default.vue index 15626a247..ce6bdc753 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -664,9 +664,8 @@ import intializePwa from "../assets/js/pwa"; import * as version from "../.postwoman/version.json"; import { hasChromeExtensionInstalled } from "../functions/strategies/ChromeStrategy"; - -import firebase from 'firebase/app'; -import { fb } from '../functions/fb'; +import firebase from "firebase/app"; +import { fb } from "../functions/fb"; export default { components: { diff --git a/pages/graphql.vue b/pages/graphql.vue index 606796472..d4129796c 100644 --- a/pages/graphql.vue +++ b/pages/graphql.vue @@ -812,9 +812,7 @@ export default { } } this.gqlTypes = types; - this.$refs.queryEditor.setValidationSchema(schema); - this.$nuxt.$loading.finish(); const duration = Date.now() - startTime; this.$toast.info(this.$t("finished_in", { duration }), { From 54e4dbc4ac65743855fff1f6998a25ea1f55dcd6 Mon Sep 17 00:00:00 2001 From: Liyas Thomas Date: Sat, 25 Jan 2020 07:00:07 +0530 Subject: [PATCH 2/2] :green_heart: Fixing CI Build --- .travis.yml | 38 ++++++++++++++++++++------------------ build.js | 2 +- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0223e03ab..92275152d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,38 +13,40 @@ language: node_js node_js: - - "12" + - "12" + +os: linux addons: - apt: - packages: - - libgconf-2-4 # cypress binary dependency + apt: + packages: + - libgconf-2-4 # cypress binary dependency env: - - DEPLOY_ENV=POSTWOMAN_IO + - DEPLOY_ENV=POSTWOMAN_IO cache: - npm: true - directories: - - "node_modules" - - ~/.cache + npm: true + directories: + - "node_modules" + - ~/.cache branches: - only: - - "master" + only: + - "master" install: - - "npm install firebase-tools" - - "npm install" + - "npm install firebase-tools" + - "npm install" before_script: - - "npm run test" + - "npm run test" script: - - "cd functions" - - "npm install" - - "cd .." - - "npm run generate" + - "cd functions" + - "npm install" + - "cd .." + - "npm run generate" notifications: webhooks: https://www.travisbuddy.com diff --git a/build.js b/build.js index be7f3f4c3..c19eb2987 100644 --- a/build.js +++ b/build.js @@ -53,7 +53,7 @@ try { // Write version data into a file fs.writeFileSync( - PW_BUILD_DATA_DIR + "/version.json", + `${PW_BUILD_DATA_DIR}/version.json`, JSON.stringify(version) ); })();