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

eslint-plugin-formatjs

Package Overview
Dependencies
Maintainers
0
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-formatjs

ESLint plugin for formatjs

  • 5.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
106K
decreased by-55.22%
Maintainers
0
Weekly downloads
 
Created

What is eslint-plugin-formatjs?

eslint-plugin-formatjs is an ESLint plugin that provides linting rules for the FormatJS library, which is used for internationalization (i18n) in JavaScript applications. The plugin helps ensure that your usage of FormatJS is consistent and follows best practices.

What are eslint-plugin-formatjs's main functionalities?

Enforce id attribute in messages

This rule ensures that all messages have an 'id' attribute, which is useful for consistency and maintainability in large projects.

module.exports = {
  'rules': {
    'formatjs/enforce-id': ['error', { 'idInterpolationPattern': '[sha512:contenthash:base64:6]' }]
  }
};

No multiple plurals

This rule prevents the use of multiple plural forms in a single message, which can lead to confusion and errors in translations.

module.exports = {
  'rules': {
    'formatjs/no-multiple-plurals': 'error'
  }
};

No id in define messages

This rule disallows the use of 'id' attributes in defineMessages, promoting the use of defaultMessage instead.

module.exports = {
  'rules': {
    'formatjs/no-id-in-define-messages': 'error'
  }
};

Other packages similar to eslint-plugin-formatjs

Keywords

FAQs

Package last updated on 05 Nov 2024

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