diff --git a/.all-contributorsrc b/.all-contributorsrc index 1ad849c7a..f4d621636 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1,5 +1,5 @@ { - "badgeTemplate": "\"All 🤝\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_🤝-21bb42.svg\" />", + "badgeTemplate": "\"All 🤝\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_🤝-21bb42.svg\" />", "commit": false, "commitConvention": "angular", "contributors": [ diff --git a/README.md b/README.md index 28b91af71..9e4e97a70 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

-All Contributors: 36 🤝 +All Contributors: 36 🤝 Codecov Test Coverage diff --git a/src/steps/writeReadme/findExistingBadges.test.ts b/src/steps/writeReadme/findExistingBadges.test.ts index 9d98caf18..81c61c7ba 100644 --- a/src/steps/writeReadme/findExistingBadges.test.ts +++ b/src/steps/writeReadme/findExistingBadges.test.ts @@ -36,20 +36,12 @@ describe("findExistingBadges", () => { `, - ` - Codecov Test Coverage - `, - ` - Contributor Covenant - `, + ` Codecov Test Coverage`, + ` Contributor Covenant`, ` - - License: MIT - `, + License: MIT`, ` - - Sponsor: On GitHub - `, + Sponsor: On GitHub`, `Style: Prettier`, `TypeScript: Strict`, ])("%s", (contents) => { @@ -85,44 +77,26 @@ describe("findExistingBadges", () => { expect( findExistingBadges(`

- -All Contributors: 1 + All Contributors: 1 - - - Codecov Test Coverage - - - Contributor Covenant - - - License: MIT - - - Sponsor: On GitHub - + Codecov Test Coverage + Contributor Covenant + License: MIT + Sponsor: On GitHub Style: Prettier - TypeScript: Strict + TypeScript: Strict

`), ).toMatchInlineSnapshot(` [ - " - - - \\"All - - - ", - " - \\"License: - ", + "\\"All", + "\\"Contributor", + "\\"Sponsor:", "\\"Codecov", - "\\"Sponsor:", - "\\"TypeScript:", + "\\"Style:", ] `); }); diff --git a/src/steps/writeReadme/generateTopContent.test.ts b/src/steps/writeReadme/generateTopContent.test.ts index d26d4a159..a16512b2c 100644 --- a/src/steps/writeReadme/generateTopContent.test.ts +++ b/src/steps/writeReadme/generateTopContent.test.ts @@ -47,22 +47,14 @@ describe("findExistingBadges", () => {

- - - - \\"All - - - - - \\"Codecov - - - \\"Contributor - - - \\"License: - + + + \\"All + + + \\"Codecov + \\"Contributor + \\"License: \\"Style: \\"TypeScript: \\"npm @@ -92,22 +84,14 @@ describe("findExistingBadges", () => {

- - - - \\"All - - - - - \\"Codecov - - - \\"Contributor - - - \\"License: - + + + \\"All + + + \\"Codecov + \\"Contributor + \\"License: \\"Style: \\"TypeScript: \\"npm @@ -137,22 +121,14 @@ describe("findExistingBadges", () => {

- - - - \\"All - - - - - \\"Codecov - - - \\"Contributor - - - \\"License: - + + + \\"All + + + \\"Codecov + \\"Contributor + \\"License: \\"Style: \\"TypeScript: \\"npm @@ -180,22 +156,14 @@ describe("findExistingBadges", () => {

- - - - \\"All - - - - - \\"Codecov - - - \\"Contributor - - - \\"License: - + + + \\"All + + + \\"Codecov + \\"Contributor + \\"License: \\"Style: \\"TypeScript: \\"npm diff --git a/src/steps/writeReadme/generateTopContent.ts b/src/steps/writeReadme/generateTopContent.ts index 1c7d8b597..04256e65b 100644 --- a/src/steps/writeReadme/generateTopContent.ts +++ b/src/steps/writeReadme/generateTopContent.ts @@ -24,39 +24,29 @@ export function generateTopContent(options: Options, existingBadges: string[]) { for (const [badgeLine, existingMatcher] of [ [ !options.excludeAllContributors && - ` - - -All Contributors: 2 - - -`, + ` + + All Contributors: 2 + + `, /ALL-CONTRIBUTORS-BADGE:START/, ], [ !options.excludeTests && - ` - Codecov Test Coverage - `, + `Codecov Test Coverage`, /https:\/\/codecov\.io\/gh/, ], [ - ` - Contributor Covenant - `, + `Contributor Covenant`, /CODE_OF_CONDUCT\.md/, ], [ - ` - License: MIT - `, + `License: MIT`, /LICENSE\.(md|txt)/, ], [ options.funding && - ` - Sponsor: On GitHub - `, + `Sponsor: On GitHub`, /github.+sponsors/, ], [ diff --git a/src/steps/writeReadme/index.test.ts b/src/steps/writeReadme/index.test.ts index 612ddb6ea..d07c301e0 100644 --- a/src/steps/writeReadme/index.test.ts +++ b/src/steps/writeReadme/index.test.ts @@ -74,25 +74,15 @@ describe("writeReadme", () => {

Test description.

- - - - \\"All - - - - - \\"Codecov - - - \\"Contributor - - - \\"License: - - - \\"Sponsor: - + + + \\"All + + + \\"Codecov + \\"Contributor + \\"License: + \\"Sponsor: \\"Style: \\"TypeScript: \\"npm @@ -145,25 +135,15 @@ describe("writeReadme", () => {

Test description.

- - - - \\"All - - - - - \\"Codecov - - - \\"Contributor - - - \\"License: - - - \\"Sponsor: - + + + \\"All + + + \\"Codecov + \\"Contributor + \\"License: + \\"Sponsor: \\"Style: \\"TypeScript: \\"npm @@ -219,25 +199,15 @@ describe("writeReadme", () => {

Test description.

- - - - \\"All - - - - - \\"Codecov - - - \\"Contributor - - - \\"License: - - - \\"Sponsor: - + + + \\"All + + + \\"Codecov + \\"Contributor + \\"License: + \\"Sponsor: \\"Style: \\"TypeScript: \\"npm @@ -282,24 +252,17 @@ describe("writeReadme", () => {

Test description.

- -All Contributors: 2 + All Contributors: 2 - - - - - Contributor Covenant - - - License: MIT - - Style: Prettier - TypeScript: Strict -

+ + Contributor Covenant + License: MIT + Style: Prettier + TypeScript: Strict +

## Contributors @@ -334,29 +297,19 @@ describe("writeReadme", () => {

Test description.

- - - - \\"All - - - - - \\"Codecov - - - \\"Contributor - - - \\"License: - - - \\"Sponsor: - + + + \\"All + + + \\"Codecov + \\"Contributor + \\"License: + \\"Sponsor: \\"Style: \\"TypeScript: \\"npm - \\"Contributor + \\"All

## Usage diff --git a/src/steps/writing/creation/writeAllContributorsRC.ts b/src/steps/writing/creation/writeAllContributorsRC.ts index c0a31520a..44f9bf3cc 100644 --- a/src/steps/writing/creation/writeAllContributorsRC.ts +++ b/src/steps/writing/creation/writeAllContributorsRC.ts @@ -9,7 +9,7 @@ export async function writeAllContributorsRC(options: Options) { return await formatJson({ badgeTemplate: - 'All Contributors: <%= contributors.length %> 👪', + 'All Contributors: <%= contributors.length %> 👪', commit: false, commitConvention: "angular", contributors: existing?.contributors ?? [],