Created
March 21, 2021 20:16
-
-
Save metachris/a408323b35b871a161922b4ff7251178 to your computer and use it in GitHub Desktop.
TypeScript Project Bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 2 | |
indent_style = space | |
insert_final_newline = true | |
trim_trailing_whitespace = true | |
[*.md] | |
max_line_length = 0 | |
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/node_modules/ | |
/build/ | |
/lib/ | |
/dist/ | |
.idea/* | |
coverage | |
*.log | |
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Needed for ts-jest | |
module.exports = { | |
roots: ['<rootDir>/src'], | |
testMatch: [ | |
"**/__tests__/**/*.+(ts|tsx|js)", | |
"**/?(*.)+(spec|test).+(ts|tsx|js)" | |
], | |
transform: { | |
"^.+\\.(ts|tsx)$": "ts-jest" | |
}, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"clean": "rm -rf dist build lib", | |
"lint": "tslint -c tslint.json 'src/**/*.ts' 'test/**/*.ts'", | |
"build": "tsc -p tsconfig.json", | |
"ts-node": "ts-node" | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es6", | |
"module": "commonjs", | |
"moduleResolution": "node", | |
"declaration": true, | |
"strict": true, | |
"noImplicitAny": false /* Raise error on expressions and declarations with an implied 'any' type. */, | |
"strictNullChecks": true /* Enable strict null checks. */, | |
"strictFunctionTypes": true /* Enable strict checking of function types. */, | |
"strictPropertyInitialization": false /* Enable strict checking of property initialization in classes. Must be false for TypeORM.*/, | |
"noUnusedLocals": false /* Report errors on unused locals. */, | |
"noUnusedParameters": true /* Report errors on unused parameters. */, | |
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */, | |
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, | |
"importHelpers": true, | |
"skipLibCheck": true, | |
"esModuleInterop": true, | |
"allowSyntheticDefaultImports": true, | |
"experimentalDecorators": true, | |
"sourceMap": true, | |
"outDir": "./lib/", | |
"types": [ | |
"node", | |
], | |
"lib": [ | |
"ES6", | |
"DOM", | |
"DOM.Iterable", | |
"ScriptHost" | |
] | |
}, | |
"include": [ | |
"src/**/*.ts" | |
], | |
"exclude": [ | |
"node_modules", | |
"**/*.test.ts" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"defaultSeverity": "error", | |
"extends": [ | |
"tslint:latest" | |
], | |
"jsRules": {}, | |
"rules": { | |
"no-console": true, | |
"object-literal-sort-keys": false, | |
"no-implicit-dependencies": false, | |
"no-submodule-imports": false | |
}, | |
"rulesDirectory": [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment