0
我剛剛使用NPM安裝了此angular2-material-datepicker。它安裝在我的node_modules
文件夾中,但我收到tslint錯誤,我不應該得到。Angular 2 - 在我的node_modules文件夾中接收到TSLint錯誤
ERROR in ./~/angular2-material-datepicker/index.ts
[1, 15]: ' should be "
但是在我tsconfig.json
我明確指出,我node_modules
文件夾應排除在外。
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [ "es2016", "dom" ],
"noImplicitAny": true,
"noImplicitReturns": true,
"suppressImplicitAnyIndexErrors": true,
"skipLibCheck": true
},
"include": [
"client/**/*"
],
"exclude": [ "node_modules", "dist" ]
}
我確認該模塊位於我的node_module
文件夾中。這是第一個給我這些錯誤的模塊。
任何想法可能的解決方案?
謝謝!
不知道這是問題..但我認爲它應該是' 「LIB」: 「ES2015」, 「DOM」]' –
@suraj' 「LIB」: 「ES2015」 「dom」]''''lib「:[」es2016「,」dom「]'和''lib」:[「es2015」,「dom」]'和其他許多字符一樣都是有效的。 –
尋找在TSLINT網站上的忽略選項,我現在沒有它的方便,但這就是你需要使用 –