Commit f5b712e7 authored by Fatih Acet's avatar Fatih Acet

Merge branch 'remove-jsx-react-eslint-plugins' into 'master'

Remove JSX/React eslint plugins.

## What does this MR do?

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

## Why was this MR needed?

## Screenshots (if relevant)

## 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?

See merge request !7470
parents 04229ece c145413d
/coverage/
/coverage-javascript/ /coverage-javascript/
/public/ /public/
/tmp/ /tmp/
......
{ {
"env": { "env": {
"jquery": true,
"browser": true, "browser": true,
"es6": true "es6": true
}, },
"extends": "airbnb", "extends": "airbnb-base",
"globals": { "globals": {
"$": false,
"_": false, "_": false,
"gl": false, "gl": false,
"gon": false, "gon": false
"jQuery": false
}, },
"plugins": [ "plugins": [
"filenames" "filenames"
......
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-underscore-dangle, prefer-arrow-callback, max-len, one-var, no-unused-vars, one-var-declaration-per-line, prefer-template, no-new, consistent-return, object-shorthand, comma-dangle, no-shadow, no-param-reassign, brace-style, vars-on-top, quotes, no-lonely-if, no-else-return, no-undef, semi, dot-notation, no-empty, no-return-assign, camelcase, prefer-spread, padded-blocks, max-len */ /* eslint-disable no-useless-return, func-names, space-before-function-paren, wrap-iife, no-var, no-underscore-dangle, prefer-arrow-callback, max-len, one-var, no-unused-vars, one-var-declaration-per-line, prefer-template, no-new, consistent-return, object-shorthand, comma-dangle, no-shadow, no-param-reassign, brace-style, vars-on-top, quotes, no-lonely-if, no-else-return, no-undef, semi, dot-notation, no-empty, no-return-assign, camelcase, prefer-spread, padded-blocks, max-len */
(function() { (function() {
this.LabelsSelect = (function() { this.LabelsSelect = (function() {
function LabelsSelect() { function LabelsSelect() {
......
/* eslint-disable func-names, space-before-function-paren, no-var, space-before-blocks, prefer-rest-params, wrap-iife, no-use-before-define, camelcase, no-unused-expressions, quotes, max-len, one-var, one-var-declaration-per-line, default-case, prefer-template, no-undef, consistent-return, no-alert, no-return-assign, no-param-reassign, prefer-arrow-callback, no-else-return, comma-dangle, no-new, brace-style, no-lonely-if, vars-on-top, no-unused-vars, semi, indent, no-sequences, no-shadow, newline-per-chained-call, no-useless-escape, radix, padded-blocks, max-len */ /* eslint-disable no-restricted-properties, func-names, space-before-function-paren, no-var, space-before-blocks, prefer-rest-params, wrap-iife, no-use-before-define, camelcase, no-unused-expressions, quotes, max-len, one-var, one-var-declaration-per-line, default-case, prefer-template, no-undef, consistent-return, no-alert, no-return-assign, no-param-reassign, prefer-arrow-callback, no-else-return, comma-dangle, no-new, brace-style, no-lonely-if, vars-on-top, no-unused-vars, semi, indent, no-sequences, no-shadow, newline-per-chained-call, no-useless-escape, radix, padded-blocks, max-len */
/*= require autosave */ /*= require autosave */
/*= require autosize */ /*= require autosize */
......
---
title: Changed eslint airbnb config to the base airbnb config and corrected eslintrc
plugins and envs
merge_request: 7470
author: Luke "Jared" Bennett
...@@ -6,13 +6,11 @@ ...@@ -6,13 +6,11 @@
"eslint-report": "npm run eslint -- --format html --output-file ./eslint-report.html" "eslint-report": "npm run eslint -- --format html --output-file ./eslint-report.html"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^3.1.1", "eslint": "^3.10.1",
"eslint-config-airbnb": "^12.0.0", "eslint-config-airbnb-base": "^10.0.1",
"eslint-plugin-filenames": "^1.1.0", "eslint-plugin-filenames": "^1.1.0",
"eslint-plugin-import": "^1.16.0", "eslint-plugin-import": "^2.2.0",
"eslint-plugin-jasmine": "^1.8.1", "eslint-plugin-jasmine": "^2.1.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.4.1",
"istanbul": "^0.4.5" "istanbul": "^0.4.5"
} }
} }
...@@ -109,7 +109,7 @@ describe('Build', () => { ...@@ -109,7 +109,7 @@ describe('Build', () => {
expect($.ajax.calls.count()).toBe(2); expect($.ajax.calls.count()).toBe(2);
let [{ url, dataType, success, context }] = $.ajax.calls.argsFor(1); let [{ url, dataType, success, context }] = $.ajax.calls.argsFor(1);
expect(url).toBe( expect(url).toBe(
`${BUILD_URL}/trace.json?state=${encodeURIComponent(INITIAL_BUILD_TRACE_STATE)}` `${BUILD_URL}/trace.json?state=${encodeURIComponent(INITIAL_BUILD_TRACE_STATE)}`,
); );
expect(dataType).toBe('json'); expect(dataType).toBe('json');
expect(success).toEqual(jasmine.any(Function)); expect(success).toEqual(jasmine.any(Function));
......
...@@ -28,10 +28,10 @@ describe('Actions Component', () => { ...@@ -28,10 +28,10 @@ describe('Actions Component', () => {
}); });
expect( expect(
component.$el.querySelectorAll('.dropdown-menu li').length component.$el.querySelectorAll('.dropdown-menu li').length,
).toEqual(actionsMock.length); ).toEqual(actionsMock.length);
expect( expect(
component.$el.querySelector('.dropdown-menu li a').getAttribute('href') component.$el.querySelector('.dropdown-menu li a').getAttribute('href'),
).toEqual(actionsMock[0].play_path); ).toEqual(actionsMock[0].play_path);
}); });
}); });
...@@ -141,18 +141,18 @@ describe('Environment item', () => { ...@@ -141,18 +141,18 @@ describe('Environment item', () => {
describe('With deployment', () => { describe('With deployment', () => {
it('should render deployment internal id', () => { it('should render deployment internal id', () => {
expect( expect(
component.$el.querySelector('.deployment-column span').textContent component.$el.querySelector('.deployment-column span').textContent,
).toContain(environment.last_deployment.iid); ).toContain(environment.last_deployment.iid);
expect( expect(
component.$el.querySelector('.deployment-column span').textContent component.$el.querySelector('.deployment-column span').textContent,
).toContain('#'); ).toContain('#');
}); });
describe('With user information', () => { describe('With user information', () => {
it('should render user avatar with link to profile', () => { it('should render user avatar with link to profile', () => {
expect( expect(
component.$el.querySelector('.js-deploy-user-container').getAttribute('href') component.$el.querySelector('.js-deploy-user-container').getAttribute('href'),
).toEqual(environment.last_deployment.user.web_url); ).toEqual(environment.last_deployment.user.web_url);
}); });
}); });
...@@ -160,13 +160,13 @@ describe('Environment item', () => { ...@@ -160,13 +160,13 @@ describe('Environment item', () => {
describe('With build url', () => { describe('With build url', () => {
it('Should link to build url provided', () => { it('Should link to build url provided', () => {
expect( expect(
component.$el.querySelector('.build-link').getAttribute('href') component.$el.querySelector('.build-link').getAttribute('href'),
).toEqual(environment.last_deployment.deployable.build_path); ).toEqual(environment.last_deployment.deployable.build_path);
}); });
it('Should render deployable name and id', () => { it('Should render deployable name and id', () => {
expect( expect(
component.$el.querySelector('.build-link').getAttribute('href') component.$el.querySelector('.build-link').getAttribute('href'),
).toEqual(environment.last_deployment.deployable.build_path); ).toEqual(environment.last_deployment.deployable.build_path);
}); });
}); });
...@@ -174,7 +174,7 @@ describe('Environment item', () => { ...@@ -174,7 +174,7 @@ describe('Environment item', () => {
describe('With commit information', () => { describe('With commit information', () => {
it('should render commit component', () => { it('should render commit component', () => {
expect( expect(
component.$el.querySelector('.js-commit-component') component.$el.querySelector('.js-commit-component'),
).toBeDefined(); ).toBeDefined();
}); });
}); });
...@@ -183,7 +183,7 @@ describe('Environment item', () => { ...@@ -183,7 +183,7 @@ describe('Environment item', () => {
describe('With manual actions', () => { describe('With manual actions', () => {
it('Should render actions component', () => { it('Should render actions component', () => {
expect( expect(
component.$el.querySelector('.js-manual-actions-container') component.$el.querySelector('.js-manual-actions-container'),
).toBeDefined(); ).toBeDefined();
}); });
}); });
...@@ -191,7 +191,7 @@ describe('Environment item', () => { ...@@ -191,7 +191,7 @@ describe('Environment item', () => {
describe('With external URL', () => { describe('With external URL', () => {
it('should render external url component', () => { it('should render external url component', () => {
expect( expect(
component.$el.querySelector('.js-external-url-container') component.$el.querySelector('.js-external-url-container'),
).toBeDefined(); ).toBeDefined();
}); });
}); });
...@@ -199,7 +199,7 @@ describe('Environment item', () => { ...@@ -199,7 +199,7 @@ describe('Environment item', () => {
describe('With stop action', () => { describe('With stop action', () => {
it('Should render stop action component', () => { it('Should render stop action component', () => {
expect( expect(
component.$el.querySelector('.js-stop-component-container') component.$el.querySelector('.js-stop-component-container'),
).toBeDefined(); ).toBeDefined();
}); });
}); });
...@@ -207,7 +207,7 @@ describe('Environment item', () => { ...@@ -207,7 +207,7 @@ describe('Environment item', () => {
describe('With retry action', () => { describe('With retry action', () => {
it('Should render rollback component', () => { it('Should render rollback component', () => {
expect( expect(
component.$el.querySelector('.js-rollback-component-container') component.$el.querySelector('.js-rollback-component-container'),
).toBeDefined(); ).toBeDefined();
}); });
}); });
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
//= require ./mock_data //= require ./mock_data
(() => { (() => {
beforeEach(() => {
gl.environmentsList.EnvironmentsStore.create();
});
describe('Store', () => { describe('Store', () => {
beforeEach(() => {
gl.environmentsList.EnvironmentsStore.create();
});
it('should start with a blank state', () => { it('should start with a blank state', () => {
expect(gl.environmentsList.EnvironmentsStore.state.environments.length).toBe(0); expect(gl.environmentsList.EnvironmentsStore.state.environments.length).toBe(0);
expect(gl.environmentsList.EnvironmentsStore.state.stoppedCounter).toBe(0); expect(gl.environmentsList.EnvironmentsStore.state.stoppedCounter).toBe(0);
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
const intervalConfig = this.smartInterval.cfg; const intervalConfig = this.smartInterval.cfg;
const iterationCount = 4; const iterationCount = 4;
const maxIntervalAfterIterations = intervalConfig.startingInterval * const maxIntervalAfterIterations = intervalConfig.startingInterval *
Math.pow(intervalConfig.incrementByFactorOf, (iterationCount - 1)); // 40 (intervalConfig.incrementByFactorOf ** (iterationCount - 1)); // 40
const currentInterval = interval.getCurrentInterval(); const currentInterval = interval.getCurrentInterval();
// Provide some flexibility for performance of testing environment // Provide some flexibility for performance of testing environment
......
...@@ -74,26 +74,26 @@ describe('Commit component', () => { ...@@ -74,26 +74,26 @@ describe('Commit component', () => {
describe('Given commit title and author props', () => { describe('Given commit title and author props', () => {
it('Should render a link to the author profile', () => { it('Should render a link to the author profile', () => {
expect( expect(
component.$el.querySelector('.commit-title .avatar-image-container').getAttribute('href') component.$el.querySelector('.commit-title .avatar-image-container').getAttribute('href'),
).toEqual(props.author.web_url); ).toEqual(props.author.web_url);
}); });
it('Should render the author avatar with title and alt attributes', () => { it('Should render the author avatar with title and alt attributes', () => {
expect( expect(
component.$el.querySelector('.commit-title .avatar-image-container img').getAttribute('title') component.$el.querySelector('.commit-title .avatar-image-container img').getAttribute('title'),
).toContain(props.author.username); ).toContain(props.author.username);
expect( expect(
component.$el.querySelector('.commit-title .avatar-image-container img').getAttribute('alt') component.$el.querySelector('.commit-title .avatar-image-container img').getAttribute('alt'),
).toContain(`${props.author.username}'s avatar`); ).toContain(`${props.author.username}'s avatar`);
}); });
}); });
it('should render the commit title', () => { it('should render the commit title', () => {
expect( expect(
component.$el.querySelector('a.commit-row-message').getAttribute('href') component.$el.querySelector('a.commit-row-message').getAttribute('href'),
).toEqual(props.commit_url); ).toEqual(props.commit_url);
expect( expect(
component.$el.querySelector('a.commit-row-message').textContent component.$el.querySelector('a.commit-row-message').textContent,
).toContain(props.title); ).toContain(props.title);
}); });
}); });
...@@ -119,7 +119,7 @@ describe('Commit component', () => { ...@@ -119,7 +119,7 @@ describe('Commit component', () => {
}); });
expect( expect(
component.$el.querySelector('.commit-title span').textContent component.$el.querySelector('.commit-title span').textContent,
).toContain('Cant find HEAD commit for this branch'); ).toContain('Cant find HEAD commit for this branch');
}); });
}); });
......
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