Skip to content

Commit

Permalink
Merge pull request #55 from actions/formatter
Browse files Browse the repository at this point in the history
Bring back the formatter
  • Loading branch information
yoannchaudet committed Aug 24, 2022
2 parents b627026 + 369d1ae commit 0dfe0f0
Show file tree
Hide file tree
Showing 15 changed files with 591 additions and 513 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
"ecmaVersion": 2020
},
"rules": {
"semi": ["error", "never"]
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/check-formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Checking formatting

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.JS
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Verify formatting
run: npm run format:check
34 changes: 34 additions & 0 deletions .github/workflows/check-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Checking linter

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.JS
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Verify linter
run: npm run lint
10 changes: 0 additions & 10 deletions .prettierrc.json

This file was deleted.

10 changes: 10 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Prettier (formatter) configuration
---
printWidth: 120
tabWidth: 2
useTabs: false
semi: false
singleQuote: true
trailingComma: none
bracketSpacing: true
arrowParens: avoid
Loading

0 comments on commit 0dfe0f0

Please sign in to comment.