Skip to content

Commit

Permalink
Patients are automatically triaged without any personnel on the map (#…
Browse files Browse the repository at this point in the history
…624)

* Fix incorrect import of isEmpty

This caused "Patients are automatically triaged without any personnel on the map" #623

* Disallow isEmpty imports from class-validator via eslint
  • Loading branch information
Dassderdie authored Jan 26, 2023
1 parent 952303e commit bd560a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .eslint/typescript.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ module.exports = {
name: 'lodash',
message: 'Please use lodash-es instead.',
},
{
name: 'class-validator',
importNames: ['isEmpty'],
message:
'You probably want to import this from lodash-es instead.',
},
],
patterns: [
{
Expand Down
2 changes: 1 addition & 1 deletion shared/src/models/patient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
IsBoolean,
IsString,
MaxLength,
isEmpty,
} from 'class-validator';
import { isEmpty } from 'lodash-es';
import { uuidValidationOptions, UUID, uuid, UUIDSet } from '../utils';
import { IsLiteralUnion, IsIdMap, IsUUIDSet } from '../utils/validators';
import { IsMetaPosition } from '../utils/validators/is-metaposition';
Expand Down

0 comments on commit bd560a7

Please sign in to comment.