Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.

Commit fd5871a

Browse files
author
Alexander Melnyk
committed
add projen and dotfiles
1 parent 3b4d081 commit fd5871a

File tree

14 files changed

+4070
-0
lines changed

14 files changed

+4070
-0
lines changed

.eslintrc.json

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
{
2+
"env": {
3+
"jest": true,
4+
"node": true
5+
},
6+
"root": true,
7+
"plugins": [
8+
"@typescript-eslint",
9+
"import"
10+
],
11+
"parser": "@typescript-eslint/parser",
12+
"parserOptions": {
13+
"ecmaVersion": 2018,
14+
"sourceType": "module",
15+
"project": "./tsconfig.dev.json"
16+
},
17+
"extends": [
18+
"plugin:import/typescript"
19+
],
20+
"settings": {
21+
"import/parsers": {
22+
"@typescript-eslint/parser": [
23+
".ts",
24+
".tsx"
25+
]
26+
},
27+
"import/resolver": {
28+
"node": {},
29+
"typescript": {
30+
"project": "./tsconfig.dev.json",
31+
"alwaysTryTypes": true
32+
}
33+
}
34+
},
35+
"ignorePatterns": [
36+
"*.js",
37+
"!.projenrc.js",
38+
"*.d.ts",
39+
"node_modules/",
40+
"*.generated.ts",
41+
"coverage"
42+
],
43+
"rules": {
44+
"indent": [
45+
"off"
46+
],
47+
"@typescript-eslint/indent": [
48+
"error",
49+
2
50+
],
51+
"quotes": [
52+
"error",
53+
"single",
54+
{
55+
"avoidEscape": true
56+
}
57+
],
58+
"comma-dangle": [
59+
"error",
60+
"always-multiline"
61+
],
62+
"comma-spacing": [
63+
"error",
64+
{
65+
"before": false,
66+
"after": true
67+
}
68+
],
69+
"no-multi-spaces": [
70+
"error",
71+
{
72+
"ignoreEOLComments": false
73+
}
74+
],
75+
"array-bracket-spacing": [
76+
"error",
77+
"never"
78+
],
79+
"array-bracket-newline": [
80+
"error",
81+
"consistent"
82+
],
83+
"object-curly-spacing": [
84+
"error",
85+
"always"
86+
],
87+
"object-curly-newline": [
88+
"error",
89+
{
90+
"multiline": true,
91+
"consistent": true
92+
}
93+
],
94+
"object-property-newline": [
95+
"error",
96+
{
97+
"allowAllPropertiesOnSameLine": true
98+
}
99+
],
100+
"keyword-spacing": [
101+
"error"
102+
],
103+
"brace-style": [
104+
"error",
105+
"1tbs",
106+
{
107+
"allowSingleLine": true
108+
}
109+
],
110+
"space-before-blocks": [
111+
"error"
112+
],
113+
"curly": [
114+
"error",
115+
"multi-line",
116+
"consistent"
117+
],
118+
"@typescript-eslint/member-delimiter-style": [
119+
"error"
120+
],
121+
"semi": [
122+
"error",
123+
"always"
124+
],
125+
"max-len": [
126+
"error",
127+
{
128+
"code": 150,
129+
"ignoreUrls": true,
130+
"ignoreStrings": true,
131+
"ignoreTemplateLiterals": true,
132+
"ignoreComments": true,
133+
"ignoreRegExpLiterals": true
134+
}
135+
],
136+
"quote-props": [
137+
"error",
138+
"consistent-as-needed"
139+
],
140+
"@typescript-eslint/no-require-imports": [
141+
"error"
142+
],
143+
"import/no-extraneous-dependencies": [
144+
"error",
145+
{
146+
"devDependencies": [
147+
"**/test/**",
148+
"**/build-tools/**"
149+
],
150+
"optionalDependencies": false,
151+
"peerDependencies": true
152+
}
153+
],
154+
"import/no-unresolved": [
155+
"error"
156+
],
157+
"import/order": [
158+
"warn",
159+
{
160+
"groups": [
161+
"builtin",
162+
"external"
163+
],
164+
"alphabetize": {
165+
"order": "asc",
166+
"caseInsensitive": true
167+
}
168+
}
169+
],
170+
"no-duplicate-imports": [
171+
"error"
172+
],
173+
"no-shadow": [
174+
"off"
175+
],
176+
"@typescript-eslint/no-shadow": [
177+
"error"
178+
],
179+
"key-spacing": [
180+
"error"
181+
],
182+
"no-multiple-empty-lines": [
183+
"error"
184+
],
185+
"@typescript-eslint/no-floating-promises": [
186+
"error"
187+
],
188+
"no-return-await": [
189+
"off"
190+
],
191+
"@typescript-eslint/return-await": [
192+
"error"
193+
],
194+
"no-trailing-spaces": [
195+
"error"
196+
],
197+
"dot-notation": [
198+
"error"
199+
],
200+
"no-bitwise": [
201+
"error"
202+
],
203+
"@typescript-eslint/member-ordering": [
204+
"error",
205+
{
206+
"default": [
207+
"public-static-field",
208+
"public-static-method",
209+
"protected-static-field",
210+
"protected-static-method",
211+
"private-static-field",
212+
"private-static-method",
213+
"field",
214+
"constructor",
215+
"method"
216+
]
217+
}
218+
]
219+
},
220+
"overrides": [
221+
{
222+
"files": [
223+
".projenrc.js"
224+
],
225+
"rules": {
226+
"@typescript-eslint/no-require-imports": "off",
227+
"import/no-extraneous-dependencies": "off"
228+
}
229+
}
230+
]
231+
}

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixes #

