Merge branch '24756-clean-up-eslintrc-globals' into 'master'
Clean up globals exemptions within .eslintrc ## What does this MR do? Removes unnecessarily-exempted globals from `.eslintrc` where possible. ## Are there points in the code the reviewer needs to double check? `npm run eslint` should return 0 errors. ## Why was this MR needed? see Issue #24756 ## Does this MR meet the acceptance criteria? - Tests - [x] 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? Closes #24756 See merge request !7642
This commit is contained in:
commit
536ec509d5
18 changed files with 53 additions and 30 deletions
33
.eslintrc
33
.eslintrc
|
@ -1,31 +1,20 @@
|
|||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true
|
||||
},
|
||||
"extends": "airbnb",
|
||||
"globals": {
|
||||
"$": false,
|
||||
"_": false,
|
||||
"gl": false,
|
||||
"gon": false,
|
||||
"jQuery": false
|
||||
},
|
||||
"plugins": [
|
||||
"filenames"
|
||||
],
|
||||
"rules": {
|
||||
"filenames/match-regex": [2, "^[a-z0-9_]+(.js)?$"]
|
||||
},
|
||||
"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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* eslint-disable no-param-reassign, class-methods-use-this */
|
||||
/* global Pager, Cookies */
|
||||
/* global Pager */
|
||||
/* global Cookies */
|
||||
|
||||
((global) => {
|
||||
class Activities {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
/* global Vue */
|
||||
|
||||
((global) => {
|
||||
global.cycleAnalytics = global.cycleAnalytics || {};
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
/* global Vue */
|
||||
|
||||
((global) => {
|
||||
global.cycleAnalytics = global.cycleAnalytics || {};
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
/* global Vue */
|
||||
|
||||
((global) => {
|
||||
global.cycleAnalytics = global.cycleAnalytics || {};
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
/* global Vue */
|
||||
|
||||
((global) => {
|
||||
global.cycleAnalytics = global.cycleAnalytics || {};
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
/* global Vue */
|
||||
|
||||
((global) => {
|
||||
global.cycleAnalytics = global.cycleAnalytics || {};
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
/* global Vue */
|
||||
|
||||
((global) => {
|
||||
global.cycleAnalytics = global.cycleAnalytics || {};
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
/* global Vue */
|
||||
|
||||
((global) => {
|
||||
global.cycleAnalytics = global.cycleAnalytics || {};
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
/* global Vue */
|
||||
|
||||
((global) => {
|
||||
global.cycleAnalytics = global.cycleAnalytics || {};
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/* global Vue */
|
||||
/* global Cookies */
|
||||
/* global Flash */
|
||||
|
||||
//= require vue
|
||||
//= require_tree ./svg
|
||||
//= require_tree .
|
||||
|
|
|
@ -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 || {};
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
/*= require ./environment_stop */
|
||||
/*= require ./environment_rollback */
|
||||
|
||||
/* globals Vue, timeago */
|
||||
/* global Vue */
|
||||
/* global timeago */
|
||||
|
||||
(() => {
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
/* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, padded-blocks */
|
||||
/* global Turbolinks */
|
||||
|
||||
(function() {
|
||||
Turbolinks.enableProgressBar();
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -7,5 +7,9 @@
|
|||
"rules": {
|
||||
"prefer-arrow-callback": 0,
|
||||
"func-names": 0
|
||||
},
|
||||
"globals": {
|
||||
"fixture": false,
|
||||
"spyOnEvent": false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
/* global environmentsList */
|
||||
|
||||
//= require vue
|
||||
//= require environments/stores/environments_store
|
||||
//= require ./mock_data
|
||||
/* globals environmentsList */
|
||||
|
||||
(() => {
|
||||
beforeEach(() => {
|
||||
gl.environmentsList.EnvironmentsStore.create();
|
||||
|
|
Loading…
Reference in a new issue