Skip to content

Commit 3b819df

Browse files
committed
TypeScript Template (Base) [1.0.0]
0 parents  commit 3b819df

19 files changed

Lines changed: 5028 additions & 0 deletions

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = tab
7+
indent_size = 4
8+
max_line_length = 80
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
max_line_length = off
14+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.eslintrc.js
2+
.vscode/
3+
dist/
4+
doc/
5+
doc*/
6+
node_modules/
7+
8+
*.md

.eslintrc.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
module.exports = {
2+
root: true,
3+
parser: "@typescript-eslint/parser",
4+
plugins: [
5+
"@typescript-eslint"
6+
],
7+
extends: [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/recommended"
10+
],
11+
parserOptions: {
12+
project: "./tsconfig.json",
13+
tsconfigRootDir: __dirname,
14+
},
15+
rules: {
16+
"brace-style": 0,
17+
"curly": 2,
18+
"indent": [2, "tab"],
19+
"max-len": [1, 80],
20+
"no-case-declarations": 1,
21+
"no-console": 1,
22+
"no-debugger": 1,
23+
"no-empty": 1,
24+
"no-eval": 2,
25+
"no-trailing-spaces": 1,
26+
"no-irregular-whitespace": 1,
27+
"no-prototype-builtins": 1,
28+
"no-use-before-define": 1,
29+
"no-useless-escape": 1,
30+
"no-var": 2,
31+
"prefer-const": 1,
32+
"quotes": [1, "single"],
33+
"radix": 1,
34+
"semi": [1, "always"],
35+
"@typescript-eslint/ban-types": 1,
36+
"@typescript-eslint/brace-style": [2, "stroustrup"],
37+
"@typescript-eslint/no-empty-function": 0,
38+
"@typescript-eslint/no-empty-interface": 1,
39+
"@typescript-eslint/no-floating-promises": 2,
40+
"@typescript-eslint/no-misused-new": 2,
41+
"@typescript-eslint/no-namespace": 1,
42+
"@typescript-eslint/promise-function-async": 1,
43+
"@typescript-eslint/no-var-requires": 2,
44+
},
45+
};

.eslintrc.prod.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"root": true,
3+
"extends": ["./.eslintrc.js"],
4+
"rules": {
5+
"no-console": 2,
6+
"no-debugger": 2
7+
}
8+
}

.gitignore

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Dependency directories
24+
node_modules/
25+
jspm_packages/
26+
27+
# Optional npm cache directory
28+
.npm
29+
30+
# Optional eslint cache
31+
.eslintcache
32+
33+
# Optional REPL history
34+
.node_repl_history
35+
36+
# Output of 'npm pack'
37+
*.tgz
38+
39+
# Yarn Integrity file
40+
.yarn-integrity
41+
42+
# dotenv environment variables file
43+
.env
44+
45+
# Build directory
46+
dist/
47+
48+
# Environment Variables
49+
.env
50+
51+
# Docs build
52+
docs/

.prettierignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.eslintrc.js
2+
.vscode/
3+
dist/
4+
doc/
5+
doc*/
6+
node_modules/
7+
8+
*.md
9+
10+
*.tar
11+
*.tar.*
12+
*.tgz
13+
*.zip

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 4,
4+
"singleQuote": true,
5+
"trailingComma": "es5",
6+
"bracketSpacing": true,
7+
"semi": true,
8+
"useTabs": true,
9+
"singleAttributePerLine": true
10+
}

.vscode/launch.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "ts-node (App)",
9+
"type": "node",
10+
"request": "launch",
11+
"args": [
12+
"src/index.ts"
13+
],
14+
"runtimeArgs": [
15+
"-r",
16+
"ts-node/register"
17+
],
18+
"cwd": "${workspaceRoot}",
19+
"internalConsoleOptions": "openOnSessionStart"
20+
},
21+
{
22+
"name": "ts-node (Current File)",
23+
"type": "node",
24+
"request": "launch",
25+
"args": [
26+
"${relativeFile}"
27+
],
28+
"runtimeArgs": [
29+
"-r",
30+
"ts-node/register"
31+
],
32+
"cwd": "${workspaceRoot}",
33+
"internalConsoleOptions": "openOnSessionStart"
34+
},
35+
{
36+
"type": "node",
37+
"request": "launch",
38+
"name": "Launch Program",
39+
"program": "${workspaceFolder}/src/index.ts",
40+
"preLaunchTask": "npm: build",
41+
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
42+
},
43+
]
44+
}

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
3+
"editor.formatOnPaste": false, // required
4+
"editor.formatOnType": false, // required
5+
"editor.formatOnSave": true, // optional
6+
"editor.formatOnSaveMode": "file", // required to format on save
7+
"[json]": {
8+
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
9+
}
10+
}

.vscode/tasks.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "build",
7+
"group": {
8+
"kind": "build",
9+
"isDefault": true
10+
},
11+
"problemMatcher": [],
12+
"label": "npm: build"
13+
}
14+
]
15+
}

0 commit comments

Comments
 (0)