Skip to content

Commit

Permalink
feat: Upgrade eslint cozy config
Browse files Browse the repository at this point in the history
- Upgrade all dependencies (only minor updates)
- Add a new rule which allows using destructuring as a mean to delete
- Make unused vars as errors rather than warnings
- Fix resulting errors, but not warnings (approx 70)
  • Loading branch information
acezard committed Feb 11, 2023
1 parent c2f06cc commit 414c1ef
Show file tree
Hide file tree
Showing 4 changed files with 293 additions and 259 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const WebviewIntentProvider = ({
!connection &&
!webviewService &&
isValidEnv() &&
getConnection(setConnection, methods)
getConnection(setConnection, methods).catch(log)
}, [connection, webviewService, methods])

useEffect(() => {
Expand Down
14 changes: 7 additions & 7 deletions packages/eslint-config-cozy-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
],
"dependencies": {
"@babel/eslint-parser": "7.19.1",
"@typescript-eslint/eslint-plugin": "5.44.0",
"@typescript-eslint/parser": "5.44.0",
"eslint": "8.28.0",
"eslint-config-prettier": "8.5.0",
"@typescript-eslint/eslint-plugin": "5.51.0",
"@typescript-eslint/parser": "5.51.0",
"eslint": "8.34.0",
"eslint-config-prettier": "8.6.0",
"eslint-plugin-jest": "27.2.1",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-react": "7.31.11",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-react-hooks": "4.6.0",
"prettier": "2.8.0",
"typescript": "4.9.3"
"prettier": "2.8.4",
"typescript": "4.9.5"
}
}
6 changes: 5 additions & 1 deletion packages/eslint-config-cozy-app/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ module.exports = {
},
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/explicit-function-return-type': 'error'
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true }
]
}
},
{
Expand Down

0 comments on commit 414c1ef

Please sign in to comment.