@fintechstudios/eslint-plugin-chai-as-promised
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -6,2 +6,10 @@ 'use strict'; | ||
module.exports = { | ||
configs: { | ||
recommended: { | ||
plugins: ['@fintechstudios/chai-as-promised'], | ||
rules: { | ||
'@fintechstudios/chai-as-promised/no-unhandled-promises': 'error' | ||
} | ||
} | ||
}, | ||
rules: { | ||
@@ -11,2 +19,1 @@ 'no-unhandled-promises': noUnhandledPromisesRules, | ||
}; | ||
@@ -41,2 +41,4 @@ 'use strict'; | ||
} | ||
/* istanbul ignore next */ | ||
return found; | ||
@@ -43,0 +45,0 @@ } |
@@ -21,2 +21,1 @@ 'use strict'; | ||
module.exports = isNodeChaiCall; | ||
{ | ||
"name": "@fintechstudios/eslint-plugin-chai-as-promised", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Prevent common problems when using chai-as-promised", | ||
@@ -11,5 +11,10 @@ "keywords": [ | ||
"author": "Dylan Praul", | ||
"contributors": [], | ||
"main": "lib/index.js", | ||
"bugs": "https://github.com/fintechstudios/eslint-plugin-chai-as-promised/issues", | ||
"repository": "https://github.com/fintechstudios/eslint-plugin-chai-as-promised", | ||
"homepage": "https://github.com/fintechstudios/eslint-plugin-chai-as-promised", | ||
"scripts": { | ||
"test": "mocha", | ||
"test": "nyc mocha", | ||
"lint": "eslint .", | ||
"preversion": "npm run test -- --single-run", | ||
@@ -20,9 +25,10 @@ "postversion": "git push --follow-tags && npm publish --access public" | ||
"devDependencies": { | ||
"eslint": "^3.9.1", | ||
"mocha": "^3.5.3" | ||
"eslint": "^6.8.0", | ||
"mocha": "^7.0.1", | ||
"nyc": "^15.0.0" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
"node": ">=8.10.0" | ||
}, | ||
"license": "MIT" | ||
} |
@@ -13,19 +13,19 @@ # @fintechstudios/eslint-plugin-chai-as-promised | ||
Next, install `eslint-plugin-chai-as-promised`: | ||
Next, install `@fintechstudios/eslint-plugin-chai-as-promised`: | ||
``` | ||
$ npm install eslint-plugin-chai-as-promised --save-dev | ||
$ npm install @fintechstudios/eslint-plugin-chai-as-promised --save-dev | ||
``` | ||
**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-chai-as-promised` globally. | ||
**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `@fintechstudios/eslint-plugin-chai-as-promised` globally. | ||
## Usage | ||
Add `chai-as-promised` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix: | ||
Add `@fintechstudios/chai-as-promised` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix: | ||
```json | ||
{ | ||
"plugins": [ | ||
"chai-as-promised" | ||
] | ||
"plugins": [ | ||
"@fintechstudios/eslint-plugin-chai-as-promised" | ||
] | ||
} | ||
@@ -39,15 +39,19 @@ ``` | ||
{ | ||
"rules": { | ||
"chai-as-promised/rule-name": 2 | ||
} | ||
"rules": { | ||
"@fintechstudios/chai-as-promised/no-unhandled-promises": 2 | ||
} | ||
} | ||
``` | ||
## Supported Rules | ||
Or, to just use the configuration above as is, you can simply add the | ||
following instead: | ||
* [`chai-as-promised/no-unhandled-promises`](./docs/rules/no-unhandled-promises.md): Must handle promises returned from chai-as-promised expressions | ||
```json | ||
{ | ||
"extends": ["plugin:@fintechstudios/chai-as-promised/recommended"] | ||
} | ||
``` | ||
## Supported Rules | ||
* [`no-unhandled-promises`](./docs/rules/no-unhandled-promises.md): Must handle promises returned from chai-as-promised expressions |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
30953
25
220
0
56
3