Skip to content

Commit faedb50

Browse files
authored
chore: update prettier to v3 (#215)
1 parent b687746 commit faedb50

22 files changed

+123
-166
lines changed

.all-contributorsrc

+17-62
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"projectOwner": "LeDDGroup",
44
"repoType": "github",
55
"repoHost": "https://github.com",
6-
"files": [
7-
"README.md"
8-
],
6+
"files": ["README.md"],
97
"imageSize": 100,
108
"commit": true,
119
"commitConvention": "angular",
@@ -15,155 +13,112 @@
1513
"name": "Daniel Perez Alvarez",
1614
"avatar_url": "https://avatars2.githubusercontent.com/u/17787042?v=4",
1715
"profile": "https://github.com/danielpza",
18-
"contributions": [
19-
"code",
20-
"maintenance",
21-
"test"
22-
]
16+
"contributions": ["code", "maintenance", "test"]
2317
},
2418
{
2519
"login": "anion155",
2620
"name": "Михайлов Антон",
2721
"avatar_url": "https://avatars1.githubusercontent.com/u/4786672?v=4",
2822
"profile": "https://github.com/anion155",
29-
"contributions": [
30-
"code",
31-
"bug",
32-
"test"
33-
]
23+
"contributions": ["code", "bug", "test"]
3424
},
3525
{
3626
"login": "joshuaavalon",
3727
"name": "Joshua Avalon",
3828
"avatar_url": "https://avatars0.githubusercontent.com/u/7152420?v=4",
3929
"profile": "https://joshuaavalon.io",
40-
"contributions": [
41-
"bug",
42-
"platform"
43-
]
30+
"contributions": ["bug", "platform"]
4431
},
4532
{
4633
"login": "roblav96",
4734
"name": "Robert Laverty",
4835
"avatar_url": "https://avatars1.githubusercontent.com/u/1457327?v=4",
4936
"profile": "https://roblav96.github.io/resume",
50-
"contributions": [
51-
"bug",
52-
"test"
53-
]
37+
"contributions": ["bug", "test"]
5438
},
5539
{
5640
"login": "oleersoy",
5741
"name": "Ole Ersoy",
5842
"avatar_url": "https://avatars3.githubusercontent.com/u/1163873?v=4",
5943
"profile": "https://github.com/oleersoy",
60-
"contributions": [
61-
"bug",
62-
"blog"
63-
]
44+
"contributions": ["bug", "blog"]
6445
},
6546
{
6647
"login": "sbmw",
6748
"name": "sbmw",
6849
"avatar_url": "https://avatars0.githubusercontent.com/u/30099628?v=4",
6950
"profile": "https://github.com/sbmw",
70-
"contributions": [
71-
"bug"
72-
]
51+
"contributions": ["bug"]
7352
},
7453
{
7554
"login": "richardspence",
7655
"name": "richardspence",
7756
"avatar_url": "https://avatars2.githubusercontent.com/u/9914123?v=4",
7857
"profile": "https://github.com/richardspence",
79-
"contributions": [
80-
"bug"
81-
]
58+
"contributions": ["bug"]
8259
},
8360
{
8461
"login": "viT-1",
8562
"name": "Vitaly Pinchuk",
8663
"avatar_url": "https://avatars1.githubusercontent.com/u/19496430?v=4",
8764
"profile": "http://codepen.io/viT-1/",
88-
"contributions": [
89-
"bug"
90-
]
65+
"contributions": ["bug"]
9166
},
9267
{
9368
"login": "laij84",
9469
"name": "laij84",
9570
"avatar_url": "https://avatars0.githubusercontent.com/u/18145822?v=4",
9671
"profile": "https://github.com/laij84",
97-
"contributions": [
98-
"bug"
99-
]
72+
"contributions": ["bug"]
10073
},
10174
{
10275
"login": "dko-slapdash",
10376
"name": "dko-slapdash",
10477
"avatar_url": "https://avatars0.githubusercontent.com/u/46383452?v=4",
10578
"profile": "https://github.com/dko-slapdash",
106-
"contributions": [
107-
"bug"
108-
]
79+
"contributions": ["bug"]
10980
},
11081
{
11182
"login": "hedwiggggg",
11283
"name": "hedwiggggg",
11384
"avatar_url": "https://avatars1.githubusercontent.com/u/42947316?v=4",
11485
"profile": "https://github.com/hedwiggggg",
115-
"contributions": [
116-
"bug",
117-
"test",
118-
"code"
119-
]
86+
"contributions": ["bug", "test", "code"]
12087
},
12188
{
12289
"login": "kuskoman",
12390
"name": "kuskoman",
12491
"avatar_url": "https://avatars3.githubusercontent.com/u/15456923?v=4",
12592
"profile": "https://github.com/kuskoman",
126-
"contributions": [
127-
"doc"
128-
]
93+
"contributions": ["doc"]
12994
},
13095
{
13196
"login": "booninite",
13297
"name": "alex weidner",
13398
"avatar_url": "https://avatars3.githubusercontent.com/u/13647495?v=4",
13499
"profile": "https://github.com/booninite",
135-
"contributions": [
136-
"bug"
137-
]
100+
"contributions": ["bug"]
138101
},
139102
{
140103
"login": "nonara",
141104
"name": "Ron S.",
142105
"avatar_url": "https://avatars0.githubusercontent.com/u/1427565?v=4",
143106
"profile": "https://github.com/nonara",
144-
"contributions": [
145-
"bug",
146-
"test",
147-
"code"
148-
]
107+
"contributions": ["bug", "test", "code"]
149108
},
150109
{
151110
"login": "vladimiry",
152111
"name": "Vladimir Yakovlev",
153112
"avatar_url": "https://avatars2.githubusercontent.com/u/1560781?v=4",
154113
"profile": "https://github.com/vladimiry",
155-
"contributions": [
156-
"bug"
157-
]
114+
"contributions": ["bug"]
158115
},
159116
{
160117
"login": "vwpo",
161118
"name": "vwpo",
162119
"avatar_url": "https://avatars3.githubusercontent.com/u/57674261?v=4",
163120
"profile": "https://github.com/vwpo",
164-
"contributions": [
165-
"bug"
166-
]
121+
"contributions": ["bug"]
167122
}
168123
],
169124
"contributorsPerLine": 7,

