Files
NapCatQQ/.pnpm-store/v3/files/a0/f44da571a2da5a93752859bc3075562e43315c8bf5f9fedef9c7ed45036c7495a0c962d098a951c19a44d63a2fe368af765eedba3795355b52668a2cb48070
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

32 lines
957 B
Plaintext

/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
meta: {
docs: {
description: "disallow destructuring.",
category: "ES2015",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-destructuring.html",
},
fixable: null,
messages: {
forbidden: "ES2015 destructuring is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
":matches(:function, AssignmentExpression, VariableDeclarator, :function > :matches(AssignmentPattern, RestElement), ForInStatement, ForOfStatement) > :matches(ArrayPattern, ObjectPattern)"(
node,
) {
context.report({ node, messageId: "forbidden" })
},
}
},
}