Commit aaf59610 authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent 1363ca12
extends:
- '@gitlab'
- plugin:promise/recommended
- plugin:@gitlab/default
- plugin:@gitlab/i18n
- plugin:no-jquery/slim
- plugin:no-jquery/deprecated-3.4
globals:
......@@ -16,9 +16,6 @@ settings:
webpack:
config: './config/webpack.config.js'
rules:
"@gitlab/i18n/no-non-i18n-strings": error
"@gitlab/vue-i18n/no-bare-strings": error
"@gitlab/vue-i18n/no-bare-attribute-strings": error
import/no-commonjs: error
no-underscore-dangle:
- error
......@@ -54,4 +51,4 @@ overrides:
- files:
- '**/spec/**/*'
rules:
"@gitlab/i18n/no-non-i18n-strings": off
"@gitlab/require-i18n-strings": off
......@@ -8,7 +8,6 @@ Please describe the proposal and add a link to the source (for example, http://w
- [ ] Make sure this MR enables a static analysis check rule for new usage but
ignores current offenses
- [ ] Create a follow-up issue to fix the current offenses as a separate iteration: ISSUE_LINK
- [ ] Mention this proposal in the relevant Slack channels (e.g. `#development`, `#backend`, `#frontend`)
- [ ] If there is a choice to make between two potential styles, set up an emoji vote in the MR:
- CHOICE_A: :a:
......@@ -17,6 +16,7 @@ Please describe the proposal and add a link to the source (for example, http://w
- [ ] The MR doesn't have significant objections, and is getting a majority of :+1: vs :-1: (remember that [we don't need to reach a consensus](https://about.gitlab.com/handbook/values/#collaboration-is-not-consensus))
- [ ] (If applicable) One style is getting a majority of vote (compared to the other choice)
- [ ] (If applicable) Update the MR with the chosen style
- [ ] Create a follow-up issue to fix the current offenses as a separate iteration: ISSUE_LINK
- [ ] Follow the [review process](https://docs.gitlab.com/ee/development/code_review.html) as usual
- [ ] Once approved and merged by a maintainer, mention it again:
- [ ] In the relevant Slack channels (e.g. `#development`, `#backend`, `#frontend`)
......
......@@ -15,8 +15,8 @@
#
# Uncomment the following lines to make the configuration take effect.
# Make sure to run `cd tooling/overcommit && make && cd -`
gemfile: 'tooling/overcommit/gems.rb'
# Make sure to run `make -C tooling/overcommit`
gemfile: 'tooling/overcommit/Gemfile'
PostCheckout:
BundleInstall:
......
......@@ -475,7 +475,7 @@ gem 'lograge', '~> 0.5'
gem 'grape_logging', '~> 1.7'
# DNS Lookup
gem 'gitlab-net-dns', '~> 0.9.1'
gem 'gitlab-net-dns', '~> 0.9.1', require: 'net/dns'
# Countries list
gem 'countries', '~> 3.0'
......
/* eslint-disable class-methods-use-this, @gitlab/i18n/no-non-i18n-strings */
/* eslint-disable class-methods-use-this, @gitlab/require-i18n-strings */
import $ from 'jquery';
import _ from 'underscore';
......
......@@ -4,7 +4,7 @@ import Icon from '~/vue_shared/components/icon.vue';
export default {
// name: 'Badge' is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/25
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
name: 'Badge',
components: {
Icon,
......
/* eslint-disable class-methods-use-this */
/* eslint-disable @gitlab/i18n/no-non-i18n-strings */
/* eslint-disable @gitlab/require-i18n-strings */
import { Node } from 'tiptap';
import { defaultMarkdownSerializer } from 'prosemirror-markdown';
......
......@@ -36,6 +36,7 @@ export default Vue.extend({
list: {
type: Object,
default: () => ({}),
required: false,
},
disabled: {
type: Boolean,
......@@ -94,7 +95,7 @@ export default Vue.extend({
return this.list.type !== ListType.blank && this.list.type !== ListType.promotion;
},
uniqueKey() {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
return `boards.${this.boardId}.${this.list.type}.${this.list.id}`;
},
helpLink() {
......
......@@ -13,29 +13,36 @@ export default {
list: {
type: Object,
default: () => ({}),
required: false,
},
issue: {
type: Object,
default: () => ({}),
required: false,
},
issueLinkBase: {
type: String,
default: '',
required: false,
},
disabled: {
type: Boolean,
default: false,
required: false,
},
index: {
type: Number,
default: 0,
required: false,
},
rootPath: {
type: String,
default: '',
required: false,
},
groupId: {
type: Number,
required: false,
},
},
data() {
......
......@@ -7,6 +7,7 @@ export default Vue.extend({
list: {
type: Object,
default: () => ({}),
required: false,
},
},
methods: {
......
......@@ -34,6 +34,7 @@ export default Vue.extend({
currentUser: {
type: Object,
default: () => ({}),
required: false,
},
},
data() {
......
......@@ -43,6 +43,7 @@ export default {
throttleDuration: {
type: Number,
default: 200,
required: false,
},
boardBaseUrl: {
type: String,
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { __ } from '~/locale';
import ModalFilters from './filters';
import ModalTabs from './tabs.vue';
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import ModalStore from '../../stores/modal_store';
import modalMixin from '../../mixins/modal_mixins';
......
const notImplemented = () => {
/* eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings */
/* eslint-disable-next-line @gitlab/require-i18n-strings */
throw new Error('Not implemented!');
};
......
import * as mutationTypes from './mutation_types';
const notImplemented = () => {
/* eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings */
/* eslint-disable-next-line @gitlab/require-i18n-strings */
throw new Error('Not implemented!');
};
......
<script>
/* eslint-disable vue/require-default-prop */
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { GlLink, GlModalDirective } from '@gitlab/ui';
import { s__, __, sprintf } from '~/locale';
import eventHub from '../event_hub';
......@@ -95,6 +95,7 @@ export default {
updateable: {
type: Boolean,
default: true,
required: false,
},
updateSuccessful: {
type: Boolean,
......
......@@ -22,6 +22,7 @@ export default {
ingressDnsHelpPath: {
type: String,
default: '',
required: false,
},
},
computed: {
......
......@@ -13,10 +13,12 @@ export default {
items: {
type: Array,
default: () => [],
required: false,
},
stage: {
type: Object,
default: () => ({}),
required: false,
},
},
};
......
......@@ -13,10 +13,12 @@ export default {
items: {
type: Array,
default: () => [],
required: false,
},
stage: {
type: Object,
default: () => ({}),
required: false,
},
},
};
......
......@@ -15,10 +15,12 @@ export default {
items: {
type: Array,
default: () => [],
required: false,
},
stage: {
type: Object,
default: () => ({}),
required: false,
},
},
};
......
......@@ -16,10 +16,12 @@ export default {
items: {
type: Array,
default: () => [],
required: false,
},
stage: {
type: Object,
default: () => ({}),
required: false,
},
},
computed: {
......
......@@ -15,10 +15,12 @@ export default {
items: {
type: Array,
default: () => [],
required: false,
},
stage: {
type: Object,
default: () => ({}),
required: false,
},
},
computed: {
......
......@@ -48,7 +48,7 @@ export default {
},
authorUrl() {
// name: 'mailto:' is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26#possible-false-positives
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
return this.author.web_url || `mailto:${this.commit.author_email}`;
},
authorAvatar() {
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
export default {
props: {
total: {
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import _ from 'underscore';
import { GlTooltipDirective } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
......@@ -342,7 +342,7 @@ export default {
isLastDeployment() {
// name: 'last?' is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26#possible-false-positives
// Vue i18n ESLint rules issue: https://gitlab.com/gitlab-org/gitlab-foss/issues/63560
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
return this.model && this.model.last_deployment && this.model.last_deployment['last?'];
},
......
......@@ -24,6 +24,7 @@ export default {
isLastDeployment: {
type: Boolean,
default: true,
required: false,
},
environment: {
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { GlTooltipDirective } from '@gitlab/ui';
import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
import { s__, sprintf } from '~/locale';
......
/* eslint-disable @gitlab/i18n/no-non-i18n-strings, import/prefer-default-export */
/* eslint-disable @gitlab/require-i18n-strings, import/prefer-default-export */
/**
* Tracks snowplow event when User clicks on error link to Sentry
......
......@@ -24,7 +24,7 @@ export default {
<label class="label-bold" for="error-tracking-api-host">{{ __('Sentry API URL') }}</label>
<div class="row">
<div class="col-8 col-md-9 gl-pr-0">
<!-- eslint-disable @gitlab/vue-i18n/no-bare-attribute-strings -->
<!-- eslint-disable @gitlab/vue-require-i18n-attribute-strings -->
<gl-form-input
id="error-tracking-api-host"
:value="apiHost"
......@@ -39,7 +39,7 @@ export default {
)
}}
</p>
<!-- eslint-enable @gitlab/vue-i18n/no-bare-attribute-strings -->
<!-- eslint-enable @gitlab/vue-require-i18n-attribute-strings -->
</div>
</div>
</div>
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import Icon from '~/vue_shared/components/icon.vue';
import Timeago from '~/vue_shared/components/time_ago_tooltip.vue';
import router from '../../ide_router';
......
......@@ -38,7 +38,7 @@ export default {
computed: {
iconName() {
// name: '-solid' is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26#possible-false-positives
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
const suffix = this.stagedList ? '-solid' : '';
return `${getCommitIconMap(this.file).icon}${suffix}`;
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { mapActions, mapState, mapGetters } from 'vuex';
import IdeStatusList from 'ee_else_ce/ide/components/ide_status_list.vue';
import IdeStatusMr from './ide_status_mr.vue';
......
......@@ -48,7 +48,7 @@ export default {
},
}),
namespace() {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
return `${this.side}Pane`;
},
tabs() {
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { uniqueId } from 'lodash';
import { GlLink, GlTooltip, GlTooltipDirective } from '@gitlab/ui';
import { __ } from '~/locale';
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { __, sprintf } from '~/locale';
import updateMixin from '../mixins/update';
import eventHub from '../event_hub';
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import timeAgoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
export default {
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import $ from 'jquery';
import IssuableTemplateSelectors from '../../../templates/issuable_template_selectors';
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { GlLink } from '@gitlab/ui';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
......
......@@ -29,5 +29,5 @@ export const updateDraft = (autosaveKey, text) => {
};
export const getDiscussionReplyKey = (noteableType, discussionId) =>
/* eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings */
/* eslint-disable-next-line @gitlab/require-i18n-strings */
['Note', capitalizeFirstCharacter(noteableType), discussionId, 'Reply'].join('/');
......@@ -10,7 +10,7 @@ const durationToMillis = duration => {
if (Object.entries(duration).length === 1 && Number.isFinite(duration.seconds)) {
return secondsToMilliseconds(duration.seconds);
}
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
throw new Error('Invalid duration: only `seconds` is supported');
};
......@@ -131,7 +131,7 @@ const convertOpenToFixed = ({ anchor, direction }) => {
* Handles invalid date ranges
*/
const handleInvalidRange = () => {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
throw new Error('The input range does not have the right format.');
};
......
......@@ -13,7 +13,7 @@ function notificationGranted(message, opts, onclick) {
}
function notifyPermissions() {
/* eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings */
/* eslint-disable-next-line @gitlab/require-i18n-strings */
if ('Notification' in window) {
return Notification.requestPermission();
}
......@@ -25,7 +25,7 @@ function notifyMe(message, body, icon, onclick) {
icon,
};
// Let's check if the browser supports notifications
/* eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings */
/* eslint-disable-next-line @gitlab/require-i18n-strings */
if (!('Notification' in window)) {
// do nothing
} else if (Notification.permission === 'granted') {
......
......@@ -111,7 +111,7 @@ export const scaledSIFormatter = (unit = '', prefixOffset = 0) => {
});
if (!units.length) {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
throw new RangeError('The unit cannot be converted, please try a different scale');
}
......@@ -122,7 +122,7 @@ export const scaledSIFormatter = (unit = '', prefixOffset = 0) => {
* Returns a function that formats a number scaled using SI units notation.
*/
export const scaledBinaryFormatter = (unit = '', prefixOffset = 0) => {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
const multiplicative = ['Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi', 'Yi'];
const symbols = ['', ...multiplicative];
......@@ -131,7 +131,7 @@ export const scaledBinaryFormatter = (unit = '', prefixOffset = 0) => {
});
if (!units.length) {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
throw new RangeError('The unit cannot be converted, please try a different scale');
}
......
......@@ -49,7 +49,7 @@ window.$ = jQuery;
// Add nonce to jQuery script handler
jQuery.ajaxSetup({
converters: {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings, func-names
// eslint-disable-next-line @gitlab/require-i18n-strings, func-names
'text script': function(text) {
jQuery.globalEval(text, { nonce: getCspNonceValue() });
return text;
......
......@@ -68,7 +68,7 @@ export default {
}
})
.catch(e => {
// eslint-disable-next-line no-console, @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line no-console, @gitlab/require-i18n-strings
console.error('SVG could not be rendered correctly: ', e);
});
},
......
......@@ -327,7 +327,7 @@ export default {
}
})
.catch(e => {
// eslint-disable-next-line no-console, @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line no-console, @gitlab/require-i18n-strings
console.error('SVG could not be rendered correctly: ', e);
});
},
......
......@@ -95,7 +95,7 @@ export default {
csvText() {
const chartData = this.graphData.metrics[0].result[0].values;
const yLabel = this.graphData.y_label;
const header = `timestamp,${yLabel}\r\n`; // eslint-disable-line @gitlab/i18n/no-non-i18n-strings
const header = `timestamp,${yLabel}\r\n`; // eslint-disable-line @gitlab/require-i18n-strings
return chartData.reduce((csv, data) => {
const row = data.join(',');
return `${csv}${row}\r\n`;
......
......@@ -28,7 +28,7 @@ export const graphDataValidatorForValues = (isValues, graphData) => {
);
};
/* eslint-disable @gitlab/i18n/no-non-i18n-strings */
/* eslint-disable @gitlab/require-i18n-strings */
/**
* Checks that element that triggered event is located on cluster health check dashboard
* @param {HTMLElement} element to check against
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { GlPopover, GlSkeletonLoading } from '@gitlab/ui';
import CiIcon from '../../vue_shared/components/ci_icon.vue';
import timeagoMixin from '../../vue_shared/mixins/timeago';
......@@ -8,7 +8,7 @@ import { mrStates, humanMRStates } from '../constants';
export default {
// name: 'MRPopover' is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/25
name: 'MRPopover', // eslint-disable-line @gitlab/i18n/no-non-i18n-strings
name: 'MRPopover', // eslint-disable-line @gitlab/require-i18n-strings
components: {
GlPopover,
GlSkeletonLoading,
......@@ -102,11 +102,11 @@ export default {
<ci-icon v-if="detailedStatus" :status="detailedStatus" />
</div>
<h5 class="my-2">{{ mergeRequestTitle }}</h5>
<!-- eslint-disable @gitlab/vue-i18n/no-bare-strings -->
<!-- eslint-disable @gitlab/vue-require-i18n-strings -->
<div class="text-secondary">
{{ `${projectPath}!${mergeRequestIID}` }}
</div>
<!-- eslint-enable @gitlab/vue-i18n/no-bare-strings -->
<!-- eslint-enable @gitlab/vue-require-i18n-strings -->
</div>
</gl-popover>
</template>
/* eslint-disable func-names, consistent-return, no-return-assign, no-else-return, @gitlab/i18n/no-non-i18n-strings */
/* eslint-disable func-names, consistent-return, no-return-assign, no-else-return, @gitlab/require-i18n-strings */
import $ from 'jquery';
import RefSelectDropdown from './ref_select_dropdown';
......
......@@ -29,6 +29,7 @@ export default {
metadata: {
type: Object,
default: () => ({}),
required: false,
},
},
computed: {
......
......@@ -43,7 +43,7 @@ renderer.paragraph = t => {
if (typeof katex !== 'undefined') {
const katexString = text
.replace(/&amp;/g, '&')
.replace(/&=&/g, '\\space=\\space') // eslint-disable-line @gitlab/i18n/no-non-i18n-strings
.replace(/&=&/g, '\\space=\\space') // eslint-disable-line @gitlab/require-i18n-strings
.replace(/<(\/?)em>/g, '_');
const regex = new RegExp(katexRegexString, 'gi');
const matchLocation = katexString.search(regex);
......
......@@ -25,7 +25,7 @@ export default {
},
computed: {
imgSrc() {
return `data:${this.outputType};base64,${this.rawCode}`; // eslint-disable-line @gitlab/i18n/no-non-i18n-strings
return `data:${this.outputType};base64,${this.rawCode}`; // eslint-disable-line @gitlab/require-i18n-strings
},
showOutput() {
return this.index === 0;
......
......@@ -22,6 +22,7 @@ export default {
metadata: {
type: Object,
default: () => ({}),
required: false,
},
},
methods: {
......
......@@ -39,7 +39,7 @@ export default {
},
methods: {
cellType(type) {
return `${type}-cell`; // eslint-disable-line @gitlab/i18n/no-non-i18n-strings
return `${type}-cell`; // eslint-disable-line @gitlab/require-i18n-strings
},
},
};
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { mapState, mapActions } from 'vuex';
import { GlSkeletonLoading } from '@gitlab/ui';
import DiffFileHeader from '~/diffs/components/diff_file_header.vue';
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import timeAgoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
export default {
......
......@@ -54,14 +54,14 @@ export default {
:description="s__('ExternalMetrics|Enter the URL of the dashboard you want to link to')"
>
<!-- placeholder with a url is a false positive -->
<!-- eslint-disable @gitlab/vue-i18n/no-bare-attribute-strings -->
<!-- eslint-disable @gitlab/vue-require-i18n-attribute-strings -->
<gl-form-input
id="full-dashboard-url"
v-model="userDashboardUrl"
placeholder="https://my-org.gitlab.io/my-dashboards"
@keydown.enter.native.prevent="updateExternalDashboardUrl"
/>
<!-- eslint-enable @gitlab/vue-i18n/no-bare-attribute-strings -->
<!-- eslint-enable @gitlab/vue-require-i18n-attribute-strings -->
</gl-form-group>
<gl-button variant="success" @click="updateExternalDashboardUrl">
{{ __('Save Changes') }}
......
......@@ -19,7 +19,7 @@ function loadModalsConfigurationFromHtml(modalsElement) {
const modalsConfiguration = {};
if (!modalsElement) {
/* eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings */
/* eslint-disable-next-line @gitlab/require-i18n-strings */
throw new Error('Modals content element not found!');
}
......
/* eslint-disable @gitlab/i18n/no-non-i18n-strings */
/* eslint-disable @gitlab/require-i18n-strings */
import Vue from 'vue';
import axios from '~/lib/utils/axios_utils';
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { GlLink, GlTooltipDirective } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
......
......@@ -14,15 +14,15 @@ export default {
computed: {
...mapState(['config']),
dockerBuildCommand() {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
return `docker build -t ${this.config.repositoryUrl} .`;
},
dockerPushCommand() {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
return `docker push ${this.config.repositoryUrl}`;
},
dockerLoginCommand() {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
return `docker login ${this.config.registryHostUrlWithPort}`;
},
},
......
......@@ -37,15 +37,15 @@ export default {
},
computed: {
dockerBuildCommand() {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
return `docker build -t ${this.repositoryUrl} .`;
},
dockerPushCommand() {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
return `docker push ${this.repositoryUrl}`;
},
dockerLoginCommand() {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
return `docker login ${this.registryHostUrlWithPort}`;
},
noContainerImagesText() {
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
export default {
name: 'ReportIssueLink',
props: {
......
......@@ -151,7 +151,7 @@ export default {
>
{{ fullPath }}
</component>
<!-- eslint-disable-next-line @gitlab/vue-i18n/no-bare-strings -->
<!-- eslint-disable-next-line @gitlab/vue-require-i18n-strings -->
<gl-badge v-if="lfsOid" variant="default" class="label-lfs ml-1">LFS</gl-badge>
<template v-if="isSubmodule">
@ <gl-link :href="submoduleTreeUrl" class="commit-sha">{{ shortSha }}</gl-link>
......
......@@ -39,7 +39,7 @@ const defaultClient = createDefaultClient(
cacheConfig: {
fragmentMatcher,
dataIdFromObject: obj => {
/* eslint-disable @gitlab/i18n/no-non-i18n-strings */
/* eslint-disable @gitlab/require-i18n-strings */
// eslint-disable-next-line no-underscore-dangle
switch (obj.__typename) {
// We need to create a dynamic ID for each entry
......@@ -55,7 +55,7 @@ const defaultClient = createDefaultClient(
// eslint-disable-next-line no-underscore-dangle
return obj.id || obj._id;
}
/* eslint-enable @gitlab/i18n/no-non-i18n-strings */
/* eslint-enable @gitlab/require-i18n-strings */
},
},
},
......
......@@ -9,7 +9,7 @@ export const setTitle = (pathMatch, ref, project) => {
const path = pathMatch.replace(/^\//, '');
const isEmpty = path === '';
/* eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings */
/* eslint-disable-next-line @gitlab/require-i18n-strings */
document.title = `${isEmpty ? 'Files' : path} · ${ref} · ${project} ${DEFAULT_TITLE}`;
};
......
......@@ -420,11 +420,11 @@ export class SearchAutocomplete {
onClick(item, $el, e) {
if (window.location.pathname.indexOf(item.url) !== -1) {
if (!e.metaKey) e.preventDefault();
/* eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings */
/* eslint-disable-next-line @gitlab/require-i18n-strings */
if (item.category === 'Projects') {
this.projectInputEl.val(item.id);
}
/* eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings */
// eslint-disable-next-line @gitlab/require-i18n-strings
if (item.category === 'Groups') {
this.groupInputEl.val(item.id);
}
......
......@@ -4,7 +4,7 @@ import UncollapsedAssigneeList from '../assignees/uncollapsed_assignee_list.vue'
export default {
// name: 'Assignees' is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26#possible-false-positives
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
name: 'Assignees',
components: {
CollapsedAssigneeList,
......
......@@ -40,6 +40,7 @@ export default {
limitToHours: {
type: Boolean,
default: false,
required: false,
},
rootPath: {
type: String,
......
mutation ($projectPath: ID!, $iid: String!, $healthStatus: HealthStatus) {
updateIssue(input: { projectPath: $projectPath, iid: $iid, healthStatus: $healthStatus}) {
mutation($projectPath: ID!, $iid: String!, $healthStatus: HealthStatus) {
updateIssue(input: { projectPath: $projectPath, iid: $iid, healthStatus: $healthStatus }) {
issue {
healthStatus
}
errors
}
}
......@@ -137,7 +137,10 @@ export default {
mutation: DeleteSnippetMutation,
variables: { id: this.snippet.id },
})
.then(() => {
.then(({ data }) => {
if (data?.destroySnippet?.errors) {
throw new Error(data?.destroySnippet?.errors[0]);
}
this.isDeleting = false;
this.errorMessage = undefined;
this.closeDeleteModal();
......
......@@ -54,7 +54,7 @@ export default class Tracking {
static event(category = document.body.dataset.page, action = 'generic', data = {}) {
if (!this.enabled()) return false;
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
if (!category) throw new Error('Tracking: no category provided for tracking.');
const { label, property, value, context } = data;
......
......@@ -5,7 +5,7 @@ import { MANUAL_DEPLOY, WILL_DEPLOY, CREATED } from './constants';
export default {
// name: 'Deployment' is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26#possible-false-positives
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
name: 'Deployment',
components: {
DeploymentActions,
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { GlLoadingIcon } from '@gitlab/ui';
import Flash from '~/flash';
import tooltip from '~/vue_shared/directives/tooltip';
......@@ -86,7 +86,7 @@ export default {
.then(res => res.data)
.then(data => {
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
if (data.message === 'Branch was deleted') {
eventHub.$emit('MRWidgetUpdateRequested', () => {
this.isMakingRequest = false;
......
......@@ -42,7 +42,7 @@ import { setFaviconOverlay } from '../lib/utils/common_utils';
export default {
el: '#js-vue-mr-widget',
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/25
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
name: 'MRWidget',
components: {
Loading,
......
......@@ -40,7 +40,7 @@ export default {
computed: {
changedIcon() {
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
const suffix = this.file.staged && this.showStagedIcon ? '-solid' : '';
return `${getCommitIconMap(this.file).icon}${suffix}`;
......
......@@ -8,6 +8,7 @@ export default {
content: {
type: String,
default: '',
required: false,
},
path: {
type: String,
......
......@@ -16,6 +16,7 @@ export default {
renderInfo: {
type: Boolean,
default: true,
required: false,
},
innerCssClasses: {
type: [Array, Object, String],
......
......@@ -39,10 +39,10 @@ export default {
mdTable() {
return [
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26
'| header | header |', // eslint-disable-line @gitlab/i18n/no-non-i18n-strings
'| header | header |', // eslint-disable-line @gitlab/require-i18n-strings
'| ------ | ------ |',
'| cell | cell |', // eslint-disable-line @gitlab/i18n/no-non-i18n-strings
'| cell | cell |', // eslint-disable-line @gitlab/i18n/no-non-i18n-strings
'| cell | cell |', // eslint-disable-line @gitlab/require-i18n-strings
'| cell | cell |', // eslint-disable-line @gitlab/require-i18n-strings
].join('\n');
},
mdSuggestion() {
......
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
/* eslint-disable @gitlab/vue-require-i18n-strings */
import { GlLink, GlLoadingIcon } from '@gitlab/ui';
export default {
......
......@@ -15,6 +15,7 @@ export default {
size: {
type: Number,
default: 40,
required: false,
},
},
computed: {
......
......@@ -4,7 +4,7 @@ import 'select2';
export default {
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
name: 'Select2Select',
props: {
options: {
......
......@@ -77,12 +77,12 @@ export default {
},
enableScopedLabels: {
type: Boolean,
require: false,
required: false,
default: false,
},
scopedLabelsDocumentationLink: {
type: String,
require: false,
required: false,
default: '#',
},
},
......
......@@ -33,12 +33,12 @@ export default {
},
enableScopedLabels: {
type: Boolean,
require: false,
required: false,
default: false,
},
scopedLabelsDocumentationLink: {
type: String,
require: false,
required: false,
default: '#',
},
},
......
......@@ -45,7 +45,7 @@ export const createLabel = ({ state, dispatch }, label) => {
dispatch('receiveCreateLabelSuccess');
dispatch('toggleDropdownContentsCreateView');
} else {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
throw new Error('Error Creating Label');
}
})
......
......@@ -8,9 +8,9 @@ export default {
size: { type: Number, required: true },
length: { type: Number, required: true },
remain: { type: Number, required: true },
rtag: { type: String, default: 'div' },
wtag: { type: String, default: 'div' },
wclass: { type: String, default: null },
rtag: { type: String, default: 'div', required: false },
wtag: { type: String, default: 'div', required: false },
wclass: { type: String, default: null, required: false },
},
};
</script>
......
......@@ -83,7 +83,7 @@ export default {
},
barStyle(percent) {
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
// eslint-disable-next-line @gitlab/require-i18n-strings
return `width: ${percent}%;`;
},
getTooltip(label, count) {
......
......@@ -51,6 +51,7 @@ module Types
Types::BoardType.connection_type,
null: true,
description: 'Boards of the group',
max_page_size: 2000,
resolver: Resolvers::BoardsResolver
field :board,
......
......@@ -184,6 +184,7 @@ module Types
Types::BoardType.connection_type,
null: true,
description: 'Boards of the project',
max_page_size: 2000,
resolver: Resolvers::BoardsResolver
field :board,
......
......@@ -68,6 +68,7 @@ class Issue < ApplicationRecord
scope :order_closest_future_date, -> { reorder(Arel.sql('CASE WHEN issues.due_date >= CURRENT_DATE THEN 0 ELSE 1 END ASC, ABS(CURRENT_DATE - issues.due_date) ASC')) }
scope :order_relative_position_asc, -> { reorder(::Gitlab::Database.nulls_last_order('relative_position', 'ASC')) }
scope :order_closed_date_desc, -> { reorder(closed_at: :desc) }
scope :order_created_at_desc, -> { reorder(created_at: :desc) }
scope :preload_associated_models, -> { preload(:labels, project: :namespace) }
scope :with_api_entity_associations, -> { preload(:timelogs, :assignees, :author, :notes, :labels, project: [:route, { namespace: :route }] ) }
......
---
title: Optimize projects_service_active queries performance in usage data
merge_request: 27093
author:
type: performance
---
title: Add grape custom validator for git reference params
merge_request: 26102
author: Rajendra Kadam
type: added
......@@ -32,6 +32,8 @@ module Gitlab
config.active_record.sqlite3.represent_boolean_as_integer = true
config.autoloader = :zeitwerk
# Sidekiq uses eager loading, but directories not in the standard Rails
# directories must be added to the eager load paths:
# https://github.com/mperham/sidekiq/wiki/FAQ#why-doesnt-sidekiq-autoload-my-rails-application-code
......
......@@ -42,7 +42,7 @@ Rails.application.configure do
config.action_mailer.raise_delivery_errors = true
# Don't make a mess when bootstrapping a development environment
config.action_mailer.perform_deliveries = (ENV['BOOTSTRAP'] != '1')
config.action_mailer.preview_path = 'app/mailers/previews'
config.action_mailer.preview_path = Rails.root.join('app', 'mailers', 'previews')
config.eager_load = false
......
......@@ -43,7 +43,7 @@ Rails.application.configure do
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
config.eager_load = true
config.eager_load = false
config.cache_store = :null_store
......
# frozen_string_literal: true
Rails.autoloaders.each do |autoloader|
# We need to ignore these since these are non-Ruby files
# that do not define Ruby classes / modules
autoloader.ignore(Rails.root.join('lib/support'))
# Ignore generators since these are loaded manually by Rails
autoloader.ignore(Rails.root.join('lib/generators'))
autoloader.ignore(Rails.root.join('ee/lib/generators')) if Gitlab.ee?
# Mailer previews are also loaded manually by Rails
autoloader.ignore(Rails.root.join('app/mailers/previews'))
autoloader.ignore(Rails.root.join('ee/app/mailers/previews')) if Gitlab.ee?
# Ignore these files because these are only used in Rake tasks
# and are not available in production
autoloader.ignore(Rails.root.join('lib/gitlab/graphql/docs'))
autoloader.inflector.inflect(
'authenticates_2fa_for_admin_mode' => 'Authenticates2FAForAdminMode',
'api' => 'API',
'api_guard' => 'APIGuard',
'group_api_compatibility' => 'GroupAPICompatibility',
'project_api_compatibility' => 'ProjectAPICompatibility',
'cte' => 'CTE',
'recursive_cte' => 'RecursiveCTE',
'cidr' => 'CIDR',
'cli' => 'CLI',
'dn' => 'DN',
'hmac_token' => 'HMACToken',
'html' => 'HTML',
'html_parser' => 'HTMLParser',
'html_gitlab' => 'HTMLGitlab',
'http' => 'HTTP',
'http_connection_adapter' => 'HTTPConnectionAdapter',
'http_clone_enabled_check' => 'HTTPCloneEnabledCheck',
'chunked_io' => 'ChunkedIO',
'http_io' => 'HttpIO',
'json' => 'JSON',
'json_formatter' => 'JSONFormatter',
'json_web_token' => 'JSONWebToken',
'as_json' => 'AsJSON',
'ldap_key' => 'LDAPKey',
'mr_note' => 'MRNote',
'pdf' => 'PDF',
'rsa_token' => 'RSAToken',
'san_extension' => 'SANExtension',
'sca' => 'SCA',
'spdx' => 'SPDX',
'sql' => 'SQL',
'ssh_key' => 'SSHKey',
'ssh_key_with_user' => 'SSHKeyWithUser',
'ssh_public_key' => 'SSHPublicKey',
'git_push_ssh_proxy' => 'GitPushSSHProxy',
'git_user_default_ssh_config_check' => 'GitUserDefaultSSHConfigCheck',
'binary_stl' => 'BinarySTL',
'text_stl' => 'TextSTL',
'svg' => 'SVG',
'function_uri' => 'FunctionURI'
)
end
......@@ -3,12 +3,6 @@
require 'settingslogic'
require 'digest/md5'
# We can not use `Rails.root` here, as this file might be loaded without the
# full Rails environment being loaded. We can not use `require_relative` either,
# as Rails uses `load` for `require_dependency` (used when loading the Rails
# environment). This could then lead to this file being loaded twice.
require_dependency File.expand_path('../lib/gitlab', __dir__)
class Settings < Settingslogic
source ENV.fetch('GITLAB_CONFIG') { Pathname.new(File.expand_path('..', __dir__)).join('config/gitlab.yml') }
namespace ENV.fetch('GITLAB_ENV') { Rails.env }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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