Skip to content

Commit

Permalink
Bump prettier version (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgebodega committed Oct 16, 2021
1 parent 3972ee6 commit d3eb33e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 30 deletions.
9 changes: 2 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ module.exports = {
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
],
extends: ['plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
Expand All @@ -24,4 +19,4 @@ module.exports = {
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
};
}
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"semi": false,
"trailingComma": "all",
"tabWidth": 2,
"jsxBracketSameLine": true,
"bracketSameLine": true,
"printWidth": 120
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"@typescript-eslint/parser": "^2.27.0",
"bcryptjs": "^2.4.3",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.20.2",
"jest": "^25.3.0",
"prettier": "^2.0.4",
"prettier": "^2.4.1",
"rimraf": "^3.0.2",
"semantic-release": "^17.0.4",
"sqlite": "^4.0.6",
Expand Down
12 changes: 7 additions & 5 deletions src/typeorm-seeding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ export const define = <Entity, Context>(entity: ObjectType<Entity>, factoryFn: F
})
}

export const factory: Factory = <Entity, Context>(entity: ObjectType<Entity>) => (context?: Context) => {
const name = getNameOfEntity(entity)
const entityFactoryObject = (global as any).seeder.entityFactories.get(name)
return new EntityFactory<Entity, Context>(name, entity, entityFactoryObject.factory, context)
}
export const factory: Factory =
<Entity, Context>(entity: ObjectType<Entity>) =>
(context?: Context) => {
const name = getNameOfEntity(entity)
const entityFactoryObject = (global as any).seeder.entityFactories.get(name)
return new EntityFactory<Entity, Context>(name, entity, entityFactoryObject.factory, context)
}

export const runSeeder = async (clazz: SeederConstructor): Promise<any> => {
const seeder: Seeder = new clazz()
Expand Down
23 changes: 8 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2369,12 +2369,10 @@ escodegen@^1.11.1:
optionalDependencies:
source-map "~0.6.1"

eslint-config-prettier@^6.10.1:
version "6.10.1"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz#129ef9ec575d5ddc0e269667bf09defcd898642a"
integrity sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ==
dependencies:
get-stdin "^6.0.0"
eslint-config-prettier@^8.3.0:
version "8.3.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a"
integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==

eslint-import-resolver-node@^0.3.2:
version "0.3.3"
Expand Down Expand Up @@ -2967,11 +2965,6 @@ get-caller-file@^2.0.1:
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==

get-stdin@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==

get-stream@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
Expand Down Expand Up @@ -5917,10 +5910,10 @@ prepend-http@^1.0.1:
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=

prettier@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.4.tgz#2d1bae173e355996ee355ec9830a7a1ee05457ef"
integrity sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w==
prettier@^2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c"
integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==

pretty-format@^25.2.1, pretty-format@^25.3.0:
version "25.3.0"
Expand Down

0 comments on commit d3eb33e

Please sign in to comment.