Commit e9759570 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Merge branch 'fix-eslint-warnings' into 'master'

Fixed lint warning and propose fail or warning

## What does this MR do?

1. Fixes a linter warning that is currently on `master`.

2. Proposes the use of `--max-warnings 0` with `eslint` to make sure the CI build fails on any warnings.

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

See merge request !8025
parents c94ae31c bc31040e
{
"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"
},
......
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment