Skip to content

Commit 6896076

Browse files
committed
Merge remote-tracking branch 'origin/main' into chore/releaseFlow
2 parents 8c6296f + 38c5103 commit 6896076

File tree

70 files changed

+15877
-830
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+15877
-830
lines changed

package-lock.json

Lines changed: 402 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@types/aws-lambda": "^8.10.72",
4747
"@types/jest": "^27.0.0",
4848
"@types/lodash": "^4.14.168",
49-
"@types/node": "^16.0.0",
49+
"@types/node": "^17.0.0",
5050
"@typescript-eslint/eslint-plugin": "^5.5.0",
5151
"@typescript-eslint/parser": "^5.5.0",
5252
"eslint": "^8.1.0",

packages/commons/.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": 2020,
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.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+
}

packages/commons/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Commons
2+
3+
A package dedicated to shared interaces, utilities and tests resources for AWS Lambda PowerTools for TypeScript.

packages/commons/jest.config.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
module.exports = {
2+
'preset': 'ts-jest',
3+
'transform': {
4+
'^.+\\.ts?$': 'ts-jest',
5+
},
6+
moduleFileExtensions: [ 'js', 'ts' ],
7+
'collectCoverageFrom': [
8+
'**/src/**/*.ts',
9+
'!**/node_modules/**',
10+
],
11+
'testMatch': ['**/?(*.)+(spec|test).ts'],
12+
'roots': [
13+
'<rootDir>/src',
14+
'<rootDir>/tests',
15+
],
16+
'testPathIgnorePatterns': [
17+
'/node_modules/',
18+
],
19+
'testEnvironment': 'node',
20+
'coveragePathIgnorePatterns': [
21+
'/node_modules/',
22+
],
23+
'coverageThreshold': {
24+
'global': {
25+
'statements': 100,
26+
'branches': 100,
27+
'functions': 100,
28+
'lines': 100,
29+
},
30+
},
31+
'coverageReporters': [
32+
'json-summary',
33+
'text',
34+
'lcov' ],
35+
};

0 commit comments

Comments
 (0)