1.1.0 • Published 7 years ago

eslint-plugin-newsdesk v1.1.0

Weekly downloads
6
License
-
Repository
-
Last release
7 years ago

eslint-plugin-newsdesk

Custom rules specific to the Newsdesk application

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-newsdesk:

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

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

Usage

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

{
    "plugins": [
        "newsdesk"
    ]
}

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

{
    "rules": {
        "newsdesk/rule-name": 2
    }
}

Supported Rules

  • newsdesk/use-sinon-sandbox: use localSandbox from testUtils to create a sandbox and prevent the direct use of sinon.spy, sinon.stub, sinon.mock, sinon.clock, or sinon.server. localSandbox restores itself upon completion of the test file.