Code with hyperdev.com url should not run
This commit is contained in:
committed by
Stuart Taylor
parent
54321af9af
commit
a33e34f942
@ -48,6 +48,16 @@ const throwForJsHtml = {
|
|||||||
throw new Error('Invalid if (null) console.log(1); detected');
|
throw new Error('Invalid if (null) console.log(1); detected');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
name: 'hyperdev in code',
|
||||||
|
description: 'Code with the URL hyperdev.com ' +
|
||||||
|
'should not be allowed to run',
|
||||||
|
detectHyperdevInCode: /hyperdev\.com/gi,
|
||||||
|
thrower: function checkForHyperdev({ contents }) {
|
||||||
|
if (contents.match(this.detectHyperdevInCode)) {
|
||||||
|
throw new Error('Hyperdev.com should not be in the code');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user