我正在尝试找到 ES-Lint 的规则或插件来识别注释代码,以便我可以删除不必要的代码并清理我的存储库。
我想识别多行和单行代码:
/* import CreateIncentive from './containers/create-incentive';
import AffiliateFilters from './containers/affiliate-filters'; */
//import NotificationsSettings from './containers/notifications-settings';
Run Code Online (Sandbox Code Playgroud)
我尝试过使用以下规则,但它无法识别上述类型的代码:
"rules": {
"no-warning-comments": [1, { "terms": ["todo", "fixme", "xxx"], "location": "anywhere" }],
"spaced-comment": ["error", "always", { "exceptions": ["-", "+"] }]
}
Run Code Online (Sandbox Code Playgroud) 我在运行使用 SDK 生成 PayPal 发票的节点脚本时遇到错误,当它从本地服务器运行时工作正常,但当它在生产服务器上运行时出现以下错误:
Uncaught Exception
{
"errorType": "Error",
"errorMessage": "Client network socket disconnected before secure TLS connection was established",
"code": "ECONNRESET",
"path": null,
"host": "api.paypal.com",
"port": 443,
"stack": [
"Error: Client network socket disconnected before secure TLS connection was established",
" at TLSSocket.onConnectEnd (_tls_wrap.js:1095:19)",
" at Object.onceWrapper (events.js:286:20)",
" at TLSSocket.emit (events.js:203:15)",
" at TLSSocket.EventEmitter.emit (domain.js:448:20)",
" at endReadableNT (_stream_readable.js:1145:12)",
" at process._tickCallback (internal/process/next_tick.js:63:19)"
]
}
Run Code Online (Sandbox Code Playgroud)
版本详情:
节点 Js 10.x,TLS:1.0
有人遇到过这样的错误吗?