Skip to content

Instantly share code, notes, and snippets.

@metachris
Created March 21, 2021 20:16
Show Gist options
  • Save metachris/a408323b35b871a161922b4ff7251178 to your computer and use it in GitHub Desktop.
Save metachris/a408323b35b871a161922b4ff7251178 to your computer and use it in GitHub Desktop.
TypeScript Project Bootstrap
# 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
/node_modules/
/build/
/lib/
/dist/
.idea/*
coverage
*.log
package-lock.json
// Needed for ts-jest
module.exports = {
roots: ['<rootDir>/src'],
testMatch: [
"**/__tests__/**/*.+(ts|tsx|js)",
"**/?(*.)+(spec|test).+(ts|tsx|js)"
],
transform: {
"^.+\\.(ts|tsx)$": "ts-jest"
},
}
"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"
}
{
"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"
]
}
{
"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