Home

Awesome

eslint-config-feedzai

Build Status

This repository contains the ESLint configuration used across products at Feedzai. We share this configuration to promote the use of linters in JavaScript and to share our conventions and best practices in the hope of inspiring others when defining their configurations.

This repo includes two distinct ESLint configurations:

Usage

Installing package dependencies

In order to list the correct versions of each package you could use this command:

npm info "@feedzai/eslint-config-feedzai@latest" peerDependencies

After this command, you can install those packages manually or if you're using the npm version > 5 you could use this shortcut:

npx install-peerdeps --dev @feedzai/eslint-config-feedzai-react

If you want to do all manually you should use:

npm install --save-dev @feedzai/eslint-config-feedzai eslint@^#.#.# eslint-plugin-import@^#.#.#

or :

npm install --save-dev @feedzai/eslint-config-feedzai-react eslint@^#.#.# @feedzai/eslint-config-feedzai@^#.#.# eslint-plugin-import@^#.#.# eslint-plugin-jest@^#.#.# eslint-plugin-jsx-a11y@^#.#.# eslint-plugin-react@^#.#.#

Using Feedzai's ESLint configurations in your .eslintrc file

Add "extends": "@feedzai/eslint-config-feedzai" for JavaScript projects or "extends": "@feedzai/eslint-config-feedzai-react" for React projects to your .eslintrc file.

Development tasks

You can check if those packages follow our coding style conventions by using npm run lint in the root folder of each package.

Deployment tasks

The available commands are: