Nauseating Pumpkin Mush

    eslint-plugin-delorean

    0.0.1 • Public • Published

    eslint-plugin-delorean

    Choose Futures over Promises

    Installation

    You'll first need to install ESLint:

    $ npm i eslint --save-dev
    

    Next, install eslint-plugin-delorean:

    $ npm install eslint-plugin-delorean --save-dev
    

    Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-delorean globally.

    Usage

    Add delorean to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

    {
        "plugins": [
            "delorean"
        ]
    }

    Then configure the rules you want to use under the rules section.

    {
        "rules": {
            "delorean/yell-on-then": 2,
            "delorean/yell-on-catch": 2
        }
    }

    Supported Rules

    yell-on-then

    Invalid Code:

    x.then()
    

    Valid Code:

    new Future((bad, good) => x.then(good).catch(bad))
    

    Options:

    { "library": "F" }
    
    • library - Optionally provide a library to validate against instead of "Future"

    yell-on-catch

    Invalid Code:

    x.catch()
    

    Valid Code:

    new Future((bad, good) => x.then(good).catch(bad))
    

    Options:

    { "library": "F" }
    
    • library - Optionally provide a library to validate against instead of "Future"

    Install

    npm i eslint-plugin-delorean

    DownloadsWeekly Downloads

    1

    Version

    0.0.1

    License

    ISC

    Unpacked Size

    10.3 kB

    Total Files

    17

    Last publish

    Collaborators

    • brekk