Skip to content

Corrected --comment/--comments spelling #536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/comments/convertComments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const createStubDependencies = (
});

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

Expand All @@ -24,7 +24,7 @@ describe("convertComments", () => {
});
});

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

Expand Down
2 changes: 1 addition & 1 deletion src/comments/convertComments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type ConvertCommentsDependencies = {
};

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

Expand Down
10 changes: 5 additions & 5 deletions src/reporting/reportCommentResults.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("reportCommentResults", () => {
// Assert
expectEqualWrites(
logger.stdout.write,
`♻ Consider using --comment to replace TSLint comment directives in your source files. ♻`,
`♻ Consider using --comments to replace TSLint comment directives in your source files. ♻`,
);
});

Expand All @@ -28,12 +28,12 @@ describe("reportCommentResults", () => {
// Assert
expectEqualWrites(
logger.stderr.write,
`❌ 1 error converting TSLint comment directives in --comment files. ❌`,
`❌ 1 error converting TSLint comment directives in --comments files. ❌`,
` Check ${logger.debugFileName} for details.`,
);
expectEqualWrites(
logger.info.write,
`1 error converting TSLint comment directives in --comment files:`,
`1 error converting TSLint comment directives in --comments files:`,
` * Hello`,
);
});
Expand All @@ -49,12 +49,12 @@ describe("reportCommentResults", () => {
// Assert
expectEqualWrites(
logger.stderr.write,
`❌ 2 errors converting TSLint comment directives in --comment files. ❌`,
`❌ 2 errors converting TSLint comment directives in --comments files. ❌`,
` Check ${logger.debugFileName} for details.`,
);
expectEqualWrites(
logger.info.write,
`2 errors converting TSLint comment directives in --comment files:`,
`2 errors converting TSLint comment directives in --comments files:`,
` * Hello`,
` * World`,
);
Expand Down
4 changes: 2 additions & 2 deletions src/reporting/reportCommentResults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const reportCommentResults = (
if (commentsResult.status === ResultStatus.Failed) {
const headline = `${commentsResult.errors.length} error${
commentsResult.errors.length === 1 ? "" : "s"
} converting TSLint comment directives in --comment files`;
} converting TSLint comment directives in --comments files`;

dependencies.logger.stderr.write(chalk.magentaBright(`${EOL}❌ ${headline}. ❌${EOL}`));
dependencies.logger.stderr.write(
Expand All @@ -33,7 +33,7 @@ export const reportCommentResults = (
if (commentsResult.data === undefined) {
dependencies.logger.stdout.write(
chalk.magentaBright(
`${EOL}♻ Consider using --comment to replace TSLint comment directives in your source files. ♻${EOL}`,
`${EOL}♻ Consider using --comments to replace TSLint comment directives in your source files. ♻${EOL}`,
),
);
return;
Expand Down