gitlab-org--gitlab-foss/app/views/shared/issuable
Alfredo Sumaran 4e68b88193 Merge branch 'clean-no-undef' into 'master'
Explicitly declare all javascript globals and all eslint rule violations

This merge request takes every single external global variable referenced within a javascript file and explicitly marks it with a `/* global Foo */` comment block at the top of the script.

This also expands all blanket instances of `/* eslint-disable */` with an explicit list of disabled rules.  This is useful because if we need to search for violations of a particular rule we can simply grep the codebase for something like `no-unused-vars` or `semi` and find all of the places where this rule has yet to be fixed.

Lastly, it also removes and resolves any existing `no-undef` eslint violations.  This is useful for catching mistakes like forgetting to declare a variable with `var`/`let`/`const` which can cause hard to find bugs.

## What does this MR do?

1. Looks for generic uses of `/* eslint-disable */` and refactors them into individual rule exceptions.
2. Looks for all occurrences of `/* eslint-disable ... no-undef */` and resolves them by either fixing bugs or declaring globals with `/* global Foo */`.

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

This touches a lot of files, most changes touch nothing other than comment blocks or whitespace.  The exceptions are the following 14 files which required some small bug fixes after removing `no-undef`:

- api.js
- breakpoints.js
- build.js
- commits.js
- diff_notes/components/jump_to_discussion.js.es6
- gfm_auto_complete.js.es6
- gl_dropdown.js
- groups_select.js
- importer_status.js
- namespace_select.js
- notes.js
- preview_markdown.js
- projects_list.js
- single_file_diff.js

## Why was this MR needed?

Removal of ~"technical debt" and some necessary changes to help !7288 

## Screenshots (if relevant)

N/A

## 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
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

N/A

See merge request !8043
2016-12-15 00:52:46 +00:00
..
form Refactor branch chooser in issuable form 2016-11-30 18:31:23 +01:00
_filter.html.haml Refactor issuable_filters_present to reduce duplications 2016-11-28 14:48:03 +05:00
_form.html.haml Feature: delegate all open discussions to Issue 2016-12-05 20:55:45 +01:00
_label_dropdown.html.haml Homogenize dropdowns on Issue page 2016-11-28 23:18:03 +01:00
_label_page_create.html.haml Add placeholder in the color input inside the create new label popup 2016-11-16 16:21:28 -07:00
_label_page_default.html.haml Simplify copy on "Create a new list" dropdown in Issue Boards 2016-11-23 17:28:58 -02:00
_milestone_dropdown.html.haml fixes milestone dropdown not select issue 2016-11-01 13:29:47 +06:00
_nav.html.haml Remove white space between nav items 2016-12-14 10:32:14 -05:00
_participants.html.haml
_search_form.html.haml fix issues mr counter 2016-09-20 14:39:15 +01:00
_sidebar.html.haml resolve all instances of no-undef eslint rule violations 2016-12-14 02:11:13 -06:00