⚝
One Hat Cyber Team
⚝
Your IP:
172.22.0.1
Server IP:
151.80.20.34
Server:
Linux 794f04d97d5e 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
Server Software:
Apache/2.4.62 (Debian)
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
nodejs
/
@babel
/
eslint-plugin
/
lib
/
rules
/
View File Name :
no-unused-expressions.cjs
const ruleComposer = require("eslint-rule-composer"); const eslint = require("eslint"); const rule = new eslint.Linter().getRules().get("no-unused-expressions"); function isFinalStatementInBlockStatement(node) { const parent = node.parent; return /^(?:If|Expression)Statement$/.test(node.type) && parent.type === "BlockStatement" && parent.body[parent.body.length - 1] === node; } function isInDoStatement(node) { if (!node) return false; if (node.type === "DoExpression") return true; if (node.type === "IfStatement" && node.parent && node.parent.type === "IfStatement") { return isInDoStatement(node.parent); } if (isFinalStatementInBlockStatement(node)) { return isInDoStatement(node.parent.parent); } return false; } function isOptionalCallExpression(node) { return !!node && node.type === "ExpressionStatement" && node.expression.type === "ChainExpression" && node.expression.expression.type === "CallExpression"; } module.exports = ruleComposer.filterReports(rule, problem => !isInDoStatement(problem.node) && !isOptionalCallExpression(problem.node)); //# sourceMappingURL=no-unused-expressions.cjs.map