From 3445f542a510b57e3e47dba2fc41837f92896a72 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Sun, 9 Jul 2023 12:36:30 +0200 Subject: [PATCH] Revert "Merge pull request #1746 from nextcloud/dependabot/npm_and_yarn/prettier-3.0.0" This reverts commit 06696725c7699cfbe6853a8a47eb5d39c2e80769, reversing changes made to d59f08e63aee2976a167d39c201f2d88885d0c42. --- CHANGELOG.md | 2 - package-lock.json | 43 +++++--------------- package.json | 2 +- src/components/AppControls/AppControls.vue | 2 +- src/components/AppInvalidGuest.vue | 2 +- src/components/AppNavi.vue | 12 +++--- src/components/EditImageField.vue | 2 +- src/components/EditInputField.vue | 2 +- src/components/EditInputGroup.vue | 10 ++--- src/components/LazyPicture.vue | 6 +-- src/components/RecipeEdit.vue | 12 +++--- src/components/RecipeList.vue | 4 +- src/components/RecipeListKeywordCloud.vue | 10 ++--- src/components/RecipeTimer.vue | 2 +- src/components/RecipeView.vue | 46 +++++++++++----------- src/components/SearchResults.vue | 8 ++-- src/components/SettingsDialog.vue | 18 ++++----- src/components/SuggestionsPopup.vue | 6 +-- src/js/api-interface.js | 6 +-- src/js/helper.js | 2 +- src/js/logging.js | 2 +- src/js/modals.js | 2 +- src/js/title-rename.js | 6 +-- src/store/index.js | 2 +- 24 files changed, 91 insertions(+), 118 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8caa1adf..d08aa6be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,8 +43,6 @@ [#1729](https://github.com/nextcloud/cookbook/pull/1729) @dependabot @christianlupus - Update Node to new LTS version [#1735](https://github.com/nextcloud/cookbook/pull/1735) @nextcloud-command -- Update major prettier version - [#1746](https://github.com/nextcloud/cookbook/pull/1746) @dependabot @christianlupus ## 0.10.2 - 2023-03-24 diff --git a/package-lock.json b/package-lock.json index 81ed9616..d2f1c12a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-import": "^2.22.1", "eslint-plugin-vue": "^9.0.1", - "prettier": "^3.0.0", + "prettier": "^2.2.1", "prettier-package-json": "^2.6.3", "stylelint": "^14.5.3", "stylelint-config-idiomatic-order": "^9.0.0", @@ -1411,23 +1411,6 @@ "url": "https://opencollective.com/postcss/" } }, - "node_modules/@vue/component-compiler-utils/node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true, - "optional": true, - "peer": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, "node_modules/@vue/component-compiler-utils/node_modules/yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", @@ -7698,15 +7681,15 @@ } }, "node_modules/prettier": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz", - "integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "bin": { - "prettier": "bin/prettier.cjs" + "prettier": "bin-prettier.js" }, "engines": { - "node": ">=14" + "node": ">=10.13.0" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -12524,14 +12507,6 @@ "source-map": "^0.6.1" } }, - "prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true, - "optional": true, - "peer": true - }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", @@ -17139,9 +17114,9 @@ "dev": true }, "prettier": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz", - "integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true }, "prettier-package-json": { diff --git a/package.json b/package.json index 15c1ba64..6eb9360b 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-import": "^2.22.1", "eslint-plugin-vue": "^9.0.1", - "prettier": "^3.0.0", + "prettier": "^2.2.1", "prettier-package-json": "^2.6.3", "stylelint": "^14.5.3", "stylelint-config-idiomatic-order": "^9.0.0", diff --git a/src/components/AppControls/AppControls.vue b/src/components/AppControls/AppControls.vue index d6035019..770504bf 100644 --- a/src/components/AppControls/AppControls.vue +++ b/src/components/AppControls/AppControls.vue @@ -285,7 +285,7 @@ export default { if ( !(await showSimpleConfirmModal( // prettier-ignore - t("cookbook", "Are you sure you want to delete this recipe?"), + t("cookbook", "Are you sure you want to delete this recipe?") )) ) { return diff --git a/src/components/AppInvalidGuest.vue b/src/components/AppInvalidGuest.vue index 6a8b632f..959acc8f 100644 --- a/src/components/AppInvalidGuest.vue +++ b/src/components/AppInvalidGuest.vue @@ -47,7 +47,7 @@ export default { }, false, // Single result ["httpd/unix-directory"], // Desired MIME type - true, // Make modal dialog + true // Make modal dialog ) }, }, diff --git a/src/components/AppNavi.vue b/src/components/AppNavi.vue index 19c30368..a31bc042 100644 --- a/src/components/AppNavi.vue +++ b/src/components/AppNavi.vue @@ -190,7 +190,7 @@ export default { { category: cat.name, } - ), + ) ) if (e && e instanceof Error) { throw e @@ -224,7 +224,7 @@ export default { { category: oldName, } - ), + ) ) if (e && e instanceof Error) { throw e @@ -269,7 +269,7 @@ export default { console.error(e2) await showSimpleAlertModal( // prettier-ignore - t("cookbook","The server reported an error. Please check."), + t("cookbook","The server reported an error. Please check.") ) } } else { @@ -277,7 +277,7 @@ export default { console.error(e2) await showSimpleAlertModal( // prettier-ignore - t("cookbook", "Could not query the server. This might be a network problem."), + t("cookbook", "Could not query the server. This might be a network problem.") ) } } @@ -327,7 +327,7 @@ export default { this.$log.info( `Reloading recipes in ${ $this.$refs[`app-navi-cat-${i}`][0].title - }`, + }` ) $this.categoryOpen(i) } @@ -339,7 +339,7 @@ export default { }) } catch (e) { await showSimpleAlertModal( - t("cookbook", "Failed to fetch categories"), + t("cookbook", "Failed to fetch categories") ) if (e && e instanceof Error) { throw e diff --git a/src/components/EditImageField.vue b/src/components/EditImageField.vue index 22256ddc..9a928452 100644 --- a/src/components/EditImageField.vue +++ b/src/components/EditImageField.vue @@ -49,7 +49,7 @@ export default { false, ["image/jpeg", "image/png"], true, - OC.dialogs.FILEPICKER_TYPE_CHOOSE, + OC.dialogs.FILEPICKER_TYPE_CHOOSE ) }, }, diff --git a/src/components/EditInputField.vue b/src/components/EditInputField.vue index c8f7891b..7c80f29e 100644 --- a/src/components/EditInputField.vue +++ b/src/components/EditInputField.vue @@ -100,7 +100,7 @@ export default { field.focus() field.setSelectionRange( this.lastCursorPosition, - this.lastCursorPosition, + this.lastCursorPosition ) } }) diff --git a/src/components/EditInputGroup.vue b/src/components/EditInputGroup.vue index b69928b2..eb56eac6 100644 --- a/src/components/EditInputGroup.vue +++ b/src/components/EditInputGroup.vue @@ -232,7 +232,7 @@ export default { const $ul = $li.closest("ul") const $insertedIndex = Array.prototype.indexOf.call( $ul.childNodes, - $li, + $li ) // Remove the common prefix from each line of the pasted text @@ -268,7 +268,7 @@ export default { this.addNewEntry( $insertedIndex + i + 1, false, - inputLinesArray[i], + inputLinesArray[i] ) } this.$emit("input", this.buffer) @@ -325,7 +325,7 @@ export default { const $ul = $li.closest("ul") const $pressedLiIndex = Array.prototype.indexOf.call( $ul.childNodes, - $li, + $li ) if ($pressedLiIndex >= this.$refs["list-field"].length - 1) { @@ -354,7 +354,7 @@ export default { const $ul = $li.closest("ul") const $pressedLiIndex = Array.prototype.indexOf.call( $ul.childNodes, - $li, + $li ) this.lastFocusedFieldIndex = $pressedLiIndex this.handleSuggestionsPopupKeyUp(e) @@ -388,7 +388,7 @@ export default { field.focus() field.setSelectionRange( this.lastCursorPosition, - this.lastCursorPosition, + this.lastCursorPosition ) }) }, diff --git a/src/components/LazyPicture.vue b/src/components/LazyPicture.vue index 9b8a5f68..41fd35c6 100644 --- a/src/components/LazyPicture.vue +++ b/src/components/LazyPicture.vue @@ -98,7 +98,7 @@ export default { const onThumbnailPreviewLoaded = () => { imgPlaceholder.removeEventListener( "load", - onThumbnailPreviewLoaded, + onThumbnailPreviewLoaded ) img.addEventListener("load", onThumbnailFullyLoaded) $this.$once("hook:destroyed", () => { @@ -110,12 +110,12 @@ export default { imgPlaceholder.addEventListener( "load", - onThumbnailPreviewLoaded, + onThumbnailPreviewLoaded ) $this.$once("hook:destroyed", () => { imgPlaceholder.removeEventListener( "load", - onThumbnailPreviewLoaded, + onThumbnailPreviewLoaded ) }) diff --git a/src/components/RecipeEdit.vue b/src/components/RecipeEdit.vue index c096a214..684d466d 100644 --- a/src/components/RecipeEdit.vue +++ b/src/components/RecipeEdit.vue @@ -497,7 +497,7 @@ export default { $this.isFetchingCategories = false } catch (e) { await showSimpleAlertModal( - t("cookbook", "Failed to fetch categories"), + t("cookbook", "Failed to fetch categories") ) if (e && e instanceof Error) { throw e @@ -523,7 +523,7 @@ export default { $this.isFetchingKeywords = false } catch (e) { await showSimpleAlertModal( - t("cookbook", "Failed to fetch keywords"), + t("cookbook", "Failed to fetch keywords") ) if (e && e instanceof Error) { throw e @@ -553,7 +553,7 @@ export default { $this.setup() } catch { await showSimpleAlertModal( - t("cookbook", "Loading recipe failed"), + t("cookbook", "Loading recipe failed") ) // Disable loading indicator if ($this.$store.state.loadingRecipe) { @@ -599,19 +599,19 @@ export default { default: await showSimpleAlertModal( // prettier-ignore - t("cookbook","Unknown answer returned from server. See logs."), + t("cookbook","Unknown answer returned from server. See logs.") ) this.$log.error(e.response) } } else if (e.request) { await showSimpleAlertModal( - t("cookbook", "No answer for request was received."), + t("cookbook", "No answer for request was received.") ) this.$log.error(e) } else { await showSimpleAlertModal( // prettier-ignore - t("cookbook","Could not start request to save recipe."), + t("cookbook","Could not start request to save recipe.") ) this.$log.error(e) } diff --git a/src/components/RecipeList.vue b/src/components/RecipeList.vue index f8f8b1e3..61de849a 100644 --- a/src/components/RecipeList.vue +++ b/src/components/RecipeList.vue @@ -167,7 +167,7 @@ export default { if (this.filters) { ret = ret.filter((r) => - r.name.toLowerCase().includes($this.filters.toLowerCase()), + r.name.toLowerCase().includes($this.filters.toLowerCase()) ) } @@ -268,7 +268,7 @@ export default { } if (recipeProperty === "name") { return r1[recipeProperty].localeCompare( - r2[recipeProperty], + r2[recipeProperty] ) } if ( diff --git a/src/components/RecipeListKeywordCloud.vue b/src/components/RecipeListKeywordCloud.vue index f7260503..e06928bd 100644 --- a/src/components/RecipeListKeywordCloud.vue +++ b/src/components/RecipeListKeywordCloud.vue @@ -156,9 +156,9 @@ export default { .map( (r) => r.keywords && - r.keywords.split(",").includes(kw.name), + r.keywords.split(",").includes(kw.name) ) - .reduce((l, r) => l || r, false), + .reduce((l, r) => l || r, false) ) }, /** @@ -166,7 +166,7 @@ export default { */ selectedKeywordsWithCount() { return this.keywordsWithCount.filter((kw) => - this.selectedKeywordsBuffer.includes(kw.name), + this.selectedKeywordsBuffer.includes(kw.name) ) }, /** @@ -174,7 +174,7 @@ export default { */ unavailableKeywords() { return this.unselectedKeywords.filter( - (kw) => !this.selectableKeywords.includes(kw), + (kw) => !this.selectableKeywords.includes(kw) ) }, /** @@ -182,7 +182,7 @@ export default { */ unselectedKeywords() { return this.keywordsWithCount.filter( - (kw) => !this.selectedKeywordsWithCount.includes(kw), + (kw) => !this.selectedKeywordsWithCount.includes(kw) ) }, }, diff --git a/src/components/RecipeTimer.vue b/src/components/RecipeTimer.vue index 69d8f2bd..35b00d53 100644 --- a/src/components/RecipeTimer.vue +++ b/src/components/RecipeTimer.vue @@ -71,7 +71,7 @@ export default { // Source for the sound https://pixabay.com/sound-effects/alarm-clock-short-6402/ // Voted by poll https://nextcloud.christian-wolf.click/nextcloud/apps/polls/s/Wke3s6CscDwQEjPV this.audio = new Audio( - linkTo("cookbook", "assets/alarm-continuous.mp3"), + linkTo("cookbook", "assets/alarm-continuous.mp3") ) // For now, the alarm should play continuously until it is dismissed diff --git a/src/components/RecipeView.vue b/src/components/RecipeView.vue index a6f08a94..cc7a085c 100644 --- a/src/components/RecipeView.vue +++ b/src/components/RecipeView.vue @@ -212,7 +212,7 @@ v-if=" 'carbohydrateContent' in recipe.nutrition && !isNullOrEmpty( - recipe.nutrition['carbohydrateContent'], + recipe.nutrition['carbohydrateContent'] ) " :title="t('cookbook', 'Carbohydrate')" @@ -222,7 +222,7 @@ v-if=" 'cholesterolContent' in recipe.nutrition && !isNullOrEmpty( - recipe.nutrition['cholesterolContent'], + recipe.nutrition['cholesterolContent'] ) " :title="t('cookbook', 'Cholesterol')" @@ -240,7 +240,7 @@ v-if=" 'proteinContent' in recipe.nutrition && !isNullOrEmpty( - recipe.nutrition['proteinContent'], + recipe.nutrition['proteinContent'] ) " :title="t('cookbook', 'Protein')" @@ -250,7 +250,7 @@ v-if=" 'sodiumContent' in recipe.nutrition && !isNullOrEmpty( - recipe.nutrition['sodiumContent'], + recipe.nutrition['sodiumContent'] ) " :title="t('cookbook', 'Sodium')" @@ -268,7 +268,7 @@ v-if=" 'saturatedFatContent' in recipe.nutrition && !isNullOrEmpty( - recipe.nutrition['saturatedFatContent'], + recipe.nutrition['saturatedFatContent'] ) " :title="t('cookbook', 'Saturated Fat')" @@ -278,7 +278,7 @@ v-if=" 'unsaturatedFatContent' in recipe.nutrition && !isNullOrEmpty( - recipe.nutrition['unsaturatedFatContent'], + recipe.nutrition['unsaturatedFatContent'] ) " :title="t('cookbook', 'Unsaturated Fat')" @@ -288,7 +288,7 @@ v-if=" 'transFatContent' in recipe.nutrition && !isNullOrEmpty( - recipe.nutrition['transFatContent'], + recipe.nutrition['transFatContent'] ) " :title="t('cookbook', 'Trans Fat')" @@ -395,25 +395,25 @@ export default { if (this.$store.state.recipe.description) { recipe.description = helpers.escapeHTML( - this.$store.state.recipe.description, + this.$store.state.recipe.description ) } if (this.$store.state.recipe.recipeIngredient) { recipe.ingredients = Object.values( - this.$store.state.recipe.recipeIngredient, + this.$store.state.recipe.recipeIngredient ).map((i) => helpers.escapeHTML(i)) } if (this.$store.state.recipe.recipeInstructions) { recipe.instructions = Object.values( - this.$store.state.recipe.recipeInstructions, + this.$store.state.recipe.recipeInstructions ).map((i) => helpers.escapeHTML(i)) } if (this.$store.state.recipe.keywords) { recipe.keywords = String( - this.$store.state.recipe.keywords, + this.$store.state.recipe.keywords ).split(",") } @@ -449,13 +449,13 @@ export default { if (this.$store.state.recipe.tool) { recipe.tools = this.$store.state.recipe.tool.map((i) => - helpers.escapeHTML(i), + helpers.escapeHTML(i) ) } if (this.$store.state.recipe.dateCreated) { const date = this.parseDateTime( - this.$store.state.recipe.dateCreated, + this.$store.state.recipe.dateCreated ) recipe.dateCreated = date != null ? date.format("L, LT").toString() : null @@ -463,7 +463,7 @@ export default { if (this.$store.state.recipe.dateModified) { const date = this.parseDateTime( - this.$store.state.recipe.dateModified, + this.$store.state.recipe.dateModified ) recipe.dateModified = date != null ? date.format("L, LT").toString() : null @@ -486,7 +486,7 @@ export default { for (let idx = 0; idx < this.recipe.ingredients.length; ++idx) { if ( this.recipe.ingredients[idx].startsWith( - this.headerPrefix, + this.headerPrefix ) ) { return true @@ -524,12 +524,12 @@ export default { return yieldCalculator.recalculateIngredients( this.parsedIngredients, this.recipeYield, - this.$store.state.recipe.recipeYield, + this.$store.state.recipe.recipeYield ) }, ingredientsWithValidSyntax() { return this.parsedIngredients.map( - yieldCalculator.isValidIngredientSyntax, + yieldCalculator.isValidIngredientSyntax ) }, ingredientsSyntaxCorrect() { @@ -553,7 +553,7 @@ export default { if (r.ingredients) { this.parsedIngredients = r.ingredients.map(() => - t("cookbook", "Loading…"), + t("cookbook", "Loading…") ) r.ingredients.forEach((ingredient, idx) => { normalizeMarkdown(ingredient) @@ -570,7 +570,7 @@ export default { if (r.instructions) { this.parsedInstructions = r.instructions.map(() => - t("cookbook", "Loading…"), + t("cookbook", "Loading…") ) r.instructions.forEach((instruction, idx) => { normalizeMarkdown(instruction) @@ -587,7 +587,7 @@ export default { if (r.tools) { this.parsedTools = r.tools.map(() => - t("cookbook", "Loading…"), + t("cookbook", "Loading…") ) r.tools.forEach((tool, idx) => { normalizeMarkdown(tool) @@ -688,7 +688,7 @@ export default { $this.$store.dispatch("setPage", { page: "recipe" }) await showSimpleAlertModal( - t("cookbook", "Loading recipe failed"), + t("cookbook", "Loading recipe failed") ) } @@ -704,10 +704,10 @@ export default { navigator.clipboard .writeText(ingredientsToCopy) .then(() => - this.$log.info("JSON array copied to clipboard"), + this.$log.info("JSON array copied to clipboard") ) .catch((err) => - this.$log.error("Failed to copy JSON array: ", err), + this.$log.error("Failed to copy JSON array: ", err) ) } else { // fallback solution diff --git a/src/components/SearchResults.vue b/src/components/SearchResults.vue index b6167723..3314d060 100644 --- a/src/components/SearchResults.vue +++ b/src/components/SearchResults.vue @@ -74,7 +74,7 @@ export default { { tags, } - ), + ) ) if (e && e instanceof Error) { throw e @@ -95,7 +95,7 @@ export default { { category: cat, } - ), + ) ) if (e && e instanceof Error) { throw e @@ -106,13 +106,13 @@ export default { const $this = this try { const response = await api.recipes.search( - $this.$route.params.value, + $this.$route.params.value ) $this.results = response.data } catch (e) { $this.results = [] await showSimpleAlertModal( - t("cookbook", "Failed to load search results"), + t("cookbook", "Failed to load search results") ) if (e && e instanceof Error) { throw e diff --git a/src/components/SettingsDialog.vue b/src/components/SettingsDialog.vue index 13c01e19..43249918 100644 --- a/src/components/SettingsDialog.vue +++ b/src/components/SettingsDialog.vue @@ -91,7 +91,7 @@ {{ t( "cookbook", - "Control which blocks of information are shown in the recipe view. If you do not use some features and find them distracting, you may hide them.", + "Control which blocks of information are shown in the recipe view. If you do not use some features and find them distracting, you may hide them." ) }} @@ -232,7 +232,7 @@ export default { } catch { await showSimpleAlertModal( // prettier-ignore - t("cookbook","Could not set preference for image printing"), + t("cookbook","Could not set preference for image printing") ) this.resetPrintImage = true this.printImage = oldVal @@ -260,7 +260,7 @@ export default { { interval: newVal, } - ), + ) ) this.resetInterval = true this.updateInterval = oldVal @@ -281,7 +281,7 @@ export default { // eslint-disable-next-line no-console console.error("Error while trying to save info blocks", err) await showSimpleAlertModal( - t("cookbook", "Could not save visible info blocks"), + t("cookbook", "Could not save visible info blocks") ) this.resetVisibleInfoBlocks = true this.visibleInfoBlocks = oldVal @@ -321,13 +321,13 @@ export default { { path } - ), - ), + ) + ) ) }, false, ["httpd/unix-directory"], - true, + true ) }, @@ -347,7 +347,7 @@ export default { this.printImage = config.print_image this.visibleInfoBlocks = visibleInfoBlocksDecode( - config.visibleInfoBlocks, + config.visibleInfoBlocks ) this.showTagCloudInRecipeList = this.$store.state.localSettings.showTagCloudInRecipeList @@ -356,7 +356,7 @@ export default { } catch (err) { this.$log.error("Error setting up SettingsDialog", err) await showSimpleAlertModal( - t("cookbook", "Loading config failed"), + t("cookbook", "Loading config failed") ) } }, diff --git a/src/components/SuggestionsPopup.vue b/src/components/SuggestionsPopup.vue index 271d7e32..7b4f9757 100644 --- a/src/components/SuggestionsPopup.vue +++ b/src/components/SuggestionsPopup.vue @@ -190,7 +190,7 @@ export const suggestionsPopupMixin = { ArrowDown: +1, }[e.key], 0, - this.suggestionOptions.length - 1, + this.suggestionOptions.length - 1 ) this.suggestionsData = { ...this.suggestionsData, @@ -273,7 +273,7 @@ export const suggestionsPopupMixin = { searchText === "" || option.title .toLowerCase() - .includes(searchText.toLowerCase()), + .includes(searchText.toLowerCase()) ) }, }, @@ -327,7 +327,7 @@ export default { field.offsetLeft + caretPos.left, field.offsetLeft + field.offsetWidth - - SUGGESTIONS_POPUP_WIDTH, + SUGGESTIONS_POPUP_WIDTH ), top: field.offsetTop + caretPos.top + caretPos.height, } diff --git a/src/js/api-interface.js b/src/js/api-interface.js index d8723328..0679b539 100644 --- a/src/js/api-interface.js +++ b/src/js/api-interface.js @@ -11,12 +11,12 @@ const baseUrl = `${generateUrl("apps/cookbook")}/webapp` instance.interceptors.request.use((config) => { Vue.$log.debug( `[axios] Making "${config.method}" request to "${config.url}"`, - config, + config ) const contentType = config.headers[config.method]["Content-Type"] if (!["application/json", "text/json"].includes(contentType)) { Vue.$log.warn( - `[axios] Request to "${config.url}" is using Content-Type "${contentType}", not JSON`, + `[axios] Request to "${config.url}" is using Content-Type "${contentType}", not JSON` ) } return config @@ -30,7 +30,7 @@ instance.interceptors.response.use( (error) => { Vue.$log.warn("[axios] Received error", error) return Promise.reject(error) - }, + } ) axios.defaults.headers.common.Accept = "application/json" diff --git a/src/js/helper.js b/src/js/helper.js index 77383346..a8a1a1a1 100644 --- a/src/js/helper.js +++ b/src/js/helper.js @@ -74,7 +74,7 @@ function escapeHTML(text) { "'": "'", "<": "<", ">": ">", - })[a], + }[a]) ) } diff --git a/src/js/logging.js b/src/js/logging.js index 07320e69..369c5c9e 100644 --- a/src/js/logging.js +++ b/src/js/logging.js @@ -35,7 +35,7 @@ const isEnabled = () => { if (userValue !== null && expiry === null) { localStorage.setItem( KEY_EXPIRY, - moment().add(EXPIRY_MINUTES, "m").valueOf(), + moment().add(EXPIRY_MINUTES, "m").valueOf() ) } diff --git a/src/js/modals.js b/src/js/modals.js index 33d40f30..ae956922 100644 --- a/src/js/modals.js +++ b/src/js/modals.js @@ -7,5 +7,5 @@ export const showSimpleAlertModal = create(SimpleAlertModal, "content", "title") export const showSimpleConfirmModal = create( SimpleConfirmModal, "content", - "title", + "title" ) diff --git a/src/js/title-rename.js b/src/js/title-rename.js index e609099d..44d71ea5 100644 --- a/src/js/title-rename.js +++ b/src/js/title-rename.js @@ -35,7 +35,7 @@ async function getRecipesFromLinks(linkIds) { recipe = null } return recipe - }), + }) ) } @@ -58,12 +58,12 @@ function insertMarkdownLinks(content, recipes) { // Replace plain references with recipe name const rePlain = RegExp( `(^|\\s|[,._+&?!-])#r/${id}($|\\s|[,._+&?!-])`, - "g", + "g" ) // const re = /(^|\s|[,._+&?!-])#r\/(\d+)(?=$|\s|[.,_+&?!-])/g ret = ret.replace( rePlain, - `$1[${r.name} (\\#r/${id})](${getRecipeUrl(id)})$2`, + `$1[${r.name} (\\#r/${id})](${getRecipeUrl(id)})$2` ) }) return ret diff --git a/src/store/index.js b/src/store/index.js index 571c660b..3a48dc15 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -56,7 +56,7 @@ export default new Vuex.Store({ initializeStore(state) { if (localStorage.getItem("showTagCloudInRecipeList")) { state.localSettings.showTagCloudInRecipeList = JSON.parse( - localStorage.getItem("showTagCloudInRecipeList"), + localStorage.getItem("showTagCloudInRecipeList") ) } else { state.localSettings.showTagCloudInRecipeList = true