Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
eslint-plugin-formatjs
Advanced tools
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.
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'
}
};
eslint-plugin-i18n is another ESLint plugin that provides rules for internationalization. It focuses on ensuring that i18n best practices are followed, such as checking for missing translations and enforcing consistent message formats. Compared to eslint-plugin-formatjs, it is more general and not specifically tied to FormatJS.
eslint-plugin-react-intl is an ESLint plugin specifically for React applications using the react-intl library. It provides rules to enforce best practices and consistency in the use of react-intl. While eslint-plugin-formatjs can be used with any JavaScript project, eslint-plugin-react-intl is tailored for React projects.
We've migrated the docs to https://formatjs.io.
FAQs
ESLint plugin for formatjs
We found that eslint-plugin-formatjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.