Commit 82353f20 authored by GitLab Dependency Bot's avatar GitLab Dependency Bot Committed by Vitaly Slobodin

Update existing camelcase lint ignores

This changes existing ignores from babel/camelcase to camelcase
parent 0df91e78
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
"app/assets/stylesheets/lazy_bundles/cropper.css" "app/assets/stylesheets/lazy_bundles/cropper.css"
], ],
"plugins":[ "plugins":[
"./scripts/frontend/stylelint/stylelint-duplicate-selectors.js", "./scripts/frontend/stylelint/stylelint_duplicate_selectors.js",
"./scripts/frontend/stylelint/stylelint-utility-classes.js", "./scripts/frontend/stylelint/stylelint_utility_classes.js",
], ],
"rules":{ "rules":{
"stylelint-gitlab/utility-classes":[true,{ "severity": "warning" }], "stylelint-gitlab/utility-classes":[true,{ "severity": "warning" }],
......
...@@ -19,6 +19,7 @@ export const toYmd = (date) => dateFormat(date, dateFormats.isoDate); ...@@ -19,6 +19,7 @@ export const toYmd = (date) => dateFormat(date, dateFormats.isoDate);
* @returns {Object} * @returns {Object}
*/ */
export const extractFilterQueryParameters = (url = '') => { export const extractFilterQueryParameters = (url = '') => {
/* eslint-disable camelcase */
const { const {
source_branch_name = null, source_branch_name = null,
target_branch_name = null, target_branch_name = null,
...@@ -27,6 +28,7 @@ export const extractFilterQueryParameters = (url = '') => { ...@@ -27,6 +28,7 @@ export const extractFilterQueryParameters = (url = '') => {
assignee_username = [], assignee_username = [],
label_name = [], label_name = [],
} = urlQueryToFilter(url); } = urlQueryToFilter(url);
/* eslint-enable camelcase */
return { return {
selectedSourceBranch: source_branch_name, selectedSourceBranch: source_branch_name,
......
/* eslint-disable no-restricted-properties, babel/camelcase, /* eslint-disable no-restricted-properties, camelcase,
no-unused-expressions, default-case, no-unused-expressions, default-case,
consistent-return, no-param-reassign, consistent-return, no-param-reassign,
no-shadow, no-useless-escape, no-shadow, no-useless-escape,
......
...@@ -10,5 +10,5 @@ export function resetServiceWorkersPublicPath() { ...@@ -10,5 +10,5 @@ export function resetServiceWorkersPublicPath() {
// see: https://webpack.js.org/guides/public-path/ // see: https://webpack.js.org/guides/public-path/
const relativeRootPath = (gon && gon.relative_url_root) || ''; const relativeRootPath = (gon && gon.relative_url_root) || '';
const webpackAssetPath = joinPaths(relativeRootPath, '/assets/webpack/'); const webpackAssetPath = joinPaths(relativeRootPath, '/assets/webpack/');
__webpack_public_path__ = webpackAssetPath; // eslint-disable-line babel/camelcase __webpack_public_path__ = webpackAssetPath; // eslint-disable-line camelcase
} }
...@@ -9,7 +9,7 @@ import { ...@@ -9,7 +9,7 @@ import {
export const getFilePath = (file) => { export const getFilePath = (file) => {
const { old_path, new_path } = file; const { old_path, new_path } = file;
// eslint-disable-next-line babel/camelcase // eslint-disable-next-line camelcase
return old_path === new_path ? new_path : `${old_path}${new_path}`; return old_path === new_path ? new_path : `${old_path}${new_path}`;
}; };
...@@ -71,7 +71,7 @@ export const getLineForParallelView = (line, id, lineType, isHead) => { ...@@ -71,7 +71,7 @@ export const getLineForParallelView = (line, id, lineType, isHead) => {
isHead: hasConflict && isHead, isHead: hasConflict && isHead,
isOrigin: hasConflict && !isHead, isOrigin: hasConflict && !isHead,
hasMatch: lineType === 'match', hasMatch: lineType === 'match',
// eslint-disable-next-line babel/camelcase // eslint-disable-next-line camelcase
lineNumber: isHead ? new_line : old_line, lineNumber: isHead ? new_line : old_line,
section: isHead ? 'head' : 'origin', section: isHead ? 'head' : 'origin',
richText: rich_text, richText: rich_text,
......
...@@ -36,12 +36,12 @@ export default { ...@@ -36,12 +36,12 @@ export default {
return xLabel; return xLabel;
}, },
yAxisTitle() { yAxisTitle() {
const { y_label = '' } = this.graphData; const { y_label: yLabel = '' } = this.graphData;
return y_label; // eslint-disable-line babel/camelcase return yLabel;
}, },
xAxisType() { xAxisType() {
const { x_type = 'value' } = this.graphData; const { x_type: xType = 'value' } = this.graphData;
return x_type; // eslint-disable-line babel/camelcase return xType;
}, },
dataZoomConfig() { dataZoomConfig() {
const handleIcon = this.svgs['scroll-handle']; const handleIcon = this.svgs['scroll-handle'];
......
...@@ -48,8 +48,8 @@ export default { ...@@ -48,8 +48,8 @@ export default {
}, },
filteredDashboards() { filteredDashboards() {
return this.allDashboards.filter(({ display_name = '' }) => return this.allDashboards.filter(({ display_name: displayName = '' }) =>
display_name.toLowerCase().includes(this.searchTerm.toLowerCase()), displayName.toLowerCase().includes(this.searchTerm.toLowerCase()),
); );
}, },
shouldShowNoMsgContainer() { shouldShowNoMsgContainer() {
......
...@@ -29,7 +29,7 @@ export const gqClient = createGqClient( ...@@ -29,7 +29,7 @@ export const gqClient = createGqClient(
* @param {String} metric.id - User-defined identifier * @param {String} metric.id - User-defined identifier
* @returns {Object} - normalized metric with a uniqueID * @returns {Object} - normalized metric with a uniqueID
*/ */
// eslint-disable-next-line babel/camelcase // eslint-disable-next-line camelcase
export const uniqMetricsId = ({ metric_id, id }) => `${metric_id || NOT_IN_DB_PREFIX}_${id}`; export const uniqMetricsId = ({ metric_id, id }) => `${metric_id || NOT_IN_DB_PREFIX}_${id}`;
/** /**
...@@ -169,10 +169,10 @@ export const mapPanelToViewModel = ({ ...@@ -169,10 +169,10 @@ export const mapPanelToViewModel = ({
id = null, id = null,
title = '', title = '',
type, type,
x_axis = {}, x_axis = {}, // eslint-disable-line camelcase
x_label, x_label,
y_label, y_label,
y_axis = {}, y_axis = {}, // eslint-disable-line camelcase
field, field,
metrics = [], metrics = [],
links = [], links = [],
...@@ -184,11 +184,11 @@ export const mapPanelToViewModel = ({ ...@@ -184,11 +184,11 @@ export const mapPanelToViewModel = ({
}) => { }) => {
// Both `x_axis.name` and `x_label` are supported for now // Both `x_axis.name` and `x_label` are supported for now
// https://gitlab.com/gitlab-org/gitlab/issues/210521 // https://gitlab.com/gitlab-org/gitlab/issues/210521
const xAxis = mapXAxisToViewModel({ name: x_label, ...x_axis }); // eslint-disable-line babel/camelcase const xAxis = mapXAxisToViewModel({ name: x_label, ...x_axis }); // eslint-disable-line camelcase
// Both `y_axis.name` and `y_label` are supported for now // Both `y_axis.name` and `y_label` are supported for now
// https://gitlab.com/gitlab-org/gitlab/issues/208385 // https://gitlab.com/gitlab-org/gitlab/issues/208385
const yAxis = mapYAxisToViewModel({ name: y_label, ...y_axis }); // eslint-disable-line babel/camelcase const yAxis = mapYAxisToViewModel({ name: y_label, ...y_axis }); // eslint-disable-line camelcase
return { return {
id, id,
...@@ -295,7 +295,7 @@ export const mapToDashboardViewModel = ({ ...@@ -295,7 +295,7 @@ export const mapToDashboardViewModel = ({
dashboard = '', dashboard = '',
templating = {}, templating = {},
links = [], links = [],
panel_groups = [], panel_groups = [], // eslint-disable-line camelcase
}) => { }) => {
return { return {
dashboard, dashboard,
......
...@@ -294,7 +294,7 @@ export const expandedPanelPayloadFromUrl = (dashboard, search = window.location. ...@@ -294,7 +294,7 @@ export const expandedPanelPayloadFromUrl = (dashboard, search = window.location.
if (params.group || params.title || params.y_label) { if (params.group || params.title || params.y_label) {
const panelGroup = dashboard.panelGroups.find(({ group }) => params.group === group); const panelGroup = dashboard.panelGroups.find(({ group }) => params.group === group);
const panel = panelGroup.panels.find( const panel = panelGroup.panels.find(
// eslint-disable-next-line babel/camelcase // eslint-disable-next-line camelcase
({ y_label, title }) => y_label === params.y_label && title === params.title, ({ y_label, title }) => y_label === params.y_label && title === params.title,
); );
......
...@@ -26,6 +26,7 @@ export const receivePackagesListSuccess = ({ commit }, { data, headers }) => { ...@@ -26,6 +26,7 @@ export const receivePackagesListSuccess = ({ commit }, { data, headers }) => {
export const requestPackagesList = ({ dispatch, state }, params = {}) => { export const requestPackagesList = ({ dispatch, state }, params = {}) => {
dispatch('setLoading', true); dispatch('setLoading', true);
// eslint-disable-next-line camelcase
const { page = DEFAULT_PAGE, per_page = DEFAULT_PAGE_SIZE } = params; const { page = DEFAULT_PAGE, per_page = DEFAULT_PAGE_SIZE } = params;
const { sort, orderBy } = state.sorting; const { sort, orderBy } = state.sorting;
const type = state.config.forceTerraform const type = state.config.forceTerraform
......
...@@ -30,6 +30,7 @@ export const fetchTestSuite = ({ state, commit, dispatch }, index) => { ...@@ -30,6 +30,7 @@ export const fetchTestSuite = ({ state, commit, dispatch }, index) => {
dispatch('toggleLoading'); dispatch('toggleLoading');
// eslint-disable-next-line camelcase
const { build_ids = [] } = state.testReports?.test_suites?.[index] || {}; const { build_ids = [] } = state.testReports?.test_suites?.[index] || {};
// Replacing `/:suite_name.json` with the name of the suite. Including the extra characters // Replacing `/:suite_name.json` with the name of the suite. Including the extra characters
// to ensure that we replace exactly the template part of the URL string // to ensure that we replace exactly the template part of the URL string
......
/* eslint-disable func-names, prefer-rest-params, consistent-return, no-shadow, no-self-compare, no-unused-expressions, yoda, prefer-spread, babel/camelcase, no-param-reassign */ /* eslint-disable func-names, prefer-rest-params, consistent-return, no-shadow, no-self-compare, no-unused-expressions, yoda, prefer-spread, camelcase, no-param-reassign */
/* global Issuable */ /* global Issuable */
/* global emitSidebarEvent */ /* global emitSidebarEvent */
......
...@@ -8,5 +8,5 @@ ...@@ -8,5 +8,5 @@
*/ */
if (gon && gon.webpack_public_path) { if (gon && gon.webpack_public_path) {
__webpack_public_path__ = gon.webpack_public_path; // eslint-disable-line babel/camelcase __webpack_public_path__ = gon.webpack_public_path; // eslint-disable-line camelcase
} }
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
"storybook:install": "yarn --cwd ./storybook install", "storybook:install": "yarn --cwd ./storybook install",
"storybook:build": "yarn --cwd ./storybook build", "storybook:build": "yarn --cwd ./storybook build",
"storybook:start": "./scripts/frontend/start_storybook.sh", "storybook:start": "./scripts/frontend/start_storybook.sh",
"stylelint-create-utility-map": "node scripts/frontend/stylelint/stylelint-utility-map.js", "stylelint-create-utility-map": "node scripts/frontend/stylelint/stylelint_utility_map.js",
"webpack": "NODE_OPTIONS=\"--max-old-space-size=3584\" webpack --config config/webpack.config.js", "webpack": "NODE_OPTIONS=\"--max-old-space-size=3584\" webpack --config config/webpack.config.js",
"webpack-vendor": "NODE_OPTIONS=\"--max-old-space-size=3584\" webpack --config config/webpack.vendor.config.js", "webpack-vendor": "NODE_OPTIONS=\"--max-old-space-size=3584\" webpack --config config/webpack.vendor.config.js",
"webpack-prod": "NODE_OPTIONS=\"--max-old-space-size=3584\" NODE_ENV=production webpack --config config/webpack.config.js" "webpack-prod": "NODE_OPTIONS=\"--max-old-space-size=3584\" NODE_ENV=production webpack --config config/webpack.config.js"
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
}, },
"devDependencies": { "devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.10.1", "@babel/plugin-transform-modules-commonjs": "^7.10.1",
"@gitlab/eslint-plugin": "11.0.0", "@gitlab/eslint-plugin": "12.0.1",
"@gitlab/stylelint-config": "4.0.0", "@gitlab/stylelint-config": "4.0.0",
"@graphql-eslint/eslint-plugin": "3.0.0", "@graphql-eslint/eslint-plugin": "3.0.0",
"@testing-library/dom": "^7.16.2", "@testing-library/dom": "^7.16.2",
......
const stylelint = require('stylelint'); const stylelint = require('stylelint');
const utils = require('./stylelint-utils'); const utils = require('./stylelint_utils');
const ruleName = 'stylelint-gitlab/duplicate-selectors'; const ruleName = 'stylelint-gitlab/duplicate-selectors';
......
const stylelint = require('stylelint'); const stylelint = require('stylelint');
const utils = require('./stylelint-utils'); const utils = require('./stylelint_utils');
const utilityClasses = require('./utility-classes-map'); const utilityClasses = require('./utility_classes_map');
const ruleName = 'stylelint-gitlab/utility-classes'; const ruleName = 'stylelint-gitlab/utility-classes';
......
...@@ -4,13 +4,13 @@ const postcss = require('postcss'); ...@@ -4,13 +4,13 @@ const postcss = require('postcss');
const prettier = require('prettier'); const prettier = require('prettier');
const sass = require('sass'); const sass = require('sass');
const utils = require('./stylelint-utils'); const utils = require('./stylelint_utils');
const ROOT_PATH = path.resolve(__dirname, '../../..'); const ROOT_PATH = path.resolve(__dirname, '../../..');
const hashMapPath = path.resolve(__dirname, './utility-classes-map.js'); const hashMapPath = path.resolve(__dirname, './utility_classes_map.js');
// //
// This creates a JS based hash map (saved in utility-classes-map.js) of the different values in the utility classes // This creates a JS based hash map (saved in utility_classes_map.js) of the different values in the utility classes
// //
sass.render( sass.render(
{ {
......
...@@ -22,14 +22,14 @@ class MockObserver { ...@@ -22,14 +22,14 @@ class MockObserver {
takeRecords() {} takeRecords() {}
// eslint-disable-next-line babel/camelcase // eslint-disable-next-line camelcase
$_triggerObserve(node, { entry = {}, options = {} } = {}) { $_triggerObserve(node, { entry = {}, options = {} } = {}) {
if (this.$_hasObserver(node, options)) { if (this.$_hasObserver(node, options)) {
this.$_cb([{ target: node, ...entry }]); this.$_cb([{ target: node, ...entry }]);
} }
} }
// eslint-disable-next-line babel/camelcase // eslint-disable-next-line camelcase
$_hasObserver(node, options = {}) { $_hasObserver(node, options = {}) {
return this.$_observers.some( return this.$_observers.some(
([obvNode, obvOptions]) => node === obvNode && isMatch(options, obvOptions), ([obvNode, obvOptions]) => node === obvNode && isMatch(options, obvOptions),
......
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