Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
add prettier and auto formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenmeier committed Feb 3, 2024
1 parent f4cccc2 commit c72ae48
Show file tree
Hide file tree
Showing 30 changed files with 1,862 additions and 713 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[*]
end_of_line = lf
indent_style = tab
indent_size = 4

[*{js,ts}]
charset = utf-8
60 changes: 29 additions & 31 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,39 +1,37 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
env: {
browser: true,
es2021: true,
},
"extends": "eslint:recommended",
"overrides": [
extends: 'eslint:recommended',
overrides: [
{
"env": {
"node": true
env: {
node: true,
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
"rules": {
"no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
rules: {
'no-unused-vars': [
'error',
{
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
},
],
"no-constant-condition": [
"error",
'no-constant-condition': [
'error',
{
"checkLoops": false
}
]
}
}
checkLoops: false,
},
],
},
};
42 changes: 29 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
push:
branches: [master]
pull_request:
branches: [master]

jobs:
lint:
runs-on: ubuntu-latest
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install dependencies
run: npm ci
- name: Install dependencies
run: npm ci

- name: Check types
run: npm run lint
- name: Check prettier
run: npm run check

- name: Run lint
run: npm run lint

tests:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install dependencies
run: npm ci

- name: Run Test
run: npm run test run
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/*.md
/*.json
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tabWidth": 4,
"useTabs": true,
"singleQuote": true,
"arrowParens": "avoid"
}
Loading

0 comments on commit c72ae48

Please sign in to comment.