Skip to content

Commit 167eb83

Browse files
authored
Disable @typescript-eslint/explicit-function-return-type rule in JS files. (#351)
* Disable @typescript-eslint/explicit-function-return-type rule in JS files. * Remove disable comments * Update files
1 parent f6dbd0b commit 167eb83

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

example/example.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* @param {string} userName - user name
55
* @returns {void}
66
*/
7-
// FIXME: https://github.com/mightyiam/eslint-config-love/issues/1525
8-
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
97
const sayHello = (userName) => {
108
console.log(`Hello, ${userName}`)
119
}

index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ const config = {
1313
'plugin:sonarjs/recommended',
1414
'plugin:@eslint-community/eslint-comments/recommended'
1515
],
16+
rules: {
17+
// https://typescript-eslint.io/rules/explicit-function-return-type/#configuring-in-a-mixed-jsts-codebase
18+
'@typescript-eslint/explicit-function-return-type': 'off'
19+
},
1620
overrides: [
1721
// For JavaScript
1822
{
@@ -34,7 +38,9 @@ const config = {
3438
'tsdoc'
3539
],
3640
rules: {
37-
'tsdoc/syntax': 'warn'
41+
'tsdoc/syntax': 'warn',
42+
// https://typescript-eslint.io/rules/explicit-function-return-type/#configuring-in-a-mixed-jsts-codebase
43+
'@typescript-eslint/explicit-function-return-type': 'error'
3844
}
3945
}
4046
]

0 commit comments

Comments
 (0)