
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
eslint-config-braintree
Advanced tools
Shared linting configuration for braintree js projects.
Install eslint@^9
npm install eslint@^9
Install the ESLint config
npm i --save-dev eslint-config-braintree
Eslint requires all the plugins that the configu uses to be installed at the root of the project as well.
npm i --save-dev @typescript-eslint/eslint-plugin eslint-plugin-prettier
In your project's eslint.config.js:
const braintreeConfig = require("eslint-config-braintree");
module.exports = braintreeConfig;
const braintreeClientConfig = require("eslint-config-braintree/client");
module.exports = braintreeClientConfig;
const braintreeServerConfig = require("eslint-config-braintree/server");
module.exports = braintreeServerConfig;
const braintreeClientConfig = require("eslint-config-braintree/client");
const braintreeEs6Config = require("eslint-config-braintree/es6");
module.exports = [...braintreeClientConfig, ...braintreeEs6Config];
In your project's .eslintrc.*:
---
extends: braintree
---
extends: braintree/client
---
extends: braintree/server
---
extends:
- braintree/client
- braintree/es6
{
"extends": "braintree"
}
{
"extends": "braintree/client"
}
{
"extends": "braintree/server"
}
{
"extends": ["braintree/client", "braintree/es6"]
}
You can extend and override rules by adding additional configuration objects to the array:
const braintreeConfig = require("eslint-config-braintree");
module.exports = [
...braintreeConfig,
{
files: ["**/*.ts", "**/*.tsx"],
rules: {
"no-new-object": "warn", // Change from error to warn
},
},
];
For different file patterns:
const braintreeConfig = require("eslint-config-braintree");
module.exports = [
...braintreeConfig,
{
files: ["**/*.js"],
rules: {
"no-multi-spaces": ["error", { ignoreEOLComments: false }],
},
},
];
You can specify a .eslintrc for a subdirectory to change the rules
that are enforced. For instance, in a node project you could extend from
eslint-config-braintree/server at the top-level, and
eslint-braintree-config/client at the public/.eslintrc level.
See Configuration File
Formats
for information on all supported .eslintrc file formats.
To override rules, add the new config under rules in your rc file. Be
sure to properly override any options set by the parent. See Extending
Configuration
Files
for details.
For example, to change the no-new-object rule to warn instead of
error:
---
extends: braintree/server
rules:
no-new-object: warn
{
"extends": "braintree/server",
"rules": {
"no-new-object": "warn"
}
}
In another example, to allow end of line comments, you'd override the
"no-multi-spaces" rule options:
---
extends: braintree/server
rules:
no-multi-spaces:
- error
- ignoreEOLComments: false
{
"extends": "braintree/server",
"rules": {
"no-multi-spaces": ["error", { "ignoreEOLComments": false }]
}
}
By default, any files in a __tests__ folder, whether at the top level
of the directory or within another directory will be configured to be
used in the Jest and ES2020 environments.
FAQs
Braintree's ESLint configuration
The npm package eslint-config-braintree receives a total of 1,675 weekly downloads. As such, eslint-config-braintree popularity was classified as popular.
We found that eslint-config-braintree demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.