Phi*_*hil 5 visual-studio typescript tsconfig tslint visual-studio-2017
我正在使用 Visual studio 2017 (15.5.1) 并尝试让 tsLint 正常工作。由于某种原因,我从 node_modules 中的所有文件以及我的任何声明 (*.d.ts) 文件中收到 linting 错误(在 Visual Studio 错误列表 (Build+intellisense) 中)。我所做的一切似乎都无法解决这个问题。我想从我的错误中排除这些文件。似乎到处都认为这是可能的,但我发现的大多数例子都不是与视觉工作室打交道,我想知道是否还缺少其他一些额外的设置。以下是我的相关文件。
tslint.json:
{
"extends": [
"tslint:latest",
"tslint-config-prettier"
]
}
Run Code Online (Sandbox Code Playgroud)
tsconfig.json:
{
"compilerOptions": {
"module": "es2015",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"noEmitHelpers": true,
"noEmitOnError": true,
"noImplicitAny": false,
"allowUnusedLabels": true,
"target": "es5",
"sourceMap": true,
"strictNullChecks": false,
"removeComments": true,
"declaration": false,
"plugins": [ { "name": "tslint-language-service" } ],
"lib": [
"dom",
"es6",
"scripthost",
"es5",
"es2015",
"es2015.promise"
],
"types": [
"angular-ui-bootstrap",
"angular",
"autolinker",
"bootbox",
"bootstrap-notify",
"bootstrap",
"cldrjs",
"dragula",
"globalize",
"googlemaps",
"google.analytics",
"imagesloaded",
"jquery.blockui",
"jquery.bootstrap.wizard",
"jquery",
"jqueryui",
"jquery.validation",
"jsts",
"kendo-ui",
"masonry-layout",
"qtip2",
"signalr",
"urijs",
"moment"
]
},
"exclude": [
"node_modules",
"bower_components",
"build"
],
"typeRoots": [
"node_modules/@types",
"node_modules/moment"
],
"awesomeTypescriptLoaderOptions": {
"useBabel": true,
"useCache": true
},
"compileOnSave": true,
"buildOnSave": true
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
573 次 |
| 最近记录: |