Skip to content

Commit

Permalink
Modify ESLint's config.
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed Dec 1, 2015
1 parent 1fa5e5b commit 2b24221
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
9 changes: 7 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"extends": "mysticatea/nodejs",
"root": true,
"extends": [
"mysticatea",
"mysticatea/modules",
"mysticatea/node"
],
"rules": {
"require-jsdoc": 2
"node/shebang": [2, {"convertBinPath": ["", "src"]}]
}
}
2 changes: 1 addition & 1 deletion src/lib/match-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const CONVERT_MAP = {":": "/", "/": ":"};
* @returns {string} The text which was swapped.
*/
function swapColonAndSlash(s) {
return s.replace(COLON_OR_SLASH, (matched) => CONVERT_MAP[matched]);
return s.replace(COLON_OR_SLASH, matched => CONVERT_MAP[matched]);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/lib/run-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ export default function runTask(task, stdin, stdout, stderr, packageConfigOption
if (stderrKind === "pipe") { cp.stderr.pipe(stderr); }

// Register
cp.on("error", (err) => {
cp.on("error", err => {
cp = null;
reject(err);
});
cp.on("close", (code) => {
cp.on("close", code => {
cp = null;
resolve({task, code});
});
Expand Down
7 changes: 5 additions & 2 deletions test/lib/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "mysticatea/es5",
"env": {"node": true},
"root": true,
"extends": [
"mysticatea/es5",
"mysticatea/node"
],
"rules": {
"no-console": 0
}
Expand Down
4 changes: 2 additions & 2 deletions test/pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ describe("[pattern] npm-run-all should run matched tasks if gived glob like patt
runAll("a")
.then(
() => assert(false, "should not match"),
(err) => assert((/not found/i).test(err.message))
err => assert((/not found/i).test(err.message))
)
);

it("command version", () =>
command(["a"])
.then(
() => assert(false, "should not match"),
(err) => assert((/not found/i).test(err.message))
err => assert((/not found/i).test(err.message))
)
);
});
Expand Down

0 comments on commit 2b24221

Please sign in to comment.