Skip to content

Commit

Permalink
chore(datastore): fix new lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
HuiSF committed Oct 5, 2024
1 parent 6a58ad7 commit 9ab49f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/datastore/src/datastore/datastore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ const initSchema = (userSchema: Schema) => {
const result = new Map<string, string[]>();

let count = 1000;
// eslint-disable-next-line no-constant-binary-expression
while (true && count > 0) {
if (modelAssociations.size === 0) {
break;
Expand Down
6 changes: 3 additions & 3 deletions packages/datastore/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ export type MetadataReadOnlyFields<
// This type makes optional some identifiers in the constructor init object (e.g. OptionallyManagedIdentifier)
export type ModelInitBase<
T extends PersistentModel,
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
M extends PersistentModelMetaData<T> = {},
> = Omit<
T,
Expand All @@ -661,7 +661,7 @@ export type ModelInitBase<

export type ModelInit<
T extends PersistentModel,
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
M extends PersistentModelMetaData<T> = {},
> = {
[P in keyof OmitOptionalRelatives<ModelInitBase<T, M>>]: SettableFieldType<
Expand All @@ -687,7 +687,7 @@ type DeepWritable<T> = {

export type MutableModel<
T extends PersistentModel,
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
M extends PersistentModelMetaData<T> = {},
// This provides Intellisense with ALL of the properties, regardless of read-only
// but will throw a linting error if trying to overwrite a read-only property
Expand Down

0 comments on commit 9ab49f3

Please sign in to comment.