Shared ESLint configuration for Braintree JavaScript projects. Current stable version is 7.0.1, requiring ESLint ^9.0.0 (flat config only, legacy .eslintrc support removed). It ships with TypeScript type declarations and provides presets for client (browserify), server (Node), and ES6 environments, as well as a JSDoc configuration. Unlike generic shareable configs (e.g., eslint-config-airbnb), it is opinionated for Braintree's internal standards and relies on plugins (e.g., @typescript-eslint/eslint-plugin, eslint-plugin-prettier) that must be installed separately. Release cadence is low; primarily updated for major ESLint versions.
npm install eslint-config-braintreeVerified import paths — ran on the pinned version, not inferred.
Shows how to install and configure the Braintree ESLint config using flat config (ESLint v9+), including required plugins and custom rule overrides.
Update ESLint to v9 and migrate to flat config (eslint.config.js). Remove .eslintrc files and use module.exports = [ ...braintreeConfig ].
Run: npm install @typescript-eslint/eslint-plugin eslint-plugin-prettier --save-dev
Use require() in CommonJS context or configure ESLint's flat config as a CommonJS file (eslint.config.js, not .mjs).
Migrate to flat config (eslint.config.js) by spreading the config array.
If using ESLint v8, stay on eslint-config-braintree v5.x (if available) or upgrade ESLint to v9.
npm install @typescript-eslint/eslint-plugin --save-dev
Use 'const x = require(...);' in a CommonJS file. Ensure eslint.config.js is not treated as ESM (name it .cjs or set type: 'module' and use dynamic import).
Wrap the config import in an array: module.exports = [ ...braintreeConfig, { rules: { 'no-new-object': 'warn' } } ];Switch to flat config (eslint.config.js) and use require('eslint-config-braintree') as described in the docs.No dependency data recorded yet.