diff options
| author | Dax Raad <[email protected]> | 2025-09-09 23:43:37 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-09-09 23:44:04 -0400 |
| commit | 38e8c42cf02f73fb300889ab989088899a3aedb7 (patch) | |
| tree | 313db96535cf136cc1032618b43462c1f2f0e14c /sdks/vscode | |
| parent | 58fe88432714456350244ebbea1e6287d3dccb36 (diff) | |
| download | opencode-38e8c42cf02f73fb300889ab989088899a3aedb7.tar.gz opencode-38e8c42cf02f73fb300889ab989088899a3aedb7.zip | |
ci: format
Diffstat (limited to 'sdks/vscode')
| -rw-r--r-- | sdks/vscode/.vscode-test.mjs | 6 | ||||
| -rw-r--r-- | sdks/vscode/esbuild.js | 88 | ||||
| -rw-r--r-- | sdks/vscode/eslint.config.mjs | 40 | ||||
| -rw-r--r-- | sdks/vscode/sst-env.d.ts | 2 |
4 files changed, 70 insertions, 66 deletions
diff --git a/sdks/vscode/.vscode-test.mjs b/sdks/vscode/.vscode-test.mjs index b62ba25f0..993a118ac 100644 --- a/sdks/vscode/.vscode-test.mjs +++ b/sdks/vscode/.vscode-test.mjs @@ -1,5 +1,5 @@ -import { defineConfig } from '@vscode/test-cli'; +import { defineConfig } from "@vscode/test-cli" export default defineConfig({ - files: 'out/test/**/*.test.js', -}); + files: "out/test/**/*.test.js", +}) diff --git a/sdks/vscode/esbuild.js b/sdks/vscode/esbuild.js index cc2be598a..aa09b4eba 100644 --- a/sdks/vscode/esbuild.js +++ b/sdks/vscode/esbuild.js @@ -1,56 +1,54 @@ -const esbuild = require("esbuild"); +const esbuild = require("esbuild") -const production = process.argv.includes('--production'); -const watch = process.argv.includes('--watch'); +const production = process.argv.includes("--production") +const watch = process.argv.includes("--watch") /** * @type {import('esbuild').Plugin} */ const esbuildProblemMatcherPlugin = { - name: 'esbuild-problem-matcher', + name: "esbuild-problem-matcher", - setup(build) { - build.onStart(() => { - console.log('[watch] build started'); - }); - build.onEnd((result) => { - result.errors.forEach(({ text, location }) => { - console.error(`✘ [ERROR] ${text}`); - console.error(` ${location.file}:${location.line}:${location.column}:`); - }); - console.log('[watch] build finished'); - }); - }, -}; + setup(build) { + build.onStart(() => { + console.log("[watch] build started") + }) + build.onEnd((result) => { + result.errors.forEach(({ text, location }) => { + console.error(`✘ [ERROR] ${text}`) + console.error(` ${location.file}:${location.line}:${location.column}:`) + }) + console.log("[watch] build finished") + }) + }, +} async function main() { - const ctx = await esbuild.context({ - entryPoints: [ - 'src/extension.ts' - ], - bundle: true, - format: 'cjs', - minify: production, - sourcemap: !production, - sourcesContent: false, - platform: 'node', - outfile: 'dist/extension.js', - external: ['vscode'], - logLevel: 'silent', - plugins: [ - /* add to the end of plugins array */ - esbuildProblemMatcherPlugin, - ], - }); - if (watch) { - await ctx.watch(); - } else { - await ctx.rebuild(); - await ctx.dispose(); - } + const ctx = await esbuild.context({ + entryPoints: ["src/extension.ts"], + bundle: true, + format: "cjs", + minify: production, + sourcemap: !production, + sourcesContent: false, + platform: "node", + outfile: "dist/extension.js", + external: ["vscode"], + logLevel: "silent", + plugins: [ + /* add to the end of plugins array */ + esbuildProblemMatcherPlugin, + ], + }) + if (watch) { + await ctx.watch() + } else { + await ctx.rebuild() + await ctx.dispose() + } } -main().catch(e => { - console.error(e); - process.exit(1); -}); +main().catch((e) => { + console.error(e) + process.exit(1) +}) diff --git a/sdks/vscode/eslint.config.mjs b/sdks/vscode/eslint.config.mjs index d5c0b53a7..bcaaf8a96 100644 --- a/sdks/vscode/eslint.config.mjs +++ b/sdks/vscode/eslint.config.mjs @@ -1,28 +1,34 @@ -import typescriptEslint from "@typescript-eslint/eslint-plugin"; -import tsParser from "@typescript-eslint/parser"; +import typescriptEslint from "@typescript-eslint/eslint-plugin" +import tsParser from "@typescript-eslint/parser" -export default [{ +export default [ + { files: ["**/*.ts"], -}, { + }, + { plugins: { - "@typescript-eslint": typescriptEslint, + "@typescript-eslint": typescriptEslint, }, languageOptions: { - parser: tsParser, - ecmaVersion: 2022, - sourceType: "module", + parser: tsParser, + ecmaVersion: 2022, + sourceType: "module", }, rules: { - "@typescript-eslint/naming-convention": ["warn", { - selector: "import", - format: ["camelCase", "PascalCase"], - }], + "@typescript-eslint/naming-convention": [ + "warn", + { + selector: "import", + format: ["camelCase", "PascalCase"], + }, + ], - curly: "warn", - eqeqeq: "warn", - "no-throw-literal": "warn", - semi: "warn", + curly: "warn", + eqeqeq: "warn", + "no-throw-literal": "warn", + semi: "warn", }, -}];
\ No newline at end of file + }, +] diff --git a/sdks/vscode/sst-env.d.ts b/sdks/vscode/sst-env.d.ts index b6a7e9066..0397645b5 100644 --- a/sdks/vscode/sst-env.d.ts +++ b/sdks/vscode/sst-env.d.ts @@ -6,4 +6,4 @@ /// <reference path="../../sst-env.d.ts" /> import "sst" -export {}
\ No newline at end of file +export {} |
