Skip to content

Commit

Permalink
fix(workspace): formatting typing files using ESLint & Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Qsppl committed Apr 8, 2024
1 parent 01b79b4 commit 915f792
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 198 deletions.
21 changes: 7 additions & 14 deletions test/types/store/model-definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ const ModelStore: Model<IModel> = {
/// @ts-expect-error
looseCalculatedBooleanList: () => [false, { loose: true }],
calculatedOptionalBooleanList: () => [false],
undefinedCalculatedOptionalBooleanList: () =>
condition ? undefined : [false],
undefinedCalculatedOptionalBooleanList: () => (condition ? undefined : [false]),

// number

Expand Down Expand Up @@ -304,8 +303,7 @@ const ModelStore: Model<IModel> = {
/// @ts-expect-error
undefinedCalculatedObject: () => undefined,
calculatedOptionalObject: () => ({ prop: "", length: 0 }),
undefinedCalculatedOptionalObject: () =>
condition ? undefined : { prop: "", length: 0 },
undefinedCalculatedOptionalObject: () => (condition ? undefined : { prop: "", length: 0 }),

// Object List

Expand All @@ -322,8 +320,7 @@ const ModelStore: Model<IModel> = {
/// @ts-expect-error
looseCalculatedObjectList: () => [{ prop: "", length: 0 }, { loose: true }],
calculatedOptionalObjectList: () => [{ prop: "", length: 0 }],
undefinedCalculatedOptionalObjectList: () =>
condition ? undefined : [{ prop: "", length: 0 }],
undefinedCalculatedOptionalObjectList: () => (condition ? undefined : [{ prop: "", length: 0 }]),

// Enumerable Model

Expand All @@ -336,8 +333,7 @@ const ModelStore: Model<IModel> = {
/// @ts-expect-error
undefinedCalculatedEnumerableModel: () => undefined,
calculatedOptionalEnumerableModel: () => EnumerableStore,
undefinedCalculatedOptionalEnumerableModel: () =>
condition ? undefined : EnumerableStore,
undefinedCalculatedOptionalEnumerableModel: () => (condition ? undefined : EnumerableStore),

// Enumerable Model List

Expand All @@ -352,8 +348,7 @@ const ModelStore: Model<IModel> = {
undefinedCalculatedEnumerableModelList: () => undefined,
looseCalculatedEnumerableModelList: () => [EnumerableStore, { loose: true }],
calculatedOptionalEnumerableModelList: () => [EnumerableStore],
undefinedCalculatedOptionalEnumerableModelList: () =>
condition ? undefined : [EnumerableStore],
undefinedCalculatedOptionalEnumerableModelList: () => (condition ? undefined : [EnumerableStore]),

// Singleton Model

Expand All @@ -366,8 +361,7 @@ const ModelStore: Model<IModel> = {
/// @ts-expect-error
undefinedCalculatedSingletonModel: () => undefined,
calculatedOptionalSingletonModel: () => SingletonStore,
undefinedCalculatedOptionalSingletonModel: () =>
condition ? undefined : SingletonStore,
undefinedCalculatedOptionalSingletonModel: () => (condition ? undefined : SingletonStore),

// Singleton Model List

Expand All @@ -389,8 +383,7 @@ const ModelStore: Model<IModel> = {
/// @ts-expect-error
calculatedOptionalSingletonModelList: () => [SingletonStore],
/// @ts-expect-error
undefinedCalculatedOptionalSingletonModelList: () =>
condition ? undefined : [SingletonStore],
undefinedCalculatedOptionalSingletonModelList: () => (condition ? undefined : [SingletonStore]),
};

export default ModelStore;
Expand Down
5 changes: 1 addition & 4 deletions test/types/store/storage-external.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { Model, ModelIdentifier, StorageValues, store } from "/types/index";
import EnumerableStore, { IEnumerable } from "./enumerable-definition.store";

const EnumerableModelsSource = new Map<
ModelIdentifier,
StorageValues<IEnumerable>
>([
const EnumerableModelsSource = new Map<ModelIdentifier, StorageValues<IEnumerable>>([
["0", { id: "0", prop: "qweqwe", length: 5, relatedModel: "2" }],
["1", { id: "1", length: 1711014651455, relatedModels: ["1", "2"] }],
["2", { id: "2", prop: "swswswsws" }],
Expand Down
4 changes: 3 additions & 1 deletion test/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
// `import "/path/to/module.ts"`
// is not `import "C:/path/to/module.ts"`
// but is `import "~project/path/to/module.ts"`
"/*": ["*"]
"/*": [
"*"
]
},
"newLine": "lf",
"esModuleInterop": true,
Expand Down
Loading

0 comments on commit 915f792

Please sign in to comment.