Add project template

This commit is contained in:
Jerko Steiner 2019-03-13 12:53:24 +05:00
parent 6d926894db
commit 77d9bb9931
6 changed files with 86 additions and 0 deletions

16
template/jest.config.js Normal file
View File

@ -0,0 +1,16 @@
module.exports = {
roots: [
'<rootDir>/src'
],
transform: {
'^.+\\.tsx?$': 'ts-jest'
},
testRegex: '(/__tests__/.*|\\.(test|spec))\\.tsx?$',
moduleFileExtensions: [
'ts',
'tsx',
'js',
'jsx'
],
setupFiles: ['<rootDir>/jest.setup.js']
}

4
template/jest.setup.js Normal file
View File

@ -0,0 +1,4 @@
if (!process.env.LOG) {
process.env.LOG = 'sql:warn'
}
process.chdir(__dirname)

14
template/package.json Normal file
View File

@ -0,0 +1,14 @@
{
"name": "@rondo/package",
"private": true,
"scripts": {
"test": "jest",
"lint": "tslint --project .",
"compile": "tsc",
"clean": "rm -rf lib/"
},
"dependencies": {
},
"main": "lib/index.js",
"types": "lib/index.d.ts"
}

0
template/src/index.ts Normal file
View File

9
template/tsconfig.json Normal file
View File

@ -0,0 +1,9 @@
{
"extends": "../tsconfig.common.json",
"compilerOptions": {
"outDir": "lib",
"rootDir": "src"
},
"references": [
]
}

43
template/tslint.json Normal file
View File

@ -0,0 +1,43 @@
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"jsRules": {},
"rules": {
"quotemark": [true, "single", "jsx-single"],
"member-access": false,
"no-bitwise": false,
"semicolon": [true, "never"],
"object-literal-sort-keys": false,
"ordered-imports": false,
"max-line-length": [true, 80],
"arrow-parens": false,
"variable-name": [
true,
"ban-keywords",
"check-format",
"allow-leading-underscore",
"allow-pascal-case"
],
"member-ordering": false,
"max-classes-per-file": false,
"no-empty-interface": false,
"trailing-comma": [true, {
"multiline": {
"objects": "always",
"arrays": "always",
"functions": "always",
"typeLiterals": "ignore"
},
"singleline": "never",
"esSpecCompliant": true
}]
},
"linterOptions": {
"exclude": [
"src/migrations/*.ts"
]
},
"rulesDirectory": []
}