Skip to content

Commit 8315814

Browse files
authored
Merge pull request #3 from mcode/linting
REMS-292 add linting and ci workflows to repository
2 parents 2170efc + 7466d36 commit 8315814

10 files changed

Lines changed: 3129 additions & 6461 deletions

File tree

.eslintignore

Whitespace-only changes.

.eslintrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"extends": [
4+
"plugin:@typescript-eslint/recommended",
5+
"prettier"
6+
],
7+
"parserOptions": {
8+
"ecmaVersion": 2018,
9+
"sourceType": "module"
10+
},
11+
"rules": {
12+
"semi": ["error", "always"],
13+
"quotes": ["error", "single", { "avoidEscape": true }],
14+
"@typescript-eslint/ban-ts-comment": "off",
15+
"@typescript-eslint/explicit-function-return-type": "off",
16+
"@typescript-eslint/no-empty-function": "off",
17+
"@typescript-eslint/no-explicit-any": "off",
18+
}
19+
}

.github/workflows/ci-workflow.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Lint and Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
name: Check tsc, lint, and prettier
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v1
11+
- uses: actions/setup-node@v1
12+
with:
13+
node-version: '12.x'
14+
- run: npm install
15+
- run: npm run lint
16+
- run: npm run prettier
17+
env:
18+
CI: true
19+
test:
20+
name: Test on node ${{ matrix.node-version }} and ${{ matrix.os }}
21+
runs-on: ${{ matrix.os }}
22+
strategy:
23+
matrix:
24+
os: [ubuntu-latest, windows-latest, macos-latest]
25+
node-version: [12]
26+
27+
steps:
28+
- uses: actions/checkout@v1
29+
- name: Use Node.js ${{ matrix.node-version }}
30+
uses: actions/setup-node@v1
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
- run: npm install
34+
- run: npm test
35+
env:
36+
CI: true

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"trailingComma": "none",
3+
"arrowParens": "avoid",
4+
"endOfLine": "auto",
5+
"printWidth": 100,
6+
"tabWidth": 2,
7+
"singleQuote": true
8+
}

0 commit comments

Comments
 (0)