Socket
Socket
Sign inDemoInstall

eslint-plugin-i18n-prefix

Package Overview
Dependencies
100
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-plugin-i18n-prefix

ESLint rule to check if i18n translation key starts with matching component name


Version published
Weekly downloads
53
increased by26.19%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

eslint-plugin-i18n-prefix

ESLint rule that helps verify that i18n translation key starts with matching component name

npm version

Example

Installation

pnpm add -D eslint eslint-plugin-eslint-plugin-i18n-prefix

Usage

Add to .eslintrc

{
  "extends": ["plugin:eslint-plugin-i18n-prefix/recommended"]
}

Rules

✅ Set in the recommended configuration

🔧 Automatically fixable by the --fix CLI option.

NameDescription💼🔧
i18n-prefixEnsure i18n translation key starts with matching component name.🔧

i18n-prefix

Ensure i18n translation key starts with matching component name

{
	"i18n-prefix/i18n-prefix": [
		"error",
		{
            "translationFunctionName": "t",
            "delimiter": ".",
            "ignorePrefixes": []
		}
	]
}

Notes

This can be used together with https://github.com/natura-cosmeticos/eslint-plugin-i18n-checker

Keywords

FAQs

Last updated on 26 Dec 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc