Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@gitlab/eslint-plugin-i18n

Package Overview
Dependencies
Maintainers
11
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gitlab/eslint-plugin-i18n

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

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
8.7K
-3.57%
Maintainers
11
Weekly downloads
 
Created
Source

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.

Keywords

eslint

FAQs

Package last updated on 12 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts