commit e9687fec9597d183507aaba5ee0415b8d451280d Author: yuantao Date: Fri Mar 27 15:35:36 2026 +0800 chore: add project configuration files - Add package.json with extension metadata and dependencies - Add tsconfig.json for TypeScript compilation - Add .eslintrc.json for code linting - Add .vscodeignore for packaging exclusions 🤖 Generated with [Qoder](https://qoder.com) diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..b125a48 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,30 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "plugins": [ + "@typescript-eslint" + ], + "rules": { + "@typescript-eslint/naming-convention": [ + "warn", + { + "selector": "import", + "format": ["camelCase", "PascalCase"] + } + ], + "@typescript-eslint/semi": "warn", + "curly": "warn", + "eqeqeq": "warn", + "no-throw-literal": "warn", + "semi": "off" + }, + "ignorePatterns": [ + "out", + "dist", + "**/*.d.ts" + ] +} diff --git a/.vscodeignore b/.vscodeignore new file mode 100644 index 0000000..3899967 --- /dev/null +++ b/.vscodeignore @@ -0,0 +1,10 @@ +.vscode/** +.vscode-test/** +src/** +.gitignore +.yarnrc +vsc-extension-quickstart.md +**/tsconfig.json +**/.eslintrc.json +**/*.map +**/*.ts diff --git a/package.json b/package.json new file mode 100644 index 0000000..8a83880 --- /dev/null +++ b/package.json @@ -0,0 +1,93 @@ +{ + "name": "qoder-cli-vscode", + "displayName": "qoder-cli", + "description": "Open terminal in a locked editor tab", + "version": "0.0.1", + "publisher": "yuantao", + "engines": { + "vscode": "^1.74.0" + }, + "categories": [ + "Other" + ], + "keywords": [ + "terminal", + "tab", + "editor" + ], + "activationEvents": [ + "onCommand:terminalTab.open" + ], + "main": "./out/extension.js", + "contributes": { + "commands": [ + { + "command": "terminalTab.open", + "title": "Open Terminal Tab", + "category": "Terminal Tab", + "icon": "$(terminal)" + }, + { + "command": "terminalTab.openInCurrentDirectory", + "title": "Open Terminal Tab (Current Directory)", + "category": "Terminal Tab", + "icon": "$(terminal)" + } + ], + "menus": { + "commandPalette": [ + { + "command": "terminalTab.open" + }, + { + "command": "terminalTab.openInCurrentDirectory" + } + ], + "editor/title": [ + { + "command": "terminalTab.openInCurrentDirectory", + "group": "navigation", + "when": "editorIsOpen" + } + ], + "explorer/context": [ + { + "command": "terminalTab.openInCurrentDirectory", + "group": "2_workspace@10" + } + ] + }, + "configuration": { + "title": "Terminal Tab", + "properties": { + "terminalTab.defaultLocation": { + "type": "string", + "default": "editor", + "enum": ["editor", "panel"], + "description": "Default location for terminal tab" + }, + "terminalTab.preserveFocus": { + "type": "boolean", + "default": false, + "description": "Preserve focus when opening terminal tab" + } + } + } + }, + "scripts": { + "vscode:prepublish": "npm run compile", + "compile": "tsc -p ./", + "watch": "tsc -watch -p ./", + "pretest": "npm run compile && npm run lint", + "lint": "eslint src --ext ts", + "test": "node ./out/test/runTest.js" + }, + "devDependencies": { + "@types/vscode": "^1.74.0", + "@types/node": "16.x", + "@typescript-eslint/eslint-plugin": "^5.45.0", + "@typescript-eslint/parser": "^5.45.0", + "eslint": "^8.28.0", + "typescript": "^4.9.4" + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..ec55768 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "ES2020", + "outDir": "out", + "lib": [ + "ES2020" + ], + "sourceMap": true, + "rootDir": "src", + "strict": true, + "types": ["node", "vscode"] + }, + "exclude": [ + "node_modules", + ".vscode-test" + ] +}