1 | var __extends = (this && this.__extends) || function (d, b) {
|
2 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
3 | function __() { this.constructor = d; }
|
4 | __.prototype = b.prototype;
|
5 | d.prototype = new __();
|
6 | };
|
7 | var BannedTermWalker = require('./utils/BannedTermWalker');
|
8 | var Rule = (function (_super) {
|
9 | __extends(Rule, _super);
|
10 | function Rule() {
|
11 | _super.apply(this, arguments);
|
12 | }
|
13 | Rule.prototype.apply = function (sourceFile) {
|
14 | var walker = new BannedTermWalker(sourceFile, this.getOptions(), Rule.FAILURE_STRING, Rule.BANNED_TERMS);
|
15 | return this.applyWithWalker(walker);
|
16 | };
|
17 | Rule.FAILURE_STRING = 'Forbidden reference to banned term: ';
|
18 | Rule.BANNED_TERMS = ['caller', 'callee', 'arguments', 'eval'];
|
19 | return Rule;
|
20 | })(Lint.Rules.AbstractRule);
|
21 | exports.Rule = Rule;
|
22 |
|
\ | No newline at end of file |