Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jaakkolehtonen committed Jun 27, 2023
0 parents commit f3ef6d8
Show file tree
Hide file tree
Showing 72 changed files with 19,926 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
quote_type = single
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.js
*.cjs
*.d.ts
node_modules
dist
coverage
cdk.out
140 changes: 140 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
],
plugins: [
'@typescript-eslint',
'deprecation',
'eslint-comments',
'eslint-plugin',
'import',
'jest',
'simple-import-sort',
'unicorn',
'prettier',
],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
tsconfigRootDir: __dirname,
project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'],
},
rules: {
semi: ['error', 'always'],
quotes: ['error', 'single'],
'deprecation/deprecation': 'error',
'prettier/prettier': 'error',
'@typescript-eslint/explicit-function-return-type': 1,
'@typescript-eslint/no-explicit-any': 1,
'@typescript-eslint/type-annotation-spacing': 1,
'@typescript-eslint/no-inferrable-types': [
'warn',
{
ignoreParameters: true,
},
],
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variable',
format: ['camelCase'],
},
{
selector: 'function',
format: ['camelCase'],
},
{
selector: 'class',
format: ['PascalCase'],
},
{
selector: 'interface',
format: ['PascalCase'],
},
{
selector: 'typeAlias',
format: ['PascalCase'],
},
{
selector: 'enum',
format: ['PascalCase'],
},
{
selector: 'variable',
types: ['boolean'],
format: ['camelCase', 'PascalCase'],
prefix: ['is', 'has', 'should'],
},
{
selector: 'variable',
modifiers: ['const'],
format: ['camelCase', 'UPPER_CASE'],
},
{
selector: 'parameter',
format: ['camelCase'],
leadingUnderscore: 'allow',
},
{
selector: 'memberLike',
modifiers: ['private'],
format: ['camelCase'],
leadingUnderscore: 'require',
},
{
selector: 'typeLike',
format: ['PascalCase'],
},
{
selector: 'enumMember',
format: ['PascalCase', 'camelCase'],
},
{
selector: 'property',
format: ['camelCase', 'snake_case', 'PascalCase', 'UPPER_CASE'],
},
{
selector: 'method',
format: ['camelCase'],
},
{
selector: 'typeParameter',
format: ['PascalCase'],
prefix: ['T'],
},
],
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-absolute-path': 'error',
'import/no-amd': 'error',
'import/no-default-export': 'error',
'import/no-duplicates': 'error',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
peerDependencies: true,
optionalDependencies: false,
},
],
'import/no-mutable-exports': 'error',
'import/no-named-default': 'error',
'import/no-named-export': 'off',
'import/no-self-import': 'error',
'import/prefer-default-export': 'off',
'simple-import-sort/imports': 'error',
},
settings: {
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
};
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
*.js
!jest.config.js
!.eslintrc.js
*.d.ts
node_modules

# CDK asset staging directory
.cdk.staging
cdk.out

.env*
!.env.example

dist
dump
*.sql
*.zip
.aws-sam
asset.*
coverage
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.ts
!*.d.ts

# CDK asset staging directory
.cdk.staging
cdk.out
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/dist
**/coverage
**/.vscode
**/cdk.out
15 changes: 15 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"endOfLine": "lf",
"bracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 140,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"semi": true,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "all",
"useTabs": false
}
12 changes: 12 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"recommendations": [
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker",
"tlent.jest-snapshot-language-support",
"mrmlnc.vscode-json5"
],
"unwantedRecommendations": ["hookyqr.beautify", "dbaeumer.jshint"]
}
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Client",
"url": "http://localhost:5173",
"webRoot": "${workspaceFolder}/packages/client/src"
},
{
"type": "node",
"request": "attach",
"name": "Attach by Process ID",
"processId": "${command:PickProcess}",
"restart": true
}
]
}
24 changes: 24 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"editor.rulers": [140],
"eslint.validate": [
"typescript",
"typescriptreact"
],
"files.trimTrailingWhitespace": true,
"typescript.tsdk": "node_modules/typescript/lib",
"javascript.preferences.importModuleSpecifier": "project-relative",
"typescript.preferences.importModuleSpecifier": "project-relative",
"javascript.preferences.quoteStyle": "single",
"typescript.preferences.quoteStyle": "single",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": false,
"[javascript]": {
"editor.formatOnSave": true
},
"[typescript]": {
"editor.formatOnSave": true
},
"[vue]": {
"editor.formatOnSave": true
}
}
14 changes: 14 additions & 0 deletions README-CDK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Welcome to your CDK TypeScript project

This is a blank project for CDK development with TypeScript.

The `cdk.json` file tells the CDK Toolkit how to execute your app.

## Useful commands

* `npm run build` compile typescript to js
* `npm run watch` watch for changes and compile
* `npm run test` perform the jest unit tests
* `cdk deploy` deploy this stack to your default AWS account/region
* `cdk diff` compare deployed stack with current state
* `cdk synth` emits the synthesized CloudFormation template
Loading

0 comments on commit f3ef6d8

Please sign in to comment.