Skip to content

Commit efcf27f

Browse files
committed
Convert stylistic sonarjs rules to warnings
1 parent b225c3b commit efcf27f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/configs/javascript.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,21 @@ export default tseslint.config(
6161
'warn',
6262
{ checkArrowFunctions: false },
6363
],
64+
'sonarjs/max-switch-cases': 'warn',
65+
'sonarjs/no-collapsible-if': 'warn',
66+
'sonarjs/no-duplicate-string': 'warn',
67+
'sonarjs/no-inverted-boolean-check': 'warn',
68+
'sonarjs/no-nested-switch': 'warn',
69+
'sonarjs/no-nested-template-literals': 'warn',
70+
'sonarjs/no-redundant-boolean': 'warn',
71+
'sonarjs/no-redundant-jump': 'warn',
72+
'sonarjs/no-same-line-conditional': 'warn',
6473
'sonarjs/no-small-switch': 'warn',
74+
'sonarjs/no-useless-catch': 'warn',
6575
'sonarjs/prefer-immediate-return': 'warn',
66-
'sonarjs/no-duplicate-string': 'warn',
76+
'sonarjs/prefer-object-literal': 'warn',
77+
'sonarjs/prefer-single-boolean-return': 'warn',
78+
'sonarjs/prefer-while': 'warn',
6779
...('todo-tag' in sonarjs.rules && { 'sonarjs/todo-tag': 'warn' }),
6880
'promise/always-return': ['error', { ignoreLastCallback: true }],
6981
'promise/no-callback-in-promise': ['warn', { exceptions: ['next'] }],

0 commit comments

Comments
 (0)