Skip to content

Commit

Permalink
Ran latest create-typescript-app
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Oct 2, 2023
1 parent ae44785 commit 7c4f1e6
Show file tree
Hide file tree
Showing 21 changed files with 766 additions and 1,009 deletions.
2 changes: 1 addition & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"badgeTemplate": "<img alt=\"All Contributors: <%= contributors.length %>\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>-21bb42.svg\" />",
"badgeTemplate": "<img alt=\"All Contributors: <%= contributors.length %> 👪\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_👪-21bb42.svg\" />",
"commit": false,
"commitConvention": "angular",
"contributors": [
Expand Down
16 changes: 11 additions & 5 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
"plugin:n/recommended",
"plugin:perfectionist/recommended-natural",
"plugin:regexp/recommended",
"prettier",
"plugin:vitest/recommended",
],
overrides: [
{
Expand Down Expand Up @@ -43,6 +43,15 @@ module.exports = {
"jsdoc/require-returns": "off",
},
},
{
files: "**/*.md/*.ts",
rules: {
"n/no-missing-import": [
"error",
{ allowModules: ["prettier-plugin-curly"] },
],
},
},
{
excludedFiles: ["**/*.md/*.ts"],
extends: [
Expand Down Expand Up @@ -82,7 +91,6 @@ module.exports = {
"@typescript-eslint/no-unsafe-call": "off",
},
},

{
extends: ["plugin:yml/standard", "plugin:yml/prettier"],
files: ["**/*.{yml,yaml}"],
Expand Down Expand Up @@ -110,7 +118,6 @@ module.exports = {
plugins: [
"@typescript-eslint",
"deprecation",
"import",
"jsdoc",
"no-only-tests",
"perfectionist",
Expand All @@ -122,14 +129,13 @@ module.exports = {
rules: {
// These off/less-strict-by-default rules work well for this repo and we like them on.
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],
"import/extensions": ["error", "ignorePackages"],
"no-only-tests/no-only-tests": "error",

// These on-by-default rules don't work well for this repo and we like them off.
"n/no-missing-import": "off",
"no-case-declarations": "off",
"no-constant-condition": "off",
"no-inner-declarations": "off",
"no-mixed-spaces-and-tabs": "off",

// Stylistic concerns that don't interfere with Prettier
"@typescript-eslint/padding-line-between-statements": [
Expand Down
2 changes: 1 addition & 1 deletion .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
npm@joshuakgoldberg.com.
git@joshuakgoldberg.com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
10 changes: 5 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ There are two steps involved:

### Finding an Issue

With the exception of very small typos, all changes to this repository generally need to correspond to an [open issue marked as `accepting prs` on the issue tracker](https://github.com/JoshuaKGoldberg/prettier-plugin-curly/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+prs%22).
If this is your first time contributing, consider searching for [unassigned issues that also have the `good first issue` label](https://github.com/JoshuaKGoldberg/prettier-plugin-curly/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+prs%22+label%3A%22good+first+issue%22+no%3Aassignee).
With the exception of very small typos, all changes to this repository generally need to correspond to an [unassigned open issue marked as `status: accepting prs` on the issue tracker](https://github.com/JoshuaKGoldberg/prettier-plugin-curly/issues?q=is%3Aissue+is%3Aopen+label%3A%22status%3A+accepting+prs%22+no%3Aassignee+).
If this is your first time contributing, consider searching for [unassigned issues that also have the `good first issue` label](https://github.com/JoshuaKGoldberg/prettier-plugin-curly/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3A%22status%3A+accepting+prs%22+no%3Aassignee+).
If the issue you'd like to fix isn't found on the issue, see [Reporting Issues](#reporting-issues) for filing your own (please do!).

#### Issue Claiming

We don't use any kind of issue claiming system.
We've found in the past that they result in accidental ["licked cookie"](https://devblogs.microsoft.com/oldnewthing/20091201-00/?p=15843) situations where contributors claim an issue but run out of time or energy trying before sending a PR.

If an issue has been marked as `accepting prs` and an open PR does not exist, feel free to send a PR.
You don't need to ask for permission.
If an unassigned issue has been marked as `status: accepting prs` and an open PR does not exist, feel free to send a PR.
Please don't post comments asking for permission or stating you will work on an issue.

### Sending a Pull Request

Once you've identified an open issue accepting PRs that doesn't yet have a PR sent, you're free to send a pull request.
Be sure to fill out the pull request template's requested information -- otherwise your PR will likely be closed.

PRs are also expected to have a title that adheres to [commitlint](https://github.com/conventional-changelog/commitlint).
PRs are also expected to have a title that adheres to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0).
Only PR titles need to be in that format, not individual commits.
Don't worry if you get this wrong: you can always change the PR title after sending it.
Check [previously merged PRs](https://github.com/JoshuaKGoldberg/prettier-plugin-curly/pulls?q=is%3Apr+is%3Amerged+-label%3Adependencies+) for reference.
Expand Down
12 changes: 8 additions & 4 deletions .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ pnpm install
## Building

Run [TypeScript](https://typescriptlang.org) locally to type check and build source files from `src/` into output files in `lib/`:
Run [**tsup**](https://tsup.egoist.dev) locally to build source files from `src/` into output files in `lib/`:

```shell
pnpm build --watch
pnpm build
```

You should also see suggestions from TypeScript in your editor.
Add `--watch` to run the builder in a watch mode that continuously cleans and recreates `lib/` as you save files:

```shell
pnpm build --watch
```

## Formatting

Expand All @@ -29,7 +33,7 @@ It should be applied automatically when you save files in VS Code or make a Git
To manually reformat all files, you can run:

```shell
pnpm format:write
pnpm format --write
```

## Linting
Expand Down
2 changes: 1 addition & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ We take all security vulnerabilities seriously.
If you have a vulnerability or other security issues to disclose:

- Thank you very much, please do!
- Please send them to us by emailing `github@joshuakgoldberg.com`
- Please send them to us by emailing `git@joshuakgoldberg.com`

We appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.
4 changes: 2 additions & 2 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"automerge": true,
"internalChecksFilter": "strict",
"labels": ["dependencies"],
"postUpdateOptions": ["pnpmDedupe"],
"stabilityDays": 3
"minimumReleaseAge": "3 days",
"postUpdateOptions": ["pnpmDedupe"]
}
2 changes: 1 addition & 1 deletion .github/workflows/lint-package-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ jobs:
lint_package_json:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm lint:package-json

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/lint-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ name: Lint Packages

on:
pull_request: ~

push:
branches:
- main
1 change: 1 addition & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm build || exit 0
- run: pnpm format --list-different

name: Prettier
Expand Down
67 changes: 3 additions & 64 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}

jobs:
Expand All @@ -9,73 +8,13 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- uses: ./.github/actions/prepare
- run: pnpm build
- run: git config user.name "${GITHUB_ACTOR}"
- run: git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
- name: Delete branch protection on main
uses: actions/github-script@v6.4.1
with:
github-token: ${{ secrets.ACCESS_TOKEN }}
script: |
try {
await github.request(
`DELETE /repos/JoshuaKGoldberg/prettier-plugin-curly/branches/main/protection`,
);
} catch (error) {
if (!error.message?.includes?.("Branch not protected")) {
throw error;
}
}
- env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
if pnpm run should-semantic-release ; then
pnpm release-it --verbose
gh workflow run post-release.yml
fi
- if: always()
name: Recreate branch protection on main
uses: actions/github-script@v6.4.1
with:
github-token: ${{ secrets.ACCESS_TOKEN }}
script: |
github.request(
`PUT /repos/JoshuaKGoldberg/prettier-plugin-curly/branches/main/protection`,
{
allow_deletions: false,
allow_force_pushes: true,
allow_fork_pushes: false,
allow_fork_syncing: true,
block_creations: false,
branch: "main",
enforce_admins: false,
owner: "JoshuaKGoldberg",
repo: "prettier-plugin-curly",
required_conversation_resolution: true,
required_linear_history: false,
required_pull_request_reviews: null,
required_status_checks: {
checks: [
{ context: "build" },
{ context: "compliance" },
{ context: "lint" },
{ context: "lint_knip" },
{ context: "lint_markdown" },
{ context: "lint_package" },
{ context: "lint_packages" },
{ context: "lint_spelling" },
{ context: "prettier" },
{ context: "test" },
],
strict: false,
},
restrictions: null,
}
);
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
uses: JoshuaKGoldberg/release-it-action@v0.2.2

name: Release

Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ jobs:
- run: pnpm run test --coverage
- name: Codecov
uses: codecov/codecov-action@v3
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: coverage

name: Test

Expand Down
4 changes: 1 addition & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.all-contributorsrc
coverage/
lib/
pnpm-lock.yaml

# See https://github.com/all-contributors/cli/issues/347
.all-contributorsrc
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"plugins": ["prettier-plugin-packagejson"],
"overrides": [
{ "files": ".*rc", "options": { "parser": "json" } },
{ "files": ".nvmrc", "options": { "parser": "yaml" } }
],
"plugins": ["./lib/index.js", "prettier-plugin-packagejson"],
"useTabs": true
}
7 changes: 7 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@
"autoGenerate": true,
"release": true,
"releaseName": "v${version}"
},
"npm": { "publishArgs": ["--access public", "--provenance"] },
"plugins": {
"@release-it/conventional-changelog": {
"infile": "CHANGELOG.md",
"preset": "angular"
}
}
}
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<h1 align="center">prettier-plugin-curly</h1>

<p align="center">Prettier plugin to enforce consistent brace style for all control statements. 🧹</p>
<p align="center">Prettier plugin to enforce consistent brace style for all control statements. 🥌</p>

<p align="center">
<a href="#contributors" target="_blank">
<!-- prettier-ignore-start -->
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<img alt="All Contributors: 3" src="https://img.shields.io/badge/all_contributors-3-21bb42.svg" />
<img alt="All Contributors: 3 👪" src="https://img.shields.io/badge/all_contributors-3_👪-21bb42.svg" />
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<!-- prettier-ignore-end -->
</a>
</a>
<a href="https://codecov.io/gh/JoshuaKGoldberg/prettier-plugin-curly" target="_blank">
<img alt="Codecov Test Coverage" src="https://codecov.io/gh/JoshuaKGoldberg/prettier-plugin-curly/branch/main/graph/badge.svg"/>
</a>
Expand All @@ -24,6 +24,8 @@
</a>
<img alt="Style: Prettier" src="https://img.shields.io/badge/style-prettier-21bb42.svg" />
<img alt="TypeScript: Strict" src="https://img.shields.io/badge/typescript-strict-21bb42.svg" />
<img alt="npm package version" src="https://img.shields.io/npm/v/prettier-plugin-curly?color=21bb42" />
<img alt="Contributor Covenant" src="https://img.shields.io/badge/code_of_conduct-enforced-21bb42" />
</p>

## Usage
Expand Down
Loading

0 comments on commit 7c4f1e6

Please sign in to comment.