Skip to content

Commit

Permalink
Merge pull request #67 from khawkins/default_prettier
Browse files Browse the repository at this point in the history
Telling VSCode that Prettier is the default formatter
  • Loading branch information
khawkins committed Jun 24, 2024
2 parents 2a45d28 + 180d0fb commit 5d8ed87
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
"typescript.tsc.autoDetect": "off",
// Prettier is this project's code formatter.
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
9 changes: 5 additions & 4 deletions src/test/runTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,16 @@ async function main() {
// support in the `engines` section of our package.
const vscodeExecutablePath =
await downloadAndUnzipVSCode(VSCODE_TEST_VERSION);
const [cliPath, ...args] =
const [cliPath, ...cliArgs] =
resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);

// Install the Salesforce Extensions, which is a pre-req for our
// extension. Bail if there's an error.
const isWindows = process.platform === 'win32';
const installExtensionDepsOuput = spawnSync(
cliPath,
[...args, '--install-extension', CORE_EXTENSION_ID],
{ stdio: 'inherit', encoding: 'utf-8' }
isWindows ? `"${cliPath}"` : cliPath,
[...cliArgs, '--install-extension', CORE_EXTENSION_ID],
{ stdio: 'inherit', encoding: 'utf-8', shell: isWindows }
);
if (installExtensionDepsOuput.error) {
console.error(
Expand Down

0 comments on commit 5d8ed87

Please sign in to comment.