-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from w3tecch/update
refactor: add eslint, change to travis and add some sample files
- Loading branch information
Showing
29 changed files
with
3,073 additions
and
2,931 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
extends: [ | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
'prettier/@typescript-eslint', | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
rules: { | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
}, | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ lib | |
es | ||
coverage | ||
.rpt2_cache | ||
test.db | ||
|
||
### node ### | ||
logs | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
language: node_js | ||
node_js: | ||
- 10 | ||
before_install: # if "install" is overridden | ||
# Repo for Yarn | ||
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg | ||
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | ||
- sudo apt-get update -qq | ||
- sudo apt-get install -y -qq yarn | ||
cache: | ||
yarn: true | ||
install: | ||
- yarn install | ||
- yarn add -P typeorm | ||
script: | ||
- yarn run lint | ||
- yarn run test | ||
- yarn run build | ||
- yarn run semantic-release || 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const path = require('path') | ||
|
||
module.exports = [ | ||
{ | ||
name: 'sample', | ||
type: 'sqlite', | ||
database: 'test.db', | ||
entities: ['sample/entities/**/*{.ts,.js}'], | ||
factories: ['sample/factories/**/*{.ts,.js}'], | ||
seeds: ['sample/seeds/**/*{.ts,.js}'], | ||
}, | ||
{ | ||
name: 'other', | ||
type: 'sqlite', | ||
database: 'test.db', | ||
entities: ['sample/entities/**/*{.ts,.js}'], | ||
factories: ['sample/factories/**/*{.ts,.js}'], | ||
seeds: ['sample/seeds/**/*{.ts,.js}'], | ||
} | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
{ | ||
"name": "typeorm-seeding", | ||
"version": "0.0.0-development", | ||
"version": "1.3.0", | ||
"description": "TypeORM seeding", | ||
"main": "dist/typeorm-seeding.js", | ||
"module": "dist/typeorm-seeding.es.js", | ||
"types": "dist/typeorm-seeding.d.ts", | ||
"bin": { | ||
"typeorm-seeding": "dist/cli.js" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"types": "dist/typeorm-seeding.d.ts", | ||
"scripts": { | ||
"prebuild": "rimraf dist", | ||
"format": "prettier --write \"src/**/*.ts\"", | ||
"lint": "tslint -p tsconfig.json -c tslint.json", | ||
"build": "npm run clean && rollup -c", | ||
"lint": "eslint \"src/**/*.ts\" --fix", | ||
"build": "tsc --project ./tsconfig.build.json", | ||
"watch": "rollup -cw", | ||
"clean": "rimraf dist", | ||
"test": "jest", | ||
"test:watch": "jest --watch", | ||
"test:cov": "jest --coverage", | ||
"semantic-release": "semantic-release" | ||
"semantic-release": "semantic-release", | ||
"schema:drop": "ts-node ./node_modules/typeorm/cli.js schema:drop -c sample", | ||
"schema:sync": "ts-node ./node_modules/typeorm/cli.js schema:sync -c sample", | ||
"schema:log": "ts-node ./node_modules/typeorm/cli.js schema:log -c sample", | ||
"seed:run": "ts-node ./src/cli.ts seed -c sample", | ||
"seed:config": "ts-node ./src/cli.ts config -c sample" | ||
}, | ||
"license": "MIT", | ||
"author": "w3tec.ch <[email protected]>", | ||
|
@@ -32,40 +36,38 @@ | |
} | ||
], | ||
"devDependencies": { | ||
"@types/faker": "^4.1.4", | ||
"@types/jest": "^24.0.13", | ||
"@types/yargs": "^13.0.0", | ||
"jest": "^24.8.0", | ||
"prettier": "^1.17.1", | ||
"rimraf": "^2.6.2", | ||
"rollup": "^0.66.2", | ||
"rollup-plugin-cli": "^0.1.5", | ||
"rollup-plugin-commonjs": "^9.1.8", | ||
"rollup-plugin-hashbang": "^2.2.2", | ||
"rollup-plugin-json": "^4.0.0", | ||
"rollup-plugin-node-builtins": "^2.1.2", | ||
"rollup-plugin-node-globals": "^1.4.0", | ||
"rollup-plugin-node-resolve": "^3.4.0", | ||
"rollup-plugin-typescript2": "^0.21.1", | ||
"semantic-release": "^15.13.27", | ||
"ts-jest": "^24.0.2", | ||
"tslint": "^5.11.0", | ||
"tslint-config-prettier": "^1.18.0", | ||
"tslint-plugin-prettier": "^2.0.1", | ||
"typescript": "^3.0.3" | ||
"@types/chalk": "^2.2.0", | ||
"@types/faker": "^4.1.11", | ||
"@types/glob": "7.1.1", | ||
"@types/jest": "^25.1.4", | ||
"@types/node": "13.9.8", | ||
"@types/yargs": "^15.0.4", | ||
"@typescript-eslint/eslint-plugin": "^2.26.0", | ||
"@typescript-eslint/parser": "^2.26.0", | ||
"eslint": "^6.8.0", | ||
"eslint-config-prettier": "^6.10.1", | ||
"eslint-plugin-import": "^2.20.2", | ||
"jest": "^25.2.6", | ||
"prettier": "^2.0.2", | ||
"rimraf": "^3.0.2", | ||
"semantic-release": "^17.0.4", | ||
"sqlite": "^3.0.6", | ||
"ts-jest": "^25.3.0", | ||
"typescript": "^3.8.3" | ||
}, | ||
"dependencies": { | ||
"@types/glob": "7.1.1", | ||
"@types/node": "12.0.4", | ||
"chalk": "2.4.2", | ||
"chalk": "^4.0.0", | ||
"faker": "4.1.0", | ||
"glob": "7.1.3", | ||
"ora": "3.4.0", | ||
"glob": "7.1.6", | ||
"ora": "4.0.3", | ||
"reflect-metadata": "0.1.13", | ||
"yargs": "13.2.4" | ||
"yargs": "15.3.1" | ||
}, | ||
"peerDependencies": { | ||
"typeorm": "^0.2.20" | ||
"typeorm": "^0.2.24" | ||
}, | ||
"resolutions": { | ||
"mem": ">=4.0.0" | ||
}, | ||
"jest": { | ||
"moduleFileExtensions": [ | ||
|
Oops, something went wrong.