Files
NapCatQQ/.pnpm-store/v3/files/40/b0bb46b3dc02c18aba77fbec197e21bcdbcd1d8934b65649d4f0a0ec6fbab9163df408c485ad6c952952457d60f47e334a9ef1a717c67edd3f07532d051178
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

42 lines
1.2 KiB
Plaintext

/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { defineRegExpHandler } = require("../util/define-regexp-handler")
module.exports = {
meta: {
docs: {
description: "disallow RegExp lookbehind assertions.",
category: "ES2018",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-regexp-lookbehind-assertions.html",
},
fixable: null,
messages: {
forbidden: "ES2018 RegExp lookbehind assertions are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return defineRegExpHandler(context, (node) => {
let found = false
return {
onLookaroundAssertionEnter(_start, kind) {
if (kind === "lookbehind") {
found = true
}
},
onExit() {
if (found) {
context.report({ node, messageId: "forbidden" })
}
},
}
})
},
}