Registry / testing / eslint-config-braintree

eslint-config-braintree

JSON →
library7.0.1jsnpmunverified

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.

testingdevops
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

This package uses CommonJS require() for flat config; ESM import is not supported. The correct usage for flat config is 'module.exports = braintreeConfig;'.

const braintreeConfig = require('eslint-config-braintree');

Use require() to load the client (browserify) preset. For flat config, spread into array: [...braintreeClientConfig, ...otherConfig].

const braintreeClientConfig = require('eslint-config-braintree/client');

The server config is exported as a separate entry point, not a property of the main config. Correct path is 'eslint-config-braintree/server'.

const braintreeServerConfig = require('eslint-config-braintree/server');

Shows how to install and configure the Braintree ESLint config using flat config (ESLint v9+), including required plugins and custom rule overrides.

// Install dependencies: // npm install eslint@^9 --save-dev // npm install eslint-config-braintree --save-dev // npm install @typescript-eslint/eslint-plugin eslint-plugin-prettier --save-dev // eslint.config.js (ESLint flat config, v9+) const braintreeConfig = require('eslint-config-braintree'); module.exports = [ ...braintreeConfig, { files: ['**/*.ts', '**/*.tsx'], rules: { 'no-new-object': 'warn', }, }, ];
Debug
Known footguns
breakingVersion 7.0.0+ drops ESLint v8 support and requires ESLint ^9. Only flat config is supported; .eslintrc files are not compatible.
gotchaAll required ESLint plugins must be installed separately (peer dependencies not auto-installed). Missing plugins will cause ESLint to throw resolution errors.
gotchaThe config uses CommonJS (require) and does not export an ESM-compatible module. Attempting to import with ESM (import) will fail.
deprecatedLegacy .eslintrc format is not supported in v7.x (ESLint v9+). Using 'eslint-config-braintree' with extends in .eslintrc will not work.
breakingVersion 6.x (last ESLint v8 compatible) is not officially released or documented; users still on v8 must pin to an older version or migrate.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
9 hits · last 30 days
gptbot
4
ahrefsbot
4
script
1
Resources