Files
NapCatQQ/.pnpm-store/v3/files/32/676a1fa122c7cf872d64af0744139385ab0cbfbeec7615628f126b471836e9bc2f455150ef83be8c76064181b99ec1404d7b3fc10adf941edd85781864a5ac
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

41 lines
1.2 KiB
Plaintext

/**
* @author Yosuke Ota <https://github.com/ota-meshi>
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
meta: {
docs: {
description: "disallow `#x in obj`.",
category: "ES2022",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-private-in.html",
},
fixable: null,
messages: {
forbidden:
"ES2022 private in (`#{{private}} in {{object}}`) is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"BinaryExpression[operator='in'] > PrivateIdentifier.left"(node) {
context.report({
node,
messageId: "forbidden",
data: {
private: node.name,
object:
node.parent.right.type === "Identifier"
? node.parent.right.name
: "object",
},
})
},
}
},
}