[英]Exporting typescript interfaces gives eslint error
Package.json: Package.json:
"eslint": "^4.16.0",
"eslint-config-airbnb": "^15.1.0",
"eslint-import-resolver-typescript": "^1.0.2",
"eslint-plugin-eslint-comments": "^2.0.2",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.5.1",
"eslint-plugin-typescript": "^0.10.0",
"typescript": "^2.7.2",
"typescript-eslint-parser": "^14.0.0"
.eslintrc.js .eslintrc.js
module.exports = {
"env": {
"browser": false,
},
"parser": "typescript-eslint-parser",
"plugins": ["typescript"],
"settings": {
"import/resolver": {
"node": true,
"eslint-import-resolver-typescript": true
}
}
};
Still can't export typescript interfaces without warnings in WebStorm 2017.3: 在WebStorm 2017.3中,如果没有警告,仍然无法导出打字稿界面:
How do I resolve this? 我该如何解决?
Can you try to add this to your eslint config ? 您可以尝试将其添加到eslint配置中吗?
overrides: {
files: ['**/*.ts'],
parser: 'typescript-eslint-parser',
rules: {
'no-undef': 'off'
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.