Skip to content

Commit

Permalink
fix: do not format LogicParser.ts using yarn fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone committed Oct 30, 2024
1 parent 9b31e4c commit 41233ce
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .dprint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
"packages/*/*.api.md",
"CHANGELOG*.md",
".yarnrc.yml",
// I have no idea why, but using dprint programmatically on this file
// results in a different formatting than using the CLI
"packages/config/src/LogicParser.ts",
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.93.0.wasm",
Expand Down
33 changes: 13 additions & 20 deletions packages/config/src/LogicParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,14 @@ const peggyParser: { parse: any; SyntaxError: any; DefaultTracer?: any } = // Ge
// @ts-ignore
var s = this.location.start;
// @ts-ignore
var offset_s = (this.location.source
&& (typeof this.location.source.offset
=== "function"))
// @ts-ignore
? this.location.source.offset(s)
// @ts-ignore
: s;
var offset_s =
(this.location.source
&& (typeof this.location.source.offset
=== "function"))
// @ts-ignore
? this.location.source.offset(s)
// @ts-ignore
: s;
// @ts-ignore
var loc = this.location.source
+ ":"
Expand All @@ -116,19 +117,11 @@ const peggyParser: { parse: any; SyntaxError: any; DefaultTracer?: any } = // Ge
// @ts-ignore
var hatLen = (last - s.column) || 1;
// @ts-ignore
str += "\n --> "
+ loc
+ "\n" // @ts-ignore
+ filler
+ " |\n" // @ts-ignore
+ offset_s.line
+ " | "
+ line
+ "\n" // @ts-ignore
+ filler
+ " | "
+ peg$padEnd("", s.column - 1, " ") // @ts-ignore
+ peg$padEnd("", hatLen, "^");
str += "\n --> " + loc + "\n" // @ts-ignore
+ filler + " |\n" // @ts-ignore
+ offset_s.line + " | " + line + "\n" // @ts-ignore
+ filler + " | " + peg$padEnd("", s.column - 1, " ") // @ts-ignore
+ peg$padEnd("", hatLen, "^");
// @ts-ignore
} else {
// @ts-ignore
Expand Down
2 changes: 1 addition & 1 deletion packages/config/src/_version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// This file is auto-generated by the codegen maintenance script
export const PACKAGE_VERSION = "14.0.0-beta.0";
export const PACKAGE_VERSION = "14.0.0-beta.1";

0 comments on commit 41233ce

Please sign in to comment.