Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-signavio-i18n

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-signavio-i18n

check rules for signavio-i18n

  • 2.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

eslint-plugin-signavio-i18n

check rules for signavio-i18n

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-signavio-i18n:

$ npm install eslint-plugin-signavio-i18n --save-dev

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

Usage

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

{
    "plugins": [
        "signavio-i18n"
    ]
}

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

{
    "rules": {
        "signavio-i18n/rule-name": 2
    }
}

Rule details

translator-comment-matches-pattern

Checks if translator comment matches provided pattern.

This considered to be warning:

//'signavio-i18n/translator-comment-matches-pattern': [1, '.*, PEX-'],

// translators: toast message when user is already added
    KEY: i18n('text')

// translators: toast message when user is already added PEX-5594
    KEY: i18n('text')

This considered to be valid, note the comma before PEX-5594:

//'signavio-i18n/translator-comment-matches-pattern': [1, '.*, PEX-'],

// translators: toast message when user is already added, PEX-5594
    KEY: i18n('text')

no-missing-translators-comment

All translator comments must start with translators:

This considered to be warning:

// toast message when user is already added
    KEY: i18n('text')

This considered to be valid:

// translators: toast message when user is already added
    KEY: i18n('text')

missing-parameter

Keys used in the template, must be present in the passed configuration object.

This considered to be warning:

i18n(
    'Here come __firstParam__, __secondParam__ and __missingParam__.',
    {
        firstParam,
        secondParam,
    }
)

This considered to be valid:

i18n(
    'Here come __firstParam__, __secondParam__ and __thirdParam__.',
    {
        firstParam,
        secondParam,
        thirdParam,
    }
)

Supported Rules

  • Fill in provided rules here

Keywords

FAQs

Package last updated on 03 May 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc