Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-config-amex

americanexpress1.8kApache-2.016.6.1

American Express' ESLint config

amex, eslint, eslintconfig

readme

Eslint Config Amex - One Amex

npm Health Check

ESLint configurations used at American Express.

👩‍💻 Hiring 👨‍💻

Want to get paid for your contributions to eslint-config-amex?

Send your resume to oneamex.careers@aexp.com

📖 Table of Contents

🤹‍ Usage

Installation

npm install --save-dev eslint eslint-config-amex

The default config provides support for React applications. ESLint configs are also provided for:

  • Jest
  • Prettier

Install required peer dependencies before extending your ESLint config:

Jest:

npm install --save-dev typescript eslint-plugin-jest eslint-plugin-jest-dom

Prettier:

npm install --save-dev prettier eslint-plugin-prettier

Extend your .eslintrc

To use the base config:

{
    "extends": "amex"
}

To use the Prettier compatible config:

{
    "extends": "amex/prettier"
}

:warning: The amex eslint config enforces single quotes, while Prettier uses double quotes by default. Enabling the Prettier config will change all the quotes in your files. To avoid this, add a custom Prettier .prettierrc config:

{
    "singleQuote": true
}

(Optionally) Create an .eslintrc file in your test directory

{
    "extends": "amex/test"
}

If you are using Prettier use the prettier/test config:

{
    "extends": "amex/prettier/test"
}

This gives you the jest global and some jest specific rules.

🏆 Contributing

We welcome Your interest in the American Express Open Source Community on Github. Any Contributor to any Open Source Project managed by the American Express Open Source Community must accept and sign an Agreement indicating agreement to the terms below. Except for the rights granted in this Agreement to American Express and to recipients of software distributed by American Express, You reserve all right, title, and interest, if any, in and to Your Contributions. Please fill out the Agreement.

Please feel free to open pull requests and see CONTRIBUTING.md to learn how to get started contributing.

🗝️ License

Any contributions made under this project will be governed by the Apache License 2.0.

🗣️ Code of Conduct

This project adheres to the American Express Community Guidelines. By participating, you are expected to honor these guidelines.

changelog

16.6.1 (2025-01-10)

Bug Fixes

  • deps: use semver for @babel/eslint-parser (#140) (af799e2)

16.6.0 (2025-01-10)

Features

  • deps: support latest eslint-plugin-jest and eslint-plugin-jest-dom (#133) (09fd81a)

16.5.0 (2025-01-08)

Features

  • support mocks dir as dev directory (0482401)

16.4.0 (2024-11-15)

Features

16.3.0 (2024-11-15)

Features

  • treat vite config files as dev files (#130) (ef8c6ab)

16.2.0 (2024-10-23)

Features

  • don't require descriptions for eslint-enable comments (#128) (0f1ea18)

16.1.0 (2024-03-26)

Features

  • dependencies: add support for prettier 3 (#126) (cfa4df3)

16.0.0 (2023-06-15)

Features

  • dependencies: update plugins and remove eslint@7 support (#121) (85cae7e)

BREAKING CHANGES

  • dependencies: Require minimum of eslint 8 and node 16 required to fix bug in node 18
  • dependencies: eslint-config-prettier All configs merged into prettier
  • dependencies: esling-plugin-prettier Drop support for eslint 5/6, prettier 1, node 6/8

15.3.2 (2023-04-17)

Bug Fixes

15.3.1 (2022-09-05)

Bug Fixes

  • eslint-plugin-jest: allow 27.x peer dep (#113) (e8624b0)

15.3.0 (2022-05-26)

Features

15.2.1 (2022-05-11)

Bug Fixes

  • peerDeps: widen semver ranges of ESLint plugins for Jest (#106) (71dde2e)

15.2.0 (2022-04-13)

Features

  • max-len: ignore described eslint ignores (#104) (283f68e)

15.1.0 (2022-02-15)

Features

15.0.3 (2022-02-14)

Bug Fixes

  • update link to remove non-inclusive term (#98) (86e85cd)

15.0.2 (2022-01-14)

Bug Fixes

  • eslint-plugin-prettier: peer version (#92) (ef06bd0)

15.0.1 (2021-11-19)

Bug Fixes

  • typescript: peer dep conflict (1793a26)

15.0.0 (2021-10-01)

chore

BREAKING CHANGES

  • relese: Node v10 has reached end-of-life and is no longer supported.

  • feat(eslint-comments): aid maintainability of eslint directives

  • relese: 7 new rules added as errors

  • fix(index): move eslint-disable directive and pair it

  • feat(ally): disallow nesting of controls in labels

  • feat(unicorn): upgrade eslint-plugin-unicorn from 23.0.0 to 36.0.0

14.2.1 (2021-05-26)

Bug Fixes

  • index: switch inclusive language to warning (#77) (b76f28d)

14.2.0 (2021-05-25)

Features

  • eslint: add inclusive-language rule (#71) (5a1cf81)

14.1.1 (2021-04-23)

Bug Fixes

  • comments: link to tagged releases instead of master (#70) (e997489)

14.1.0 (2021-03-16)

Features

  • react/boolean-prop-naming: extend to allow 'should' in boolean names (#67) (6787d35)

14.0.0 (2021-03-03)

Features

  • fix the peer dep test; update all deps to latest (51d1864)
  • move optional tools and plugins to optional peerDependencies (4aebd5e)

BREAKING CHANGES

  • Moved TypeScript and Prettier dependencies to peer dependencies and made them optional. Consumers of this package must install them separately. Moved ESLint plugins required by amex/test and amex/prettier/* to become optional peer dependencies.
    • Several ESLint plugins received major updates.
  • ESLint versions below v7.15.0 are no longer supported.
    • Several ESLint plugins received major updates.
  • ESLint versions below v7.15.0 are no longer supported.

13.1.0 (2020-08-18)

Features

  • unicorn/prefer-includes: disable (#50) (d526530)

13.0.0 (2020-07-16)

Bug Fixes

  • eslint: disable prevent abbreviations (#33) (6647bef)

Features

BREAKING CHANGES

  • unicorn: major update to unicorn
  • js: no-lonely-if errors
  • js: no-return-assign, errors
  • js: prefer-object-spread, errors
  • js: no-bitwise, errors

12.2.0 (2020-06-06)

Features

  • eslint: array includes is acceptable (#34) (bdf92f1)

12.1.0 (2020-06-05)

Features

  • eslint: spaced comment warn instead of error (#37) (51c539d)

12.0.3 (2020-06-02)

Bug Fixes

  • eslint: disable airbnb default props rules (#27) (70936b8)

12.0.2 (2020-05-11)

Bug Fixes

  • eslint: react requires use of null (#32) (bdf6800)

12.0.1 (2020-05-07)

Bug Fixes

12.0.0 (2020-03-30)

Features

  • deps: update dependencies to latest version (#16) (27ad145)

BREAKING CHANGES

  • deps: Updates deps major versions

11.2.0 (2020-02-07)

Features

  • index: disable jsx-one-expression-per-line (#8) (68e6d48)
  • rules: no-extra-parens (#9) (a3afc72)