Skip to content

Commit cf60bdf

Browse files
committed
Update dependencies
- Add `eslint-config-mysticatea` for linting rules. - Fixed for linting.
1 parent a59ef7d commit cf60bdf

File tree

5 files changed

+28
-44
lines changed

5 files changed

+28
-44
lines changed

.eslintrc

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,6 @@
11
{
2-
"env": {
3-
"node": true,
4-
"es6": true
5-
},
6-
"ecmaFeatures": {
7-
"arrowFunctions": true,
8-
"binaryLiterals": true,
9-
"blockBindings": true,
10-
"classes": true,
11-
"defaultParams": true,
12-
"destructuring": true,
13-
"forOf": true,
14-
"generators": true,
15-
"modules": true,
16-
"objectLiteralComputedProperties": true,
17-
"objectLiteralDuplicateProperties": true,
18-
"objectLiteralShorthandMethods": true,
19-
"objectLiteralShorthandProperties": true,
20-
"octalLiterals": true,
21-
"regexUFlag": true,
22-
"regexYFlag": true,
23-
"superInFunctions": true,
24-
"templateStrings": true,
25-
"unicodeCodePointEscapes": true,
26-
"globalReturn": true
2+
"extends": "mysticatea/nodejs",
3+
"rules": {
4+
"spaced-comment": [2, "always", {"exceptions": ["*", "-"]}]
275
}
286
}

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,21 @@
2929
"test-task:stdio": "node test/tasks/stdio.js"
3030
},
3131
"dependencies": {
32-
"es6-promise": "^2.1.1",
33-
"minimatch": "^2.0.7"
32+
"es6-promise": "^2.3.0",
33+
"minimatch": "^2.0.8"
3434
},
3535
"devDependencies": {
36-
"babel": "^5.4.2",
37-
"babel-core": "^5.4.2",
38-
"babel-plugin-espower": "^0.3.0",
36+
"babel": "^5.5.8",
37+
"babel-core": "^5.5.8",
38+
"babel-plugin-espower": "^1.0.0",
3939
"coveralls": "^2.11.2",
40-
"eslint": "^0.21.0",
41-
"istanbul": "^0.3.14",
40+
"eslint": "^0.23.0",
41+
"eslint-config-mysticatea": "^0.3.0",
42+
"istanbul": "^0.3.15",
4243
"mocha": "^2.2.5",
43-
"npm-run-all": "^1.2.4",
44+
"npm-run-all": "^1.2.5",
4445
"power-assert": "^0.11.0",
45-
"rimraf": "^2.3.3"
46+
"rimraf": "^2.4.0"
4647
},
4748
"repository": {
4849
"type": "git",

src/command.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ export default function main(
6969
case "--version":
7070
printVersion(stdout);
7171
return SUCCESS;
72+
73+
default:
74+
break;
7275
}
7376

7477
let queue;
@@ -89,18 +92,18 @@ export default function main(
8992
}
9093

9194
const options = {
92-
stdout: stdout,
93-
stderr: stderr,
95+
stdout,
96+
stderr,
9497
parallel: group.parallel
9598
};
9699
return runAll(group.tasks, options).then(next);
97100
})();
98101
}
99102

100-
/*eslint no-process-exit:0*/
103+
/* eslint no-process-exit:0 */
101104
if (require.main === module) {
102105
main(process.argv.slice(2)).catch(err => {
103-
console.log("ERROR:", err.message);
106+
console.error("ERROR:", err.message); // eslint-disable-line no-console
104107
process.exit(1);
105108
});
106109
}

src/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function readTaskList() {
2121
}
2222
}
2323
catch (err) {
24-
console.error("ERROR:", err.message);
24+
console.error("ERROR:", err.message); // eslint-disable-line no-console
2525
}
2626

2727
return null;
@@ -52,7 +52,7 @@ function filterTasks(taskList, patterns) {
5252

5353
// Take tasks while keep the order of patterns.
5454
const retv = [];
55-
let matched = Object.create(null);
55+
const matched = Object.create(null);
5656
filters.forEach(filter => {
5757
candidates.forEach(task => {
5858
if (filter(task)) {
@@ -78,9 +78,7 @@ function defineExec() {
7878
const OPTIONS = {windowsVerbatimArguments: true};
7979
return command => spawn(FILE, ["/s", "/c", `"${command}"`], OPTIONS);
8080
}
81-
else {
82-
return command => spawn("/bin/sh", ["-c", command]);
83-
}
81+
return command => spawn("/bin/sh", ["-c", command]);
8482
}
8583

8684
const exec = defineExec();

test/.eslintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"env": {"mocha": true}
2+
"env": {"mocha": true},
3+
"rules": {
4+
"max-nested-callbacks": 0,
5+
"spaced-comment": 0
6+
}
37
}

0 commit comments

Comments
 (0)