Skip to content

Commit a9940c1

Browse files
committed
breaking: bump prettier to version 3
1 parent 6027d3a commit a9940c1

File tree

35 files changed

+200
-138
lines changed

35 files changed

+200
-138
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"devDependencies": {
1919
"cross-env": "^7.0.2",
20-
"prettier": "~2.8.8",
20+
"prettier": "~3.1.0",
2121
"ts-node": "^10.0.0"
2222
},
2323
"packageManager": "[email protected]"

packages/language-server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
"estree-walker": "^2.0.1",
5353
"fast-glob": "^3.2.7",
5454
"lodash": "^4.17.21",
55-
"prettier": "~2.8.8",
56-
"prettier-plugin-svelte": "~2.10.1",
55+
"prettier": "~3.1.0",
56+
"prettier-plugin-svelte": "~3.1.1",
5757
"svelte": "^3.57.0",
5858
"svelte-preprocess": "~5.1.0",
5959
"svelte2tsx": "workspace:~",

packages/language-server/src/lib/documents/Document.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ export class Document extends WritableDocument {
2525
*/
2626
private path = urlToPath(this.url);
2727

28-
constructor(public url: string, public content: string) {
28+
constructor(
29+
public url: string,
30+
public content: string
31+
) {
2932
super();
3033
this.configPromise = configLoader.awaitConfig(this.getFilePath() || '');
3134
this.updateDocInfo();
@@ -106,8 +109,8 @@ export class Document extends WritableDocument {
106109
(tag === 'style'
107110
? this.styleInfo?.attributes
108111
: tag === 'script'
109-
? this.scriptInfo?.attributes || this.moduleScriptInfo?.attributes
110-
: this.templateInfo?.attributes) || {};
112+
? this.scriptInfo?.attributes || this.moduleScriptInfo?.attributes
113+
: this.templateInfo?.attributes) || {};
111114
const lang = attrs.lang || attrs.type || '';
112115
return lang.replace(/^text\//, '');
113116
}

packages/language-server/src/lib/documents/DocumentMapper.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ export interface DocumentMapper {
5858
* Does not map, returns positions as is.
5959
*/
6060
export class IdentityMapper implements DocumentMapper {
61-
constructor(private url: string, private parent?: DocumentMapper) {}
61+
constructor(
62+
private url: string,
63+
private parent?: DocumentMapper
64+
) {}
6265

6366
getOriginalPosition(generatedPosition: Position): Position {
6467
if (this.parent) {

packages/language-server/src/ls-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,8 @@ export class LSConfigManager {
474474
p.startsWith('*')
475475
? '/' + slashNormalized
476476
: isRelative
477-
? p
478-
: '/**/' + slashNormalized
477+
? p
478+
: '/**/' + slashNormalized
479479
);
480480
}
481481
);

packages/language-server/src/plugins/css/CSSDocument.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ export class CSSDocument extends ReadableDocument implements DocumentMapper {
1515
public stylesheet: Stylesheet;
1616
public languageId: string;
1717

18-
constructor(private parent: Document, languageServices: CSSLanguageServices) {
18+
constructor(
19+
private parent: Document,
20+
languageServices: CSSLanguageServices
21+
) {
1922
super();
2023

2124
if (this.parent.styleInfo) {

packages/language-server/src/plugins/css/FileSystemProvider.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ export class FileSystemProvider implements CSSFileSystemProvider {
7272
return stat.isDirectory()
7373
? FileType.Directory
7474
: stat.isFile()
75-
? FileType.File
76-
: stat.isSymbolicLink()
77-
? FileType.SymbolicLink
78-
: FileType.Unknown;
75+
? FileType.File
76+
: stat.isSymbolicLink()
77+
? FileType.SymbolicLink
78+
: FileType.Unknown;
7979
}
8080

8181
async readDirectory(uri: string): Promise<Array<[string, FileType]>> {

packages/language-server/src/plugins/html/HTMLPlugin.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ export class HTMLPlugin
6161

6262
private htmlTriggerCharacters = ['.', ':', '<', '"', '=', '/'];
6363

64-
constructor(docManager: DocumentManager, private configManager: LSConfigManager) {
64+
constructor(
65+
docManager: DocumentManager,
66+
private configManager: LSConfigManager
67+
) {
6568
configManager.onChange(() =>
6669
this.lang.setDataProviders(false, this.getCustomDataProviders())
6770
);

packages/language-server/src/plugins/svelte/SvelteDocument.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ export class SvelteDocument {
8181
} else {
8282
this.transpiledDoc = await FallbackTranspiledSvelteDocument.create(
8383
this.parent,
84-
(
85-
await this.config
86-
)?.preprocess
84+
(await this.config)?.preprocess
8785
);
8886
}
8987
}
@@ -142,7 +140,10 @@ export class TranspiledSvelteDocument implements ITranspiledSvelteDocument {
142140
);
143141
}
144142

145-
constructor(private code: string, private mapper?: SourceMapDocumentMapper) {}
143+
constructor(
144+
private code: string,
145+
private mapper?: SourceMapDocumentMapper
146+
) {}
146147

147148
getOriginalPosition(generatedPosition: Position): Position {
148149
return this.mapper?.getOriginalPosition(generatedPosition) || generatedPosition;

packages/language-server/src/plugins/typescript/DocumentMapper.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import { Position } from 'vscode-languageserver';
33
import { SourceMapDocumentMapper } from '../../lib/documents';
44

55
export class ConsumerDocumentMapper extends SourceMapDocumentMapper {
6-
constructor(traceMap: TraceMap, sourceUri: string, private nrPrependesLines: number) {
6+
constructor(
7+
traceMap: TraceMap,
8+
sourceUri: string,
9+
private nrPrependesLines: number
10+
) {
711
super(traceMap, sourceUri);
812
}
913

0 commit comments

Comments
 (0)