.github/workflows/build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
2+
3+
name: build
4+
on:
5+
pull_request: {}
6+
workflow_dispatch: {}
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
checks: write
12+
contents: write
13+
actions: write
14+
env:
15+
CI: "true"
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
with:
20+
ref: ${{ github.event.pull_request.head.ref }}
21+
repository: ${{ github.event.pull_request.head.repo.full_name }}
22+
- name: Set git identity
23+
run: |-
24+
git config user.name "github-actions"
25+
git config user.email "github-actions@github.com"
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v2.2.0
28+
with:
29+
node-version: "14"
30+
- name: Install dependencies
31+
run: yarn install --check-files --frozen-lockfile
32+
- name: build
33+
run: npx projen build
34+
- name: Check for changes
35+
id: git_diff
36+
run: git diff --exit-code || echo "::set-output name=has_changes::true"
37+
- if: steps.git_diff.outputs.has_changes
38+
name: Commit and push changes (if changed)
39+
run: 'git add . && git commit -m "chore: self mutation" && git push origin
40+
HEAD:${{ github.event.pull_request.head.ref }}'
41+
- if: steps.git_diff.outputs.has_changes
42+
name: Update status check (if changed)
43+
run: gh api -X POST /repos/${{ github.event.pull_request.head.repo.full_name
44+
}}/check-runs -F name="build" -F head_sha="$(git rev-parse HEAD)" -F
45+
status="completed" -F conclusion="success"
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
- if: steps.git_diff.outputs.has_changes
49+
name: Cancel workflow (if changed)
50+
run: gh api -X POST /repos/${{ github.event.pull_request.head.repo.full_name
51+
}}/actions/runs/${{ github.run_id }}/cancel
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
container:
55+
image: jsii/superchain:1-buster-slim
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
2+
3+
name: pull-request-lint
4+
on:
5+
pull_request_target:
6+
types:
7+
- labeled
8+
- opened
9+
- synchronize
10+
- reopened
11+
- ready_for_review
12+
- edited
13+
jobs:
14+
validate:
15+
name: Validate PR title
16+
runs-on: ubuntu-latest
17+
permissions:
18+
pull-requests: write
19+
steps:
20+
- uses: amannn/action-semantic-pull-request@v3.4.6
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
with:
24+
types: |-
25+
feat
26+
fix
27+
chore
28+
requireScope: false

0 commit comments

Comments
 (0)