Skip to content

Commit 213d7a1

Browse files
committed
Run prettier format on vscode extension
1 parent c445189 commit 213d7a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2206
-1817
lines changed

extensions/vscode/.eslintrc.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,8 @@
55
"ecmaVersion": 6,
66
"sourceType": "module"
77
},
8-
"plugins": [
9-
"@typescript-eslint"
10-
],
11-
"extends": [
12-
"prettier"
13-
],
8+
"plugins": ["@typescript-eslint"],
9+
"extends": ["prettier"],
1410
"rules": {
1511
"@typescript-eslint/naming-convention": "warn",
1612
"@typescript-eslint/semi": "warn",
@@ -19,10 +15,5 @@
1915
"no-throw-literal": "warn",
2016
"semi": "off"
2117
},
22-
"ignorePatterns": [
23-
"out",
24-
"dist",
25-
"**/*.d.ts",
26-
"api"
27-
]
18+
"ignorePatterns": ["out", "dist", "**/*.d.ts", "api"]
2819
}
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
// See http://go.microsoft.com/fwlink/?LinkId=827846
3-
// for the documentation about the extensions.json format
4-
"recommendations": [
5-
"dbaeumer.vscode-eslint"
6-
]
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": ["dbaeumer.vscode-eslint"]
75
}

extensions/vscode/.vscode/launch.json

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,26 @@
33
// Hover to view descriptions of existing attributes.
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
{
6-
"version": "0.2.0",
7-
"configurations": [
8-
{
9-
"name": "Run Extension",
10-
"type": "extensionHost",
11-
"request": "launch",
12-
"args": [
13-
"--extensionDevelopmentPath=${workspaceFolder}"
14-
],
15-
"outFiles": [
16-
"${workspaceFolder}/out/**/*.js"
17-
],
18-
"preLaunchTask": "${defaultBuildTask}"
19-
},
20-
{
21-
"name": "Extension Tests",
22-
"type": "extensionHost",
23-
"request": "launch",
24-
"args": [
25-
"--extensionDevelopmentPath=${workspaceFolder}",
26-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
27-
],
28-
"outFiles": [
29-
"${workspaceFolder}/out/test/**/*.js"
30-
],
31-
"preLaunchTask": "${defaultBuildTask}"
32-
}
33-
]
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
13+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
14+
"preLaunchTask": "${defaultBuildTask}"
15+
},
16+
{
17+
"name": "Extension Tests",
18+
"type": "extensionHost",
19+
"request": "launch",
20+
"args": [
21+
"--extensionDevelopmentPath=${workspaceFolder}",
22+
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
23+
],
24+
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
25+
"preLaunchTask": "${defaultBuildTask}"
26+
}
27+
]
3428
}

extensions/vscode/.vscode/settings.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
},
99
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
1010
"typescript.tsc.autoDetect": "off",
11-
"cSpell.words": [
12-
"mutexify"
13-
],
11+
"cSpell.words": ["mutexify"],
1412
"svg.preview.background": "editor",
1513
"editor.tabSize": 2,
1614
"editor.formatOnSave": true,
1715
"editor.detectIndentation": false
18-
}
16+
}

extensions/vscode/.vscode/tasks.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
// See https://go.microsoft.com/fwlink/?LinkId=733558
22
// for the documentation about the tasks.json format
33
{
4-
"version": "2.0.0",
5-
"tasks": [
6-
{
7-
"type": "npm",
8-
"script": "watch",
9-
"problemMatcher": "$tsc-watch",
10-
"isBackground": true,
11-
"presentation": {
12-
"reveal": "never"
13-
},
14-
"group": {
15-
"kind": "build",
16-
"isDefault": true
17-
}
18-
}
19-
]
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "watch",
9+
"problemMatcher": "$tsc-watch",
10+
"isBackground": true,
11+
"presentation": {
12+
"reveal": "never"
13+
},
14+
"group": {
15+
"kind": "build",
16+
"isDefault": true
17+
}
18+
}
19+
]
2020
}

extensions/vscode/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@
55
Install the extension.
66
[https://cdn.posit.co/publisher/releases/tags/v0.0.alpha2/publisher-0.0.alpha2.vsix](https://cdn.posit.co/publisher/releases/tags/v0.0.alpha2/publisher-0.0.alpha2.vsix).
77

8-
To learn how to install a `.vsix` file, see the [*Install from a VSIX*](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix) guide from Visual Studio Code.
8+
To learn how to install a `.vsix` file, see the [_Install from a VSIX_](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix) guide from Visual Studio Code.
99

1010
## Tutorial
1111

12-
Once installed, open *Posit Publisher* by clicking the icon in the editor menu bar.
12+
Once installed, open _Posit Publisher_ by clicking the icon in the editor menu bar.
1313

1414
![](https://cdn.posit.co/publisher/assets/img/tutorial.png)
1515

1616
## Command Pallette Commands
1717

1818
### Posit: Open Publisher
1919

20-
This command opens *Posit Publisher* in a new window or focuses on an existing window.
20+
This command opens _Posit Publisher_ in a new window or focuses on an existing window.
2121

22-
This command invokes the same action as clicking the *Posit Publisher* icon.
22+
This command invokes the same action as clicking the _Posit Publisher_ icon.
2323

2424
### Posit: Close Publisher
2525

26-
This command closes *Posit Publisher* and shuts down the server.
26+
This command closes _Posit Publisher_ and shuts down the server.
2727

2828
## Configuration
2929

3030
### `posit.publisher.executable.path`
3131

32-
By default, the extension uses the bundled Posit Publisher binary executable. To override this behavior, configure the `posit.publisher.executable.path` property in your *User* or *Workspace* settings.
32+
By default, the extension uses the bundled Posit Publisher binary executable. To override this behavior, configure the `posit.publisher.executable.path` property in your _User_ or _Workspace_ settings.
3333

3434
![](https://cdn.posit.co/publisher/assets/img/settings.png)

extensions/vscode/src/api/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# API Wrapper Library
1+
# API Wrapper Library
22

33
A library to enable convenient access to the Publisher Client API and its
44
response types.
55

66
## Usage
77

88
```typescript
9-
import { useApi } from 'src/api';
9+
import { useApi } from "src/api";
1010

1111
const api = useApi();
1212

@@ -22,7 +22,7 @@ using `setBaseUrl`. This changes the client so all requests will use the new
2222
base URL. This will need to be done before any requests are made.
2323

2424
```typescript
25-
api.setBaseUrl('http://localhost:9000/api');
25+
api.setBaseUrl("http://localhost:9000/api");
2626
```
2727

2828
## Organization
@@ -73,4 +73,4 @@ try {
7373
} catch (err) {
7474
// handle the error
7575
}
76-
```
76+
```

extensions/vscode/src/api/axios.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Copyright (C) 2023 by Posit Software, PBC.
22

33
// eslint-disable-next-line @typescript-eslint/no-unused-vars
4-
import { AxiosRequestConfig } from 'axios';
4+
import { AxiosRequestConfig } from "axios";
55

6-
declare module 'axios' {
6+
declare module "axios" {
77
interface AxiosRequestConfig {
8-
ignoreCamelCase?: string[]
8+
ignoreCamelCase?: string[];
99
}
1010
}

extensions/vscode/src/api/client.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Copyright (C) 2023 by Posit Software, PBC.
22

3-
import axios from 'axios';
3+
import axios from "axios";
44

5-
import { Accounts } from './resources/Accounts';
6-
import { Deployments } from './resources/Deployments';
7-
import { Configurations } from './resources/Configurations';
8-
import { Files } from './resources/Files';
9-
import { Requirements } from './resources/Requirements';
5+
import { Accounts } from "./resources/Accounts";
6+
import { Deployments } from "./resources/Deployments";
7+
import { Configurations } from "./resources/Configurations";
8+
import { Files } from "./resources/Files";
9+
import { Requirements } from "./resources/Requirements";
1010

1111
class PublishingClientApi {
1212
private client;
@@ -19,7 +19,7 @@ class PublishingClientApi {
1919

2020
constructor() {
2121
this.client = axios.create({
22-
baseURL: '/api',
22+
baseURL: "/api",
2323
});
2424

2525
this.accounts = new Accounts(this.client);
@@ -36,4 +36,4 @@ class PublishingClientApi {
3636

3737
export const api = new PublishingClientApi();
3838

39-
export const useApi = () => api;
39+
export const useApi = () => api;

extensions/vscode/src/api/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Copyright (C) 2023 by Posit Software, PBC.
22

3-
export { api as default, useApi } from './client';
3+
export { api as default, useApi } from "./client";
44

5-
export * from './types/accounts';
6-
export * from './types/configurations';
7-
export * from './types/connect';
8-
export * from './types/deployments';
9-
export * from './types/events';
10-
export * from './types/schema';
5+
export * from "./types/accounts";
6+
export * from "./types/configurations";
7+
export * from "./types/connect";
8+
export * from "./types/deployments";
9+
export * from "./types/events";
10+
export * from "./types/schema";
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Copyright (C) 2023 by Posit Software, PBC.
22

3-
import { AxiosInstance } from 'axios';
3+
import { AxiosInstance } from "axios";
44

5-
import { Account } from '../types/accounts';
5+
import { Account } from "../types/accounts";
66

77
export class Accounts {
88
private client: AxiosInstance;
@@ -15,9 +15,7 @@ export class Accounts {
1515
// 200 - success
1616
// 500 - internal server error
1717
getAll() {
18-
return this.client.get<{ accounts: Account[] }>(
19-
'/accounts',
20-
);
18+
return this.client.get<{ accounts: Account[] }>("/accounts");
2119
}
2220

2321
// Returns:
@@ -26,8 +24,6 @@ export class Accounts {
2624
// 500 - internal server error
2725
get(accountName: string) {
2826
const encodedAccountName = encodeURIComponent(accountName);
29-
return this.client.get<Account>(
30-
`/accounts/${encodedAccountName}`,
31-
);
27+
return this.client.get<Account>(`/accounts/${encodedAccountName}`);
3228
}
3329
}

extensions/vscode/src/api/resources/Configurations.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Copyright (C) 2023 by Posit Software, PBC.
22

3-
import { AxiosInstance } from 'axios';
3+
import { AxiosInstance } from "axios";
44

55
import {
66
Configuration,
77
ConfigurationDetails,
88
ConfigurationError,
9-
} from '../types/configurations';
9+
} from "../types/configurations";
1010

1111
export class Configurations {
1212
private client: AxiosInstance;
@@ -20,7 +20,7 @@ export class Configurations {
2020
// 500 - internal server error
2121
getAll() {
2222
return this.client.get<Array<Configuration | ConfigurationError>>(
23-
'/configurations',
23+
"/configurations",
2424
);
2525
}
2626

@@ -48,6 +48,6 @@ export class Configurations {
4848
// 400 - bad request
4949
// 500 - internal server error
5050
inspect() {
51-
return this.client.post<ConfigurationDetails[]>('/inspect');
51+
return this.client.post<ConfigurationDetails[]>("/inspect");
5252
}
5353
}

0 commit comments

Comments
 (0)