Javascript 如何告诉TSLint忽略从第三方库创建的对象
我正在使用第三方JS库Openlayers3并使用它创建对象,如下所示: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,
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"
]
}
}