Fixed lint warning and propose fail or warning

This commit is contained in:
Luke "Jared" Bennett 2016-12-10 12:04:54 +00:00
parent 3f768f9a14
commit bc31040ea9
No known key found for this signature in database
GPG key ID: 402ED51FB5D306C2
2 changed files with 10 additions and 8 deletions

View file

@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
"eslint": "eslint --ext .js,.js.es6 .",
"eslint": "eslint --max-warnings 0 --ext .js,.js.es6 .",
"eslint-fix": "npm run eslint -- --fix",
"eslint-report": "npm run eslint -- --format html --output-file ./eslint-report.html"
},

View file

@ -21,16 +21,18 @@
return this.project = new Project();
});
return describe('project list', function() {
beforeEach((function(_this) {
return function() {
_this.projects_data = fixture.load('projects.json')[0];
return spyOn(jQuery, 'ajax').and.callFake(function(req) {
var fakeAjaxResponse = function fakeAjaxResponse(req) {
var d;
expect(req.url).toBe('/api/v3/projects.json?simple=true');
d = $.Deferred();
d.resolve(_this.projects_data);
d.resolve(this.projects_data);
return d.promise();
});
};
beforeEach((function(_this) {
return function() {
_this.projects_data = fixture.load('projects.json')[0];
return spyOn(jQuery, 'ajax').and.callFake(fakeAjaxResponse.bind(_this));
};
})(this));
it('to show on toggle click', (function(_this) {