Files
NapCatQQ/.pnpm-store/v3/files/61/6acc6056f0f5bfb0ab9a72f79b97a6664a2fadf29087d649392986fd89129b3e98930b0ab382e6d99306df6c1466990e03e1fca3023591f667d8cba802bcc6
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

51 lines
1.5 KiB
Plaintext

/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description: "disallow the `Array.prototype.includes` method.",
category: "ES2016",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-array-prototype-includes.html",
},
fixable: null,
messages: {
forbidden: "ES2016 '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
Array: ["includes"],
Int8Array: ["includes"],
Uint8Array: ["includes"],
Uint8ClampedArray: ["includes"],
Int16Array: ["includes"],
Uint16Array: ["includes"],
Int32Array: ["includes"],
Uint32Array: ["includes"],
Float32Array: ["includes"],
Float64Array: ["includes"],
BigInt64Array: ["includes"],
BigUint64Array: ["includes"],
})
},
}