Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/395.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何告诉TSLint忽略从第三方库创建的对象_Javascript_Lint_Tslint - Fatal编程技术网

Javascript 如何告诉TSLint忽略从第三方库创建的对象

Javascript 如何告诉TSLint忽略从第三方库创建的对象,javascript,lint,tslint,Javascript,Lint,Tslint,我正在使用第三方JS库Openlayers3并使用它创建对象,如下所示: var layer = new ol.layer.Vector({ title: 'foo', source: bar, ... }); TSLint对此表示异议,我收到了很多这样的错误: 错误:找不到名称“ol” 我正在使用一个文件(如下所示)来管理TSLint配置,但我不清楚如何告诉TSLint忽略这些类型的错误 { "rules": { "class-name": true,

我正在使用第三方JS库Openlayers3并使用它创建对象,如下所示:

var layer = new ol.layer.Vector({
    title: 'foo',
    source: bar,
    ...
});
TSLint对此表示异议,我收到了很多这样的错误:

错误:找不到名称“ol”

我正在使用一个文件(如下所示)来管理TSLint配置,但我不清楚如何告诉TSLint忽略这些类型的错误

{
  "rules": {
    "class-name": true,
    "curly": true,
    "eofline": true,
    "forin": true,
    "indent": [true, "spaces"],
    "label-position": true,
    "label-undefined": true,
    "max-line-length": [true, 140],
    "no-arg": true,
    "no-bitwise": true,
    "no-console": [true,
      "debug",
      "info",
      "time",
      "timeEnd",
      "trace"
    ],
    "no-construct": true,
    "no-debugger": true,
    "no-duplicate-key": true,
    "no-duplicate-variable": true,
    "no-eval": true,
    "no-inferrable-types": true,
    "no-shadowed-variable": true,
    "no-string-literal": true,
    "no-switch-case-fall-through": true,
    "no-trailing-whitespace": true,
    "no-unused-expression": true,
    "no-unused-variable": true,
    "no-unreachable": true,
    "no-use-before-declare": true,
    "one-line": [true,
      "check-open-brace",
      "check-catch",
      "check-else",
      "check-whitespace"
    ],
    "quotemark": [true, "single"],
    "radix": true,
    "semicolon": true,
    "trailing-comma": false,
    "triple-equals": [true, "allow-null-check"],
    "typedef-whitespace": [true, {
      "call-signature": "nospace",
      "index-signature": "nospace",
      "parameter": "nospace",
      "property-declaration": "nospace",
      "variable-declaration": "nospace"
    }],
    "variable-name": false,
    "whitespace": [true,
      "check-branch",
      "check-decl",
      "check-operator",
      "check-separator",
      "check-type"
    ]
  }
}