0.0.52 • Published 8 years ago

eslint-config-pier1 v0.0.52

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

eslint-config-pier1

Build Status npm devDependencies Status license

ESLint shareable config

Installation

$ npm install --save-dev eslint babel-eslint eslint-config-pier1

Usage

Once the eslint-config-pier1 package is installed, you can use it by specifying pier1 in the extends section of your ESLint configuration.

{
  "extends": "pier1",
  "rules": {
    // Additional, per-project rules...
  },
  "globals": {
    // Additional, per-project `no-undef` ignores...
  }
}

Using the pier1 config with eslint:recommended

There are several rules in the eslint:recommended ruleset that you might want to override and enforce in your project.

To use Pier 1 Imports style in conjunction with ESLint's recommended rule set, extend them both, making sure to list pier1 last:

{
  "extends": ["eslint:recommended", "pier1"],
  "rules": {
    // Additional, per-project rules...
  },
  "globals": {
    // Additional, per-project `no-undef` ignores...
  }
}

To see how the pier1 config compares with eslint:recommended, refer to the source code of index.js, which lists every ESLint rule along with whether (and how) it is enforced by the pier1 config.

Using the pier1 config with eslint-plugin-demandware

Demandware has numerous globals that need to be defined so that ESLint will not warn about their usage.

Once the eslint-plugin-demandware package is installed, you can use it by specifying demandware in the plugins and demandware/globals in the env section of your ESLint configuration.

{
  "extends": ["eslint:recommended", "pier1"],
  "rules": {
    // Additional, per-project rules...
  },
  "plugins": [
    // Additional, per-project plugins...
    "demandware"
  ],
  "env": {
    // Additional, per-project environments...
    "demandware/globals": true
  },
  "globals": {
    // Additional, per-project `no-undef` ignores...
  }
}

License

Licensed under the MIT License.

Copyright (c) 2017 Pier 1 Imports, Inc.

0.0.52

8 years ago

0.0.51

8 years ago

0.0.50

8 years ago

0.0.49

8 years ago

0.0.48

8 years ago

0.0.47

8 years ago

0.0.46

8 years ago

0.0.45

8 years ago

0.0.44

8 years ago

0.0.43

8 years ago

0.0.42

8 years ago

0.0.41

8 years ago

0.0.40

8 years ago

0.0.39

8 years ago

0.0.38

8 years ago

0.0.37

8 years ago

0.0.36

8 years ago

0.0.35

8 years ago

0.0.34

8 years ago

0.0.33

8 years ago

0.0.32

8 years ago

0.0.31

8 years ago

0.0.30

8 years ago

0.0.29

8 years ago

0.0.28

8 years ago

0.0.27

8 years ago

0.0.26

8 years ago

0.0.25

8 years ago

0.0.24

8 years ago

0.0.23

8 years ago

0.0.22

8 years ago

0.0.21

8 years ago

0.0.20

8 years ago

0.0.19

8 years ago

0.0.18

8 years ago

0.0.17

8 years ago

0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.0.0

8 years ago