Skip to content

chore: bump to create-typescript-app@2 with transitions action #51

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 8 commits into from
Apr 3, 2025
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
88 changes: 40 additions & 48 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,50 +1,42 @@
{
"badgeTemplate": "\t<a href=\"#contributors\" target=\"_blank\"><img alt=\"👪 All Contributors: <%= contributors.length %>\" src=\"https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-<%= contributors.length %>-21bb42.svg\" /></a>",
"contributors": [
{
"login": "JoshuaKGoldberg",
"name": "Josh Goldberg ✨",
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
"profile": "http://www.joshuakgoldberg.com/",
"contributions": [
"code",
"content",
"doc",
"ideas",
"infra",
"maintenance",
"projectManagement",
"tool",
"bug"
]
},
{
"login": "alexmunoz",
"name": "Alex Muñoz",
"avatar_url": "https://avatars.githubusercontent.com/u/3093946?v=4",
"profile": "https://github.com/AlexMunoz",
"contributions": [
"code"
]
},
{
"login": "jakebailey",
"name": "Jake Bailey",
"avatar_url": "https://avatars.githubusercontent.com/u/5341706?v=4",
"profile": "https://jakebailey.dev",
"contributions": [
"bug"
]
}
],
"contributorsSortAlphabetically": true,
"projectName": "eslint-plugin-erasable-syntax-only",
"projectOwner": "JoshuaKGoldberg",
"repoType": "github",
"commitConvention": "angular",
"files": [
"README.md"
],
"commitType": "docs",
"contributorsPerLine": 7
"badgeTemplate": "\t<a href=\"#contributors\" target=\"_blank\"><img alt=\"👪 All Contributors: <%= contributors.length %>\" src=\"https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-<%= contributors.length %>-21bb42.svg\" /></a>",
"contributors": [
{
"login": "JoshuaKGoldberg",
"name": "Josh Goldberg ✨",
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
"profile": "http://www.joshuakgoldberg.com/",
"contributions": [
"code",
"content",
"doc",
"ideas",
"infra",
"maintenance",
"projectManagement",
"tool",
"bug"
]
},
{
"login": "alexmunoz",
"name": "Alex Muñoz",
"avatar_url": "https://avatars.githubusercontent.com/u/3093946?v=4",
"profile": "https://github.com/AlexMunoz",
"contributions": ["code"]
},
{
"login": "jakebailey",
"name": "Jake Bailey",
"avatar_url": "https://avatars.githubusercontent.com/u/5341706?v=4",
"profile": "https://jakebailey.dev",
"contributions": ["bug"]
}
],
"contributorsSortAlphabetically": true,
"projectName": "eslint-plugin-erasable-syntax-only",
"projectOwner": "JoshuaKGoldberg",
"repoType": "github",
"commitConvention": "angular"
}

4 changes: 2 additions & 2 deletions .eslint-doc-generatorrc.cjs → .eslint-doc-generatorrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const prettier = require("prettier");
import prettier from "prettier";

/** @type {import('eslint-doc-generator').GenerateOptions} */
const config = {
Expand All @@ -10,4 +10,4 @@ const config = {
ruleDocTitleFormat: "prefix-name",
};

module.exports = config;
export default config;
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

Thanks for your interest in contributing to `eslint-plugin-erasable-syntax-only`! 💖
Thanks for your interest in contributing to `eslint-plugin-erasable-syntax-only`!

> After this page, see [DEVELOPMENT.md](./DEVELOPMENT.md) for local development instructions.

Expand Down Expand Up @@ -93,5 +93,5 @@ Please do ping the maintainer who merged your PR if that doesn't happen within 2
## Emojis & Appreciation

If you made it all the way to the end, bravo dear user, we love you.
Please include your favorite emoji in the bottom of your issues and PRs to signal to us that you did in fact read this file and are trying to conform to it as best as possible.
💖 is a good starter if you're not sure which to use.
Please include an emoji in the bottom of your issues and PRs to signal to us that you did in fact read this file and are trying to conform to it as best as possible.
is a good starter if you're not sure which to use.
9 changes: 9 additions & 0 deletions .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ Add `--watch` to run the builder in a watch mode that continuously cleans and re
pnpm build --watch
```

### Building Docs

Run [`eslint-doc-generator`](https://github.com/bmish/eslint-doc-generator) to generate Markdown files documenting rules.

```shell
pnpm build:docs
```

## Formatting

[Prettier](https://prettier.io) is used to format code.
Expand All @@ -42,6 +50,7 @@ This package includes several forms of linting to enforce consistent code qualit
Each should be shown in VS Code, and can be run manually on the command-line:

- `pnpm lint` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files
- `pnpm lint:docs` ([eslint-doc-generator](https://github.com/bmish/eslint-doc-generator)): Generates and validates documentation for ESLint rules
- `pnpm lint:knip` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports
- `pnpm lint:md` ([Markdownlint](https://github.com/DavidAnson/markdownlint)): Checks Markdown source files
- `pnpm lint:packages` ([pnpm dedupe --check](https://pnpm.io/cli/dedupe)): Checks for unnecessarily duplicated packages in the `pnpm-lock.yml` file
Expand Down
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/01-bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ body:
description: Any additional info you'd like to provide.
label: Additional Info
type: textarea

description: Report a bug trying to run the code

labels:
- "type: bug"

name: 🐛 Bug

title: "🐛 Bug: <short description of the bug>"
6 changes: 5 additions & 1 deletion .github/ISSUE_TEMPLATE/02-documentation.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Bug Report Checklist
label: Documentation Report Checklist
options:
- label: I have pulled the latest `main` branch of the repository.
required: true
Expand All @@ -18,8 +18,12 @@ body:
description: Any additional info you'd like to provide.
label: Additional Info
type: textarea

description: Report a typo or missing area of documentation

labels:
- "area: documentation"

name: 📝 Documentation

title: "📝 Documentation: <short description of the request>"
6 changes: 5 additions & 1 deletion .github/ISSUE_TEMPLATE/03-feature.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Bug Report Checklist
label: Feature Request Checklist
options:
- label: I have pulled the latest `main` branch of the repository.
required: true
Expand All @@ -18,8 +18,12 @@ body:
description: Any additional info you'd like to provide.
label: Additional Info
type: textarea

description: Request that a new feature be added or an existing feature improved

labels:
- "type: feature"

name: 🚀 Feature

title: "🚀 Feature: <short description of the feature>"
6 changes: 5 additions & 1 deletion .github/ISSUE_TEMPLATE/04-tooling.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Bug Report Checklist
label: Tooling Report Checklist
options:
- label: I have tried restarting my IDE and the issue persists.
required: true
Expand All @@ -20,8 +20,12 @@ body:
description: Any additional info you'd like to provide.
label: Additional Info
type: textarea

description: Report a bug or request an enhancement in repository tooling

labels:
- "area: tooling"

name: 🛠 Tooling

title: "🛠 Tooling: <short description of the change>"
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- 👋 Hi, thanks for sending a PR to eslint-plugin-erasable-syntax-only! 💖.
<!-- 👋 Hi, thanks for sending a PR to eslint-plugin-erasable-syntax-only!
Please fill out all fields below and make sure each item is true and [x] checked.
Otherwise we may not be able to review your PR. -->

Expand Down
4 changes: 1 addition & 3 deletions .github/actions/prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ name: Prepare
runs:
steps:
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
with:
version: 9
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
with:
cache: pnpm
node-version: "22.12.0"
node-version: 22.14.0
- run: pnpm install --frozen-lockfile
shell: bash
using: composite
30 changes: 30 additions & 0 deletions .github/actions/transition/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
description: Runs create-typescript-app in transition mode

name: Transition

runs:
steps:
- uses: ./.github/actions/prepare
- run: npx create-typescript-app
shell: bash
- id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_author: The Friendly Bingo Bot <[email protected]>
commit_message: Check in changes from re-running npx create-typescript-app
commit_user_email: [email protected]
commit_user_name: The Friendly Bingo Bot
- if: steps.auto-commit-action.outputs.changes_detected == 'true'
uses: mshick/add-pr-comment@v2
with:
issue: ${{ github.event.pull_request.number }}
message: |-
🤖 Beep boop! I ran `npx create-typescript-app` and it updated some files.

I went ahead and checked those changes into this PR for you. Please review the latest commit to see if you want to merge it.

Cheers!
— _The Friendly Bingo Bot_ 💝

> ℹ️ These automatic commits keep your repository up-to-date with new versions of [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app). If you want to opt out, delete your `.github/workflows/cta-transitions.yml` file.
using: composite
1 change: 0 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
"labels": ["dependencies"],
"minimumReleaseAge": "7 days",
"patch": { "enabled": false },
"pinDigests": false,
"postUpdateOptions": ["pnpmDedupe"]
}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ./.github/actions/prepare
- run: pnpm build
- run: pnpm build || exit 0
- run: pnpm lint:docs
lint_knip:
name: Lint Knip
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/cta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
jobs:
transition:
name: Transition
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
token: ${{ secrets.ACCESS_TOKEN }}
- id: check
if: (github.actor == 'JoshuaKGoldberg' || github.actor == 'renovate[bot]') && startsWith(github.head_ref, 'renovate/') && contains(github.event.pull_request.title, 'create-typescript-app')
uses: ./.github/actions/transition
- if: steps.check.outcome == 'skipped'
run: echo 'Skipping transition mode because the PR does not appear to be an automated or owner-created update to create-typescript-app.'

name: CTA

on:
pull_request:
branches:
- main

permissions:
pull-requests: write
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.all-contributorsrc
/.all-contributorsrc
/.husky
/coverage
/lib
Expand Down
6 changes: 1 addition & 5 deletions .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
"commitMessage": "chore: release v${version}",
"requireCommits": true
},
"github": {
"autoGenerate": true,
"release": true,
"releaseName": "v${version}"
},
"github": { "release": true, "releaseName": "v${version}" },
"npm": { "publishArgs": ["--access public", "--provenance"] },
"plugins": {
"@release-it/conventional-changelog": {
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<!-- prettier-ignore-end -->
<a href="https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank"><img alt="🤝 Code of Conduct: Kept" src="https://img.shields.io/badge/%F0%9F%A4%9D_code_of_conduct-kept-21bb42" /></a>
<a href="https://codecov.io/gh/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only" target="_blank"><img alt="🧪 Coverage" src="https://img.shields.io/codecov/c/github/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only?label=%F0%9F%A7%AA%20coverage" /></a>
<a href="https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/LICENSE.md" target="_blank"><img alt="📝 License: MIT" src="https://img.shields.io/badge/%F0%9F%93%9D_license-MIT-21bb42.svg"></a>
<a href="http://npmjs.com/package/eslint-plugin-erasable-syntax-only"><img alt="📦 npm version" src="https://img.shields.io/npm/v/eslint-plugin-erasable-syntax-only?color=21bb42&label=%F0%9F%93%A6%20npm" /></a>
<a href="https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/LICENSE.md" target="_blank"><img alt="📝 License: MIT" src="https://img.shields.io/badge/%F0%9F%93%9D_license-MIT-21bb42.svg" /></a>
<a href="http://npmjs.com/package/eslint-plugin-erasable-syntax-only" target="_blank"><img alt="📦 npm version" src="https://img.shields.io/npm/v/eslint-plugin-erasable-syntax-only?color=21bb42&label=%F0%9F%93%A6%20npm" /></a>
<img alt="💪 TypeScript: Strict" src="https://img.shields.io/badge/%F0%9F%92%AA_typescript-strict-21bb42.svg" />
</p>

Expand Down Expand Up @@ -114,7 +114,7 @@ export default tseslint.config(
## Development

See [`.github/CONTRIBUTING.md`](./.github/CONTRIBUTING.md), then [`.github/DEVELOPMENT.md`](./.github/DEVELOPMENT.md).
Thanks! 💖
Thanks!

## Contributors

Expand Down
25 changes: 25 additions & 0 deletions create-typescript-app.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// create-typescript-app.config.js
// 👋 Hi! This is an optional config file for create-typescript-app (CTA).
// Repos created with CTA or its underlying framework Bingo don't use one by default.
// A CTA config file allows automatic updates to the repo that preserve customizations.
// For more information, see Bingo's docs:
// https://www.create.bingo/execution#transition-mode
// Eventually these values should be inferable, making this config file unnecessary:
// https://github.com/JoshuaKGoldberg/bingo/issues/128
import { blockESLint, createConfig } from "create-typescript-app";

export default createConfig({
refinements: {
addons: [
blockESLint({
rules: [
{
entries: {
"n/no-unpublished-import": "off",
},
},
],
}),
],
},
});
5 changes: 3 additions & 2 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
"pnpm-lock.yaml"
],
"words": [
"TSESTree",
"apexskier",
"automerge",
"eslint-doc-generatorrc.js",
"joshuakgoldberg",
"markdownlintignore",
"tseslint",
"TSESTree"
"tseslint"
]
}
Loading