Skip to content

Commit

Permalink
chore: use latest create-typescript-app templating (#171)
Browse files Browse the repository at this point in the history
## PR Checklist

- [x] Addresses an existing open issue: fixes #77
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/tidelift-me-up-site/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/tidelift-me-up-site/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

Runs `npx create-typescript-app@latest --mode migrate`.

Also prepends _`Web app to`_ to the description, to help disambiguate in
my project listings from
https://github.com/JoshuaKGoldberg/tidelift-me-up.
  • Loading branch information
JoshuaKGoldberg authored Nov 12, 2023
1 parent d4b321c commit f8e0789
Show file tree
Hide file tree
Showing 29 changed files with 754 additions and 755 deletions.
117 changes: 49 additions & 68 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,70 +1,51 @@
{
"badgeTemplate": "<img alt=\"All Contributors: <%= contributors.length %>\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>-21bb42.svg\" />",
"commit": false,
"commitConvention": "angular",
"contributors": [
{
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
"contributions": [
"maintenance",
"code",
"design",
"tool"
],
"login": "JoshuaKGoldberg",
"name": "Josh Goldberg",
"profile": "http://www.joshuakgoldberg.com"
},
{
"login": "kathryngraysonnanz",
"name": "Kathryn Grayson Nanz",
"avatar_url": "https://avatars.githubusercontent.com/u/61242943?v=4",
"profile": "https://github.com/kathryngraysonnanz",
"contributions": [
"design"
]
},
{
"login": "dsherret",
"name": "David Sherret",
"avatar_url": "https://avatars.githubusercontent.com/u/1609021?v=4",
"profile": "http://stackoverflow.com/users/188246/david-sherret",
"contributions": [
"code",
"bug"
]
},
{
"login": "jrachelr",
"name": "Rachel Johnson",
"avatar_url": "https://avatars.githubusercontent.com/u/101299667?v=4",
"profile": "https://www.racheldev.com/",
"contributions": [
"code",
"design",
"maintenance",
"bug"
]
},
{
"login": "RuthwikReddy09",
"name": "Ruthwik",
"avatar_url": "https://avatars.githubusercontent.com/u/126862059?v=4",
"profile": "https://github.com/RuthwikReddy09",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
"contributorsSortAlphabetically": true,
"files": [
"README.md"
],
"imageSize": 100,
"projectName": "tidelift-me-up-site",
"projectOwner": "JoshuaKGoldberg",
"repoHost": "https://github.com",
"repoType": "github",
"commitType": "docs"
"badgeTemplate": "<img alt=\"All Contributors: <%= contributors.length %> 👪\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_👪-21bb42.svg\" />",
"commit": false,
"commitConvention": "angular",
"contributors": [
{
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
"contributions": ["maintenance", "code", "design", "tool", "bug"],
"login": "JoshuaKGoldberg",
"name": "Josh Goldberg",
"profile": "http://www.joshuakgoldberg.com"
},
{
"login": "kathryngraysonnanz",
"name": "Kathryn Grayson Nanz",
"avatar_url": "https://avatars.githubusercontent.com/u/61242943?v=4",
"profile": "https://github.com/kathryngraysonnanz",
"contributions": ["design"]
},
{
"login": "dsherret",
"name": "David Sherret",
"avatar_url": "https://avatars.githubusercontent.com/u/1609021?v=4",
"profile": "http://stackoverflow.com/users/188246/david-sherret",
"contributions": ["bug", "code"]
},
{
"login": "jrachelr",
"name": "Rachel Johnson",
"avatar_url": "https://avatars.githubusercontent.com/u/101299667?v=4",
"profile": "https://www.racheldev.com/",
"contributions": ["code", "design", "maintenance", "bug"]
},
{
"login": "RuthwikReddy09",
"name": "Ruthwik",
"avatar_url": "https://avatars.githubusercontent.com/u/126862059?v=4",
"profile": "https://github.com/RuthwikReddy09",
"contributions": ["code"]
}
],
"contributorsPerLine": 7,
"contributorsSortAlphabetically": true,
"files": ["README.md"],
"imageSize": 100,
"projectName": "tidelift-me-up-site",
"projectOwner": "JoshuaKGoldberg",
"repoHost": "https://github.com",
"repoType": "github"
}

3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
!.*
coverage*
.next
coverage
lib
node_modules
pnpm-lock.yaml
44 changes: 31 additions & 13 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module.exports = {
"plugin:n/recommended",
"plugin:perfectionist/recommended-natural",
"plugin:regexp/recommended",
"prettier",
],
overrides: [
{
Expand All @@ -24,13 +23,20 @@ module.exports = {
{
extends: [
"plugin:jsdoc/recommended-typescript-error",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/strict",
"plugin:@typescript-eslint/stylistic",
],
files: ["**/*.ts", "**/*.tsx"],
parser: "@typescript-eslint/parser",
rules: {
// These off-by-default rules work well for this repo and we like them on.
"jsdoc/informative-docs": "error",
"logical-assignment-operators": [
"error",
"always",
{ enforceForIfStatements: true },
],
"operator-assignment": "error",

// These on-by-default rules don't work well for this repo and we like them off.
"jsdoc/require-jsdoc": "off",
Expand All @@ -39,11 +45,20 @@ module.exports = {
"jsdoc/require-returns": "off",
},
},
{
files: "**/*.md/*.ts",
rules: {
"n/no-missing-import": [
"error",
{ allowModules: ["tidelift-me-up-site"] },
],
},
},
{
excludedFiles: ["**/*.md/*.ts"],
extends: [
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/strict",
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
],
files: ["**/*.ts"],
parser: "@typescript-eslint/parser",
Expand All @@ -53,14 +68,6 @@ module.exports = {
rules: {
// These off-by-default rules work well for this repo and we like them on.
"deprecation/deprecation": "error",

// These more-strict-by-default rules don't work well for this repo and we like them less strict.
"@typescript-eslint/no-unnecessary-condition": [
"error",
{
allowConstantLoopConditions: true,
},
],
},
},
{
Expand All @@ -72,6 +79,12 @@ module.exports = {
"jsonc/sort-keys": "error",
},
},
{
files: ["*.jsonc"],
rules: {
"jsonc/no-comments": "off",
},
},
{
extends: ["plugin:yml/standard", "plugin:yml/prettier"],
files: ["**/*.{yml,yaml}"],
Expand Down Expand Up @@ -99,28 +112,33 @@ module.exports = {
plugins: [
"@typescript-eslint",
"deprecation",
"import",
"jsdoc",
"jsx-a11y",
"no-only-tests",
"perfectionist",
"regexp",
],
reportUnusedDisableDirectives: true,
root: true,
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" }],
"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": [
"error",
{ blankLine: "always", next: "*", prev: "block-like" },
],
"no-useless-rename": "error",
"object-shorthand": "error",
"perfectionist/sort-objects": [
"error",
{
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.
github@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
20 changes: 17 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +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/tidelift-me-up-site/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/tidelift-me-up-site/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/tidelift-me-up-site/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/tidelift-me-up-site/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 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/tidelift-me-up-site/pulls?q=is%3Apr+is%3Amerged+-label%3Adependencies+) for reference.
Expand Down Expand Up @@ -81,3 +89,9 @@ Once all feedback is addressed and the PR is approved, we'll ensure the branch i

Once your PR is merged, if you haven't yet been added to the [_Contributors_ table in the README.md](../README.md#contributors) for its [type of contribution](https://allcontributors.org/docs/en/emoji-key "Allcontributors emoji key"), you should be soon.
Please do ping the maintainer who merged your PR if that doesn't happen within 24 hours - it was likely an oversight on our end!

## 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.
26 changes: 20 additions & 6 deletions .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,41 @@ 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

This package includes several forms of linting to enforce consistent code quality and styling.
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: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:package` ([npm-package-json-lint](https://npmpackagejsonlint.org/)): Lints the `package.json` file
- `pnpm lint:package-json` ([npm-package-json-lint](https://npmpackagejsonlint.org/)): Lints the `package.json` file
- `pnpm lint:packages` ([pnpm dedupe --check](https://pnpm.io/cli/dedupe)): Checks for unnecessarily duplicated packages in the `pnpm-lock.yml` file
- `pnpm lint:spelling` ([cspell](https://cspell.org)): Spell checks across all source files
- `pnpm lint` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files

Read the individual documentation for each linter to understand how it can be configured and used best.

For example, ESLint can be run with `--fix` to auto-fix some lint rule complaints:

```shell
pnpm run lint --fix
```

## Type Checking

Run [TypeScript](https://typescriptlang.org) locally to type check source files from `src/`:
You should be able to see suggestions from [TypeScript](https://typescriptlang.org) in your editor for all open files.

However, it can be useful to run the TypeScript command-line (`tsc`) to type check all files in `src/`:

```shell
pnpm tsc --watch
pnpm tsc
```

You should also see suggestions from TypeScript in your editor.
Add `--watch` to keep the type checker running in a watch mode that updates the display as you save files:

```shell
pnpm tsc --watch
```
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/01-bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ body:
description: Report a bug trying to run the code
labels:
- "type: bug"
name: 🐛 Report a Bug
name: 🐛 Bug
title: "🐛 Bug: <short description of the bug>"
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/03-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ body:
description: Request that a new feature be added or an existing feature improved
labels:
- "type: feature"
name: 🚀 Request a Feature
name: 🚀 Feature
title: "🚀 Feature: <short description of the feature>"
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 `npm@joshuakgoldberg.com`
- Please send them to us by emailing `github@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"]
}
25 changes: 25 additions & 0 deletions .github/workflows/accessibility-alt-text-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
jobs:
accessibility_alt_text_bot:
runs-on: ubuntu-latest
steps:
- uses: github/[email protected]

name: Accessibility Alt Text Bot

on:
issue_comment:
types:
- created
- edited
issues:
types:
- edited
- opened
pull_request:
types:
- edited
- opened

permissions:
issues: write
pull-requests: write
Loading

0 comments on commit f8e0789

Please sign in to comment.