Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4ba38d5

Browse files
committed
Add basic package.json and eslint.
Signed-off-by: Eric Wang <skygragon@gmail.com>
1 parent ecbb4fb commit 4ba38d5

File tree

4 files changed

+48
-2
lines changed

4 files changed

+48
-2
lines changed

.eslintrc.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
"env": {
3+
"browser": false,
4+
"node": true,
5+
"es6": true
6+
},
7+
"extends": "google",
8+
"rules": {
9+
"comma-dangle": 0,
10+
"curly": 0,
11+
"key-spacing": [2, {align: "value"}],
12+
"max-len": [1, 120],
13+
"no-var": 0,
14+
"quotes": [2, "single", {avoidEscape: true}],
15+
"require-jsdoc": 0
16+
}
17+
};

package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "leetcode-cli-plugins",
3+
"version": "1.0.0",
4+
"description": "3rd party plugins for leetcode-cli.",
5+
"directories": {
6+
"doc": "docs"
7+
},
8+
"scripts": {
9+
"lint": "eslint plugins/",
10+
"test": "npm run lint"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "git+https://github.com/skygragon/leetcode-cli-plugins.git"
15+
},
16+
"author": {
17+
"name": "Eric Wang",
18+
"email": "skygragon@gmail.com"
19+
},
20+
"license": "MIT",
21+
"bugs": {
22+
"url": "https://github.com/skygragon/leetcode-cli-plugins/issues"
23+
},
24+
"homepage": "https://github.com/skygragon/leetcode-cli-plugins#readme",
25+
"devDependencies": {
26+
"eslint": "^4.4.1",
27+
"eslint-config-google": "^0.9.1"
28+
}
29+
}

plugins/cpp.run.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ plugin.testProblem = function(problem, cb) {
3535

3636
var types = re[1].split(',').map(function(x) {
3737
var parts = x.trim().split(' ');
38-
parts.pop(); // skip param name
38+
parts.pop(); // skip param name
3939
return parts.join(' ');
4040
});
4141

plugins/lintcode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ plugin.getProblems = function(cb) {
9898
};
9999

100100
plugin.getPageProblems = function(page, cb) {
101-
log.debug('running lintcode.getPageProblems: ' + page);
101+
log.debug('running lintcode.getPageProblems: ' + page);
102102
var opts = makeOpts(config.URL_PROBLEMS.replace('$page', page));
103103

104104
request(opts, function(e, resp, body) {

0 commit comments

Comments
 (0)