README.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ Add it to _plugins_ in your _tsconfig.json_
2828
"baseUrl": "./",
2929
// Configure your path mapping here
3030
"paths": {
31-
"@utils/*": ["utils/*"]
31+
"@utils/*": ["utils/*"],
3232
},
3333
// Note: To transform paths for both the output .js and .d.ts files, you need both of the below entries
3434
"plugins": [
3535
// Transform paths in output .js files
3636
{ "transform": "typescript-transform-paths" },
3737

3838
// Transform paths in output .d.ts files (Include this line if you output declarations files)
39-
{ "transform": "typescript-transform-paths", "afterDeclarations": true }
40-
]
41-
}
39+
{ "transform": "typescript-transform-paths", "afterDeclarations": true },
40+
],
41+
},
4242
}
4343
```
4444

@@ -86,12 +86,12 @@ import { sum } from "@utils/sum";
8686
"transformers": [
8787
{
8888
"name": "typescript-transform-paths/nx-transformer",
89-
"options": { "afterDeclarations": true }
90-
}
91-
]
92-
}
93-
}
94-
}
89+
"options": { "afterDeclarations": true },
90+
},
91+
],
92+
},
93+
},
94+
},
9595
}
9696
```
9797

@@ -108,13 +108,13 @@ To enable virtual directory mapping, use the `useRootDirs` plugin option.
108108
"rootDirs": ["src", "generated"],
109109
"baseUrl": ".",
110110
"paths": {
111-
"#root/*": ["./src/*", "./generated/*"]
111+
"#root/*": ["./src/*", "./generated/*"],
112112
},
113113
"plugins": [
114114
{ "transform": "typescript-transform-paths", "useRootDirs": true },
115-
{ "transform": "typescript-transform-paths", "useRootDirs": true, "afterDeclarations": true }
116-
]
117-
}
115+
{ "transform": "typescript-transform-paths", "useRootDirs": true, "afterDeclarations": true },
116+
],
117+
},
118118
}
119119
```
120120

@@ -158,15 +158,15 @@ Example:
158158
"compilerOptions": {
159159
"paths": {
160160
"sub-module1/*": ["../../node_modules/sub-module1/*"],
161-
"sub-module2/*": ["../../node_modules/sub-module2/*"]
161+
"sub-module2/*": ["../../node_modules/sub-module2/*"],
162162
},
163163
"plugins": [
164164
{
165165
"transform": "typescript-transform-paths",
166-
"exclude": ["**/node_modules/**"]
167-
}
168-
]
169-
}
166+
"exclude": ["**/node_modules/**"],
167+
},
168+
],
169+
},
170170
}
171171
```
172172

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"@types/minimatch": "^5.1.2",
6060
"@types/node": "^18.11.2",
6161
"jest": "^29.7.0",
62-
"prettier": "^2.7.1",
62+
"prettier": "^3.3.3",
6363
"rimraf": "^5.0.5",
6464
"standard-version": "^9.5.0",
6565
"@types/ts-expose-internals": "npm:ts-expose-internals@4.9.4",

