Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-promise

Package Overview
Dependencies
Maintainers
0
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-promise - npm Package Compare versions

Comparing version 6.3.0 to 6.4.0

.eslint-doc-generatorrc.js

45

index.js
'use strict'
module.exports = {
const recommendedRules = {
'promise/always-return': 'error',
'promise/no-return-wrap': 'error',
'promise/param-names': 'error',
'promise/catch-or-return': 'error',
'promise/no-native': 'off',
'promise/no-nesting': 'warn',
'promise/no-promise-in-callback': 'warn',
'promise/no-callback-in-promise': 'warn',
'promise/avoid-new': 'off',
'promise/no-new-statics': 'error',
'promise/no-return-in-finally': 'warn',
'promise/valid-params': 'warn',
}
const pluginPromise = {
rules: {

@@ -28,21 +43,13 @@ 'param-names': require('./rules/param-names'),

},
configs: {
recommended: {
plugins: ['promise'],
rules: {
'promise/always-return': 'error',
'promise/no-return-wrap': 'error',
'promise/param-names': 'error',
'promise/catch-or-return': 'error',
'promise/no-native': 'off',
'promise/no-nesting': 'warn',
'promise/no-promise-in-callback': 'warn',
'promise/no-callback-in-promise': 'warn',
'promise/avoid-new': 'off',
'promise/no-new-statics': 'error',
'promise/no-return-in-finally': 'warn',
'promise/valid-params': 'warn',
},
},
}
pluginPromise.configs = {
recommended: {
plugins: ['promise'],
rules: recommendedRules,
},
'flat/recommended': {
plugins: { promise: pluginPromise },
rules: recommendedRules,
},
}
module.exports = pluginPromise
{
"name": "eslint-plugin-promise",
"version": "6.3.0",
"version": "6.4.0",
"description": "Enforce best practices for JavaScript promises",

@@ -73,3 +73,3 @@ "keywords": [

"eslint-config-prettier": "^8.5.0",
"eslint-doc-generator": "^0.25.0",
"eslint-doc-generator": "^1.7.1",
"eslint-plugin-eslint-plugin": "^4.4.1",

@@ -76,0 +76,0 @@ "eslint-plugin-jest": "^26.9.0",

@@ -71,8 +71,20 @@ # eslint-plugin-promise

```json
{
"extends": ["plugin:promise/recommended"]
}
```
- `eslint.config.js`:
```js
import pluginPromise from 'eslint-plugin-promise'
export default [
// ...
pluginPromise.configs['flat/recommended'],
]
```
- `.eslintrc.*`:
```json
{
"extends": ["plugin:promise/recommended"]
}
```
## Rules

@@ -85,5 +97,5 @@

🚫 Configurations disabled in.\
✅ Set in the `flat/recommended` configuration.\
✅ Set in the `recommended` configuration.\
🔧 Automatically fixable by the
[`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).
🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).

@@ -90,0 +102,0 @@ | Name                      | Description | 💼 | ⚠️ | 🚫 | 🔧 |

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc