Skip to content

Commit 50ab124

Browse files
committed
feat: Initial Arduino API for VS Code extensions
Signed-off-by: dankeboy36 <[email protected]>
1 parent c310d66 commit 50ab124

22 files changed

+9319
-0
lines changed

.eslintrc.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"extends": [
9+
"plugin:@typescript-eslint/recommended",
10+
"plugin:prettier/recommended",
11+
"prettier"
12+
],
13+
"plugins": ["@typescript-eslint", "prettier"],
14+
"rules": {
15+
"@typescript-eslint/naming-convention": "off",
16+
"@typescript-eslint/semi": "warn",
17+
"curly": "warn",
18+
"eqeqeq": "warn",
19+
"no-throw-literal": "warn",
20+
"semi": "off",
21+
"prettier/prettier": "warn"
22+
},
23+
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
24+
}

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
name: test (${{ matrix.os }}, node-${{ matrix.node }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [windows-latest, ubuntu-latest, macos-latest]
18+
node: [16.x, 18.x]
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- uses: actions/checkout@v3
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: ${{ matrix.config.node }}
25+
- uses: coactions/setup-xvfb@v1
26+
with:
27+
run: npm ci && npm test

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
out
2+
dist
3+
node_modules
4+
.vscode-test/
5+
*.vsix

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
out
2+
dist
3+
.vscode-test

.prettierrc.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"singleQuote": true,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"printWidth": 80,
6+
"endOfLine": "auto",
7+
"overrides": [
8+
{
9+
"files": "*.json",
10+
"options": {
11+
"tabWidth": 2
12+
}
13+
}
14+
]
15+
}

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"amodio.tsl-problem-matcher",
5+
"streetsidesoftware.code-spell-checker"
6+
]
7+
}

.vscode/launch.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Run Extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
9+
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
10+
"preLaunchTask": "${defaultBuildTask}"
11+
},
12+
{
13+
"name": "Extension Tests",
14+
"type": "extensionHost",
15+
"request": "launch",
16+
"args": [
17+
"--extensionDevelopmentPath=${workspaceFolder}",
18+
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
19+
],
20+
"outFiles": [
21+
"${workspaceFolder}/out/**/*.js",
22+
"${workspaceFolder}/dist/**/*.js"
23+
],
24+
"preLaunchTask": "tasks: watch-tests"
25+
}
26+
]
27+
}

.vscode/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"files.exclude": {
3+
"out": false,
4+
"dist": false
5+
},
6+
"search.exclude": {
7+
"out": true,
8+
"dist": true
9+
},
10+
"typescript.tsc.autoDetect": "off",
11+
"typescript.tsdk": "./node_modules/typescript/lib",
12+
"editor.codeActionsOnSave": {
13+
"source.fixAll.eslint": true
14+
}
15+
}

.vscode/tasks.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "watch",
7+
"problemMatcher": "$ts-webpack-watch",
8+
"isBackground": true,
9+
"presentation": {
10+
"reveal": "never",
11+
"group": "watchers"
12+
},
13+
"group": {
14+
"kind": "build",
15+
"isDefault": true
16+
}
17+
},
18+
{
19+
"type": "npm",
20+
"script": "watch-tests",
21+
"problemMatcher": "$tsc-watch",
22+
"isBackground": true,
23+
"presentation": {
24+
"reveal": "never",
25+
"group": "watchers"
26+
},
27+
"group": "build"
28+
},
29+
{
30+
"label": "tasks: watch-tests",
31+
"dependsOn": ["npm: watch", "npm: watch-tests"],
32+
"problemMatcher": []
33+
}
34+
]
35+
}

.vscodeignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.vscode/**
2+
.vscode-test/**
3+
out/**
4+
node_modules/**
5+
src/**
6+
.gitignore
7+
.yarnrc
8+
webpack.config.js
9+
vsc-extension-quickstart.md
10+
**/tsconfig.json
11+
**/.eslintrc.json
12+
**/*.map
13+
**/*.ts

0 commit comments

Comments
 (0)