Add project template
This commit is contained in:
parent
6d926894db
commit
77d9bb9931
16
template/jest.config.js
Normal file
16
template/jest.config.js
Normal 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
4
template/jest.setup.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
if (!process.env.LOG) {
|
||||||
|
process.env.LOG = 'sql:warn'
|
||||||
|
}
|
||||||
|
process.chdir(__dirname)
|
||||||
14
template/package.json
Normal file
14
template/package.json
Normal 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
0
template/src/index.ts
Normal file
9
template/tsconfig.json
Normal file
9
template/tsconfig.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"extends": "../tsconfig.common.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "lib",
|
||||||
|
"rootDir": "src"
|
||||||
|
},
|
||||||
|
"references": [
|
||||||
|
]
|
||||||
|
}
|
||||||
43
template/tslint.json
Normal file
43
template/tslint.json
Normal 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": []
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user