
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@transferwise/eslint-config
Advanced tools
This is an extensible ESLint config used at TransferWise :money_with_wings:
It uses Airbnb's as a base, has Prettier baked in, and overrides some rules we've seen ourselves having to change often :heart:
npx install-peerdeps --dev @transferwise/eslint-config
(if it doesn't work, update npm)
@transferwise
.eslintrc
{
"extends": "@transferwise"
}
Your own config can extend and override it however you want. If you find yourself changing a certain rule often, consider contributing.
For the best developer experience, all of the following are recommended.
package.json
scriptsExample:
"test": "npm run lint && ...other test commands...",
"lint": "eslint '**/*.{js,jsx}'", // runs on all js and jsx files, add {ts,tsx} for TypeScript
"format": "npm run lint -- --fix"
VS Code
settings.json
"javascript.format.enable": false,
"eslint.validate": [
"javascript",
"javascriptreact",
// "typescript",
// "typescriptreact",
],
"eslint.autoFixOnSave": true,
npm install --save-dev lint-staged husky
package.json
"lint-staged": {
"*.{js,jsx}": [ // add {ts,tsx} for TypeScript
"eslint --fix",
"git add"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
}
The ESLint config already auto-formats JS files based on Prettier rules, so you only need this when your editor does not support ESLint auto-fixing or you want to use Prettier with file types other than JS.
To use the configuration, add the following line to your package.json
:
package.json
"prettier": "@transferwise/eslint-config/.prettierrc.js"
Read more about shared configs here, especially if you need to extend/override the default configuration.
If you think a rule should be added or changed, create a pull request. The change will be discussed, and if people agree, it can be merged. Every merge automatically releases to GitHub and npm.
Bear in mind that you'll need to bump the version in package.json
(major for breaking rules, minor for additions, patch for bugfixes) and add a CHANGELOG.md
entry.
FAQs
TransferWise ESLint & Prettier configuration
The npm package @transferwise/eslint-config receives a total of 28 weekly downloads. As such, @transferwise/eslint-config popularity was classified as not popular.
We found that @transferwise/eslint-config 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.