register.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ try {
33
tsNode = require("ts-node");
44
} catch {
55
throw new Error(
6-
`Cannot resolve ts-node. Make sure ts-node is installed before using typescript-transform-paths/register`
6+
`Cannot resolve ts-node. Make sure ts-node is installed before using typescript-transform-paths/register`,
77
);
88
}
99

src/harmony/utils.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ export type DownSampleTsTypes<TypeMap extends [any, any][], Tuple extends [...un
1313
};
1414

1515
// @prettier-ignore
16-
type DownSampleTsType<TypeMap extends [any, any][], T> = T extends Exclude<TypeMap[number][0], undefined>
17-
? Extract<TypeMap[number], [T, any]>[1]
18-
: T;
16+
type DownSampleTsType<TypeMap extends [any, any][], T> =
17+
T extends Exclude<TypeMap[number][0], undefined> ? Extract<TypeMap[number], [T, any]>[1] : T;
1918

2019
// @formatter:on
2120
// endregion

src/harmony/versions/four-seven.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export namespace TsFourSeven {
3232
[TsCurrentModule.NamedExportBindings, TsFourSevenModule.NamedExportBindings],
3333
[TsCurrentModule.ModuleDeclaration, TsFourSevenModule.ModuleDeclaration],
3434
[TsCurrentModule.ModuleName, TsFourSevenModule.ModuleName],
35-
[TsCurrentModule.ModuleBody, TsFourSevenModule.ModuleBody]
35+
[TsCurrentModule.ModuleBody, TsFourSevenModule.ModuleBody],
3636
];
3737
}
3838

@@ -56,13 +56,13 @@ export namespace TsFourSeven {
5656
modifiers: readonly Modifier[] | undefined,
5757
importClause: ImportClause | undefined,
5858
moduleSpecifier: Expression,
59-
assertClause: AssertClause | undefined
59+
assertClause: AssertClause | undefined,
6060
) {
6161
const [dsNode, dsImportClause, dsModuleSpecifier, dsAssertClause] = downSample(
6262
node,
6363
importClause,
6464
moduleSpecifier,
65-
assertClause
65+
assertClause,
6666
);
6767

6868
return factory.updateImportDeclaration(
@@ -71,7 +71,7 @@ export namespace TsFourSeven {
7171
dsNode.modifiers,
7272
dsImportClause,
7373
dsModuleSpecifier,
74-
dsAssertClause
74+
dsAssertClause,
7575
);
7676
};
7777
case "updateExportDeclaration":
@@ -81,13 +81,13 @@ export namespace TsFourSeven {
8181
isTypeOnly: boolean,
8282
exportClause: NamedExportBindings | undefined,
8383
moduleSpecifier: Expression | undefined,
84-
assertClause: AssertClause | undefined
84+
assertClause: AssertClause | undefined,
8585
) {
8686
const [dsNode, dsExportClause, dsModuleSpecifier, dsAssertClause] = downSample(
8787
node,
8888
exportClause,
8989
moduleSpecifier,
90-
assertClause
90+
assertClause,
9191
);
9292

9393
return factory.updateExportDeclaration(
@@ -97,15 +97,15 @@ export namespace TsFourSeven {
9797
isTypeOnly,
9898
dsExportClause,
9999
dsModuleSpecifier,
100-
dsAssertClause
100+
dsAssertClause,
101101
);
102102
};
103103
case "updateModuleDeclaration":
104104
return function (
105105
node: ModuleDeclaration,
106106
modifiers: readonly Modifier[] | undefined,
107107
name: ModuleName,
108-
body: ModuleBody | undefined
108+
body: ModuleBody | undefined,
109109
) {
110110
const [dsNode, dsName, dsBody] = downSample(node, name, body);
111111

0 commit comments

Comments
 (0)