Skip to content
This repository was archived by the owner on Dec 12, 2022. It is now read-only.

Commit 4e6daa1

Browse files
committed
Formatted code
Created `.prettierrc` and applied to files
1 parent da3dbf9 commit 4e6daa1

File tree

9 files changed

+46
-39
lines changed

9 files changed

+46
-39
lines changed

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"printWidth": 120,
3+
"trailingComma": "all",
4+
"singleQuote": true,
5+
"useTabs": true,
6+
"tabWidth": 4
7+
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
enum PositionCollision {
2-
bestFit,
3-
flipfit,
4-
ignore,
2+
bestFit,
3+
flipfit,
4+
ignore,
55
}
66

7-
export default PositionCollision;
7+
export default PositionCollision;

src/Interfaces/Alignments.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { HorizontalAlignment, VerticalAlignment } from "../Types/AlignmentTypes";
1+
import { HorizontalAlignment, VerticalAlignment } from '../Types/AlignmentTypes';
22

33
export default interface Alignments {
4-
vertical: VerticalAlignment;
5-
horizontal: HorizontalAlignment;
6-
}
4+
vertical: VerticalAlignment;
5+
horizontal: HorizontalAlignment;
6+
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default interface CalculationOutcome {
2-
value: number;
3-
willCollide: boolean;
4-
mayOverflow?: boolean;
5-
}
2+
value: number;
3+
willCollide: boolean;
4+
mayOverflow?: boolean;
5+
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default interface ElementDimensions {
2-
height: number;
3-
width: number;
4-
top: number;
5-
left: number;
6-
}
2+
height: number;
3+
width: number;
4+
top: number;
5+
left: number;
6+
}

src/Interfaces/FitPosition.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export default interface FitPosition {
2-
top: number;
3-
left: number;
4-
}
2+
top: number;
3+
left: number;
4+
}

src/Interfaces/FitPositionData.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { CombinedAlignment } from "../Types/AlignmentTypes";
2-
import CalculationOutcome from "./CalculationOutcome";
1+
import { CombinedAlignment } from '../Types/AlignmentTypes';
2+
import CalculationOutcome from './CalculationOutcome';
33

44
export default interface FitPositionData {
5-
my: CombinedAlignment;
6-
at: CombinedAlignment;
7-
top: CalculationOutcome;
8-
left: CalculationOutcome;
9-
}
5+
my: CombinedAlignment;
6+
at: CombinedAlignment;
7+
top: CalculationOutcome;
8+
left: CalculationOutcome;
9+
}

src/Interfaces/PositionOptions.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import PositionCollision from "../Enumerators/PositionCollision";
2-
import { CombinedAlignment, PositionAlignment } from "../Types/AlignmentTypes";
1+
import PositionCollision from '../Enumerators/PositionCollision';
2+
import { CombinedAlignment, PositionAlignment } from '../Types/AlignmentTypes';
33

44
export default interface PositionOptions {
5-
my: PositionAlignment;
6-
at: PositionAlignment;
7-
anchor: HTMLElement | MouseEvent;
8-
target: HTMLElement;
9-
collision?: PositionCollision;
10-
bestFitPreference?: "horizontal" | "vertical";
11-
defaults?: { my: CombinedAlignment; at: CombinedAlignment };
12-
}
5+
my: PositionAlignment;
6+
at: PositionAlignment;
7+
anchor: HTMLElement | MouseEvent;
8+
target: HTMLElement;
9+
collision?: PositionCollision;
10+
bestFitPreference?: 'horizontal' | 'vertical';
11+
defaults?: { my: CombinedAlignment; at: CombinedAlignment };
12+
}

src/Types/AlignmentTypes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export type PositionAlignment = VerticalAlignment | HorizontalAlignment | CombinedAlignment;
22
export type CombinedAlignment = `${VerticalAlignment} ${HorizontalAlignment}`;
3-
export type VerticalAlignment = "top" | "center" | "bottom";
4-
export type HorizontalAlignment = "left" | "center" | "right";
3+
export type VerticalAlignment = 'top' | 'center' | 'bottom';
4+
export type HorizontalAlignment = 'left' | 'center' | 'right';

0 commit comments

Comments
 (0)