Registry / devops / eslint-config-expensify

eslint-config-expensify

JSON →
library2.0.110jsnpmunverified

Expensify’s sharable ESLint configuration, based on Airbnb’s style guide, with React and JSX a11y support. Current stable version is 2.0.110. Released automatically via GitHub Actions on merge. Provides two configs: default (full) and legacy. Requires eslint, eslint-plugin-import, eslint-plugin-react, and eslint-plugin-jsx-a11y as peer dependencies. Automatically versioned and published via CI.

npm install eslint-config-expensify
INSTALL
IMPORT
SIG · ESLINT-CONFIG-EXPE
E
eslint-config-expensify
devopsjavascriptv2.0.110
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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.

default config
module.exports = { extends: 'expensify' }
module.exports = { extends: 'eslint-config-expensify' }
Use the shorthand 'expensify' not the full package name.
legacy config
module.exports = { extends: 'expensify/legacy' }
module.exports = { extends: 'eslint-config-expensify/legacy' }
Shorthand works: 'expensify/legacy' instead of full path.
overrides
module.exports = { extends: ['expensify'], rules: { 'react/jsx-filename-extension': [1, { extensions: ['.jsx'] }] } }
You can extend and override rules normally.

Shows how to set up an .eslintrc.js file using the Expensify config with a custom rule override.

// .eslintrc.js module.exports = { extends: ['expensify'], rules: { 'react/jsx-filename-extension': [1, { extensions: ['.jsx'] }], }, };
Debug
Known issues
breakingv2+ dropped support for Node <16 and ESLint <8. If you are on an older version, extend must be updated or you will see parser/plugin errors.
fix
Upgrade Node to >=16 and ESLint to >=8, or stay on v1.x.
affects: >=2.0.0
deprecatedThe legacy config (eslint-config-expensify/legacy) is deprecated and will be removed in a future major version.
fix
Migrate to the default config and remove legacy references.
affects: >=2.0.0
gotchaMissing peer dependencies: eslint-plugin-import, eslint-plugin-react, eslint-plugin-jsx-a11y must be installed or ESLint will error.
fix
Run 'npm install --save-dev eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y'.
affects: *
gotchaAutomatic version bump on merge: do not manually bump version in package.json; CI handles it. Conflicts may arise if you do.
fix
Let CI bump version; only change rules in your PR.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-plugin-import'
Missing peer dependency.
fix
npm install --save-dev eslint-plugin-import
Error: Cannot find module 'eslint-config-expensify'
Package not installed or not in node_modules.
fix
npm install eslint-config-expensify --save-dev
Configuration for rule 'react/jsx-filename-extension' is invalid
Using incorrect rule config shape.
fix
Ensure the rule is an array with severity and options, e.g., [1, { extensions: ['.jsx'] }].
Upgrade
Version history
2.0.110latest on npm
Audit
Dependencies
eslintrequiredpeer dependency required to run linting
eslint-plugin-importrequiredpeer dependency for import/export rules
eslint-plugin-reactrequiredpeer dependency for React rules
eslint-plugin-jsx-a11yrequiredpeer dependency for accessibility rules
Agent activity
2 hits · last 30 days
node
2
Resources