Skip to content

Commit 9489e00

Browse files
committed
Added github ci
1 parent 3fef6ed commit 9489e00

19 files changed

+326
-378
lines changed

.eslintignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
lib/
2+
es/
3+
es6/
4+
*.d.ts
5+
src/**/*.js
6+
test/**/*.js
7+
.eslintrc.js
8+
jest.config.js
9+
coverage

.eslintrc.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*
2+
Rules Severity
3+
- 0 = off
4+
- 1 = warn
5+
- 2 = error
6+
*/
7+
{
8+
"env": {
9+
"node": true
10+
},
11+
"extends": [
12+
"eslint:recommended",
13+
"plugin:@typescript-eslint/recommended",
14+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
15+
],
16+
"parser": "@typescript-eslint/parser",
17+
"parserOptions": {
18+
"ecmaFeatures": {
19+
"impliedStrict": true
20+
},
21+
"ecmaVersion": "latest",
22+
"project": "./tsconfig.json",
23+
"sourceType": "module"
24+
},
25+
"plugins": [
26+
"@typescript-eslint",
27+
"typescript-sort-keys"
28+
],
29+
"rules": {
30+
// Javscript Specific Rules That Are Applied To Typescript Too
31+
"max-len": [
32+
"error",
33+
{
34+
"code": 80,
35+
"ignoreComments": true,
36+
"ignorePattern": "^(import)|(it\\()",
37+
"ignoreTemplateLiterals": true
38+
}
39+
],
40+
"no-console": 1,
41+
"quotes": [
42+
2,
43+
"single"
44+
],
45+
"semi": 2,
46+
"sort-keys": [
47+
2,
48+
"asc",
49+
{
50+
"caseSensitive": true,
51+
"natural": false,
52+
"minKeys": 2
53+
}
54+
],
55+
// Typescript Specific Rules From This Point On
56+
"typescript-sort-keys/interface": 2,
57+
"typescript-sort-keys/string-enum": 0,
58+
"@typescript-eslint/explicit-function-return-type": 2,
59+
"@typescript-eslint/no-explicit-any": 2,
60+
"@typescript-eslint/no-inferrable-types": 2,
61+
"@typescript-eslint/no-non-null-assertion": 2,
62+
"@typescript-eslint/no-unsafe-call": 2,
63+
"@typescript-eslint/no-unsafe-member-access": 2,
64+
"@typescript-eslint/no-unused-vars": [
65+
2,
66+
{
67+
"argsIgnorePattern": "_",
68+
"ignoreRestSiblings": true
69+
}
70+
],
71+
"@typescript-eslint/no-var-requires": 2,
72+
"@typescript-eslint/require-await": 2
73+
}
74+
}

.github/release-drafter.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name-template: 'Next Release'
2+
tag-template: 'next'
3+
change-template: '- $TITLE #$NUMBER'
4+
no-changes-template: '- No changes yet'
5+
template: |
6+
$CHANGES

.github/workflows/node.js.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [12.x, 14.x, 16.x]
20+
ts-project: [src/tsconfig.json, src/tsconfig-es6.json]
21+
22+
env:
23+
TS_NODE_PROJECT: ${{ matrix.ts-project }}
24+
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v1
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
- run: npm cache clean --force
32+
- run: npm ci
33+
- run: npm run build --if-present
34+
- run: npm test

.travis.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

gulpfile.js

Lines changed: 0 additions & 181 deletions
This file was deleted.

jest.config.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"collectCoverage": true,
3+
"coverageDirectory": "<rootDir>/coverage",
4+
"coverageReporters": [
5+
"html",
6+
"json",
7+
"text"
8+
],
9+
"moduleFileExtensions": [
10+
"js",
11+
"json",
12+
"ts"
13+
],
14+
"rootDir": ".",
15+
"setupFilesAfterEnv": [
16+
"<rootDir>/test/helpers/jest.setup.ts"
17+
],
18+
"testEnvironment": "node",
19+
"testPathIgnorePatterns": [
20+
"node_modules"
21+
],
22+
"testRegex": ".test.ts$",
23+
"transform": {
24+
"^.+\\.ts$": "ts-jest"
25+
}
26+
}

0 commit comments

Comments
 (0)