gitlab-org--gitlab-foss/app/views/shared
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
..
builds Remove white space between nav items 2016-12-14 10:32:14 -05:00
empty_states Added empty state svg and set up blank conditional 2016-11-18 03:57:36 +00:00
groups Update avatar container name so it doesnt conflict with other image containers 2016-11-03 12:26:09 -05:00
icons Update manual build icon SVG 2016-12-13 14:58:56 +01:00
issuable Merge branch 'clean-no-undef' into 'master' 2016-12-15 00:52:46 +00:00
labels Reduce duplication between the project and group label forms 2016-10-19 14:58:26 -02:00
members Merge branch '23305-leave-project-and-leave-group-should-be-buttons' into 'master' 2016-12-09 19:27:09 +00:00
milestones Displays milestone remaining days only when it's present 2016-12-08 17:09:06 -02:00
notifications remove left_align setting from notification setting dropdown in favor of a pure css solution 2016-12-10 00:21:47 -06:00
projects Update avatar container name so it doesnt conflict with other image containers 2016-11-03 12:26:09 -05:00
snippets move snippet edited timeago under the snippet title 2016-12-10 00:57:23 -06:00
web_hooks Add option to confidential issues events to trigger Webhooks 2016-08-31 18:34:23 -03:00
_allow_request_access.html.haml Allow to disable user request access to groups/projects 2016-07-20 14:38:21 +02:00
_choose_group_avatar_button.html.haml
_clone_panel.html.haml Clone button should not be clickable when there is a disabled protocol 2016-07-05 16:54:22 -05:00
_commit_message_container.html.haml
_confirm_modal.html.haml Move modal css to separate file and fix danger text for confirmation modal 2016-04-29 19:02:30 +02:00
_event_filter.html.haml remove unnecessary issues event filter on comments tab 2016-12-08 23:46:45 +03:00
_field.html.haml
_file_highlight.html.haml add custom highlighting via .gitattributes 2016-06-27 14:17:49 -07:00
_group_form.html.haml use standard gitlab namespace regex for group name validation 2016-11-25 10:38:55 -06:00
_group_tips.html.haml
_import_form.html.haml some JS magic to fix empty URL bug 2016-07-13 17:01:24 +02:00
_issues.html.haml Save a query on issue and MR lists 2016-12-01 12:24:55 +00:00
_label.html.haml Avoid code duplication for label subscription status on label partial 2016-11-17 15:10:13 -02:00
_label_row.html.haml Only show label type for projects that belong to a group 2016-10-19 14:58:28 -02:00
_labels_row.html.haml Fix LabelsHelper#link_to_label to use the subject argument 2016-10-19 14:58:24 -02:00
_logo.svg Change logo animation to CSS 2016-08-26 17:32:11 -05:00
_merge_requests.html.haml Save a query on issue and MR lists 2016-12-01 12:24:55 +00:00
_milestone_expired.html.haml Add a starting date to milestones 2016-11-23 13:41:04 +02:00
_milestones_filter.html.haml Remove white space between nav items 2016-12-14 10:32:14 -05:00
_nav_scroll.html.haml Add horizontal scrolling to all sub-navs on mobile viewports 2016-08-25 18:01:37 -05:00
_new_commit_form.html.haml
_new_project_item_select.html.haml Replace bootstrap caret with fontawesome caret 2016-10-05 17:39:52 -05:00
_no_password.html.haml
_no_ssh.html.haml
_outdated_browser.html.haml
_project_limit.html.haml
_promo.html.haml
_ref_switcher.html.haml Make the ref-selector function work properly for branch selection. 2016-08-17 09:23:43 -06:00
_service_settings.html.haml Frontend review changes 2016-11-21 22:11:21 +00:00
_show_aside.html.haml
_sort_dropdown.html.haml Homogenize dropdowns on Issue page 2016-11-28 23:18:03 +01:00
_visibility_level.html.haml Fix "Create project" button layout with restricted visibility 2016-09-26 09:04:15 -04:00
_visibility_radios.html.haml Fix "Create project" button layout with restricted visibility 2016-09-26 09:04:15 -04:00