
Research
Security News
The Landscape of Malicious Open Source Packages: 2025 Mid‑Year Threat Report
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
@calm/eslint-plugin-react-intl
Advanced tools
This is a plugin to ensure that Intl translations are being made correctly with react-intl. Since they should be stored in an object for translation, this disables plain text between html tags.
The plugin is actively supported by the Calm engineering team, and contributions/concerns are welcome at https://github.com/calm/eslint-plugin-react-intl.
There are three options to enable, and we recommend enabling all of them to ensure proper translations in all languages.
The { noTrailingWhitespace: true } option is set by default and is not necessary to declare in the rules section.
This is recommended as some languages don't have spaces between words.
Additionally, the option ignoreLinks
is set to true by default. Depending on your
use case, you may want to disable this.
<a>
tags by default are not checked (this can be disabled)-
)<track label="subtitles" />
)<img alt="description" />
)<Checkbox value="checkedA" inputProps={{ 'aria-label': 'Checkbox A' }} />
)
{variable}
declarations must be declared in the values
attributenumber
defaultMessage
and id
attributes set
requireDefaultMessage : false
defaultMessage
and id
attributes cannot be emptyrequireDescription
can optionally be set to require that all translations contain the description attributeformatDefineMessages: true
option in order to also check the defineMessages declaration from react-intl
requireIdAsString: false
will allow for variables in the id field
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install @calm/eslint-plugin-react-intl
:
$ npm install @calm/eslint-plugin-react-intl --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install @calm/eslint-plugin-react-intl
globally.
Add @calm/react-intl
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"@calm/react-intl"
]
}
Then configure the rules you want to use under the rules section.
It's recommended that you explicitly set each option.
The rules (with their default settings) are listed below.
{
"rules": {
"@calm/react-intl/missing-formatted-message": [2,
{
"noTrailingWhitespace": true,
"ignoreLinks": true,
"enforceLabels": false,
"enforceImageAlts": false,
"enforceInputProps": false
}
],
"@calm/react-intl/missing-attribute": [2,
{
"noTrailingWhitespace": true,
"noSpreadOperator": true,
"requireDescription": false,
"formatDefineMessages": false,
"requireIdAsString": true,
"requireDefaultMessage": true,
}
],
"@calm/react-intl/missing-values": 2
}
}
FAQs
Linter for React-Intl integration
The npm package @calm/eslint-plugin-react-intl receives a total of 31,034 weekly downloads. As such, @calm/eslint-plugin-react-intl popularity was classified as popular.
We found that @calm/eslint-plugin-react-intl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 36 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.
Research
Security News
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.