Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
eslint-plugin-m6web-i18n
Advanced tools
This is an eslint plugin for i18n in a react application.
yarn add -D eslint-plugin-m6web-i18n
You have to add the following lines in your .eslintrc
file to configure this plugin:
// Declare the plugin
"plugins": [
"i18n"
],
// Specify rules severity
"rules": {
"i18n/no-unknown-key": "error",
"i18n/no-unknown-key-secondary-langs": "warn",
"i18n/no-text-as-children": "error"
},
// The plugin needs jsx feature to be on for 'no-text-as-children' rule
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
// Settings of your translation
"settings": {
"i18n": {
// Your principal languages used in 'no-unknown-key' rule
"principalLangs": [
{
"name": "fr",
"translationPath": "i18n/fr.json"
}
],
// Secondary languages used in 'no-unknown-key-secondary-langs' rule
"secondaryLangs": [
{
"name": "en",
"translationPath": "i18n/en.json"
}
],
// Name of your translate function
"functionName": "t",
// If you want to ignore specific files
"ignoreFiles": "spec.js",
// If you have pluralization
"pluralizedKeys": ["one", "other"]
}
}
FAQs
eslint plugin for generic i18n
We found that eslint-plugin-m6web-i18n demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.