Skip to content

Commit 1a14c7a

Browse files
committed
WIP
1 parent 7c3e264 commit 1a14c7a

23 files changed

+6068
-0
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.{js,ts,json,yml,yaml,xml}]
10+
indent_size = 2
11+
indent_style = space

.eslintrc.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"env": {
3+
"es2020": true,
4+
"node": true
5+
},
6+
"extends": [
7+
"airbnb-typescript/base"
8+
],
9+
"parser": "@typescript-eslint/parser",
10+
"parserOptions": {
11+
"project": "./tsconfig.json"
12+
},
13+
"plugins": [
14+
"@typescript-eslint",
15+
"typescript-sort-keys",
16+
"sort-keys-fix",
17+
"unused-imports"
18+
],
19+
"root": true,
20+
"overrides": [
21+
{
22+
"files": "docs/api/compiler.ts",
23+
"rules": {
24+
"no-console": "off"
25+
}
26+
}
27+
],
28+
"rules": {
29+
"@typescript-eslint/no-use-before-define": "off",
30+
"guard-for-in": "off",
31+
"import/no-default-export": "error",
32+
"import/order": ["warn", {"alphabetize": {"order": "asc", "caseInsensitive": true}}],
33+
"import/prefer-default-export": "off",
34+
"max-classes-per-file": "off",
35+
"max-len": "off",
36+
"newline-after-var": "warn",
37+
"newline-before-return": "warn",
38+
"no-console": "warn",
39+
"no-multiple-empty-lines": ["warn", {"max": 1, "maxBOF": 0, "maxEOF": 0}],
40+
"no-param-reassign": "off",
41+
"no-restricted-syntax": "off",
42+
"padding-line-between-statements": ["warn", {"blankLine": "never", "prev": "import", "next": "import"}],
43+
"sort-keys-fix/sort-keys-fix": ["warn", "asc", {"caseSensitive": true, "natural": false}],
44+
"typescript-sort-keys/interface": "warn",
45+
"unused-imports/no-unused-imports-ts": "warn",
46+
"unused-imports/no-unused-vars-ts": "warn"
47+
}
48+
}

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text eol=lf

.github/workflows/publish.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Publish to package registry
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
build:
10+
name: npm Registry
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@master
16+
17+
- name: Cache dependencies
18+
id: cache
19+
uses: actions/cache@v1
20+
with:
21+
path: ./.npm
22+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
23+
restore-keys: |
24+
${{ runner.os }}-npm-
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@master
28+
with:
29+
node-version: '15.x'
30+
31+
- name: Install npm dependencies
32+
run: npm ci --prefer-offline --cache=./.npm
33+
34+
- name: Build library
35+
run: npx tsc
36+
37+
- name: Set version in package.json
38+
run: npm --no-git-tag-version version ${{ github.event.release.tag_name }}
39+
40+
- name: Set npm credentials
41+
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
42+
43+
- name: Publish to npm Registry
44+
run: npm publish --access public
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Quality assurance
2+
3+
on: push
4+
5+
jobs:
6+
eslint:
7+
name: ESLint
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@master
13+
14+
- name: Cache dependencies
15+
id: cache
16+
uses: actions/cache@v1
17+
with:
18+
path: ./.npm
19+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
20+
restore-keys: |
21+
${{ runner.os }}-npm-
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@master
25+
with:
26+
node-version: '15.x'
27+
28+
- name: Install npm dependencies
29+
run: npm ci --prefer-offline --cache=./.npm
30+
31+
- name: Lint with ESLint
32+
run: npx eslint .
33+
34+
typescript_compiler:
35+
name: TypeScript compiler
36+
runs-on: ubuntu-latest
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@master
41+
42+
- name: Cache dependencies
43+
id: cache
44+
uses: actions/cache@v1
45+
with:
46+
path: ./.npm
47+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
48+
restore-keys: |
49+
${{ runner.os }}-npm-
50+
51+
- name: Setup Node.js
52+
uses: actions/setup-node@master
53+
with:
54+
node-version: '15.x'
55+
56+
- name: Install npm dependencies
57+
run: npm ci --prefer-offline --cache=./.npm
58+
59+
- name: Build library
60+
run: npx tsc

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/node_modules/
2+
/dist/
3+
.DS_Store

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-exact=true

0 commit comments

Comments
 (0)