Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 9a9c621

Browse files
authored
Rebuild extension.
2 parents f9b110e + 97a8322 commit 9a9c621

File tree

107 files changed

+12578
-7883
lines changed

Some content is hidden

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

107 files changed

+12578
-7883
lines changed

.eslintrc.json

Lines changed: 84 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,88 @@
11
{
2-
"root": true,
3-
"parser": "@typescript-eslint/parser",
4-
"parserOptions": {
5-
"ecmaVersion": 6,
6-
"sourceType": "module"
7-
},
8-
"plugins": [
9-
"@typescript-eslint"
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module",
7+
"project": ["src/tsconfig.json"]
8+
},
9+
"plugins": ["@typescript-eslint"],
10+
"extends": [
11+
"eslint:recommended",
12+
"plugin:@typescript-eslint/recommended",
13+
"plugin:rxjs/recommended"
14+
],
15+
"rules": {
16+
"no-console": "error",
17+
"prefer-const": "error",
18+
"no-param-reassign": "error",
19+
"no-else-return": "error",
20+
"max-len": [
21+
"error",
22+
{
23+
"code": 100,
24+
"ignoreStrings": true,
25+
"ignoreUrls": true,
26+
"ignoreTemplateLiterals": true,
27+
"ignoreRegExpLiterals": true
28+
}
1029
],
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"
30+
"class-methods-use-this": "error",
31+
"no-magic-numbers": "off",
32+
"@typescript-eslint/no-magic-numbers": [
33+
"error",
34+
{ "ignore": [0, 1], "ignoreDefaultValues": true }
35+
],
36+
"@typescript-eslint/explicit-module-boundary-types": "off",
37+
"@typescript-eslint/no-explicit-any": "off",
38+
"@typescript-eslint/no-unused-vars": [
39+
"error",
40+
{ "argsIgnorePattern": "^_" }
41+
],
42+
"@typescript-eslint/array-type": "error",
43+
"@typescript-eslint/no-unnecessary-condition": "error",
44+
"@typescript-eslint/no-unnecessary-qualifier": "error",
45+
"@typescript-eslint/no-unnecessary-type-arguments": "error",
46+
"@typescript-eslint/prefer-for-of": "error",
47+
"@typescript-eslint/prefer-function-type": "error",
48+
"@typescript-eslint/prefer-includes": "error",
49+
"@typescript-eslint/prefer-nullish-coalescing": "error",
50+
"@typescript-eslint/prefer-optional-chain": "error",
51+
"@typescript-eslint/prefer-readonly": "error",
52+
"@typescript-eslint/prefer-as-const": "error",
53+
"@typescript-eslint/prefer-string-starts-ends-with": "error",
54+
"@typescript-eslint/prefer-ts-expect-error": "error",
55+
"@typescript-eslint/promise-function-async": [
56+
"error",
57+
{ "checkArrowFunctions": false }
58+
],
59+
"@typescript-eslint/member-ordering": [
60+
"error",
61+
{
62+
"default": [
63+
"static-field",
64+
"abstract-field",
65+
"instance-field",
66+
"decorated-field",
67+
"constructor",
68+
"static-method",
69+
"abstract-method",
70+
"instance-method",
71+
"decorated-method"
72+
]
73+
}
74+
],
75+
"rxjs/finnish": "error",
76+
"rxjs/no-ignored-notifier": "off"
77+
},
78+
"ignorePatterns": ["**/*.d.ts"],
79+
"overrides": [
80+
{
81+
"files": ["**/test/**/*.ts"],
82+
"rules": {
83+
"@typescript-eslint/no-magic-numbers": "off",
84+
"no-console": ["error", { "allow": ["error"] }]
85+
}
1886
}
87+
]
1988
}

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'npm'
4+
directory: '/'
5+
schedule:
6+
interval: 'monthly'
7+
target-branch: 'develop'
8+
- package-ecosystem: 'pip'
9+
directory: '/src/python/'
10+
schedule:
11+
interval: 'monthly'
12+
target-branch: 'develop'

.github/workflows/build.yml

Lines changed: 109 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,118 @@ name: build
22
on: [push, pull_request]
33

44
jobs:
5-
build:
5+
ts-lint:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v2
10+
11+
- name: Install Node.js
12+
uses: actions/setup-node@v2
13+
with:
14+
node-version: '15'
15+
16+
- name: Install dependencies
17+
run: npm install
18+
19+
- name: Lint
20+
run: npm run lint
21+
22+
ts-test:
623
strategy:
724
matrix:
825
os: [macos-latest, ubuntu-latest, windows-latest]
926
runs-on: ${{ matrix.os }}
1027
steps:
11-
- name: Checkout
12-
uses: actions/checkout@v2
13-
- name: Install Node.js
14-
uses: actions/setup-node@v1
15-
with:
16-
node-version: 10.x
17-
- run: npm install
18-
- name: Lint
19-
run: npm run lint
20-
- name: Run tests
21-
uses: GabrielBB/xvfb-action@v1.2
22-
with:
28+
- name: Checkout
29+
uses: actions/checkout@v2
30+
31+
- name: Install Node.js
32+
uses: actions/setup-node@v2
33+
with:
34+
node-version: '15'
35+
36+
- name: Install dependencies
37+
run: npm install
38+
39+
- name: Test for Linux
40+
run: xvfb-run -a npm test
41+
if: runner.os == 'Linux'
42+
43+
- name: Test for other OS
2344
run: npm test
45+
if: runner.os != 'Linux'
46+
47+
py-lint:
48+
runs-on: ubuntu-latest
49+
defaults:
50+
run:
51+
working-directory: src/python/
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v2
55+
56+
- name: Set up Python
57+
uses: actions/setup-python@v2
58+
with:
59+
python-version: 3.8
60+
61+
- name: Set up Poetry
62+
uses: abatilo/actions-poetry@v2.1.0
63+
with:
64+
poetry-version: 1.1.6
65+
66+
- name: Install dependencies
67+
run: poetry install --no-root
68+
69+
- name: Lint
70+
run: |
71+
poetry run python -m pylint scripts/
72+
poetry run python -m mypy scripts/
73+
74+
py-test:
75+
strategy:
76+
matrix:
77+
os: [macos-latest, ubuntu-latest, windows-latest]
78+
runs-on: ${{ matrix.os }}
79+
defaults:
80+
run:
81+
working-directory: src/python/
82+
steps:
83+
- name: Checkout
84+
uses: actions/checkout@v2
85+
86+
- name: Set up Python
87+
uses: actions/setup-python@v2
88+
with:
89+
python-version: 3.8
90+
91+
- name: Set up Poetry
92+
uses: abatilo/actions-poetry@v2.1.0
93+
with:
94+
poetry-version: 1.1.6
95+
96+
- name: Install dependencies
97+
run: poetry install --no-root
98+
99+
- name: Test
100+
run: poetry run python -m pytest tests/
101+
102+
package:
103+
runs-on: ubuntu-latest
104+
needs: [ts-lint, ts-test, py-lint, py-test]
105+
steps:
106+
- name: Checkout
107+
uses: actions/checkout@v2
108+
109+
- name: Install Node.js
110+
uses: actions/setup-node@v2
111+
with:
112+
node-version: '15'
113+
114+
- name: Install dependencies
115+
run: npm install
116+
117+
- name: Package VSIX
118+
if: steps.version_check.outputs.changed == 'true'
119+
run: npx vsce package

.github/workflows/release.yml

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,59 @@ name: release
22
on:
33
push:
44
branches:
5-
- master
5+
- master
66

