Skip to content

Commit 7b271e1

Browse files
Manual lint fixes + typo for plural verb
1 parent dd4308d commit 7b271e1

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

docs/rules/prefer-composition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ This rule accepts a single option which is an object with a `checkDecorators` an
6565

6666
The `checkDecorators` property is an array containing the names of the decorators that determine whether or not a class is checked. By default, `checkDecorators` is `["Component"]`.
6767

68-
The `superClass` property is an array containing the names of classes to extend from that already implements a `Subject`-based `ngOnDestroy`.
68+
The `superClass` property is an array containing the names of classes to extend from that already implement a `Subject`-based `ngOnDestroy`.
6969

7070
```json
7171
{

docs/rules/prefer-takeuntil.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The `checkDecorators` property is an array containing the names of the decorator
7474

7575
The `checkDestroy` property is a boolean that determines whether or not a `Subject`-based `ngOnDestroy` must be implemented.
7676

77-
The `superClass` property is an array containing the names of classes to extend from that already implements a `Subject`-based `ngOnDestroy`.
77+
The `superClass` property is an array containing the names of classes to extend from that already implement a `Subject`-based `ngOnDestroy`.
7878

7979
The `alias` property is an array of names of operators that should be treated similarly to `takeUntil`.
8080

src/rules/prefer-composition.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ export const preferCompositionRule = ruleCreator({
3535
{
3636
properties: {
3737
checkDecorators: { type: 'array', items: { type: 'string' }, description: 'An optional array of decorator names to check.' },
38-
superClass: { type: 'array', items: { type: 'string' } },
38+
superClass: { type: 'array', items: { type: 'string' }, description: 'An optional array of superclass names that already implement a `Subject`-based `ngOnDestroy`' },
3939
},
4040
type: 'object',
4141
description: stripIndent`
4242
An optional object with an optional \`checkDecorators\` property.
4343
The \`checkDecorators\` property is an array containing the names of the decorators that determine whether or not a class is checked.
44-
The \`superClass\` property is an array containing the names of classes to extend from that already implements a \`Subject\`-based \`ngOnDestroy\`.
44+
The \`superClass\` property is an array containing the names of classes to extend from that already implement a \`Subject\`-based \`ngOnDestroy\`.
4545
`,
4646
},
4747
],
@@ -252,7 +252,7 @@ export const preferCompositionRule = ruleCreator({
252252
.map((className) => `[superClass.name="${className}"]`)
253253
.join()})`]: (node: es.ClassDeclaration) => {
254254
const entry = getEntry();
255-
if (entry && entry.hasDecorator) {
255+
if (entry.hasDecorator) {
256256
entry.extendsSuperClassDeclaration = node;
257257
}
258258
},

src/rules/prefer-takeuntil.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const preferTakeuntilRule = ruleCreator({
5050
checkComplete: { type: 'boolean', description: 'Check for `complete` calls.' },
5151
checkDecorators: { type: 'array', items: { type: 'string' }, description: 'An optional array of decorator names to check.' },
5252
checkDestroy: { type: 'boolean', description: 'Check for `Subject`-based `ngOnDestroy`.' },
53-
superClass: { type: 'array', items: { type: 'string' } },
53+
superClass: { type: 'array', items: { type: 'string' }, description: 'An optional array of superclass names that already implement a `Subject`-based `ngOnDestroy`' },
5454
},
5555
type: 'object',
5656
description: stripIndent`
@@ -59,7 +59,7 @@ export const preferTakeuntilRule = ruleCreator({
5959
The \`checkComplete\` property is a boolean that determines whether or not \`complete\` must be called after \`next\`.
6060
The \`checkDecorators\` property is an array containing the names of the decorators that determine whether or not a class is checked.
6161
The \`checkDestroy\` property is a boolean that determines whether or not a \`Subject\`-based \`ngOnDestroy\` must be implemented.
62-
The \`superClass\` property is an array containing the names of classes to extend from that already implements a \`Subject\`-based \`ngOnDestroy\`.
62+
The \`superClass\` property is an array containing the names of classes to extend from that already implement a \`Subject\`-based \`ngOnDestroy\`.
6363
`,
6464
},
6565
],
@@ -339,7 +339,7 @@ export const preferTakeuntilRule = ruleCreator({
339339
.map((className) => `[superClass.name="${className}"]`)
340340
.join()})`]: (node: es.ClassDeclaration) => {
341341
const entry = getEntry();
342-
if (entry && entry.hasDecorator) {
342+
if (entry.hasDecorator) {
343343
entry.extendsSuperClassDeclaration = node;
344344
}
345345
},
@@ -391,7 +391,7 @@ export const preferTakeuntilRule = ruleCreator({
391391
[`${ngOnDestroyMethodSelector} CallExpression[callee.object.type='Super'][callee.property.name='ngOnDestroy']`]:
392392
(node: es.CallExpression) => {
393393
const entry = getEntry();
394-
if (entry && entry.hasDecorator) {
394+
if (entry.hasDecorator) {
395395
entry.superNgOnDestroyCallExpression = node;
396396
}
397397
},

0 commit comments

Comments
 (0)