Skip to content

Commit 204801a

Browse files
refactor: sharereplay already defaults allowConfig true
1 parent da46a21 commit 204801a

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/configs/recommended.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const createRecommendedConfig = (
1717
'rxjs-x/no-internal': 'error',
1818
'rxjs-x/no-nested-subscribe': 'error',
1919
'rxjs-x/no-redundant-notify': 'error',
20-
'rxjs-x/no-sharereplay': ['error', { allowConfig: true }],
20+
'rxjs-x/no-sharereplay': 'error',
2121
'rxjs-x/no-subject-unsubscribe': 'error',
2222
'rxjs-x/no-unbound-methods': 'error',
2323
'rxjs-x/no-unsafe-subject-next': 'error',

src/configs/strict.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const createStrictConfig = (
2020
'rxjs-x/no-internal': 'error',
2121
'rxjs-x/no-nested-subscribe': 'error',
2222
'rxjs-x/no-redundant-notify': 'error',
23-
'rxjs-x/no-sharereplay': ['error', { allowConfig: true }],
23+
'rxjs-x/no-sharereplay': 'error',
2424
'rxjs-x/no-subject-unsubscribe': 'error',
2525
'rxjs-x/no-topromise': 'error',
2626
'rxjs-x/no-unbound-methods': 'error',

tests/configs/recommended.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ describe('recommended', () => {
88
expect(config.plugins).toEqual({ 'rxjs-x': mockPlugin });
99
});
1010

11-
it('should default no-sharereplay to allowConfig: true', () => {
11+
it('should use the defaults of each rule', () => {
1212
expect(config.rules).instanceOf(Object);
13-
expect(config.rules['rxjs-x/no-sharereplay']).toEqual(['error', { allowConfig: true }]);
13+
for (const ruleEntry of Object.values(config.rules)) {
14+
expect(ruleEntry).toEqual('error');
15+
}
1416
});
1517
});

0 commit comments

Comments
 (0)