Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Continious integration for VSCode extension
on:
push:
branches:
- master
jobs:
eslint:
name: 'Node.js v${{ matrix.node }}'
runs-on: ubuntu-latest
strategy:
matrix:
node:
- 22

steps:
- uses: actions/setup-node@v3
with:
node-version: '${{ matrix.node }}'

- uses: actions/checkout@v4

- name: 'Cache node_modules'
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-v${{ matrix.node }}-

- name: 'Install Dependencies'
run: npm ci
working-directory: ./vscode

- name: 'Run ESLint'
run: npm run eslint-check
working-directory: ./vscode
6 changes: 3 additions & 3 deletions vscode/esbuild.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
const esbuild = require("esbuild");
import { context } from "esbuild";
import process from "node:process";

const production = process.argv.includes("--production");
const watch = process.argv.includes("--watch");

async function main() {
const ctx = await esbuild.context({
const ctx = await context({
entryPoints: ["src/extension.ts"],
bundle: true,
format: "cjs",
Expand All @@ -16,7 +17,6 @@ async function main() {
external: ["vscode"],
logLevel: "warning",
plugins: [
/* add to the end of plugins array */
esbuildProblemMatcherPlugin,
],
});
Expand Down
44 changes: 44 additions & 0 deletions vscode/eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import js from "@eslint/js";

import { defineConfig } from "eslint/config";
import globals from "globals";
import tseslint from "typescript-eslint";

export default defineConfig(
{
ignores: ["dist/**", "node_modules/**", "generated-types/**", "artifacts/**", "coverage/**"],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ["src/**/*.ts"],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: process.cwd(),
},
globals: {
...globals.node,
},
},
plugins: {
"@typescript-eslint": tseslint.plugin,
},
rules: {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: { attributes: false } }],
},
},
{
files: ["**/*.js"],
languageOptions: {
globals: {
...globals.node,
},
},
}
);
Loading