Skip to content

Commit e8b5fb3

Browse files
committed
Init
0 parents  commit e8b5fb3

10 files changed

+199
-0
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/*.js
2+
node_modules/

.eslintrc.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
env:
2+
browser: false
3+
node: true
4+
es6: true
5+
jest: true
6+
7+
parser: "@typescript-eslint/parser"
8+
9+
plugins:
10+
- "@typescript-eslint/eslint-plugin"
11+
- "unused-imports"
12+
- "security"
13+
14+
extends:
15+
- "airbnb-typescript/base"
16+
- "plugin:security/recommended"
17+
- "plugin:@typescript-eslint/eslint-recommended"
18+
- "plugin:@typescript-eslint/recommended"
19+
- "plugin:prettier/recommended"
20+
- "prettier/@typescript-eslint"
21+
22+
parserOptions:
23+
sourceType: module
24+
ecmaVersion: 2018
25+
project: tsconfig.json
26+
27+
rules:
28+
"@typescript-eslint/interface-name-prefix": off
29+
semi:
30+
- error
31+
- always
32+
quotes:
33+
- error
34+
- single
35+
"@typescript-eslint/explicit-function-return-type": off
36+
"@typescript-eslint/no-explicit-any": off
37+
"@typescript-eslint/member-delimiter-style": error
38+
"@typescript-eslint/no-unused-vars": off
39+
unused-imports/no-unused-imports-ts: error
40+
unused-imports/no-unused-vars-ts:
41+
- error
42+
- vars: all
43+
varsIgnorePattern: "^_"
44+
args: after-used
45+
argsIgnorePattern: "^_"
46+
47+
object-curly-newline:
48+
- error
49+
- ObjectExpression:
50+
minProperties: 6
51+
multiline: true
52+
consistent: true
53+
node/no-unsupported-features/es-syntax: off
54+
no-await-in-loop: 0
55+
import/prefer-default-export: off
56+
max-len:
57+
- error
58+
- code: 120
59+
ignoreStrings: true
60+
eol-last: error
61+
class-methods-use-this: 0
62+
no-underscore-dangle:
63+
- error
64+
- allowAfterSuper: true
65+
allowAfterThis: true
66+
no-plusplus:
67+
- error
68+
- allowForLoopAfterthoughts: true
69+
security/detect-object-injection: off
70+
71+
settings:
72+
import/resolver:
73+
node:
74+
extensions:
75+
- ".ts"
76+
- ".tsx"

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor files directory
2+
.DS_Store
3+
.idea
4+
.vscode
5+
6+
### Node.js
7+
# Logs
8+
logs
9+
*.log
10+
npm-debug.log*
11+
package-lock.json
12+
node_modules
13+
14+
.env
15+
coverage
16+

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.css

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "all",
4+
"singleQuote": true,
5+
"printWidth": 100,
6+
"tabWidth": 2,
7+
"bracketSpacing": true,
8+
"arrowParens": "always",
9+
"parser": "typescript"
10+
}

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Typescript starter kit
2+
3+
## Quick start
4+
5+
1. Clone this repo `git clone https://github.com/p0vidl0/typescript-starter.git`
6+
1. Install packages `npm install`
7+
1. Run code `npm run start:dev`
8+
9+
## License
10+
This code is upder MIT license.

package.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"name": "typescript-starter",
3+
"version": "0.1.0",
4+
"description": "Typescript starter kit ",
5+
"main": "src/index.ts",
6+
"scripts": {
7+
"build": "tsc",
8+
"start": "node -r dotenv/config dist/index.ts",
9+
"start:dev": "node --inspect -r ts-node/register -r dotenv/config src/index.ts",
10+
"test": "jest",
11+
"test:watch": "jest --watch"
12+
},
13+
"repository": {
14+
"type": "git",
15+
"url": "git+https://github.com/p0vidl0/typescript-starter.git"
16+
},
17+
"author": "Alex Kalashnikov",
18+
"license": "MIT",
19+
"bugs": {
20+
"url": "https://github.com/p0vidl0/typescript-starter/issues"
21+
},
22+
"homepage": "https://github.com/p0vidl0/typescript-starter#readme",
23+
"devDependencies": {
24+
"@types/node": "^14.14.6",
25+
"@typescript-eslint/eslint-plugin": "^4.6.1",
26+
"@typescript-eslint/parser": "^4.6.1",
27+
"eslint": "^7.13.0",
28+
"eslint-config-airbnb-typescript": "^12.0.0",
29+
"eslint-config-prettier": "^6.15.0",
30+
"eslint-plugin-import": "^2.22.1",
31+
"eslint-plugin-prettier": "^3.1.4",
32+
"eslint-plugin-security": "^1.4.0",
33+
"eslint-plugin-unused-imports": "^1.0.0",
34+
"prettier": "^2.1.2",
35+
"ts-node": "^9.0.0",
36+
"typescript": "^4.0.5"
37+
},
38+
"jest": {
39+
"moduleFileExtensions": [
40+
"js",
41+
"json",
42+
"ts"
43+
],
44+
"rootDir": "src",
45+
"testRegex": ".spec.ts$",
46+
"transform": {
47+
"^.+\\.(t|j)s$": "ts-jest"
48+
},
49+
"coverageDirectory": "../coverage",
50+
"testEnvironment": "node",
51+
"testTimeout": 30000,
52+
"maxConcurrency": 1,
53+
"maxWorkers": 1,
54+
"collectCoverage": true,
55+
"collectCoverageFrom": [
56+
"**/*.{js,jsx,ts}",
57+
"!**/node_modules/**",
58+
"!**/vendor/**"
59+
]
60+
},
61+
"dependencies": {
62+
"dotenv": "^8.2.0"
63+
}
64+
}

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('It\'s alive');

tsconfig.build.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"exclude": ["node_modules", "dist", "test", "**/*spec.ts"]
4+
}

tsconfig.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"declaration": true,
5+
"removeComments": true,
6+
"emitDecoratorMetadata": true,
7+
"experimentalDecorators": true,
8+
"allowSyntheticDefaultImports": true,
9+
"target": "es2017",
10+
"sourceMap": true,
11+
"outDir": "./dist",
12+
"baseUrl": "./",
13+
"incremental": true
14+
}
15+
}

0 commit comments

Comments
 (0)