Files
NapCatQQ/.pnpm-store/v3/files/18/36433a7310fd8e027704246359f08d8c5a773de63c892cfdcbc9907091c0cca056c8a25727cf28a54dd1c08fa54b04f7fbe47f356c1ca09fa34485d5113d4c
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

39 lines
1021 B
Plaintext

/**
* @author Wil Moore III
* See LICENSE file in root directory for full license.
*/
"use strict"
/** @type {import('./rule-module').RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "disallow `new` operators with calls to `require`",
recommended: false,
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-new-require.md",
},
fixable: null,
schema: [],
messages: {
noNewRequire: "Unexpected use of new with require.",
},
},
create(context) {
return {
NewExpression(node) {
if (
node.callee.type === "Identifier" &&
node.callee.name === "require"
) {
context.report({
node,
messageId: "noNewRequire",
})
}
},
}
},
}