Skip to content

Commit 422238e

Browse files
committed
init
0 parents  commit 422238e

15 files changed

+1710
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.vscode-test/
3+
*.vsix

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
enable-pre-post-scripts = true

.vscode-test.mjs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from '@vscode/test-cli';
2+
3+
export default defineConfig({
4+
files: 'test/**/*.test.js',
5+
});

.vscode/extensions.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
"dbaeumer.vscode-eslint",
6+
"ms-vscode.extension-test-runner"
7+
]
8+
}

.vscode/launch.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// A launch configuration that launches the extension inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"args": [
13+
"--extensionDevelopmentPath=${workspaceFolder}"
14+
]
15+
}
16+
]
17+
}

.vscodeignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.vscode/**
2+
.vscode-test/**
3+
test/**
4+
.gitignore
5+
.yarnrc
6+
vsc-extension-quickstart.md
7+
**/jsconfig.json
8+
**/*.map
9+
**/eslint.config.mjs
10+
**/.vscode-test.*

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Change Log
2+
3+
All notable changes to the "cursor-fake-machine" extension will be documented in this file.
4+
5+
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
6+
7+
## [Unreleased]
8+
9+
- Initial release

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Cursor Fake Machine
2+
3+
一个用于在 VS Code 中模拟光标行为的扩展。
4+
5+
6+
MIT

eslint.config.mjs

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import globals from "globals";
2+
3+
export default [{
4+
files: ["**/*.js"],
5+
languageOptions: {
6+
globals: {
7+
...globals.commonjs,
8+
...globals.node,
9+
...globals.mocha,
10+
},
11+
12+
ecmaVersion: 2022,
13+
sourceType: "module",
14+
},
15+
16+
rules: {
17+
"no-const-assign": "warn",
18+
"no-this-before-super": "warn",
19+
"no-undef": "warn",
20+
"no-unreachable": "warn",
21+
"no-unused-vars": "warn",
22+
"constructor-super": "warn",
23+
"valid-typeof": "warn",
24+
},
25+
}];

extension.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const vscode = require('vscode');
2+
3+
function activate(context) {
4+
vscode.window.showInformationMessage('Cursor Fake Machine 已启动!');
5+
}
6+
7+
function deactivate() {}
8+
9+
module.exports = {
10+
activate,
11+
deactivate,
12+
};

jsconfig.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compilerOptions": {
3+
"module": "Node16",
4+
"target": "ES2022",
5+
"checkJs": false, /* Typecheck .js files. */
6+
"lib": [
7+
"ES2022"
8+
]
9+
},
10+
"exclude": [
11+
"node_modules"
12+
]
13+
}

package.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "cursor-fake-machine",
3+
"displayName": "cursor-fake-machine",
4+
"description": "",
5+
"version": "0.0.1",
6+
"engines": {
7+
"vscode": "^1.95.0"
8+
},
9+
"categories": [
10+
"Other"
11+
],
12+
"activationEvents": [],
13+
"main": "./extension.js",
14+
"contributes": {
15+
"commands": [
16+
{
17+
"command": "cursor-fake-machine.cursor-fake-machine",
18+
"title": "Fake Cursor: Fake Machine"
19+
}
20+
]
21+
},
22+
"scripts": {
23+
"lint": "eslint .",
24+
"pretest": "pnpm run lint",
25+
"test": "vscode-test"
26+
},
27+
"devDependencies": {
28+
"@types/vscode": "^1.95.0",
29+
"@types/mocha": "^10.0.9",
30+
"@types/node": "20.x",
31+
"eslint": "^9.13.0",
32+
"@vscode/test-cli": "^0.0.10",
33+
"@vscode/test-electron": "^2.4.1"
34+
}
35+
}

0 commit comments

Comments
 (0)