Files
NapCatQQ/.pnpm-store/v3/files/10/318b5d3b5a837ca5f6e0456298ed06a607885fd66d705a7e2aa6e01379b9cb41a8c2f955803c73f08c2e8d105413ff60f14a2d34baabc34e97224858db8d41
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
1.2 KiB
Plaintext

"use strict"
module.exports = {
meta: {
docs: {
description:
"disallow function declarations in if statement clauses without using blocks.",
category: "legacy",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-function-declarations-in-if-statement-clauses-without-block.html",
},
fixable: "code",
messages: {
forbidden:
"Annex B feature the function declarations in if statement clauses without using blocks are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"IfStatement > FunctionDeclaration.consequent, IfStatement > FunctionDeclaration.alternate"(
node,
) {
context.report({
node,
messageId: "forbidden",
fix(fixer) {
return [
fixer.insertTextBefore(node, "{"),
fixer.insertTextAfter(node, "}"),
]
},
})
},
}
},
}