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.
@sigfox/eslint-config-react
Advanced tools
This is the shared Eslint configuration used for React based projects at Sigfox.
It is meant to be used with Prettier (all rules handled by Prettier are turned off).
⚠️ Work in progress
This package is still at its early stages, and radical changes may occur.
If you use yarn, run npm info "@sigfox/eslint-config-react@latest" peerDependencies
to list the peer dependencies and versions, then run yarn add --dev <dependency>@<version>
for each listed peer dependency.
npx install-peerdeps --dev @sigfox/eslint-config-react
Here is our typical .eslintrc
file:
// .eslintrc
{
"extends": "@sigfox/eslint-config-react",
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"es6": true
},
"rules": {}
}
We use the babel-eslint. It's not mandatory, but if you are using babel (including babel-loader in your webpack or other flavors), you should use this parser to avoid false positives.
All rules that are unnecessary or might conflict with Prettier are turned off.
This is the Prettier config we use:
// .prettierrc
{
"printWidth": 80,
"tabWidth": 2,
"tabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "avoid",
"proseWrap": "preserve"
}
Please refer to the Prettier documentation to integrate it in your environment and editor/IDE. Don't forget to consider prettier-eslint.
If you are migrating from a previous eslint version or configuration, or just did an upgrade of this package or dependencies, follow these steps after installation and configuration:
yarn cache clean
yarn
or npm install
Don't hesitate to open issues, submit pull requests, and to start a debate.
Still, you have to keep in mind that this is the configuration we use at Sigfox, and that we might decline change requests because they don't comply with our internal choices, and not because they are stupid.
Feel free to fork, change, rename and pubish your own package based on this one.
MIT
Big thanks to Airbnb for publishing their eslint config packages, which we used and tuned for a time before deciding to make our own package. Most of the code here is still simple copy/paste of it.
FAQs
Eslint config for React projects used @ Sigfox
The npm package @sigfox/eslint-config-react receives a total of 1 weekly downloads. As such, @sigfox/eslint-config-react popularity was classified as not popular.
We found that @sigfox/eslint-config-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.