Skip to content

Commit

Permalink
Upgrade prettier (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeharding committed May 5, 2024
1 parent 8db5e41 commit cb0bd24
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function parseDateLine(dateLine: string): { type: string; date: string } {

try {
var date = new Date(
Date.UTC(+parsed[4], getMonth(parsed[3]), +parsed[2], +parsed[1])
Date.UTC(+parsed[4], getMonth(parsed[3]), +parsed[2], +parsed[1]),
).toISOString();
} catch (error) {
throw new GslError("Failed to parse date line", error);
Expand Down Expand Up @@ -127,10 +127,10 @@ function parseLines(lines: string[]) {
const parsedLines = lines.map((l) => l.split(/[ ]+/).filter((s) => s !== ""));

const identificationLine = parsedLines.find(
(l) => +l[0] === RapLineTypes.Identification
(l) => +l[0] === RapLineTypes.Identification,
);
const stationIdLine = parsedLines.find(
(l) => +l[0] === RapLineTypes.StationID
(l) => +l[0] === RapLineTypes.StationID,
);

if (!identificationLine || !stationIdLine)
Expand All @@ -143,7 +143,7 @@ function parseLines(lines: string[]) {
(l) =>
+l[0] === RapLineTypes.MandatoryLevel ||
+l[0] === RapLineTypes.SignificantLevel ||
+l[0] === RapLineTypes.SurfaceLevel
+l[0] === RapLineTypes.SurfaceLevel,
);

const data = parseDataLines(dataLines);
Expand Down Expand Up @@ -236,7 +236,7 @@ function isInvalidDewpt(dewpt: number) {
}

function parseToNumber<K>(
data: Record<keyof K, string>
data: Record<keyof K, string>,
): Record<keyof K, number> {
const ret = {} as Record<keyof K, number>;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"fs-extra": "^11.2.0",
"prettier": "^2.6.2",
"prettier": "^3.2.5",
"tsx": "^4.9.1",
"typescript": "^5.4.5",
"watch": "^1.0.2"
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cb0bd24

Please sign in to comment.