Skip to content

Commit 2f9c130

Browse files
amir-rahmaniiASafaeirad
authored andcommitted
feat(base): add new rules
1 parent 113b7c8 commit 2f9c130

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/modules/base.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ function base(options = {}) {
6969
'no-dupe-else-if': 'error',
7070
'no-dupe-keys': 'error',
7171
'no-duplicate-case': 'error',
72+
'no-duplicate-imports': 'error',
7273
'no-empty-character-class': 'error',
7374
'no-empty-function': 'warn',
7475
'no-empty-pattern': 'error',
@@ -142,6 +143,7 @@ function base(options = {}) {
142143
{ argsIgnorePattern: '^_', varsIgnorePattern: '^ignore(d)?', args: 'after-used', ignoreRestSiblings: true },
143144
],
144145
'no-use-before-define': ['error', 'nofunc'],
146+
'no-useless-assignment': 'warn',
145147
'no-useless-backreference': 'error',
146148
'no-useless-call': 'error',
147149
'no-useless-catch': 'error',
@@ -163,12 +165,14 @@ function base(options = {}) {
163165
requireCatchParameter: true,
164166
},
165167
]),
168+
'prefer-destructuring': ['warn', { object: true, array: true }],
166169
'prefer-exponentiation-operator': 'warn',
167170
'prefer-numeric-literals': 'error',
168171
'prefer-object-has-own': 'warn',
169172
'prefer-rest-params': 'error',
170173
'prefer-spread': 'error',
171174
'prefer-template': 'error',
175+
'prefer-promise-reject-errors': 'warn',
172176
'radix': 'error',
173177
'require-await': 'error',
174178
'require-yield': 'error',
@@ -184,6 +188,7 @@ function base(options = {}) {
184188
'grouped-accessor-pairs': 'warn',
185189
'no-extra-boolean-cast': 'warn',
186190
'no-param-reassign': 'warn',
191+
'no-plusplus': ['warn', { allowForLoopAfterthoughts: true }],
187192
'prefer-regex-literals': ['warn', { disallowRedundantWrapping: true }],
188193

189194
'no-console': strict(options, 'warn'),

0 commit comments

Comments
 (0)