的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
module.exports = {
"env": {
"browser": false,
},
"parser": "typescript-eslint-parser",
"plugins": ["typescript"],
"settings": {
"import/resolver": {
"node": true,
"eslint-import-resolver-typescript": true
}
}
};
在WebStorm 2017.3中仍然无法在没有警告的情况下导出typescript接口:
如何解决此问题?
答案 0 :(得分:0)
您可以尝试将此添加到您的eslint配置吗?
overrides: {
files: ['**/*.ts'],
parser: 'typescript-eslint-parser',
rules: {
'no-undef': 'off'
}