* refactor: product service * fix: type errors in consumers * fix: use Status enum instead of ProductStatus * fix: remove ProductStatus * fix: rename ProductStatus * fix: product model nullable fields * fix: explicit typecasting in listVariants * fix: use atomicPhase in public methods * fix: use transactionManager in protected methods * fix: remove disable eslint rule comment * fix: retrieveVariants relations * fix: retrieveVariants * fix: FilterableProductProps validation * fix: nullable thumbnail * fix: tests by making model column types more explicit * move upsert method to repo layer * fix: unit tests * fix: integration tests * fix: product tags query + integration test * fix: rename FindWithRelationsOptions to FindWithoutRelationsOptions * fix (productRepository): use string[] for relations * refactor: extract price relation filtering logic into util * fix: failing unit test * rename DTO suffix to Input suffix * fix: missing awaits * fix: check for images and tags length * fix: remove unneeded function * extract types used in product service to types folder * fix: use text instead of varchar * remove: reorderOptions from ProductService * fix: product model * fix: add private retrieve method * fix: conflicts * fix: failing unit test * fix: integration test * fix: remove ProductSelector type * fix: remove validateId * fix: use spread operator * fix: repo method typings * fix: remove comment
79 lines
1.9 KiB
JavaScript
79 lines
1.9 KiB
JavaScript
module.exports = {
|
|
parser: `@babel/eslint-parser`,
|
|
parserOptions: {
|
|
requireConfigFile: false,
|
|
ecmaFeatures: {
|
|
experimentalDecorators: true,
|
|
},
|
|
},
|
|
plugins: [`eslint-plugin-prettier`],
|
|
extends: [`eslint:recommended`, `google`, `eslint-config-prettier`],
|
|
rules: {
|
|
"prettier/prettier": `error`,
|
|
curly: [2, `all`],
|
|
"new-cap": `off`,
|
|
"require-jsdoc": `off`,
|
|
semi: `off`,
|
|
"no-unused-expressions": `off`,
|
|
camelcase: `off`,
|
|
"no-invalid-this": `off`,
|
|
},
|
|
env: {
|
|
es6: true,
|
|
node: true,
|
|
jest: true,
|
|
},
|
|
ignorePatterns: [`**/models`, `**/repositories`],
|
|
overrides: [
|
|
{
|
|
files: [`*.ts`],
|
|
parser: `@typescript-eslint/parser`,
|
|
plugins: [`@typescript-eslint/eslint-plugin`],
|
|
extends: [`plugin:@typescript-eslint/recommended`, "prettier"],
|
|
rules: {
|
|
"valid-jsdoc": [
|
|
"error",
|
|
{
|
|
requireParamType: false,
|
|
requireReturnType: false,
|
|
prefer: {
|
|
arg: "param",
|
|
argument: "param",
|
|
class: "constructor",
|
|
return: "return",
|
|
virtual: "abstract",
|
|
},
|
|
},
|
|
],
|
|
"@typescript-eslint/explicit-function-return-type": ["error"],
|
|
"@typescript-eslint/no-non-null-assertion": ["off"],
|
|
},
|
|
},
|
|
{
|
|
files: [
|
|
"**/api/**/*.js",
|
|
"**/api/**/*.ts",
|
|
"**/medusa-js/**/resources/**/*.ts",
|
|
],
|
|
rules: {
|
|
"valid-jsdoc": ["off"],
|
|
},
|
|
},
|
|
{
|
|
// Medusa JS client
|
|
files: ["**/medusa-js/**/resources/**/*.ts"],
|
|
rules: {
|
|
"valid-jsdoc": ["off"],
|
|
},
|
|
},
|
|
{
|
|
files: ["**/api/**/*.ts"],
|
|
rules: {
|
|
"valid-jsdoc": ["off"],
|
|
"@typescript-eslint/explicit-function-return-type": ["off"],
|
|
"@typescript-eslint/no-var-requires": ["off"],
|
|
},
|
|
},
|
|
],
|
|
}
|