mirror of
https://github.com/owncast/owncast.git
synced 2024-11-21 20:28:15 +03:00
eslint rule updates for typescript
This commit is contained in:
parent
e53ea1d6cf
commit
f001904e35
2 changed files with 25 additions and 1 deletions
|
@ -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"]
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -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 });
|
||||
|
|
Loading…
Reference in a new issue