From 11d19912795d1233f232587cc74607fc961d12d8 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 13 Dec 2021 20:34:23 +0100 Subject: [PATCH] [CI] Add woodpecker-ci --- .eslintrc.js | 8 ++------ .npmignore | 1 + .woodpecker/.deploy.yml | 14 ++++++++++++++ .woodpecker/.lint.yml | 9 +++++++++ README.md | 1 + package.json | 1 + 6 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 .npmignore create mode 100644 .woodpecker/.deploy.yml create mode 100644 .woodpecker/.lint.yml diff --git a/.eslintrc.js b/.eslintrc.js index abb7497..31c0fe2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -44,7 +44,7 @@ module.exports = { // https://github.com/prettier/eslint-config-prettier#installation // usage with Prettier, provided by 'eslint-config-prettier'. - 'prettier', //'plugin:prettier/recommended' + 'plugin:prettier/recommended', ], plugins: [ @@ -54,10 +54,6 @@ module.exports = { // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file // required to lint *.vue files 'vue', - - // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674 - // Prettier has not been included as plugin to avoid performance impact - // add it as an extension for your IDE ], // add your custom rules here @@ -65,7 +61,7 @@ module.exports = { 'prefer-promise-reject-errors': 'off', // TypeScript - quotes: ['warn', 'single', { avoidEscape: true }], + quotes: ['error', 'single', { avoidEscape: true }], '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', 'vue/multi-word-component-names': 'off', diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..82c5139 --- /dev/null +++ b/.npmignore @@ -0,0 +1 @@ +.woodpecker/ diff --git a/.woodpecker/.deploy.yml b/.woodpecker/.deploy.yml new file mode 100644 index 0000000..b0b1e0a --- /dev/null +++ b/.woodpecker/.deploy.yml @@ -0,0 +1,14 @@ +pipeline: + deploy: + when: + event: tag + tag: v* + image: node:lts-alpine + commands: + - echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" > .npmrc + - yarn publish --non-interactive + secrets: [ node_auth_token ] + +depends_on: + - lint + diff --git a/.woodpecker/.lint.yml b/.woodpecker/.lint.yml new file mode 100644 index 0000000..040a118 --- /dev/null +++ b/.woodpecker/.lint.yml @@ -0,0 +1,9 @@ +pipeline: + lint: + when: + branch: [main, develop] + image: node:lts-alpine + commands: + - yarn install + - yarn lint + diff --git a/README.md b/README.md index d5f8ef9..1ba0edf 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Flaschengeist `pricelist` fontend-plugin +![status-badge](https://ci.os-sc.org/api/badges/Flaschengeist/flaschengeist-pricelist/status.svg) This package provides the [Flaschengeist](https://flaschengeist.dev/Flaschengeist/flaschengeist) frontend for the pricelist plugin (build and manage drinks, show pricelist and calculate prices). diff --git a/package.json b/package.json index e51e9a0..7adb040 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "@typescript-eslint/parser": "^5.5.0", "eslint": "^8.2.0", "eslint-config-prettier": "^8.3.0", + "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-vue": "^8.1.1", "pinia": "^2.0.6", "prettier": "^2.5.1",