Skip to content

Commit e812c84

Browse files
author
Josh Goldberg
authored
Corrected --comment/--comments spelling (#536)
1 parent b189ab7 commit e812c84

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/comments/convertComments.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const createStubDependencies = (
1010
});
1111

1212
describe("convertComments", () => {
13-
it("returns an empty result when --comment is not provided", async () => {
13+
it("returns an empty result when --comments is not provided", async () => {
1414
// Arrange
1515
const dependencies = createStubDependencies();
1616

@@ -24,7 +24,7 @@ describe("convertComments", () => {
2424
});
2525
});
2626

27-
it("returns an error when --comment is given as a boolean value", async () => {
27+
it("returns an error when --comments is given as a boolean value", async () => {
2828
// Arrange
2929
const dependencies = createStubDependencies();
3030

src/comments/convertComments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type ConvertCommentsDependencies = {
1010
};
1111

1212
const noGlobsResult: ResultWithDataStatus<string[]> = {
13-
errors: [new Error("--comment requires file path globs to be passed.")],
13+
errors: [new Error("--comments requires file path globs to be passed.")],
1414
status: ResultStatus.Failed,
1515
};
1616

src/reporting/reportCommentResults.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe("reportCommentResults", () => {
1313
// Assert
1414
expectEqualWrites(
1515
logger.stdout.write,
16-
`♻ Consider using --comment to replace TSLint comment directives in your source files. ♻`,
16+
`♻ Consider using --comments to replace TSLint comment directives in your source files. ♻`,
1717
);
1818
});
1919

@@ -28,12 +28,12 @@ describe("reportCommentResults", () => {
2828
// Assert
2929
expectEqualWrites(
3030
logger.stderr.write,
31-
`❌ 1 error converting TSLint comment directives in --comment files. ❌`,
31+
`❌ 1 error converting TSLint comment directives in --comments files. ❌`,
3232
` Check ${logger.debugFileName} for details.`,
3333
);
3434
expectEqualWrites(
3535
logger.info.write,
36-
`1 error converting TSLint comment directives in --comment files:`,
36+
`1 error converting TSLint comment directives in --comments files:`,
3737
` * Hello`,
3838
);
3939
});
@@ -49,12 +49,12 @@ describe("reportCommentResults", () => {
4949
// Assert
5050
expectEqualWrites(
5151
logger.stderr.write,
52-
`❌ 2 errors converting TSLint comment directives in --comment files. ❌`,
52+
`❌ 2 errors converting TSLint comment directives in --comments files. ❌`,
5353
` Check ${logger.debugFileName} for details.`,
5454
);
5555
expectEqualWrites(
5656
logger.info.write,
57-
`2 errors converting TSLint comment directives in --comment files:`,
57+
`2 errors converting TSLint comment directives in --comments files:`,
5858
` * Hello`,
5959
` * World`,
6060
);

src/reporting/reportCommentResults.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const reportCommentResults = (
1515
if (commentsResult.status === ResultStatus.Failed) {
1616
const headline = `${commentsResult.errors.length} error${
1717
commentsResult.errors.length === 1 ? "" : "s"
18-
} converting TSLint comment directives in --comment files`;
18+
} converting TSLint comment directives in --comments files`;
1919

2020
dependencies.logger.stderr.write(chalk.magentaBright(`${EOL}${headline}. ❌${EOL}`));
2121
dependencies.logger.stderr.write(
@@ -33,7 +33,7 @@ export const reportCommentResults = (
3333
if (commentsResult.data === undefined) {
3434
dependencies.logger.stdout.write(
3535
chalk.magentaBright(
36-
`${EOL}♻ Consider using --comment to replace TSLint comment directives in your source files. ♻${EOL}`,
36+
`${EOL}♻ Consider using --comments to replace TSLint comment directives in your source files. ♻${EOL}`,
3737
),
3838
);
3939
return;

0 commit comments

Comments
 (0)