Website Structure
This commit is contained in:
parent
62812f2090
commit
71f0676a62
22365 changed files with 4265753 additions and 791 deletions
35
Frontend-Learner/node_modules/eslint-plugin-regexp/dist/rules/no-standalone-backslash.js
generated
vendored
Normal file
35
Frontend-Learner/node_modules/eslint-plugin-regexp/dist/rules/no-standalone-backslash.js
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const utils_1 = require("../utils");
|
||||
exports.default = (0, utils_1.createRule)("no-standalone-backslash", {
|
||||
meta: {
|
||||
docs: {
|
||||
description: "disallow standalone backslashes (`\\`)",
|
||||
category: "Best Practices",
|
||||
recommended: false,
|
||||
},
|
||||
schema: [],
|
||||
messages: {
|
||||
unexpected: "Unexpected standalone backslash (`\\`). It looks like an escape sequence, but it's a single `\\` character pattern.",
|
||||
},
|
||||
type: "suggestion",
|
||||
},
|
||||
create(context) {
|
||||
function createVisitor({ node, getRegexpLocation, }) {
|
||||
return {
|
||||
onCharacterEnter(cNode) {
|
||||
if (cNode.value === utils_1.CP_BACK_SLASH && cNode.raw === "\\") {
|
||||
context.report({
|
||||
node,
|
||||
loc: getRegexpLocation(cNode),
|
||||
messageId: "unexpected",
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
return (0, utils_1.defineRegexpVisitor)(context, {
|
||||
createVisitor,
|
||||
});
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue