Skip to content

Commit

Permalink
Adopt ESLint.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Jan 21, 2016
1 parent 1eb907f commit 26bad50
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ecmaFeatures:
modules: true

env:
es6: true
browser: true

extends:
"eslint:recommended"

rules:
no-cond-assign: 0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"scripts": {
"pretest": "mkdir -p build && node -e 'process.stdout.write(\"var version = \\\"\" + require(\"./package.json\").version + \"\\\"; export * from \\\"../index\\\"; export {version};\");' > build/bundle.js && rollup -f umd -u d3-timer -n d3_timer -o build/d3-timer.js -- build/bundle.js",
"test": "faucet `find test -name '*-test.js'`",
"test": "faucet `find test -name '*-test.js'` && eslint index.js src",
"prepublish": "npm run test && uglifyjs build/d3-timer.js -c -m -o build/d3-timer.min.js && rm -f build/d3-timer.zip && zip -j build/d3-timer.zip -- LICENSE README.md build/d3-timer.js build/d3-timer.min.js"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Timer.prototype = timer.prototype = {

export function timer(callback, delay, time) {
return new Timer(callback, delay, time);
};
}

export function timerFlush(time) {
time = time == null ? Date.now() : +time;
Expand All @@ -58,7 +58,7 @@ export function timerFlush(time) {
} finally {
--frame;
}
};
}

function wake() {
frame = timeout = 0;
Expand Down

0 comments on commit 26bad50

Please sign in to comment.