diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ed57a972a..d4f69ec9e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -294,6 +294,10 @@ jobs: shell: bash run: make appinfo/info.xml + - name: Update NPM + shell: bash + run: sudo npm install -g npm + - name: Install the NPM dependencies shell: bash run: >- diff --git a/CHANGELOG.md b/CHANGELOG.md index c9e672a73..ecd689c6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ [#823](https://github.com/nextcloud/cookbook/pull/823) @christianlupus - Fix test script after update in docker-compose [#833](https://github.com/nextcloud/cookbook/pull/833) @christianlupus +- Update NPM during automatic building to latest version ([#837](https://github.com/nextcloud/cookbook/issues/837)) + [#839](https://github.com/nextcloud/cookbook/pull/839) @christianlupus +- Downgrade eslint to meet peer dependencies ([#838](https://github.com/nextcloud/cookbook/issues/838)) + [#839](https://github.com/nextcloud/cookbook/pull/839) @christianlupus +- Fix bug in Makefile to simplify development + [#839](https://github.com/nextcloud/cookbook/pull/839) @christianlupus ## 0.9.6 - 2021-10-18 diff --git a/Makefile b/Makefile index a1f556591..90a66fd12 100755 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ appstore_package_name=$(appstore_build_directory)/$(app_name) npm=$(shell which npm 2> /dev/null) composer=$(shell which composer 2> /dev/null) -all: build +all: build appinfo/info.xml # Fetches the PHP and JS dependencies and compiles the JS. If no composer.json # is present, the composer step is skipped, if no package.json or js/package.json diff --git a/package.json b/package.json index f5ad31462..c9b0a7a28 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "prettier-fix": "npx prettier --write src", "stylelint": "npx stylelint src", "stylelint-fix": "npx stylelint --fix src", - "eslint": "npx eslint src", - "eslint-fix": "npx eslint --fix src" + "eslint": "npx eslint src/**/*.{vue,js}", + "eslint-fix": "npx eslint --fix src/**/*.{vue,js}" }, "repository": { "type": "git", @@ -46,7 +46,7 @@ "babel-loader": "^8.1.0", "compression-webpack-plugin": "^9.0.0", "css-loader": "^6.0.0", - "eslint": "^8.0.1", + "eslint": "^7.32.0", "eslint-config-airbnb-base": "^14.2.1", "eslint-config-prettier": "^8.0.0", "eslint-plugin-import": "^2.22.1", diff --git a/src/components/AppControls.vue b/src/components/AppControls.vue index 824486355..4a0d49d48 100644 --- a/src/components/AppControls.vue +++ b/src/components/AppControls.vue @@ -296,7 +296,8 @@ export default { deleteRecipe() { // Confirm delete if ( - !confirm( + // eslint-disable-next-line no-alert + !window.confirm( // prettier-ignore t("cookbook","Are you sure you want to delete this recipe?") ) @@ -307,10 +308,11 @@ export default { this.$store .dispatch("deleteRecipe", { id: this.$store.state.recipe.id }) - .then((response) => { + .then(() => { $this.$window.goTo("/") }) .catch((e) => { + // eslint-disable-next-line no-alert alert(t("cookbook", "Delete failed")) if (e && e instanceof Error) { throw e @@ -330,7 +332,7 @@ export default { this.$root.$emit("saveRecipe") }, search(e) { - this.$window.goTo("/search/" + e.target[1].value) + this.$window.goTo(`/search/${e.target[1].value}`) }, updateFilters(e) { this.filterValue = e diff --git a/src/components/AppNavi.vue b/src/components/AppNavi.vue index 251bb65d0..44b7943b7 100644 --- a/src/components/AppNavi.vue +++ b/src/components/AppNavi.vue @@ -285,7 +285,7 @@ export default { e2.response.status >= 400 && e2.response.status < 500 ) { - if (e2.response.status == 409) { + if (e2.response.status === 409) { // There was a recipe found with the same name // eslint-disable-next-line no-alert @@ -295,14 +295,18 @@ export default { alert(e2.response.data) } } else { + // eslint-disable-next-line no-console console.error(e2) + // eslint-disable-next-line no-alert alert( // prettier-ignore t("cookbook","The server reported an error. Please check.") ) } } else { + // eslint-disable-next-line no-console console.error(e2) + // eslint-disable-next-line no-alert alert( // prettier-ignore t("cookbook", "Could not query the server. This might be a network problem.") diff --git a/src/components/RecipeCard.vue b/src/components/RecipeCard.vue index 41cf6fe03..521deaa2b 100644 --- a/src/components/RecipeCard.vue +++ b/src/components/RecipeCard.vue @@ -1,5 +1,5 @@ diff --git a/src/components/RecipeList.vue b/src/components/RecipeList.vue index 126177a06..657f401a4 100644 --- a/src/components/RecipeList.vue +++ b/src/components/RecipeList.vue @@ -4,7 +4,7 @@ v-if="showTagCloudInRecipeList" v-model="keywordFilter" :keywords="rawKeywords" - :filteredRecipes="filteredRecipes" + :filtered-recipes="filteredRecipes" />