Commit b1761aae authored by Mike Greiling's avatar Mike Greiling

Upgrade eslint to v5

We needed to disable a few eslint-config-airbnb-base rules in order
to keep the number of line changes under control. These should be
re-enabled asap.
parent edbdc66d
......@@ -56,6 +56,10 @@ rules:
component: always
svg: always
math: always
camelcase:
- error
- properties: never
ignoreDestructuring: true
## Conflicting rules with prettier:
space-before-function-paren: off
curly: off
......@@ -63,7 +67,7 @@ rules:
function-paren-newline: off
object-curly-newline: off
padded-blocks: off
# Disabled for now, to make the eslint 3 -> eslint 4 update smoother
# Disabled for now, to make the eslint 3 -> eslint 5 update smoother
## Indent rule. We are using the old for now: https://eslint.org/docs/user-guide/migrating-to-4.0.0#indent-rewrite
indent: off
indent-legacy:
......@@ -78,3 +82,11 @@ rules:
FunctionExpression:
parameters: 1
body: 1
# Disabled for now, to make the airbnb-base 12.1.0 -> 13.1.0 update smoother
operator-linebreak: off
implicit-arrow-linebreak: off
no-else-return:
- error
- allowElseIf: true
import/no-useless-path-segments: off
lines-between-class-members: off
......@@ -9,7 +9,7 @@ import '~/vue_shared/models/assignee';
import FilteredSearchBoards from './filtered_search_boards';
import eventHub from './eventhub';
import sidebarEventHub from '~/sidebar/event_hub'; // eslint-disable-line import/first
import sidebarEventHub from '~/sidebar/event_hub';
import './models/milestone';
import './models/project';
import './stores/boards_store';
......@@ -21,19 +21,19 @@ import './components/board';
import './components/board_sidebar';
import './components/new_list_dropdown';
import BoardAddIssuesModal from './components/modal/index.vue';
import '~/vue_shared/vue_resource_interceptor'; // eslint-disable-line import/first
import '~/vue_shared/vue_resource_interceptor';
import 'ee/boards/models/list'; // eslint-disable-line import/first
import 'ee/boards/models/issue'; // eslint-disable-line import/first
import 'ee/boards/models/project'; // eslint-disable-line import/first
import BoardService from 'ee/boards/services/board_service'; // eslint-disable-line import/first
import 'ee/boards/components/board_sidebar'; // eslint-disable-line import/first
import 'ee/boards/components/board'; // eslint-disable-line import/first
import 'ee/boards/components/modal/index'; // eslint-disable-line import/first
import 'ee/boards/components/boards_selector'; // eslint-disable-line import/first
import collapseIcon from 'ee/boards/icons/fullscreen_collapse.svg'; // eslint-disable-line import/first
import expandIcon from 'ee/boards/icons/fullscreen_expand.svg'; // eslint-disable-line import/first
import tooltip from '~/vue_shared/directives/tooltip'; // eslint-disable-line import/first
import 'ee/boards/models/list';
import 'ee/boards/models/issue';
import 'ee/boards/models/project';
import BoardService from 'ee/boards/services/board_service';
import 'ee/boards/components/board_sidebar';
import 'ee/boards/components/board';
import 'ee/boards/components/modal/index';
import 'ee/boards/components/boards_selector';
import collapseIcon from 'ee/boards/icons/fullscreen_collapse.svg';
import expandIcon from 'ee/boards/icons/fullscreen_expand.svg';
import tooltip from '~/vue_shared/directives/tooltip';
export default () => {
const $boardApp = document.getElementById('board-app');
......
......@@ -4,7 +4,7 @@
*/
import environmentItem from './environment_item.vue';
import deployBoard from 'ee/environments/components/deploy_board_component.vue'; // eslint-disable-line import/first
import deployBoard from 'ee/environments/components/deploy_board_component.vue'; // eslint-disable-line import/order
export default {
components: {
......
......@@ -32,7 +32,7 @@ import initSearchAutocomplete from './search_autocomplete';
import GlFieldErrors from './gl_field_errors';
// EE-only scripts
import 'ee/main'; // eslint-disable-line import/first
import 'ee/main';
// expose jQuery as global (TODO: remove these)
window.jQuery = jQuery;
......
......@@ -115,8 +115,9 @@ export default class MergeRequestTabs {
this.mergeRequestTabs &&
this.mergeRequestTabs.querySelector(`a[data-action='${action}']`) &&
this.mergeRequestTabs.querySelector(`a[data-action='${action}']`).click
)
) {
this.mergeRequestTabs.querySelector(`a[data-action='${action}']`).click();
}
this.initAffix();
}
......
<script>
import _ from 'underscore';
import StageColumnComponent from './stage_column_component.vue';
import LinkedPipelinesColumn from 'ee/pipelines/components/graph/linked_pipelines_column.vue'; // eslint-disable-line import/first
import LinkedPipelinesColumn from 'ee/pipelines/components/graph/linked_pipelines_column.vue'; // eslint-disable-line import/order
export default {
components: {
......
......@@ -114,8 +114,9 @@ class BoardsStoreEE {
!this.$boardApp.hasAttribute('data-show-promotion') ||
this.promotionIsHidden() ||
this.store.disabled
)
) {
return;
}
this.store.addList({
id: 'promotion',
......
......@@ -32,8 +32,9 @@ const CustomNumber = {
92, // right window
93, // select
].indexOf(e.detail.which || e.detail.keyCode) > -1
)
) {
return;
}
if (this.timeout) clearTimeout(this.timeout);
this.timeout = setTimeout(this.keydown.bind(this, e), 200);
......
......@@ -2,7 +2,7 @@ import Vue from 'vue';
import pipelineComponent from '~/vue_merge_request_widget/components/mr_widget_pipeline.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
import mockData from '../mock_data';
import mockLinkedPipelines from 'ee_spec/pipelines/graph/linked_pipelines_mock_data'; // eslint-disable-line import/first
import mockLinkedPipelines from 'ee_spec/pipelines/graph/linked_pipelines_mock_data'; // eslint-disable-line import/order
describe('MRWidgetPipeline', () => {
let vm;
......
......@@ -10,7 +10,7 @@ import { TEST_HOST } from 'spec/test_constants';
import state from 'ee/vue_shared/security_reports/store/state';
import mockData, { baseIssues, headIssues, basePerformance, headPerformance } from './mock_data';
import {
import { // eslint-disable-line import/order
sastIssues,
sastIssuesBase,
dockerReport,
......@@ -19,7 +19,7 @@ import {
dastBase,
sastBaseAllIssues,
sastHeadAllIssues,
} from 'ee_spec/vue_shared/security_reports/mock_data'; // eslint-disable-line import/first
} from 'ee_spec/vue_shared/security_reports/mock_data';
describe('ee merge request widget options', () => {
let vm;
......
This diff is collapsed.
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