Files
NapCatQQ/.pnpm-store/v3/files/c6/3f28db65907085fa5c817e9eb0d84a99e5c7febd88f9d4385e21717c396a6ed5275e479c1c8055bfdd8d8e16a47357fde1b15637a1b02c595b2641e213e606
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

34 lines
932 B
Plaintext

"use strict"
const { getSourceCode } = require("eslint-compat-utils")
module.exports = {
meta: {
docs: {
description: "disallow Hashbang comments.",
category: "ES2023",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-hashbang.html",
},
fixable: null,
messages: {
forbidden: "ES2023 Hashbang comments are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
Program() {
const firstComment = getSourceCode(context).ast.comments[0]
if (firstComment && firstComment.type === "Shebang") {
context.report({
node: firstComment,
messageId: "forbidden",
})
}
},
}
},
}