November's Paddleball Marathon

    eslint-config-braintree

    5.0.1 • Public • Published

    eslint-config-braintree

    Shared linting configuration for braintree js projects.

    Consuming

    Install the eslint config

    npm i --save-dev eslint-config-braintree

    In your project's .eslintrc.*:

    yaml

    default

    ---
    extends: braintree

    browserify

    ---
    extends: braintree/client

    node

    ---
    extends: braintree/server

    browserify + es6

    ---
    extends:
      - braintree/client
      - braintree/es6

    json

    default

    {
      "extends": "braintree"
    }

    browserify

    {
      "extends": "braintree/client"
    }

    node

    {
      "extends": "braintree/server"
    }

    browserify + es6

    {
      "extends": [
        "braintree/client",
        "braintree/es6"
      ]
    }

    You can specify a .eslintrc for a subdirectory to change the rules that are enforced. For instance, in a node project you could extend from eslint-config-braintree/server at the top-level, and eslint-braintree-config/client at the public/.eslintrc level.

    See Configuration File Formats for information on all supported .eslintrc file formats.

    To override rules, add the new config under rules in your rc file. Be sure to properly override any options set by the parent. See Extending Configuration Files for details.

    For example, to change the no-new-object rule to warn instead of error:

    ---
    extends: braintree/server
    rules:
      no-new-object: 1
    {
      "extends": "braintree/server",
      "rules": {
        "no-new-object": 1
      }
    }

    In another example, to allow end of line comments, you'd override the "no-multi-spaces" rule options:

    ---
    extends: braintree/server
    rules:
      no-multi-spaces:
        - 2
        - ignoreEOLComments: false
    {
      "extends": "braintree/server",
      "rules": {
        "no-multi-spaces": [ 2, { "ignoreEOLComments": false } ]
      }
    }

    Keywords

    none

    Install

    npm i eslint-config-braintree

    DownloadsWeekly Downloads

    189

    Version

    5.0.1

    License

    MIT

    Unpacked Size

    10.2 kB

    Total Files

    13

    Last publish

    Collaborators

    • braintree