Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use and configure Prettier, improve GitHub Action #37

Merged
merged 5 commits into from
Oct 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: ''

assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: ''

assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ updates:
directory: "/"
schedule:
interval: daily
time: '08:00'
time: "08:00"
timezone: Europe/Amsterdam

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: '08:00'
time: "08:00"
timezone: Europe/Amsterdam
5 changes: 4 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
<!-- This pull request template is adapted from ProGit 2's pull request template. -->

<!-- Mark the checkbox [X] or [x] if you agree with the item. -->

- [ ] I provide my work under the [project license](https://github.com/RoostingGeese/git-gosling/blob/main/LICENSE.md).

## Changes

<!-- List your changes here. -->

-
-

## Context

<!--
List related issues.
Provide the necessary context to understand the changes you made.
Expand Down
26 changes: 12 additions & 14 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,29 @@ name: Node.js CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.2
with:
node-version: ${{ matrix.node-version }}
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.2
with:
node-version: ${{ matrix.node-version }}

- name: Install Yarn with npm
run: npm install -g yarn
- name: Install dependencies with Yarn
run: yarn install --frozen-lockfile

- name: Use Yarn to install dependencies and create a build
run: |
yarn install
yarn build
- name: Make a build with Yarn
run: yarn build
171 changes: 171 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# ---------------------------------------------------------------------------------- #

# This is the default Docusaurus2 gitignore.
# This is licensed under the MIT License.

# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# ---------------------------------------------------------------------------------- #

# This is licensed under the project's license.

# Ignore JetBrains stuff
.idea

# ---------------------------------------------------------------------------------- #

# Node gitignore from https://github.com/github/gitignore/blob/master/Node.gitignore
# This is licensed under the Creative Commons Zero v1.0 Universal license.

# 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/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# 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
.parcel-cache

# Next.js build output
.next
out

# 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

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# ---------------------------------------------------------------------------------- #

# Visual Studio Code (VS Code) gitignore from https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore
# This is licensed under the Creative Commons Zero v1.0 Universal license.

.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

# ---------------------------------------------------------------------------------- #
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
14 changes: 7 additions & 7 deletions docs/abbreviations.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ title: List of abbreviations

You'll find the following abbreviations in the guide:

| Abbreviation | Full name
| :---: | ---- |
| CLI | Command Line Interface |
| IDE | Integrated Development Environment |
| Bash | Bourne Again SHell |
| PAT | Personal Access Token |
| 2FA | Two-factor authentication |
| Abbreviation | Full name |
| :----------: | ---------------------------------- |
| CLI | Command Line Interface |
| IDE | Integrated Development Environment |
| Bash | Bourne Again SHell |
| PAT | Personal Access Token |
| 2FA | Two-factor authentication |
12 changes: 6 additions & 6 deletions docs/advanced_git_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ $ git config --global pull.rebase "true"

See this table for a list of popular editors, and how to configure them for use with Git.

| Editor | Configuration |
| :---: | --- |
| Nano | `git config --global core.editor "nano -w"` |
| Visual Studio Code | `git config --global core.editor "code --wait"`|
| VSCodium | `git config --global core.editor "codium --wait"` |
| Atom | `git config --global core.editor "atom --wait"` |
| Editor | Configuration |
| :----------------: | ------------------------------------------------- |
| Nano | `git config --global core.editor "nano -w"` |
| Visual Studio Code | `git config --global core.editor "code --wait"` |
| VSCodium | `git config --global core.editor "codium --wait"` |
| Atom | `git config --global core.editor "atom --wait"` |

:::note
The `--wait` or `-w` option tells Git to wait until you've saved the message and closed the commit message screen.
Expand Down
10 changes: 5 additions & 5 deletions docs/best_practices_linters.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Prettier can format a lot of languages, and is supported with a lot of editors.

## Well-known linters

| Name | Supported languages |
| :---: | :---: |
| [Prettier](https://prettier.io/) | JavaScript/TypeScript, HTML/CSS, Vue/Angular, Markdown, YAML |
| [ESLint](https://eslint.org/) | JavaScript/TypeScript |
| [StandardJS](https://standardjs.com/) | JavaScript |
| Name | Supported languages |
| :-----------------------------------: | :----------------------------------------------------------: |
| [Prettier](https://prettier.io/) | JavaScript/TypeScript, HTML/CSS, Vue/Angular, Markdown, YAML |
| [ESLint](https://eslint.org/) | JavaScript/TypeScript |
| [StandardJS](https://standardjs.com/) | JavaScript |
4 changes: 2 additions & 2 deletions docs/best_practices_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ title: Testing and GitHub Actions
Developers avoid merges/updates, because they are afraid of breaking things.
If this is you, go write some proper tests!

At the very least write a *smoke test*, to ensure that you can actually make a build.
At the very least write a _smoke test_, to ensure that you can actually make a build.

Even better, test the *happy path* of your code.
Even better, test the _happy path_ of your code.
This ensures the most frequently used code continues to work.

For even more confidence, learn and follow the **Test Driven Development** (TDD) process.
Expand Down
Loading