From 0d149fdbccaa87483cdbdd54f7fd1a7a313f9f95 Mon Sep 17 00:00:00 2001 From: Stephan <57194608+stephan418@users.noreply.github.com> Date: Thu, 29 Sep 2022 20:17:17 +0200 Subject: [PATCH] Initial commit --- .github/workflows/prettier-check.yml | 28 +++++++ .github/workflows/prettier-format.yml | 30 ++++++++ .gitignore | 104 ++++++++++++++++++++++++++ .prettierignore | 2 + .prettierrc | 10 +++ README.md | 3 + 6 files changed, 177 insertions(+) create mode 100644 .github/workflows/prettier-check.yml create mode 100644 .github/workflows/prettier-format.yml create mode 100644 .gitignore create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 README.md diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml new file mode 100644 index 0000000..22de2d9 --- /dev/null +++ b/.github/workflows/prettier-check.yml @@ -0,0 +1,28 @@ +# This workflow checks whether all files conform with the Prettier configuration + +name: Check prettier formatting + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + + workflow_dispatch: + +jobs: + # Job to check the formatting + check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '16' + + - name: Install prettier + run: npm i -g prettier + + - name: Check formatting + run: prettier -c . \ No newline at end of file diff --git a/.github/workflows/prettier-format.yml b/.github/workflows/prettier-format.yml new file mode 100644 index 0000000..3aac460 --- /dev/null +++ b/.github/workflows/prettier-format.yml @@ -0,0 +1,30 @@ +# This workflow runs Prettier and formats all files + +name: Format files using prettier + +on: + workflow_dispatch: + +jobs: + # Job to check the formatting + format: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '16' + + - name: Install prettier + run: npm i -g prettier + + - name: Format using prettier + run: prettier -w . + + - name: Make pull request + uses: peter-evans/create-pull-request@v3 + with: + commit-message: "[create-pull-request] push formatted files" + delete-branch: true + title: "Reformat files using prettier" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6704566 --- /dev/null +++ b/.gitignore @@ -0,0 +1,104 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and *not* Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..9ab42c9 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +.github/ +package-lock.json \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..bab368c --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + "printWidth": 120, + "tabWidth": 2, + "semi": true, + "singleQuote": false, + "trailingComma": "es5", + "bracketSpacing": true, + "bracketSameLine": true, + "arrowParens": "always" +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..e2bdf21 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# repo-template-web + +This is a template repository for new Detleph repositories which are using web technologies