Skip to content

Commit

Permalink
Merge pull request #55 from ipeters90/configure-lint-script
Browse files Browse the repository at this point in the history
fixed eslint errs and added npm lint script
  • Loading branch information
gaearon committed Feb 25, 2016
2 parents fcf7598 + b821b8b commit 9e99c17
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
],
"scripts": {
"build": "babel src --out-dir lib",
"prepublish": "rimraf lib && npm run build",
"test": "mocha --compilers js:babel-core/register --reporter spec test/*.js"
"prepublish": "npm run test && rimraf lib && npm run build",
"test": "mocha --compilers js:babel-core/register --reporter spec test/*.js",
"posttest": "npm run lint",
"lint": "eslint src test"
},
"repository": {
"type": "git",
Expand All @@ -37,6 +39,7 @@
"chai": "^3.2.0",
"eslint": "^1.10.2",
"eslint-config-airbnb": "1.0.2",
"eslint-plugin-react": "^4.1.0",
"mocha": "^2.2.5",
"rimraf": "^2.4.3"
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ function thunkMiddleware({ dispatch, getState }) {
next(action);
}

module.exports = thunkMiddleware
module.exports = thunkMiddleware;
6 changes: 3 additions & 3 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ describe('thunk middleware', () => {
const expected = 'redux';
const actionHandler = nextHandler(() => expected);

let outcome = actionHandler();
const outcome = actionHandler();
chai.assert.strictEqual(outcome, expected);
});

it('must return value as expected if a function', () => {
const expected = 'rocks';
const actionHandler = nextHandler();

let outcome = actionHandler(() => expected);
const outcome = actionHandler(() => expected);
chai.assert.strictEqual(outcome, expected);
});

Expand All @@ -71,7 +71,7 @@ describe('thunk middleware', () => {
it('must throw if argument is non-object', done => {
try {
thunkMiddleware();
} catch(err) {
} catch (err) {
done();
}
});
Expand Down

0 comments on commit 9e99c17

Please sign in to comment.