77
jobs:
88
release:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Checkout
12-
uses: actions/checkout@v2
13-
14-
- name: Check if version has been updated
15-
id: version_check
16-
uses: EndBug/version-check@v1
17-
with:
18-
diff-search: true
19-
token: ${{ secrets.GITHUB_TOKEN }}
20-
21-
- name: Install Node.js
22-
if: steps.version_check.outputs.changed == 'true'
23-
uses: actions/setup-node@v1
24-
with:
25-
node-version: 10.x
26-
27-
- run: npm install
28-
if: steps.version_check.outputs.changed == 'true'
29-
30-
- name: Create GitHub release
31-
id: create_release
32-
if: steps.version_check.outputs.changed == 'true'
33-
uses: actions/create-release@v1
34-
env:
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
with:
37-
tag_name: ${{ steps.version_check.outputs.version }}
38-
release_name: ${{ steps.version_check.outputs.version }}
39-
body: Thanks for following along! For more information check out the [CHANGELOG](https://github.com/seanwu1105/vscode-qt-for-python/blob/master/CHANGELOG.md).
40-
41-
- name: Package VSIX
42-
if: steps.version_check.outputs.changed == 'true'
43-
run: npx vsce package
44-
45-
- name: Upload VSIX to release assets
46-
if: steps.version_check.outputs.changed == 'true'
47-
uses: actions/upload-release-asset@v1
48-
env:
49-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50-
with:
51-
upload_url: ${{ steps.create_release.outputs.upload_url }}
52-
asset_path: ./vscode-qt-for-python-${{ steps.version_check.outputs.version }}.vsix
53-
asset_name: vscode-qt-for-python-${{ steps.version_check.outputs.version }}.vsix
54-
asset_content_type: application/vsix
55-
56-
- name: Publish on Visual Studio Code Extension Marketplace
57-
if: steps.version_check.outputs.changed == 'true'
58-
run: npm run deploy
59-
env:
60-
VSCE_PAT: ${{ secrets.VSCE_PAT }}
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
14+
- name: Use Node.js
15+
uses: actions/setup-node@v2
16+
with:
17+
node-version: '15'
18+
19+
- name: Check if version has been updated
20+
id: version_check
21+
uses: EndBug/version-check@v2
22+
with:
23+
diff-search: true
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Install dependencies
27+
run: npm install
28+
if: steps.version_check.outputs.changed == 'true'
29+
30+
- name: Package VSIX
31+
if: steps.version_check.outputs.changed == 'true'
32+
run: npx vsce package
33+
34+
- name: Publish on Visual Studio Code Extension Marketplace
35+
if: steps.version_check.outputs.changed == 'true'
36+
run: npx vsce publish
37+
env:
38+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
39+
40+
- name: Create GitHub release
41+
id: create_release
42+
if: steps.version_check.outputs.changed == 'true'
43+
uses: actions/create-release@v1
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
with:
47+
tag_name: ${{ steps.version_check.outputs.version }}
48+
release_name: ${{ steps.version_check.outputs.version }}
49+
body: Thanks for following along! For more information check out the [CHANGELOG](https://github.com/seanwu1105/vscode-qt-for-python/blob/master/CHANGELOG.md).
50+
51+
- name: Upload VSIX to release assets
52+
if: steps.version_check.outputs.changed == 'true'
53+
uses: actions/upload-release-asset@v1
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
with:
57+
upload_url: ${{ steps.create_release.outputs.upload_url }}
58+
asset_path: ./vscode-qt-for-python-${{ steps.version_check.outputs.version }}.vsix
59+
asset_name: vscode-qt-for-python-${{ steps.version_check.outputs.version }}.vsix
60+
asset_content_type: application/vsix

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
out
2+
dist
23
node_modules
34
.vscode-test/
45
*.vsix
6+
.eslintcache

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.prettierignore

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

.prettierrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"arrowParens": "avoid"
4+
}

.vscode/extensions.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
// See http://go.microsoft.com/fwlink/?LinkId=827846
3-
// for the documentation about the extensions.json format
4-
"recommendations": [
5-
"dbaeumer.vscode-eslint"
6-
]
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": ["dbaeumer.vscode-eslint", "eamodio.tsl-problem-matcher"]
75
}

0 commit comments

Comments
 (0)