diff options
author | Ezekiel Kigbo <ekigbo@gitlab.com> | 2019-06-24 17:22:04 +1000 |
---|---|---|
committer | Ezekiel Kigbo <ekigbo@gitlab.com> | 2019-06-24 18:29:24 +1000 |
commit | 56aa0cbd53433465c4054c74c2113dd114f686c1 (patch) | |
tree | cced430714f59500f193136d49cc89bd5d3969de | |
parent | e740580dcf8e5b09b5baa0b2763edafa0b289eae (diff) | |
download | gitlab-ce-vue-i18n-eslint-disable-false-positives.tar.gz |
Vue-i18n: disable eslint rulesvue-i18n-eslint-disable-false-positives
disabling eslint for some known false positives
5 files changed, 14 insertions, 1 deletions
diff --git a/app/assets/javascripts/mr_popover/components/mr_popover.vue b/app/assets/javascripts/mr_popover/components/mr_popover.vue index c203cb0667c..b5066debac1 100644 --- a/app/assets/javascripts/mr_popover/components/mr_popover.vue +++ b/app/assets/javascripts/mr_popover/components/mr_popover.vue @@ -7,6 +7,8 @@ import query from '../queries/merge_request.query.graphql'; import { mrStates, humanMRStates } from '../constants'; export default { + // TODO: when the vue i18n rules are merged need to disable @gitlab/i18n/no-non-i18n-strings + // 'name' is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26#possible-false-positive name: 'MRPopover', components: { GlPopover, diff --git a/app/assets/javascripts/notebook/cells/markdown.vue b/app/assets/javascripts/notebook/cells/markdown.vue index 61eabbcb8b2..7a560539878 100644 --- a/app/assets/javascripts/notebook/cells/markdown.vue +++ b/app/assets/javascripts/notebook/cells/markdown.vue @@ -43,6 +43,8 @@ renderer.paragraph = t => { if (typeof katex !== 'undefined') { const katexString = text .replace(/&/g, '&') + // TODO: when the vue i18n rules are merged need to disable @gitlab/i18n/no-non-i18n-strings + // regex is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26#possible-false-positives .replace(/&=&/g, '\\space=\\space') .replace(/<(\/?)em>/g, '_'); const regex = new RegExp(katexRegexString, 'gi'); diff --git a/app/assets/javascripts/notebook/cells/output/image.vue b/app/assets/javascripts/notebook/cells/output/image.vue index f1130275525..b58047617cd 100644 --- a/app/assets/javascripts/notebook/cells/output/image.vue +++ b/app/assets/javascripts/notebook/cells/output/image.vue @@ -25,6 +25,8 @@ export default { }, computed: { imgSrc() { + // TODO: when the vue i18n rules are merged need to disable @gitlab/i18n/no-non-i18n-strings + // data: url is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26#possible-false-positives return `data:${this.outputType};base64,${this.rawCode}`; }, showOutput() { @@ -36,6 +38,7 @@ export default { <template> <div class="output"> - <prompt type="out" :count="count" :show-output="showOutput" /> <img :src="imgSrc" /> + <prompt type="out" :count="count" :show-output="showOutput" /> + <img :src="imgSrc" /> </div> </template> diff --git a/app/assets/javascripts/notebook/index.vue b/app/assets/javascripts/notebook/index.vue index e7056c03e4a..110aacaf39a 100644 --- a/app/assets/javascripts/notebook/index.vue +++ b/app/assets/javascripts/notebook/index.vue @@ -39,6 +39,8 @@ export default { }, methods: { cellType(type) { + // TODO: when the vue i18n rules are merged need to disable @gitlab/i18n/no-non-i18n-strings + // ${type}-cell is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26#possible-false-positives return `${type}-cell`; }, }, diff --git a/app/assets/javascripts/operation_settings/components/external_dashboard.vue b/app/assets/javascripts/operation_settings/components/external_dashboard.vue index ed518611d0b..f1330c44711 100644 --- a/app/assets/javascripts/operation_settings/components/external_dashboard.vue +++ b/app/assets/javascripts/operation_settings/components/external_dashboard.vue @@ -52,6 +52,10 @@ export default { :label="s__('ExternalMetrics|Full dashboard URL')" :description="s__('ExternalMetrics|Enter the URL of the dashboard you want to link to')" > + <!-- + TODO: eslint disable this false positive https://gitlab.com/ekigbo/eslint-plugin-vue-i18n/issues/13 + // placeholder with a url is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26#possible-false-positives + --> <gl-form-input v-model="userDashboardUrl" placeholder="https://my-org.gitlab.io/my-dashboards" |