This package has been deprecated

Author message:

Deprecated in favor of @gitlab/eslint-plugin: https://www.npmjs.com/package/@gitlab/eslint-plugin

@gitlab/eslint-plugin-i18n

1.1.0 • Public • Published

pipeline status code style: prettier

eslint-plugin-i18n

Detect and autofix strings which require externalization in Vanilla JS files.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install @gitlab/eslint-plugin-i18n:

$ npm install @gitlab/eslint-plugin-i18n --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install @gitlab/eslint-plugin-i18n globally.

Usage

Add @gitlab/eslint-plugin-i18n to the plugins section of your .eslintrc configuration file. You can omit the @gitlab/eslint-plugin- prefix:

JSON:

{
  "plugins": ["@gitlab/i18n"]
}

YAML:

plugins:
  - @gitlab/i18n

Then configure the rules you want to use under the rules section.

JSON:

{
  "rules": {
    "@gitlab/i18n/no-non-i18n-strings": "error"
  }
}

YAML:

rules:
  "@gitlab/i18n/no-non-i18n-strings": error

VueJS (.vue files)

@gitlab/eslint-plugin-i18n can also detect strings requiring externalization for code within the <script></script> tags of a .vue file.

Editor support

Supported Rules

Contribution guidelines

Please refer to gitlab-ce's CONTRIBUTING.md for details on our guidelines.

/@gitlab/eslint-plugin-i18n/

    Package Sidebar

    Install

    npm i @gitlab/eslint-plugin-i18n

    Weekly Downloads

    1,486

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    17.2 kB

    Total Files

    11

    Last publish

    Collaborators

    • apanchal-gitlab
    • rob.hunt-gitlab
    • gitlab-administration
    • tzallmann
    • gitlab-bot
    • leipert