Skip to content

Add ESLint vue rules to detect vue i18n offences

Ezekiel Kigbo requested to merge 63560-add-vue-i18n-eslint into master

What does this MR do?

Adds eslint-plugin-vue-i18n to provide i18n linting for .vue files.

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>

EE Port

EE Port

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #63560 (closed)

Edited by Ezekiel Kigbo

Merge request reports