Skip to content

Commit 4ef5292

Browse files
authored
Setup CI/CD (#22)
1 parent b7e785c commit 4ef5292

3 files changed

Lines changed: 37 additions & 10 deletions

File tree

.eslintrc.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,8 @@
66
"node": true
77
},
88
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
9-
"parserOptions": {
10-
"ecmaFeatures": {
11-
"jsx": true
12-
},
13-
"sourceType": "module"
14-
},
9+
"plugins": ["prettier"],
1510
"rules": {
16-
"no-unreachable": "warn",
17-
"no-unused-vars": "warn",
18-
"semi": "warn",
19-
"valid-typeof": "warn"
11+
"prettier/prettier": "error"
2012
}
2113
}

.github/workflows/main.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Install, lint and package
2+
on:
3+
# Triggers the workflow on push or pull-request events for the master and Dev branches
4+
push:
5+
branches: [master, Dev]
6+
pull_request:
7+
branches: [master, Dev]
8+
9+
jobs:
10+
install-lint-package:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Git repository
14+
uses: actions/checkout@v3
15+
16+
- name: Install node
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 14
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Lint codebase
25+
run: npm run lint
26+
27+
- name: Create package
28+
run: npm run package

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
// Place your settings in this file to overwrite default and user settings.
22
{
3+
"[javascript]": {
4+
"editor.defaultFormatter": "esbenp.prettier-vscode",
5+
"editor.codeActionsOnSave": {
6+
"source.fixAll.eslint": true
7+
},
8+
"editor.formatOnSave": true
9+
},
310
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe"
411
}

0 commit comments

Comments
 (0)