diff options
author | Mike Greiling <mike@pixelcog.com> | 2016-11-21 17:19:51 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2016-11-22 12:19:51 -0600 |
commit | bd0017c6d4e008474fcd87e979b3b4e3f93e39b1 (patch) | |
tree | d232acfac0d235b73e71703aedf6476c39692dc0 | |
parent | 12e4f5bd777adb5cc035c84201ef67ad53e01237 (diff) | |
download | gitlab-ce-bd0017c6d4e008474fcd87e979b3b4e3f93e39b1.tar.gz |
clean up globals exemptions within .eslintrc
18 files changed, 47 insertions, 25 deletions
diff --git a/.eslintrc b/.eslintrc index 5850c107a02..6823d0c9f35 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,4 +1,8 @@ { + "env": { + "browser": true, + "es6": true + }, "extends": "airbnb", "plugins": [ "filenames" @@ -9,23 +13,7 @@ "globals": { "$": false, "_": false, - "beforeEach": false, - "d3": false, - "define": false, - "describe": false, - "document": false, - "expect": false, - "fixture": false, "gl": false, - "it": false, - "jQuery": false, - "Mousetrap": false, - "spyOn": false, - "spyOnEvent": false, - "Turbolinks": false, - "window": false, - "Vue": false, - "Flash": false, - "Cookies": false + "jQuery": false } } diff --git a/app/assets/javascripts/activities.js.es6 b/app/assets/javascripts/activities.js.es6 index 19bcfef89fb..648cb4d5d85 100644 --- a/app/assets/javascripts/activities.js.es6 +++ b/app/assets/javascripts/activities.js.es6 @@ -1,5 +1,6 @@ /* eslint-disable no-param-reassign, class-methods-use-this */ -/* global Pager, Cookies */ +/* global Pager */ +/* global Cookies */ ((global) => { class Activities { diff --git a/app/assets/javascripts/cycle_analytics/components/stage_code_component.js.es6 b/app/assets/javascripts/cycle_analytics/components/stage_code_component.js.es6 index 520cee7738b..b83a4c63fad 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_code_component.js.es6 +++ b/app/assets/javascripts/cycle_analytics/components/stage_code_component.js.es6 @@ -1,4 +1,6 @@ /* eslint-disable no-param-reassign */ +/* global Vue */ + ((global) => { global.cycleAnalytics = global.cycleAnalytics || {}; diff --git a/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js.es6 b/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js.es6 index 3bb01c67206..cb1687dcc7a 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js.es6 +++ b/app/assets/javascripts/cycle_analytics/components/stage_issue_component.js.es6 @@ -1,4 +1,6 @@ /* eslint-disable no-param-reassign */ +/* global Vue */ + ((global) => { global.cycleAnalytics = global.cycleAnalytics || {}; diff --git a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js.es6 b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js.es6 index b568ab62a69..513298ba4e7 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js.es6 +++ b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.js.es6 @@ -1,4 +1,6 @@ /* eslint-disable no-param-reassign */ +/* global Vue */ + ((global) => { global.cycleAnalytics = global.cycleAnalytics || {}; diff --git a/app/assets/javascripts/cycle_analytics/components/stage_production_component.js.es6 b/app/assets/javascripts/cycle_analytics/components/stage_production_component.js.es6 index a6b6d817a82..73f4205b578 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_production_component.js.es6 +++ b/app/assets/javascripts/cycle_analytics/components/stage_production_component.js.es6 @@ -1,4 +1,6 @@ /* eslint-disable no-param-reassign */ +/* global Vue */ + ((global) => { global.cycleAnalytics = global.cycleAnalytics || {}; diff --git a/app/assets/javascripts/cycle_analytics/components/stage_review_component.js.es6 b/app/assets/javascripts/cycle_analytics/components/stage_review_component.js.es6 index 9e819c1d420..501ffb1fac9 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_review_component.js.es6 +++ b/app/assets/javascripts/cycle_analytics/components/stage_review_component.js.es6 @@ -1,4 +1,6 @@ /* eslint-disable no-param-reassign */ +/* global Vue */ + ((global) => { global.cycleAnalytics = global.cycleAnalytics || {}; diff --git a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js.es6 b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js.es6 index b30c3a31010..82622232f64 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js.es6 +++ b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.js.es6 @@ -1,4 +1,6 @@ /* eslint-disable no-param-reassign */ +/* global Vue */ + ((global) => { global.cycleAnalytics = global.cycleAnalytics || {}; diff --git a/app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6 b/app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6 index c54d6b6ee37..4bfd363a1f1 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6 +++ b/app/assets/javascripts/cycle_analytics/components/stage_test_component.js.es6 @@ -1,4 +1,6 @@ /* eslint-disable no-param-reassign */ +/* global Vue */ + ((global) => { global.cycleAnalytics = global.cycleAnalytics || {}; diff --git a/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 b/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 index 8403fbeaab5..b9675f50e31 100644 --- a/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 +++ b/app/assets/javascripts/cycle_analytics/components/total_time_component.js.es6 @@ -1,4 +1,6 @@ /* eslint-disable no-param-reassign */ +/* global Vue */ + ((global) => { global.cycleAnalytics = global.cycleAnalytics || {}; diff --git a/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6 b/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6 index f1ddd139c48..2f810a69758 100644 --- a/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6 +++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_bundle.js.es6 @@ -1,3 +1,7 @@ +/* global Vue */ +/* global Cookies */ +/* global Flash */ + //= require vue //= require_tree ./svg //= require_tree . diff --git a/app/assets/javascripts/environments/components/environment.js.es6 b/app/assets/javascripts/environments/components/environment.js.es6 index c6b38d8447d..35e183a9086 100644 --- a/app/assets/javascripts/environments/components/environment.js.es6 +++ b/app/assets/javascripts/environments/components/environment.js.es6 @@ -1,12 +1,13 @@ +/* eslint-disable no-param-reassign */ +/* global Vue */ +/* global EnvironmentsService */ + //= require vue //= require vue-resource //= require_tree ../services/ //= require ./environment_item -/* globals Vue, EnvironmentsService */ -/* eslint-disable no-param-reassign */ - -(() => { // eslint-disable-line +(() => { window.gl = window.gl || {}; /** diff --git a/app/assets/javascripts/environments/components/environment_item.js.es6 b/app/assets/javascripts/environments/components/environment_item.js.es6 index da7db5c05bd..36a0fec3cab 100644 --- a/app/assets/javascripts/environments/components/environment_item.js.es6 +++ b/app/assets/javascripts/environments/components/environment_item.js.es6 @@ -6,7 +6,8 @@ /*= require ./environment_stop */ /*= require ./environment_rollback */ -/* globals Vue, timeago */ +/* global Vue */ +/* global timeago */ (() => { /** diff --git a/app/assets/javascripts/logo.js b/app/assets/javascripts/logo.js index 9404b2c3a8c..0ae6df311bb 100644 --- a/app/assets/javascripts/logo.js +++ b/app/assets/javascripts/logo.js @@ -1,4 +1,6 @@ /* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, padded-blocks */ +/* global Turbolinks */ + (function() { Turbolinks.enableProgressBar(); diff --git a/app/assets/javascripts/tree.js b/app/assets/javascripts/tree.js index 54c473d936d..f48a7ee0f55 100644 --- a/app/assets/javascripts/tree.js +++ b/app/assets/javascripts/tree.js @@ -1,4 +1,5 @@ /* eslint-disable func-names, space-before-function-paren, wrap-iife, max-len, quotes, consistent-return, no-var, one-var, one-var-declaration-per-line, no-else-return, prefer-arrow-callback, padded-blocks, max-len */ +/* global Turbolinks */ (function() { this.TreeView = (function() { function TreeView() { diff --git a/spec/javascripts/.eslintrc b/spec/javascripts/.eslintrc index 90388929612..7792acffac2 100644 --- a/spec/javascripts/.eslintrc +++ b/spec/javascripts/.eslintrc @@ -7,5 +7,9 @@ "rules": { "prefer-arrow-callback": 0, "func-names": 0 + }, + "globals": { + "fixture": false, + "spyOnEvent": false } } diff --git a/spec/javascripts/build_spec.js.es6 b/spec/javascripts/build_spec.js.es6 index e21e5844a26..ee192c4f18a 100644 --- a/spec/javascripts/build_spec.js.es6 +++ b/spec/javascripts/build_spec.js.es6 @@ -1,5 +1,7 @@ -/* global Build */ /* eslint-disable no-new */ +/* global Build */ +/* global Turbolinks */ + //= require lib/utils/timeago //= require lib/utils/datetime_utility //= require build diff --git a/spec/javascripts/environments/environments_store_spec.js.es6 b/spec/javascripts/environments/environments_store_spec.js.es6 index 82d9599f372..9b0b3cb1c65 100644 --- a/spec/javascripts/environments/environments_store_spec.js.es6 +++ b/spec/javascripts/environments/environments_store_spec.js.es6 @@ -1,7 +1,9 @@ +/* global environmentsList */ + //= require vue //= require environments/stores/environments_store //= require ./mock_data -/* globals environmentsList */ + (() => { beforeEach(() => { gl.environmentsList.EnvironmentsStore.create(); |