eslint-plugin-newsdesk

1.1.0 • Public • Published

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.

Package Sidebar

Install

npm i eslint-plugin-newsdesk

Weekly Downloads

3

Version

1.1.0

License

none

Last publish

Collaborators

  • daveyboy