1.1.0 • Published 9 years ago
eslint-plugin-newsdesk v1.1.0
eslint-plugin-newsdesk
Custom rules specific to the Newsdesk application
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-newsdesk:
$ npm install eslint-plugin-newsdesk --save-devNote: 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
localSandboxfromtestUtilsto create a sandbox and prevent the direct use ofsinon.spy,sinon.stub,sinon.mock,sinon.clock, orsinon.server.localSandboxrestores itself upon completion of the test file.