0.0.52 • Published 7 years ago

eslint-config-pier1 v0.0.52

Weekly downloads
1
License
MIT
Repository
github
Last release
7 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

7 years ago

0.0.51

7 years ago

0.0.50

7 years ago

0.0.49

7 years ago

0.0.48

7 years ago

0.0.47

7 years ago

0.0.46

7 years ago

0.0.45

7 years ago

0.0.44

7 years ago

0.0.43

7 years ago

0.0.42

7 years ago

0.0.41

7 years ago

0.0.40

7 years ago

0.0.39

7 years ago

0.0.38

7 years ago

0.0.37

7 years ago

0.0.36

7 years ago

0.0.35

7 years ago

0.0.34

7 years ago

0.0.33

7 years ago

0.0.32

7 years ago

0.0.31

7 years ago

0.0.30

7 years ago

0.0.29

7 years ago

0.0.28

7 years ago

0.0.27

7 years ago

0.0.26

7 years ago

0.0.25

7 years ago

0.0.24

7 years ago

0.0.23

7 years ago

0.0.22

7 years ago

0.0.21

7 years ago

0.0.20

7 years ago

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago