diff --git a/extensions/void/.eslintrc b/extensions/void/.eslintrc index b309a6bd..f47a9afd 100644 --- a/extensions/void/.eslintrc +++ b/extensions/void/.eslintrc @@ -1,55 +1,56 @@ { - "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module", - "ecmaFeatures": { - "jsx": true - } - }, - "plugins": [ - "@typescript-eslint", - "react", - "react-hooks" - ], - "extends": [ - "eslint:recommended", - "plugin:react/recommended", - "plugin:react-hooks/recommended" - ], - "rules": { - "@typescript-eslint/naming-convention": [ - "warn", - { - "selector": "import", - "format": [ - "camelCase", - "PascalCase" - ] - } - ], - "curly": "off", - "eqeqeq": "warn", - "no-empty": "off", - "no-throw-literal": "warn", - "semi": "off", - "no-unused-vars": "off", - "react-hooks/exhaustive-deps": "warn" - }, - "ignorePatterns": [ - "out", - "dist", - "**/*.d.ts" - ], - "settings": { - "react": { - "version": "detect" - } - }, - "env": { - "browser": true, // enable browser globals (window, document, console, etc) - "es6": true, // enable ES6 features - "node": true // enable Node (things like Buffer which is used in file reading, etc) - } -} + "root": true, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + }, + "plugins": [ + "@typescript-eslint", + "react", + "react-hooks" + ], + "extends": [ + "eslint:recommended", + "plugin:react/recommended", + "plugin:react-hooks/recommended" + ], + "rules": { + "@typescript-eslint/naming-convention": [ + "warn", + { + "selector": "import", + "format": [ + "camelCase", + "PascalCase" + ] + } + ], + "curly": "off", + "eqeqeq": "warn", + "no-empty": "off", + "no-throw-literal": "warn", + "semi": "off", + "no-unused-vars": "off", + "react-hooks/exhaustive-deps": "warn" + }, + "ignorePatterns": [ + "out", + "dist", + "**/*.d.ts" + ], + "settings": { + "react": { + "version": "detect" + } + }, + "env": { + "browser": true, // enable browser globals linting (window, document, console, etc) + "es6": true, // enable ES6 linting + "node": true, // enable Node linting (things like Buffer which is used in file reading, etc) + "mocha": true // enable Mocha linting + } +} \ No newline at end of file diff --git a/extensions/void/package-lock.json b/extensions/void/package-lock.json index cb1b8f87..1073079a 100644 --- a/extensions/void/package-lock.json +++ b/extensions/void/package-lock.json @@ -15,14 +15,14 @@ "@eslint/js": "^9.9.1", "@types/diff": "^5.2.2", "@types/jest": "^29.5.12", - "@types/mocha": "^10.0.7", + "@types/mocha": "^10.0.8", "@types/node": "^22.5.1", "@types/react": "^18.3.4", "@types/react-dom": "^18.3.0", "@types/vscode": "1.92.0", "@typescript-eslint/eslint-plugin": "^8.3.0", "@typescript-eslint/parser": "^8.3.0", - "@vscode/test-cli": "0.0.10", + "@vscode/test-cli": "^0.0.10", "@vscode/test-electron": "2.4.1", "autoprefixer": "^10.4.20", "diff": "^6.0.0-beta", @@ -911,6 +911,7 @@ "resolved": "https://registry.npmjs.org/@vscode/test-cli/-/test-cli-0.0.10.tgz", "integrity": "sha512-B0mMH4ia+MOOtwNiLi79XhA+MLmUItIC8FckEuKrVAVriIuSWjt7vv4+bF8qVFiNFe4QRfzPaIZk39FZGWEwHA==", "dev": true, + "license": "MIT", "dependencies": { "@types/mocha": "^10.0.2", "c8": "^9.1.0", diff --git a/extensions/void/package.json b/extensions/void/package.json index 1147f7e0..43b34951 100644 --- a/extensions/void/package.json +++ b/extensions/void/package.json @@ -98,25 +98,23 @@ }, "scripts": { "vscode:prepublish": "npm run compile", - "compile": "tsc -p ./", "watch": "tsc -watch -p ./", "build": "rimraf dist && node build-tsx.js && node build-css.js", - "pretest": "npm run compile && npm run lint", - "lint": "eslint src --ext ts", + "pretest": "tsc -p ./ && eslint src --ext ts", "test": "vscode-test" }, "devDependencies": { "@eslint/js": "^9.9.1", "@types/diff": "^5.2.2", "@types/jest": "^29.5.12", - "@types/mocha": "^10.0.7", + "@types/mocha": "^10.0.8", "@types/node": "^22.5.1", "@types/react": "^18.3.4", "@types/react-dom": "^18.3.0", "@types/vscode": "1.92.0", "@typescript-eslint/eslint-plugin": "^8.3.0", "@typescript-eslint/parser": "^8.3.0", - "@vscode/test-cli": "0.0.10", + "@vscode/test-cli": "^0.0.10", "@vscode/test-electron": "2.4.1", "autoprefixer": "^10.4.20", "diff": "^6.0.0-beta", diff --git a/extensions/void/src/test/extension.test.ts b/extensions/void/src/test/extension.test.ts new file mode 100644 index 00000000..4ca0ab41 --- /dev/null +++ b/extensions/void/src/test/extension.test.ts @@ -0,0 +1,15 @@ +import * as assert from 'assert'; + +// You can import and use all API from the 'vscode' module +// as well as import your extension to test it +import * as vscode from 'vscode'; +// import * as myExtension from '../../extension'; + +suite('Extension Test Suite', () => { + vscode.window.showInformationMessage('Start all tests.'); + + test('Sample test', () => { + assert.strictEqual(-1, [1, 2, 3].indexOf(5)); + assert.strictEqual(-1, [1, 2, 3].indexOf(0)); + }); +}); diff --git a/extensions/void/tsconfig.json b/extensions/void/tsconfig.json index c3d99ff0..63e3afa9 100644 --- a/extensions/void/tsconfig.json +++ b/extensions/void/tsconfig.json @@ -10,8 +10,9 @@ "module": "Node16", "target": "ES6", "outDir": "out", - "types": [ // no idea how this differs from .eslintrc's node, but keeping it + "types": [ "node", + "mocha", ], "lib": [ "dom", diff --git a/test/automation/src/activityBar.ts b/test/automation/src/activityBar.ts index 67254fff..c5be25ed 100644 --- a/test/automation/src/activityBar.ts +++ b/test/automation/src/activityBar.ts @@ -10,6 +10,7 @@ export const enum ActivityBarPosition { RIGHT = 1 } + export class ActivityBar { constructor(private code: Code) { }