JSPM

eslint-plugin-i18n-lingui

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 176
  • Score
    100M100P100Q72371F
  • License MIT

ESLint plugin for enforcing i18n best practices.

Package Exports

  • eslint-plugin-i18n-lingui

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-plugin-i18n-lingui) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

eslint-plugin-i18n-lingui

ESLint Plugin to enforce i18n best practices.

Installation

Local Development

  1. clone the repo in the parent directory of your project

  2. Add the plugin to your project's node_modules:

    $ yarn add ../eslint-plugin-i18n-lingui --save-dev
  3. In your project's .eslintrc.js, add

    module.exports = {
        ...
        plugins: [
            "i18n-lingui"
        ],
        rules: {
            "i18n-lingui/no-eval-in-placeholder": 1, // warning
            "i18n-lingui/prefer-unicode-ellipsis": 2, // error
        }
    }

List of supported rules

Has Fixer Rule Description
no-eval-in-placeholder No evaluation of placeholder values in wrapped strings
✔️ i18n-lingui/prefer-unicode-ellipsis Detects three periods in Trans or t tag wrapped strings