Skip to content

Commit 414c1ef

Browse files
committed
feat: Upgrade eslint cozy config
- 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)
1 parent c2f06cc commit 414c1ef

File tree

4 files changed

+293
-259
lines changed

4 files changed

+293
-259
lines changed

packages/cozy-intent/src/view/components/WebviewIntentProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const WebviewIntentProvider = ({
102102
!connection &&
103103
!webviewService &&
104104
isValidEnv() &&
105-
getConnection(setConnection, methods)
105+
getConnection(setConnection, methods).catch(log)
106106
}, [connection, webviewService, methods])
107107

108108
useEffect(() => {

packages/eslint-config-cozy-app/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
],
2121
"dependencies": {
2222
"@babel/eslint-parser": "7.19.1",
23-
"@typescript-eslint/eslint-plugin": "5.44.0",
24-
"@typescript-eslint/parser": "5.44.0",
25-
"eslint": "8.28.0",
26-
"eslint-config-prettier": "8.5.0",
23+
"@typescript-eslint/eslint-plugin": "5.51.0",
24+
"@typescript-eslint/parser": "5.51.0",
25+
"eslint": "8.34.0",
26+
"eslint-config-prettier": "8.6.0",
2727
"eslint-plugin-jest": "27.2.1",
2828
"eslint-plugin-prettier": "4.2.1",
2929
"eslint-plugin-promise": "6.1.1",
30-
"eslint-plugin-react": "7.31.11",
30+
"eslint-plugin-react": "7.32.2",
3131
"eslint-plugin-react-hooks": "4.6.0",
32-
"prettier": "2.8.0",
33-
"typescript": "4.9.3"
32+
"prettier": "2.8.4",
33+
"typescript": "4.9.5"
3434
}
3535
}

packages/eslint-config-cozy-app/react.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ module.exports = {
3636
},
3737
plugins: ['@typescript-eslint'],
3838
rules: {
39+
'@typescript-eslint/explicit-function-return-type': 'error',
3940
'@typescript-eslint/no-explicit-any': 'error',
40-
'@typescript-eslint/explicit-function-return-type': 'error'
41+
'@typescript-eslint/no-unused-vars': [
42+
'error',
43+
{ ignoreRestSiblings: true }
44+
]
4145
}
4246
},
4347
{

0 commit comments

Comments
 (0)