文件操作 - no-negated-in-lhs.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/eslint/lib/rules/no-negated-in-lhs.js
编辑文件内容
/** * @fileoverview A rule to disallow negated left operands of the `in` operator * @author Michael Ficarra * @deprecated in ESLint v3.3.0 */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ /** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { description: "Disallow negating the left operand in `in` expressions", recommended: false, url: "https://eslint.org/docs/latest/rules/no-negated-in-lhs" }, replacedBy: ["no-unsafe-negation"], deprecated: true, schema: [], messages: { negatedLHS: "The 'in' expression's left operand is negated." } }, create(context) { return { BinaryExpression(node) { if (node.operator === "in" && node.left.type === "UnaryExpression" && node.left.operator === "!") { context.report({ node, messageId: "negatedLHS" }); } } }; } };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件