文件操作 - no-template-curly-in-string.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/eslint/lib/rules/no-template-curly-in-string.js
编辑文件内容
/** * @fileoverview Warn when using template string syntax in regular strings * @author Jeroen Engels */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ /** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { description: "Disallow template literal placeholder syntax in regular strings", recommended: false, url: "https://eslint.org/docs/latest/rules/no-template-curly-in-string" }, schema: [], messages: { unexpectedTemplateExpression: "Unexpected template string expression." } }, create(context) { const regex = /\$\{[^}]+\}/u; return { Literal(node) { if (typeof node.value === "string" && regex.test(node.value)) { context.report({ node, messageId: "unexpectedTemplateExpression" }); } } }; } };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件