Debian Codegraph @

eslint/plugin-fig-linter/rules/no-malicious-script.js

raw symbols SCIP
1 const RM_RF_REGEXP = /rm \-(?:f(?:(?: \-)?r)?|r(?: \-f|f)?)/;
2
3 module.exports = {
4 meta: {
5 type: "problem",
6 },
7 create(context) {
8 return {
9 Property(node) {
10 if (node.key.name === "script") {
11 const scriptValue = node.value.value;
12 if (RM_RF_REGEXP.test(scriptValue)) {
13 context.report({
14 node,
15 message: "No Malicious Script allowed",
16 });
17 }
18 }
19 },
20 };
21 },
22 };