Skip to content

Commit 6a10308

Browse files
authored
Merge pull request #56 from lightninglabs/actions-first-party
Add GitHub Actions: lint, prettier, build (first party)
2 parents 6e1dcf7 + feafa74 commit 6a10308

File tree

6 files changed

+69
-1
lines changed

6 files changed

+69
-1
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Build
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- name: Use Node.js
9+
uses: actions/setup-node@v3
10+
with:
11+
node-version: '12.x'
12+
- run: npm ci
13+
- run: npm run build

.github/workflows/lint.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Lint
2+
on: [push]
3+
jobs:
4+
lint:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- name: Use Node.js
9+
uses: actions/setup-node@v3
10+
with:
11+
node-version: '12.x'
12+
- run: npm ci
13+
- run: npm run lint

.github/workflows/prettier.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Prettier
2+
on: [push]
3+
jobs:
4+
prettier:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- name: Use Node.js
9+
uses: actions/setup-node@v3
10+
with:
11+
node-version: '12.x'
12+
- run: npm ci
13+
- run: npm run prettier

.prettierignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.github/**
2+
demos/**
3+
dist/**
4+
lib/types/**
5+
lib/wasm_exec.js
6+
package-lock.json
7+
package.json
8+
README.md
9+
test/**
10+
tsconfig.json
11+
tslint.json
12+
webpack.config.js

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"test": "mocha --reporter spec",
1818
"update-protos": "sh scripts/update_protos.sh ${npm_package_config_lnd_release_tag} ${npm_package_config_loop_release_tag} ${npm_package_config_pool_release_tag} ${npm_package_config_faraday_release_tag}",
1919
"generate": "sh scripts/generate_types.sh ${npm_package_config_lnd_release_tag} ${npm_package_config_loop_release_tag} ${npm_package_config_pool_release_tag} ${npm_package_config_faraday_release_tag} ${npm_package_config_protoc_version}",
20-
"prettier": "prettier --check --write '**/*.ts*' '!dist/**' '!lib/types/**'",
20+
"prettier": "prettier --check '**/*.ts*'",
21+
"prettier-write": "prettier --check --write '**/*.ts*'",
2122
"lint": "tslint -p tsconfig.json",
2223
"prepare": "npm run build",
2324
"prepublishOnly": "npm run lint",

tslint.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
{
22
"extends": ["tslint:recommended", "tslint-config-prettier"],
3+
"rules": {
4+
"max-line-length": {
5+
"options": [120]
6+
},
7+
"new-parens": true,
8+
"no-arg": true,
9+
"no-bitwise": true,
10+
"no-conditional-assignment": true,
11+
"no-consecutive-blank-lines": true,
12+
"no-console": {
13+
"severity": "warning",
14+
"options": ["debug", "info", "log", "time", "timeEnd", "trace"]
15+
},
16+
"no-unused-variable": true
17+
},
318
"linterOptions": {
419
"exclude": [
520
"dist",
@@ -8,3 +23,4 @@
823
]
924
}
1025
}
26+

0 commit comments

Comments
 (0)