Skip to content

Commit ba283d1

Browse files
committed
fix(prettier): add prettier as dev dependency and run format for v3
1 parent 475cb4d commit ba283d1

6 files changed

Lines changed: 20 additions & 9 deletions

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@
3232
}
3333
},
3434
"devDependencies": {
35-
"@parcel/watcher": "2.5.1",
3635
"@changesets/cli": "^2.27.6",
36+
"@parcel/watcher": "2.5.1",
3737
"@types/node": "^20.14.9",
3838
"@types/yargs": "^17.0.32",
3939
"@typescript-eslint/eslint-plugin": "^7.14.1",
4040
"@vitest/coverage-v8": "^1.6.0",
4141
"eslint": "^8.57.0",
4242
"eslint-plugin-sort-class-members": "^1.20.0",
4343
"eslint-plugin-unused-imports": "^4.0.0",
44+
"prettier": "^3.5.2",
4445
"tsup": "^8.1.0",
4546
"typescript": "^5.5.2",
4647
"vitest": "^1.6.0"

pnpm-lock.yaml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bin/cli.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ async function main() {
4646

4747
if (!watcher) {
4848
throw new Error(
49-
"Watcher not found, please install @parcel/watcher"
49+
"Watcher not found, please install @parcel/watcher",
5050
);
5151
}
5252

@@ -67,10 +67,10 @@ async function main() {
6767
await processFiles([argv.input], argv.output);
6868
},
6969
// Negative glob to still match our pattern for events
70-
{ ignore: ["!**/*.{ts,tsx}"] }
70+
{ ignore: ["!**/*.{ts,tsx}"] },
7171
);
7272
}
73-
}
73+
},
7474
)
7575
.help()
7676
.alias("help", "h")

src/cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function updateLabelCache({
4040
*/
4141
function getLabelFromData(
4242
source: LabelData,
43-
path: Array<string>
43+
path: Array<string>,
4444
): string | undefined {
4545
let current: LabelData | string = source;
4646
for (const key of path) {

src/extract.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function extractLabels(filename: string, source: string) {
1212
filename,
1313
source,
1414
ts.ScriptTarget.Latest,
15-
true
15+
true,
1616
);
1717

1818
// Since we use the namespace string we also allow nested namespaces out of the box
@@ -43,7 +43,7 @@ export function extractLabels(filename: string, source: string) {
4343
currentScope.variables.set(
4444
node.name.text,
4545
// Remove the surrounding quotes
46-
callExpr.arguments[0].getText().slice(1, -1)
46+
callExpr.arguments[0].getText().slice(1, -1),
4747
);
4848
}
4949
}
@@ -109,7 +109,7 @@ export function extractLabels(filename: string, source: string) {
109109
if (label) {
110110
const namespace = findNamespaceForExpression(
111111
baseIdentifier,
112-
currentScope
112+
currentScope,
113113
);
114114

115115
if (namespace) {

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { LabelData } from "./types";
1111
*/
1212
export async function processFiles(
1313
input: string,
14-
output: string
14+
output: string,
1515
): Promise<void> {
1616
const cache: LabelData = {};
1717
const pattern = "**/*.{ts,tsx}";

0 commit comments

Comments
 (0)