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

Package detail

eslint-config-gitbook

GitbookIO12.6kApache-2.05.0.1

GitBook's ESLint config, following our styleguide

readme

eslint-config-gitbook

NPM version Build Status

This package provides GitBook's .eslintrc as an extensible shared config. It is mostly based on airbnb styleguide and setup with prettier to code format with eslint --fix.

Installation

npm install eslint-config-gitbook --save-dev

With npm 5+, you can now install the package along with its peer dependencies easily:

npx install-peerdeps --dev eslint-config-gitbook

Usage

Add to your .eslintrc:

{
    "extends": "gitbook"
}

changelog

Release notes

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

5.0.1

  • Fix destructuring in react components
  • Fix lines between properties in class

5.0.0

  • Upgrade to eslint@5

4.0.0

  • Upgrade to eslint@4

3.0.0

  • Move eslint plugins as peerDependencies

2.0.1

  • Switch prettier parser to babylon

2.0.0

  • Use prettier
  • Based on airbnb

1.3.1

  • Accept unwrapped multilines jsx for assignment and declaration

1.3.0

  • Disable rule no-case-declarations
  • Enforce wrap of multilines JSX (react/jsx-wrap-multilines)

1.2.0

  • Enforce spaces before and after keywords (keyword-spacing)
  • Disallow spaces in parentheses (space-in-parens)

1.1.2

  • Fix no-multi-spaces throwing errors for assignment