Skip to content

Commit 767f398

Browse files
Nikola HristovNikola Hristov
authored andcommitted
Merge remote-tracking branch 'Parent/main' into Current
2 parents fddd031 + f64b217 commit 767f398

File tree

172 files changed

+27261
-804
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+27261
-804
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+
"plugins": [
9+
"@typescript-eslint"
10+
],
11+
"rules": {
12+
"@typescript-eslint/naming-convention": "warn",
13+
"@typescript-eslint/semi": "warn",
14+
"curly": "warn",
15+
"eqeqeq": "warn",
16+
"no-throw-literal": "warn",
17+
"semi": "off"
18+
},
19+
"ignorePatterns": [
20+
"out",
21+
"dist",
22+
"**/*.d.ts"
23+
]
24+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: 'Build VSIX'
2+
description: "Build the extension's VSIX"
3+
4+
inputs:
5+
node_version:
6+
description: 'Version of Node to install'
7+
required: true
8+
9+
runs:
10+
using: 'composite'
11+
steps:
12+
- name: Install Node
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: ${{ inputs.node_version }}
16+
cache: 'npm'
17+
18+
# Minimum supported version is Python 3.9
19+
- name: Use Python 3.9
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: 3.9
23+
24+
- name: Pip cache
25+
uses: actions/cache@v4
26+
with:
27+
path: ~/.cache/pip
28+
key: ${{ runner.os }}-pip-build-vsix-${{ hashFiles('**/requirements.txt') }}
29+
restore-keys: |
30+
${{ runner.os }}-pip-build-vsix-
31+
32+
# For faster/better builds of sdists.
33+
- name: Update pip, install pipx and install wheel
34+
run: python -m pip install -U pip pipx wheel
35+
shell: bash
36+
37+
- name: Run npm ci
38+
run: npm ci --prefer-offline
39+
shell: bash
40+
41+
- name: Install bundled python libraries
42+
run: pipx run nox --session install_bundled_libs
43+
shell: bash
44+
45+
# Use the GITHUB_RUN_ID environment variable to update the build number.
46+
# GITHUB_RUN_ID is a unique number for each run within a repository.
47+
# This number does not change if you re-run the workflow run.
48+
- name: Update extension build number
49+
run: pipx run nox --session update_build_number -- $GITHUB_RUN_ID
50+
shell: bash
51+
52+
- name: Build VSIX
53+
run: npm run vsce-package
54+
shell: bash
55+
56+
- name: Upload VSIX
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: linter-package
60+
path: |
61+
**/*.vsix
62+
if-no-files-found: error
63+
retention-days: 7

.github/actions/lint/action.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: 'Lint'
2+
description: 'Lint TypeScript and Python code'
3+
4+
inputs:
5+
node_version:
6+
description: 'Version of Node to install'
7+
required: true
8+
9+
runs:
10+
using: 'composite'
11+
steps:
12+
- name: Install Node
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: ${{ inputs.node_version }}
16+
cache: 'npm'
17+
18+
- name: Install Node dependencies
19+
run: npm ci
20+
shell: bash
21+
22+
- name: Lint TypeScript code
23+
run: npm run lint
24+
shell: bash
25+
26+
- name: Check TypeScript format
27+
run: npm run format-check
28+
shell: bash
29+
30+
- name: Install Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: '3.9'
34+
35+
- name: Pip cache
36+
uses: actions/cache@v4
37+
with:
38+
path: ~/.cache/pip
39+
key: ${{ runner.os }}-pip-lint-${{ hashFiles('**/requirements.txt') }}
40+
restore-keys: |
41+
${{ runner.os }}-pip-lint-
42+
43+
# For faster/better builds of sdists.
44+
- name: Update pip, install pipx and install wheel
45+
run: python -m pip install -U pip pipx wheel
46+
shell: bash
47+
48+
# This will install libraries to a target directory.
49+
- name: Install bundled python libraries
50+
run: pipx run nox --session install_bundled_libs
51+
shell: bash
52+
53+
- name: Check linting and formatting
54+
run: pipx run nox --session lint
55+
shell: bash

0 commit comments

Comments
 (0)