3.1.1 • Published 5 years ago

@financial-times/eslint-config-de-tooling v3.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

eslint-config-de-tooling

This is an ESLint configuration which aims to ensure all de-tooling applications' source code is consistent in style.

This plugin extends airbnb's base config along with extra rules provided by eslint-plugin-unicorn.

Usage

Install this package together with your application:

npm install --save-dev @financial-times/eslint-config-de-tooling

It's recommended to avoid global installs where possible, as eslint in particular can be volatile with dependency locations.

Extend the config using an eslint config file. For example in an .eslintrc.js file:

{
    "extends": [
        "@financial-times/de-tooling"
    ],
    "rules": {
        // Override any settings from the "parent" extended configuration
    }
}

Mocha config

A mocha config is provided which can be used to extend the base config:

{
    "extends": [
        "@financial-times/de-tooling",
        "@financial-times/de-tooling/test"
    ],
    "rules": {
        // Override any settings from the "parent" extended configuration
    }
}

This config adds mocha and sinon globals and additional rules for mocha based tests.

React/JSX config

A jsx config is provided which replaces the base config, based on the full airbnb config:

{
    "extends": [
        "@financial-times/de-tooling/react"
    ],
    "rules": {
        // Override any settings from the "parent" extended configuration
    }
}

Dependencies

This package requires certain dependencies as peerDependencies. This is a decision consistent with eslint (see https://github.com/eslint/eslint/issues/2518, https://github.com/eslint/eslint/issues/3458). This means they should be installed wherever this package is consumed, with matching version ranges:

It's possible to automatically install these by adapting the steps from eslint-config-airbnb-base, e.g. for Linux/OSX:

(
  export PKG=@financial-times/eslint-config-de-tooling;
  npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)
3.1.1

5 years ago

3.1.0

5 years ago

3.0.2

5 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.2.0

6 years ago

2.1.0

6 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago