Skip to content

Commit

Permalink
Merge pull request #6711 from himdel/camelcase
Browse files Browse the repository at this point in the history
eslint: disable camelcase rule
  • Loading branch information
mzazrivec authored Feb 26, 2020
2 parents 3710c3c + 2c8bb9d commit 845708d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
7 changes: 1 addition & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@
"brace-style": [2, "1tbs", {
"allowSingleLine": false
}],
"camelcase": [2, {
"properties": "never"
}],
"comma-spacing": [2, {
"before": false,
"after": true
Expand Down Expand Up @@ -186,9 +183,7 @@
}],
"func-names": 0,
"no-mixed-spaces-and-tabs": 2,
"camelcase": [ "warn", {
"properties": "never"
}],
"camelcase": 0,

"curly": [ "warn", "all" ],
"no-eq-null": 0,
Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"miqHideSearchClearButton": true // local miq_application.js
},
"rules": {
"camelcase": "off",
"key-spacing": ["error", {
"mode": "minimum"
}],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const AsyncProviderCredentials = ({ ...props }) => {
const asyncValidate = (fields, fieldNames) => new Promise((resolve, reject) => {
const resource = pick(fields, fieldNames);
API.post('/api/providers', { action: 'verify_credentials', resource }).then(({ results: [result] }) => {
const { task_id, success } = result; // eslint-disable-line camelcase
const { task_id, success } = result;
// The request here can either create a background task or fail
return success ? API.wait_for_task(task_id) : Promise.reject(result);
// The wait_for_task request can succeed with valid or invalid credentials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ const PxeServersForm = ({ id }) => {
.then(({
id: _id,
href: _h,
pxe_menus, // eslint-disable-line camelcase
pxe_menus,
authentications,
...data
}) => setInitialValues({
...data,
pxe_menus: pxe_menus.map(({ file_name }) => ({ file_name })), // eslint-disable-line camelcase
pxe_menus: pxe_menus.map(({ file_name }) => ({ file_name })),
authentication: authentications[0] ? ({
userid: authentications[0].userid,
}) : ({}),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint camelcase: ["warn", {allow: ["bs_tree", "tree_name", "click_url", "check_url", "allow_reselect"]}] */
import React, { useEffect } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ describe('Toolbar actions', () => {
});

describe('Generic action', () => {
let add_flash; // eslint-disable-line camelcase
let add_flash;

beforeEach(() => {
spyOn(window.vanillaJsAPI, 'post').and.returnValue(Promise.resolve({
results: [
{ success: true, message: 'some' },
],
}));
add_flash = jasmine.createSpy('add_flash'); // eslint-disable-line camelcase
window.add_flash = add_flash; // eslint-disable-line camelcase
add_flash = jasmine.createSpy('add_flash');
window.add_flash = add_flash;
});

test('should send correct data', () => {
Expand Down

0 comments on commit 845708d

Please sign in to comment.