1.0.6 • Published 7 years ago

eslint-config-loanmarket-react v1.0.6

Weekly downloads
8
License
MIT
Repository
github
Last release
7 years ago

eslint-config-loanmarket-react

This is the react specific eslint configuation for Loan Market’s javascript development. This package is built on top of airbnb's eslint config. It does not include any React or test runner specific configuration options.

Installation

npm install --save-dev eslint-config-loanmarket-react eslint

Basic usage

Create a .eslintrc.json file in the base of your new projects directory.

**.eslintrc.json

{
  "env": {},
  "extends": [
    "loanmarket-react"
  ],
  "plugins": [],
  "rules": {}
}

For more advance usage checkout out the eslint documentation - https://eslint.org/docs/user-guide/configuring

Using with Code Climate

Currently Code Climate does not support importing eslint configs through NPM. To circumvent this limitation we provide a compiled eslint file that you can import directly in your .codeclimate.yml.

.codeclimate.yml

engines:
  eslint:
    enabled: true
    channel: "eslint-4"
    config:
      config: ./node_modules/eslint-config-loanmarket-react/dist/.eslintrc.json
  duplication:
    enabled: true
    config:
      languages:
         javascript:
           mass_threshold: 50
    checks:
      Similar code:
        enabled: false
ratings:
  paths:
    - "**.js"

You will need to exclude this file from your .gitignore, so that the codeclimate can access it directly.

.gitignore

# Dependency directory
node_modules/
# do not ignore eslint prebuilt for code climate
node_modules/eslint-config-loanmarket-react/*
!node_modules/eslint-config-loanmarket-react/dist