Skip to content

Commit

Permalink
Use prettier on code base
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahgraham committed Jan 29, 2022
1 parent 09752f6 commit 528a63d
Show file tree
Hide file tree
Showing 19 changed files with 435 additions and 392 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
insert_final_newline = true
end_of_line = lf
indent_style = space

[*.{js,ts,md,c,cpp,h}]
indent_size = 4

[*.{json,yml}]
indent_size = 2
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules/
/out/
*.vsix
3 changes: 3 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
34 changes: 15 additions & 19 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
]
}
]
}
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"]
}
]
}
30 changes: 15 additions & 15 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ including CI information, download locations, etc can be found in the
Before your contribution can be accepted by the project team contributors must
electronically sign the Eclipse Contributor Agreement (ECA).

* http://www.eclipse.org/legal/ECA.php
- http://www.eclipse.org/legal/ECA.php

Commits that are provided by non-committers must have a Signed-off-by field in
the footer indicating that the author is aware of the terms by which the
Expand All @@ -37,4 +37,4 @@ https://www.eclipse.org/projects/handbook/#resources-commit

Contact the project developers via the project's "dev" list.

* https://dev.eclipse.org/mailman/listinfo/cdt-dev
- https://dev.eclipse.org/mailman/listinfo/cdt-dev
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This is a Visual Studio Code extension that supports debugging using gdb and any other debugger that supports the MI protocol. It is built by the experts that provide the gdb support in the Eclipse C/C++ IDE (CDT).

This extension provides a number of features that integrate into the Visual Studio Code debug environment. This includes launch types, support for the standard debug views as well as a custom viewer for memory browsing.
This extension provides a number of features that integrate into the Visual Studio Code debug environment. This includes launch types, support for the standard debug views as well as a custom viewer for memory browsing.

## Launch Settings

Expand All @@ -24,20 +24,27 @@ We use yarn to as our package manager. To build, simply do
yarn
yarn build
```

You can also run the build in watch mode using

```
yarn watch
```

### Co-developing cdt-gdb-adapter

If you are working on the cdt-gdb-adapter you can check it out to a different location and then link it in.

From the cdt-gdb-adapter project run

```
yarn link
```

Then from this project run

```
yarn link cdt-gdb-adapter
```

You can set up a VS Code workspace that has both folders. Also make sure you have builds running in each folder to pick up updates.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@
"event-stream": "^4.0.1",
"node-sass": "^7.0.1",
"npm-run-all": "^4.1.5",
"prettier": "2.5.1",
"sass-loader": "^12.4.0",
"style-loader": "^3.3.1",
"ts-loader": "^9.2.6",
Expand Down
8 changes: 4 additions & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ export function activate(context: ExtensionContext) {
new MemoryServer(context);

context.subscriptions.push(
commands.registerCommand('cdt.debug.askProgramPath', _config => {
commands.registerCommand('cdt.debug.askProgramPath', (_config) => {
return window.showInputBox({
placeHolder: "Please enter the path to the program"
placeHolder: 'Please enter the path to the program',
});
})
);

context.subscriptions.push(
commands.registerCommand('cdt.debug.askProcessId', _config => {
commands.registerCommand('cdt.debug.askProcessId', (_config) => {
return window.showInputBox({
placeHolder: "Please enter ID of process to attach to"
placeHolder: 'Please enter ID of process to attach to',
});
})
);
Expand Down
55 changes: 28 additions & 27 deletions src/memory/client/MemoryBrowser.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,37 @@
* SPDX-License-Identifier: EPL-2.0
*********************************************************************/
#memory-browser {
align-items: left;
box-sizing: border-box;
height: 100%;
padding: 10px;
align-items: left;
box-sizing: border-box;
height: 100%;
padding: 10px;

.group {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: flex-start;
}
.group {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: flex-start;
}

.input-group {
align-self: center;
margin: 2px;
margin-right: 20px;
flex-shrink: 2;
.input-group {
align-self: center;
margin: 2px;
margin-right: 20px;
flex-shrink: 2;

input, select {
border-radius: 5px;
flex-basis: 0;
}
input,
select {
border-radius: 5px;
flex-basis: 0;
}
}

label {
margin-right: 10px;
}
label {
margin-right: 10px;
}

.seperator {
border: 1px solid;
margin-top: 10px;
}
}
.seperator {
border: 1px solid;
margin-top: 10px;
}
}
Loading

0 comments on commit 528a63d

Please sign in to comment.