Skip to content

Commit 5036c01

Browse files
authored
add CI (#13)
1 parent df69e47 commit 5036c01

16 files changed

Lines changed: 1752 additions & 110 deletions

‎.eslintrc.js‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module.exports = {
2+
root: true,
3+
parser: "@typescript-eslint/parser",
4+
parserOptions: {
5+
sourceType: "module",
6+
project: "./tsconfig.json",
7+
},
8+
extends: ["plugin:@typescript-eslint/recommended"],
9+
plugins: ["@typescript-eslint"],
10+
settings: {},
11+
env: {
12+
node: true,
13+
},
14+
ignorePatterns: [".eslintrc.js"],
15+
rules: {
16+
"no-unneeded-ternary": ["error", { defaultAssignment: false }],
17+
"@typescript-eslint/no-non-null-assertion": "error",
18+
"@typescript-eslint/no-explicit-any": "error",
19+
"@typescript-eslint/no-unused-vars": "error",
20+
"init-declarations": ["error", "always"],
21+
"no-lonely-if": "error",
22+
"object-shorthand": ["error", "always"],
23+
"@typescript-eslint/consistent-type-assertions": [
24+
"error",
25+
{
26+
assertionStyle: "never",
27+
},
28+
],
29+
eqeqeq: ["error", "smart"],
30+
},
31+
}

‎.github/workflows/javascript.yml‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Javascript
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Use Node.js
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version-file: "package.json"
18+
- name: Install dependencies
19+
run: npm ci
20+
- name: Build bundle
21+
run: ./s/build
22+
format:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Use Node.js
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version-file: "package.json"
30+
- name: Install dependencies
31+
run: npm ci
32+
- name: Check Formatting
33+
run: ./s/fmt
34+
lint:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Use Node.js
39+
uses: actions/setup-node@v3
40+
with:
41+
node-version-file: "package.json"
42+
- name: Install dependencies
43+
run: npm ci
44+
- name: Lint JS
45+
run: ./s/eslint
46+
typecheck:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v2
50+
- name: Use Node.js
51+
uses: actions/setup-node@v3
52+
with:
53+
node-version-file: "package.json"
54+
- name: Install dependencies
55+
run: npm ci
56+
- name: Typescript
57+
run: ./s/typecheck

‎.prettierrc.js‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// https://prettier.io/docs/en/options.html
22
module.exports = {
3-
semi: false,
4-
useTabs: false,
5-
tabWidth: 2,
6-
singleQuote: false,
7-
trailingComma: "all",
8-
bracketSpacing: true,
9-
}
3+
semi: false,
4+
useTabs: false,
5+
tabWidth: 2,
6+
singleQuote: false,
7+
trailingComma: "all",
8+
bracketSpacing: true,
9+
}

‎.vscode/launch.json‎

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,28 @@
33
// Hover to view descriptions of existing attributes.
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
{
6-
"version": "0.2.0",
7-
"configurations": [
8-
{
9-
"name": "Extension",
10-
"type": "extensionHost",
11-
"request": "launch",
12-
"runtimeExecutable": "${execPath}",
13-
"args": [
14-
"--extensionDevelopmentPath=${workspaceFolder}"
15-
],
16-
"outFiles": [
17-
"${workspaceFolder}/out/**/*.js",
18-
],
19-
"internalConsoleOptions": "openOnSessionStart",
20-
"preLaunchTask": "build"
21-
},
22-
{
23-
"name": "Extension Tests",
24-
"type": "extensionHost",
25-
"request": "launch",
26-
"runtimeExecutable": "${execPath}",
27-
"args": [
28-
"--extensionDevelopmentPath=${workspaceFolder}",
29-
"--extensionTestsPath=${workspaceFolder}/test"
30-
],
31-
"outFiles": [
32-
"${workspaceFolder}/out/test/**/*.js",
33-
]
34-
}
35-
]
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"runtimeExecutable": "${execPath}",
13+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
14+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
15+
"internalConsoleOptions": "openOnSessionStart",
16+
"preLaunchTask": "build"
17+
},
18+
{
19+
"name": "Extension Tests",
20+
"type": "extensionHost",
21+
"request": "launch",
22+
"runtimeExecutable": "${execPath}",
23+
"args": [
24+
"--extensionDevelopmentPath=${workspaceFolder}",
25+
"--extensionTestsPath=${workspaceFolder}/test"
26+
],
27+
"outFiles": ["${workspaceFolder}/out/test/**/*.js"]
28+
}
29+
]
3630
}

‎.vscode/settings.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Place your settings in this file to overwrite default and user settings.
22
{
3-
"editor.defaultFormatter": "esbenp.prettier-vscode",
4-
"editor.formatOnSave": true
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"editor.formatOnSave": true
55
}

‎.vscode/tasks.json‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
2-
"version": "2.0.0",
3-
"tasks": [
4-
{
5-
"label": "build",
6-
"type": "npm",
7-
"script": "compile",
8-
"problemMatcher": [],
9-
"presentation": {
10-
// "echo": true,
11-
// "reveal": "silent",
12-
// "focus": false,
13-
// "panel": "new",
14-
// "showReuseMessage": false,
15-
// "clear": true,
16-
"close": true
17-
}
18-
}
19-
]
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build",
6+
"type": "npm",
7+
"script": "compile",
8+
"problemMatcher": [],
9+
"presentation": {
10+
// "echo": true,
11+
// "reveal": "silent",
12+
// "focus": false,
13+
// "panel": "new",
14+
// "showReuseMessage": false,
15+
// "clear": true,
16+
"close": true
17+
}
18+
}
19+
]
2020
}

0 commit comments

Comments
 (0)