From 74b55b7839f8c0ba180f5c84a1bc77b9a591f954 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 14 Dec 2021 14:11:53 +0100 Subject: [PATCH] feat(ci): Added woodpecker CI --- .eslintrc.js | 18 +++++++----------- .gitignore | 1 + .npmignore | 3 +++ .woodpecker/deploy.yml | 14 ++++++++++++++ .woodpecker/lint.yml | 9 +++++++++ 5 files changed, 34 insertions(+), 11 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 ab9cd5e..b3c0240 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -17,11 +17,11 @@ module.exports = { project: resolve(__dirname, './tsconfig.json'), tsconfigRootDir: __dirname, ecmaVersion: 2019, // Allows for the parsing of modern ECMAScript features - sourceType: 'module' // Allows for the use of imports + sourceType: 'module', // Allows for the use of imports }, env: { - browser: true + browser: true, }, // Rules order is important, please avoid shuffling them @@ -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,11 +61,11 @@ 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', // allow debugger during development only - 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' - } -} + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', + }, +}; diff --git a/.gitignore b/.gitignore index 9e512a5..e7d9f2c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ node_modules yarn-error.log +# No need for pinned dependencies, there are only peer dependencies yarn.lock .idea diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..bc1a792 --- /dev/null +++ b/.npmignore @@ -0,0 +1,3 @@ +yarn-error.log + +.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 +