eslint rule updates for typescript

This commit is contained in:
Ginger Wong 2020-10-10 18:48:29 -07:00
parent e53ea1d6cf
commit f001904e35
2 changed files with 25 additions and 1 deletions

View file

@ -23,5 +23,29 @@ module.exports = {
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": [1, { extensions: [".js", ".jsx", ".tsx"] }],
"react/jsx-props-no-spreading": "off",
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-use-before-define': [0],
'@typescript-eslint/no-use-before-define': [1],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]
},
settings: {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
};

View file

@ -14,7 +14,7 @@ export default function Admin() {
console.log("====",{count, result})
setBroadcasterStatus({ ...result, broadcastActive });
setCount(count => count + 1);
setCount(c => c + 1);
} catch (error) {
setBroadcasterStatus({ ...broadcasterStatus, message: error.message });