eslint-plugin-call-func-with-return
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "eslint-plugin-call-func-with-return", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "call specified functions with return statement", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -5,2 +5,17 @@ # eslint-plugin-call-func-with-return | ||
``` js | ||
function jsonRet(data = {}, retCode, retMessage) { | ||
return { | ||
data, | ||
retCode, | ||
retMessage, | ||
} | ||
} | ||
function main() { | ||
jsonRet({ author: 'elvinn' }); // 错误 | ||
return jsonRet({ author: 'elvin' }); // 正确 | ||
} | ||
``` | ||
## 安装 | ||
@@ -7,0 +22,0 @@ |
@@ -7,2 +7,17 @@ # eslint-plugin-call-func-with-return | ||
``` js | ||
function jsonRet(data = {}, retCode, retMessage) { | ||
return { | ||
data, | ||
retCode, | ||
retMessage, | ||
} | ||
} | ||
function main() { | ||
jsonRet({ author: 'elvinn' }); // error | ||
return jsonRet({ author: 'elvin' }); // ok | ||
} | ||
``` | ||
## Installation | ||
@@ -9,0 +24,0 @@ |
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
8757
64