Files
NapCatQQ/.pnpm-store/v3/files/9f/98e0725650768ec0618f58114dc8a1f1360b7b86147ce1ce10cdb6729fb108dcf7d8ef6c66e476e459145b4921bd0f04d9dbea012835afe41f1091acc7b039
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

48 lines
1.6 KiB
Plaintext

"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description:
"disallow the `Array.prototype.{findLast,findLastIndex}` methods.",
category: "ES2023",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-array-prototype-findlast-findlastindex.html",
},
fixable: null,
messages: {
forbidden: "ES2023 '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
Array: ["findLast", "findLastIndex"],
Int8Array: ["findLast", "findLastIndex"],
Uint8Array: ["findLast", "findLastIndex"],
Uint8ClampedArray: ["findLast", "findLastIndex"],
Int16Array: ["findLast", "findLastIndex"],
Uint16Array: ["findLast", "findLastIndex"],
Int32Array: ["findLast", "findLastIndex"],
Uint32Array: ["findLast", "findLastIndex"],
Float32Array: ["findLast", "findLastIndex"],
Float64Array: ["findLast", "findLastIndex"],
BigInt64Array: ["findLast", "findLastIndex"],
BigUint64Array: ["findLast", "findLastIndex"],
})
},
}