Skip to content

Commit e2fcbaf

Browse files
author
Tyler Deemer
committed
Prettier Suggestions
1 parent a7d50af commit e2fcbaf

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

src/api/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export class AtelierAPI {
2828
// If a CSP file, change from
2929
// \csp\user\... to
3030
// csp/user/...
31-
if(filename.startsWith("\\")) {
32-
return filename.substring(1).replace(/\\/g, "\/");
31+
if (filename.startsWith("\\")) {
32+
return filename.substring(1).replace(/\\/g, "/");
3333
}
3434
return filename;
3535
}
@@ -330,7 +330,7 @@ export class AtelierAPI {
330330
}
331331
// v1+
332332
public actionCompile(docs: string[], flags?: string, source = false): Promise<any> {
333-
docs = docs.map(doc => this.formatCspName(doc));
333+
docs = docs.map((doc) => this.formatCspName(doc));
334334
return this.request(1, "POST", `${this.ns}/action/compile`, docs, {
335335
flags,
336336
source,

src/explorer/models/rootNode.ts

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@ export class RootNode extends NodeBase {
1111
private readonly _category: string;
1212
private readonly isCsp: boolean;
1313

14-
public constructor(label: string, fullName: string, contextValue: string, category: string, options: NodeOptions, isCsp = false) {
14+
public constructor(
15+
label: string,
16+
fullName: string,
17+
contextValue: string,
18+
category: string,
19+
options: NodeOptions,
20+
isCsp = false
21+
) {
1522
super(label, fullName, options);
1623
this.contextValue = contextValue;
1724
this._category = category;
@@ -31,7 +38,7 @@ export class RootNode extends NodeBase {
3138
}
3239

3340
public async getChildren(element): Promise<NodeBase[]> {
34-
const path = (this instanceof PackageNode || this.isCsp) ? this.fullName + "/" : "";
41+
const path = this instanceof PackageNode || this.isCsp ? this.fullName + "/" : "";
3542
return this.getItems(path, this._category);
3643
}
3744

@@ -78,12 +85,12 @@ export class RootNode extends NodeBase {
7885
const content = data.result.content;
7986
return content;
8087
})
81-
.then(data =>
82-
data.map(el => {
88+
.then((data) =>
89+
data.map((el) => {
8390
let fullName = el.Name;
84-
if(this instanceof PackageNode) {
91+
if (this instanceof PackageNode) {
8592
fullName = this.fullName + "." + el.Name;
86-
} else if(this.isCsp) {
93+
} else if (this.isCsp) {
8794
fullName = this.fullName + "/" + el.Name;
8895
}
8996
return {
@@ -97,11 +104,11 @@ export class RootNode extends NodeBase {
97104
public getItems(path: string, category: string): Promise<NodeBase[]> {
98105
return this.getList(path, category, false).then((data) =>
99106
data
100-
.filter(el => {
101-
if(category === "OTHER") {
107+
.filter((el) => {
108+
if (category === "OTHER") {
102109
return el.Type === "100";
103-
} else if(category === "CSP") {
104-
return el.Type === "10" || el.Type === "5"
110+
} else if (category === "CSP") {
111+
return el.Type === "10" || el.Type === "5";
105112
} else {
106113
return true;
107114
}

src/providers/DocumentContentProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class DocumentContentProvider implements vscode.TextDocumentContentProvid
6363
}
6464
const isCsp = name.split("/")[0] === "csp";
6565
if (namespace && namespace !== "") {
66-
if(isCsp) {
66+
if (isCsp) {
6767
uri = uri.with({
6868
query: `ns=${namespace}&csp=1`,
6969
});

0 commit comments

Comments
 (0)