Skip to content

Commit 378ee67

Browse files
committed
Update filenames and dependencies
1 parent f9d6714 commit 378ee67

12 files changed

+1785
-1734
lines changed

.eslintrc.json

+13-17
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
{
2-
"env": {
3-
"browser": true,
4-
"commonjs": true,
5-
"es6": true,
6-
"node": true
7-
},
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
84
"parserOptions": {
9-
"ecmaFeatures": {
10-
"jsx": true
11-
},
5+
"ecmaVersion": 6,
126
"sourceType": "module"
137
},
8+
"plugins": [
9+
"@typescript-eslint"
10+
],
1411
"rules": {
15-
"no-const-assign": "warn",
16-
"no-this-before-super": "warn",
17-
"no-undef": "warn",
18-
"no-unreachable": "warn",
19-
"no-unused-vars": "warn",
20-
"constructor-super": "warn",
21-
"valid-typeof": "warn"
12+
"@typescript-eslint/class-name-casing": "warn",
13+
"@typescript-eslint/semi": "warn",
14+
"curly": "warn",
15+
"eqeqeq": "warn",
16+
"no-throw-literal": "warn",
17+
"semi": "off"
2218
}
23-
}
19+
}

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
node_modules
33
*.vsix
44
npm-debug.log*
5-
*.log
5+
*.log
6+
out
7+
.vscode-test/
8+
*.vsix

.vscodeignore

+9
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,12 @@ test/**
44
.gitignore
55
jsconfig.json
66
vsc-extension-quickstart.md
7+
.vscode-test/**
8+
out/test/**
9+
src/**
10+
.gitignore
11+
vsc-extension-quickstart.md
12+
**/tsconfig.json
13+
**/.eslintrc.json
14+
**/*.map
15+
**/*.ts

package-lock.json

+1,711-1,704
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+19-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"url": "https://github.com/felipecaputo/git-project-manager.git"
2121
},
2222
"engines": {
23-
"vscode": "^1.5.0"
23+
"vscode": "^1.44.0"
2424
},
2525
"categories": [
2626
"Other"
@@ -33,7 +33,6 @@
3333
"onCommand:gitProjectManager.openSubFolder",
3434
"onCommand:gitProjectManager.openProjectNewWindow"
3535
],
36-
"main": "./src/extension",
3736
"contributes": {
3837
"configuration": {
3938
"type": "object",
@@ -170,21 +169,34 @@
170169
}
171170
]
172171
},
172+
"main": "./out/extension.js",
173173
"devDependencies": {
174174
"chai": "^3.5.0",
175-
"mocha": "^2.4.5",
176175
"rimraf": "^2.6.2",
177176
"rmdir": "^1.2.0",
178177
"sinon": "^5.0.7",
179-
"vscode": "^1.1.21"
180-
},
181-
"dependencies": {
178+
"@types/vscode": "^1.44.0",
179+
"@types/glob": "^7.1.1",
180+
"@types/mocha": "^7.0.2",
181+
"@types/node": "^13.11.0",
182+
"eslint": "^6.8.0",
183+
"@typescript-eslint/parser": "^2.26.0",
184+
"@typescript-eslint/eslint-plugin": "^2.26.0",
185+
"glob": "^7.1.6",
186+
"mocha": "^7.1.1",
187+
"typescript": "^3.8.3",
188+
"vscode-test": "^1.3.0",
182189
"crypto-js": "^3.1.9-1",
183190
"makeerror": "^1.0.11",
184191
"tmpl": "^1.0.4",
185192
"walker": "^1.0.7"
186193
},
187194
"scripts": {
188-
"test": "node ./node_modules/vscode/bin/test"
195+
"vscode:prepublish": "npm run compile",
196+
"compile": "tsc -p ./",
197+
"lint": "eslint src --ext ts",
198+
"watch": "tsc -watch -p ./",
199+
"pretest": "npm run compile && npm run lint",
200+
"test": "node ./out/test/runTest.js"
189201
}
190202
}

src/config.js src/config.ts

File renamed without changes.

src/dirList.js src/dirList.ts

File renamed without changes.

src/extension.js src/extension.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// The module 'vscode' contains the VS Code extensibility API
22
// Import the module and reference it with the alias vscode in your code below
3-
const vscode = require('vscode');
4-
const ProjectManager = require('./gitProjectManager');
5-
const Config = require('./config');
3+
import * as vscode from 'vscode';
4+
import ProjectManager from './gitProjectManager';
5+
import Config from './config';
66
const cfg = new Config(vscode.workspace.getConfiguration('gitProjectManager'))
77

88
// this method is called when your extension is activated
99
// your extension is activated the very first time the command is executed
10-
function activate(context) {
10+
function activate(context: vscode.ExtensionContext) {
1111
const projectManager = new ProjectManager(cfg, context.globalState);
1212

1313
let disposable = vscode.commands.registerCommand('gitProjectManager.openProject', function () {
File renamed without changes.
File renamed without changes.

src/recentItems.js src/recentItems.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
class RecentItems {
2+
state: any;
3+
listSize: number;
4+
list: any;
25
/**
36
* Creates an instance of RecentItems.
47
*
@@ -10,7 +13,7 @@ class RecentItems {
1013
this.listSize = listSize;
1114
this.list = this.state.get('recent', []);
1215
}
13-
addProject(projectPath, gitRepo) {
16+
addProject(projectPath: string, gitRepo) {
1417
const idx = this.list.findIndex(p => p.projectPath === projectPath);
1518
if (idx >= 0) {
1619
this.list[idx].lastUsed = new Date().getTime();

tsconfig.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"target": "es6",
5+
"outDir": "out",
6+
"lib": [
7+
"es6"
8+
],
9+
"sourceMap": true,
10+
"rootDir": "src",
11+
"strict": true /* enable all strict type-checking options */
12+
/* Additional Checks */
13+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
14+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
15+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
16+
},
17+
"exclude": [
18+
"node_modules",
19+
".vscode-test"
20+
]
21+
}

0 commit comments

Comments
 (0)