-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Setup testing using `wdio-vscode-service`, with coverage via istanbul - Add CI badges Includes some additional linting/style revisions of the source code.
- Loading branch information
1 parent
21d57bf
commit 386a933
Showing
24 changed files
with
13,866 additions
and
3,868 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,87 @@ | ||
{ | ||
"extends": "./node_modules/gts/", | ||
"rules": { | ||
"indent": 4, | ||
"extends": "./node_modules/gts/", | ||
"rules": { | ||
// "max-len": [ | ||
// "error", | ||
// { | ||
// "code": 92, | ||
// "tabWidth": 4 | ||
// } | ||
// ], | ||
// Google Style doesn't allow `_` to denote unused variables; here I make an | ||
// exception, as I find this a super useful option | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"args": "all", | ||
"argsIgnorePattern": "^_", | ||
"caughtErrors": "all", | ||
"caughtErrorsIgnorePattern": "^_", | ||
"destructuredArrayIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_", | ||
"ignoreRestSiblings": true | ||
} | ||
// TODO: there are likely some other overrides to use here but we'll wait to copy | ||
// those over from Master Key when we find issues | ||
], | ||
|
||
"n/no-unpublished-require": [ | ||
"error", | ||
"error", | ||
{ | ||
"args": "all", | ||
"argsIgnorePattern": "^_", | ||
"caughtErrors": "all", | ||
"caughtErrorsIgnorePattern": "^_", | ||
"destructuredArrayIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_", | ||
"ignoreRestSiblings": true | ||
} | ||
// TODO: there are likely some other overrides to use here but we'll wait to copy | ||
// those over from Master Key when we find issues | ||
], | ||
"n/no-unpublished-require": [ | ||
"error", | ||
{ | ||
"allowModules": [ | ||
"webpack" | ||
] | ||
} | ||
], | ||
"n/no-unpublished-import": [ | ||
"error", | ||
{ | ||
"allowModules": [ | ||
"lodash", | ||
"wdio-vscode-service" | ||
] | ||
} | ||
], | ||
"n/no-extraneous-import": [ | ||
"error", | ||
{ | ||
"allowModules": ["vscode-uri", "@wdio/globals", "webdriverio", "@wdio/types"] | ||
} | ||
] | ||
}, | ||
"overrides": [ | ||
{ | ||
"allowModules": ["webpack"] | ||
// GTS doesn't allow for *.mts files, but they will be part of testing | ||
"files": [ | ||
"**/*.mts" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"extends": [ | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"rules": { | ||
// copied from gts eslintrc.json | ||
"@typescript-eslint/ban-ts-comment": "warn", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"@typescript-eslint/no-warning-comments": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/camelcase": "off", | ||
"n/no-missing-import": "off", | ||
"n/no-empty-function": "off", | ||
"n/no-unsupported-features/es-syntax": "off", | ||
"n/no-missing-require": "off", | ||
"n/shebang": "off", | ||
"no-dupe-class-members": "off", | ||
"require-atomic-updates": "off" | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
} | ||
} | ||
] | ||
}, | ||
"overrides": [{ | ||
// GTS doesn't allow for *.mts files, but they will be part of testing | ||
"files": ["**/*.mts"], | ||
"parser": "@typescript-eslint/parser", | ||
"extends": [ | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"rules": { | ||
// copied from gts eslintrc.json | ||
"@typescript-eslint/ban-ts-comment": "warn", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"@typescript-eslint/no-warning-comments": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/camelcase": "off", | ||
"n/no-missing-import": "off", | ||
"n/no-empty-function": "off", | ||
"n/no-unsupported-features/es-syntax": "off", | ||
"n/no-missing-require": "off", | ||
"n/shebang": "off", | ||
"no-dupe-class-members": "off", | ||
"require-atomic-updates": "off" | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
} | ||
}] | ||
|
||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+* | ||
pull_request: | ||
types: ['opened', 'edited', 'reopened', 'synchronize', 'ready_for_review'] | ||
workflow_dispatch: | ||
inputs: | ||
node_version: | ||
description: 'Node.js version' | ||
required: true | ||
default: '20' | ||
type: choice | ||
options: | ||
- 18 | ||
- 20 | ||
|
||
jobs: | ||
build: | ||
if: '! github.event.pull_request.draft' | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node_version || 20 }} | ||
- name: Install Dependencies | ||
run: npm ci | ||
env: | ||
DETECT_CHROMEDRIVER_VERSION: true | ||
- name: Run Tests | ||
uses: coactions/setup-xvfb@v1 | ||
with: | ||
run: npm run ci | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,7 @@ dist/* | |
.DS_Store | ||
.cache/ | ||
.parcel-cache | ||
wdio.conf.mts | ||
.wdio-vscode-service | ||
wdio.log | ||
coverage/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
module.exports = { | ||
...require('gts/.prettierrc.json') | ||
...require('gts/.prettierrc.json'), | ||
"tabWidth": 4, | ||
"printWidth": 92, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"wdio": { | ||
"main": "./dist/desktop/extension.js" | ||
} | ||
} |
Oops, something went wrong.