EE Port - 63560 add vue i18n eslint EE
What does this MR do?
Adds eslint-plugin-vue-i18n to provide i18n linting for .vue files.
- This MR should be merged after https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14932
- Files with
eslint-disable
directives will have their outstanding lints addressed in https://gitlab.com/gitlab-org/gitlab-ce/issues/63458, at which point theeslint-disable
s can be removed.
New Rules
- Introduces 2 new rules
- no-bare-strings: providing an error on bare strings
<template>
<div>
<h1>This is a translatable string</h1> // Error: Content should be marked for translation
</div>
</template>
- no-bare-attribute-strings: providing an error on bare attributes
<template>
<div>
<h1 title="This is translatable">{{ __('This is a translatable string') }}</h1> // Error: Attribute should be marked for translation
</div>
</template>
- Provides autofixing for simple offences
- Disables the rules for files that will need to be manually fixed
CE MR
Edited by Ezekiel Kigbo