Skip to content

Commit 3e0bdb5

Browse files
committed
start of construct library
1 parent f73814a commit 3e0bdb5

File tree

9 files changed

+978
-50
lines changed

9 files changed

+978
-50
lines changed

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
nodejs 20.19.1
1+
nodejs 22.20.0
22
python 3.12.7
33
poetry 1.8.3
44
shellcheck 0.10.0

.vscode/eps-cdk-utils.code-workspace

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@
33
{
44
"name": "eps-cdk-utils",
55
"path": ".."
6+
},
7+
{
8+
"name": "cdkConstructs",
9+
"path": "../packages/cdkConstructs"
610
}
711
],
812
"settings": {
13+
"files.exclude": {
14+
"packages/": true,
15+
},
916
"cSpell.words": [
1017
"apigw",
1118
"ASID",
@@ -65,17 +72,25 @@
6572
"package-lock.json",
6673
"node_modules",
6774
".vscode"
68-
]
75+
],
76+
"eslint.useFlatConfig": true,
77+
"eslint.format.enable": true
6978
},
7079
"extensions": {
7180
"recommendations": [
81+
"AmazonWebServices.aws-toolkit-vscode",
7282
"eamodio.gitlens",
7383
"github.vscode-pull-request-github",
7484
"redhat.vscode-yaml",
7585
"streetsidesoftware.code-spell-checker",
7686
"timonwong.shellcheck",
7787
"mkhl.direnv",
78-
"tamasfe.even-better-toml"
88+
"tamasfe.even-better-toml",
89+
"christian-kohler.npm-intellisense",
90+
"dbaeumer.vscode-eslint",
91+
"redhat.vscode-xml",
92+
"timonwong.shellcheck",
93+
"mkhl.direnv"
7994
]
8095
}
8196
}

eslint.config.mjs

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
import globals from "globals";
2+
import tsParser from "@typescript-eslint/parser";
3+
import tsPlugin from "@typescript-eslint/eslint-plugin";
4+
import eslintJsPlugin from "@eslint/js";
5+
import importNewlines from "eslint-plugin-import-newlines";
6+
7+
const commonConfig = {
8+
plugins: {
9+
"@typescript-eslint": tsPlugin,
10+
"import-newlines": importNewlines,
11+
},
12+
rules: {
13+
...tsPlugin.configs.recommended.rules,
14+
"@typescript-eslint/array-type": [
15+
"error",
16+
{
17+
default: "generic",
18+
},
19+
],
20+
21+
"@typescript-eslint/consistent-type-assertions": [
22+
"error",
23+
{
24+
assertionStyle: "as",
25+
objectLiteralTypeAssertions: "never",
26+
},
27+
],
28+
29+
"block-spacing": "error",
30+
"brace-style": ["error", "1tbs"],
31+
"comma-dangle": ["error", "never"],
32+
33+
"comma-spacing": [
34+
"error",
35+
{
36+
before: false,
37+
after: true,
38+
},
39+
],
40+
41+
"dot-location": ["error", "property"],
42+
"eol-last": ["error", "always"],
43+
eqeqeq: "error",
44+
"func-call-spacing": "error",
45+
46+
"func-style": [
47+
"error",
48+
"declaration",
49+
{
50+
allowArrowFunctions: true,
51+
},
52+
],
53+
54+
"import-newlines/enforce": [
55+
"error",
56+
{
57+
items: 3,
58+
"max-len": 120,
59+
semi: false,
60+
},
61+
],
62+
63+
indent: [
64+
"error",
65+
2,
66+
{
67+
SwitchCase: 1,
68+
},
69+
],
70+
71+
"max-len": ["error", 120],
72+
"no-multi-spaces": "error",
73+
74+
"no-multiple-empty-lines": [
75+
"error",
76+
{
77+
max: 1,
78+
},
79+
],
80+
81+
"no-trailing-spaces": "error",
82+
"object-curly-spacing": ["error", "never"],
83+
84+
quotes: [
85+
"error",
86+
"double",
87+
{
88+
allowTemplateLiterals: true,
89+
avoidEscape: true,
90+
},
91+
],
92+
93+
semi: ["error", "never"],
94+
},
95+
};
96+
97+
export default [
98+
{
99+
ignores: ["**/lib/*", "**/coverage/*"],
100+
},
101+
{
102+
rules: eslintJsPlugin.configs.recommended.rules,
103+
},
104+
{
105+
files: ["**/*.ts"],
106+
107+
languageOptions: {
108+
parser: tsParser,
109+
globals: {
110+
...globals.node,
111+
},
112+
},
113+
...commonConfig,
114+
},
115+
{
116+
files: ["**/tests/**/*.ts"],
117+
118+
languageOptions: {
119+
parser: tsParser,
120+
globals: {
121+
...globals.jest,
122+
...globals.node,
123+
},
124+
},
125+
...commonConfig,
126+
},
127+
];

0 commit comments

Comments
 (0)