Skip to content

Commit 524ca7a

Browse files
committed
initial setup
1 parent 90b8e5a commit 524ca7a

9 files changed

+3666
-0
lines changed

.eslintrc.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"env": {
5+
"node": true
6+
},
7+
"ignorePatterns": ["**/*.ts"],
8+
"plugins": ["@typescript-eslint"],
9+
"extends": [],
10+
"rules": {
11+
"@typescript-eslint/explicit-module-boundary-types": "off"
12+
},
13+
"overrides": []
14+
}

.prettierignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
tmp
2+
/test
3+
/build
4+
node_modules
5+
/package.json
6+
/.vscode
7+
/.idea
8+
/.github
9+
/coverage
10+
/.yarn
11+
/.verdaccio/build/local-registry
12+
/dist

.prettierrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"endOfLine": "lf"
4+
}

jest.config.ts

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* For a detailed explanation regarding each configuration property and type check, visit:
3+
* https://jestjs.io/docs/configuration
4+
*/
5+
6+
export default {
7+
testMatch: ["**/+(*.)+(spec|test).+(ts|js)?(x)"],
8+
transform: {
9+
"^.+\\.(ts|js|html)$": "ts-jest",
10+
},
11+
clearMocks: true,
12+
collectCoverage: true,
13+
coverageDirectory: "coverage",
14+
coveragePathIgnorePatterns: ["/node_modules/"],
15+
coverageProvider: "v8",
16+
coverageReporters: ["json", "text", "lcov", "clover", "html"],
17+
maxWorkers: "80%",
18+
moduleDirectories: ["node_modules"],
19+
moduleFileExtensions: ["js", "ts", "json"],
20+
preset: "ts-jest",
21+
globals: { "ts-jest": { tsconfig: "<rootDir>/tsconfig.spec.json" } },
22+
displayName: "PROJECT",
23+
testEnvironment: "node",
24+
roots: ["<rootDir>"],
25+
};

jest.setup.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
jest.setTimeout(3000);

package.json

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "lib-starter",
3+
"version": "1.0.0",
4+
"description": "NodeJS library develop quick start: TypeScript + CI/CD + Release Workflow + Linter + Changelog + ...",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "jest"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/linbudu599/node-lib-starter.git"
12+
},
13+
"keywords": [],
14+
"author": "linbudu599",
15+
"license": "MIT",
16+
"bugs": {
17+
"url": "https://github.com/linbudu599/node-lib-starter/issues"
18+
},
19+
"homepage": "https://github.com/linbudu599/node-lib-starter#readme",
20+
"devDependencies": {
21+
"@types/eslint": "^7.28.0",
22+
"@types/jest": "^27.0.1",
23+
"@types/node": "^16.7.1",
24+
"@typescript-eslint/eslint-plugin": "^4.29.2",
25+
"@typescript-eslint/experimental-utils": "^4.29.2",
26+
"@typescript-eslint/parser": "^4.29.2",
27+
"chalk": "^4.1.2",
28+
"consola": "^2.15.3",
29+
"eslint": "^7.32.0",
30+
"eslint-config-prettier": "^8.3.0",
31+
"jest": "^27.0.6",
32+
"prettier": "^2.3.2",
33+
"ts-jest": "^27.0.5",
34+
"ts-node": "^10.2.1",
35+
"ts-node-dev": "^1.1.8",
36+
"typescript": "^4.3.5"
37+
},
38+
"dependencies": {
39+
"tslib": "^2.3.1"
40+
}
41+
}

0 commit comments

Comments
 (0)