Skip to content

Commit

Permalink
refactor: add linter
Browse files Browse the repository at this point in the history
  • Loading branch information
daiyam committed Jul 26, 2021
1 parent 24af2c0 commit b3715dd
Show file tree
Hide file tree
Showing 18 changed files with 5,868 additions and 1,198 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12.19.0
v14.16.1
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
};
3 changes: 3 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
'*.ts': 'xo'
};
5,911 changes: 5,204 additions & 707 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,19 @@
},
"main": "./out/extension",
"scripts": {
"compile": "tsc -p src",
"lint": "xo",
"prepare": "husky install",
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./"
"watch": "tsc -watch -p src"
},
"dependencies": {
"@daiyam/regexp": "^0.1.4",
"@daiyam/regexp": "^0.2.1",
"@zokugun/vscode.explicit-folding-api": "0.1.1"
},
"devDependencies": {
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@types/chai": "^4.2.17",
"@types/glob": "^7.1.3",
"@types/klaw-sync": "^6.0.0",
Expand All @@ -119,10 +123,13 @@
"@types/vscode": "^1.23.0",
"chai": "^4.3.4",
"glob": "^7.1.6",
"husky": "^7.0.1",
"klaw-sync": "^6.0.0",
"lint-staged": "^11.1.1",
"mocha": "^8.3.2",
"typescript": "^4.2.4",
"vscode-test": "^1.5.2",
"xo": "^0.42.0",
"yaml": "^1.10.2"
},
"keywords": [
Expand Down
4 changes: 3 additions & 1 deletion src/disposable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ export class Disposable extends vscode.Disposable {
private subscriptions: vscode.Disposable[] = [];

constructor() {
super(() => {});
super(() => {
// do nothing
});
}

dispose() {
Expand Down
Loading

0 comments on commit b3715dd

Please sign in to comment.