Skip to content

Commit

Permalink
chore: refreshed CTA tooling for March 2024 (#401)
Browse files Browse the repository at this point in the history
<!-- 👋 Hi, thanks for sending a PR to ts-api-utils! 💖.
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. -->

## PR Checklist

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

## Overview

Runs `npx -y create-typescript-app@1.57.8 --auto --mode migrate` and
touches up the results.
  • Loading branch information
JoshuaKGoldberg authored Mar 25, 2024
1 parent cc315d6 commit 01d39d8
Show file tree
Hide file tree
Showing 15 changed files with 548 additions and 702 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

30 changes: 20 additions & 10 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ module.exports = {
"plugin:regexp/recommended",
"plugin:vitest/recommended",
],
ignorePatterns: [
"!.*",
"coverage",
"docs",
"lib",
"node_modules",
"pnpm-lock.yaml",
],
overrides: [
{
extends: ["plugin:markdown/recommended"],
extends: ["plugin:markdown/recommended-legacy"],
files: ["**/*.md"],
processor: "markdown/markdown",
},
Expand All @@ -28,15 +36,10 @@ module.exports = {
parser: "@typescript-eslint/parser",
rules: {
// These rules have configurations specific to this repo and we like them on.
"jsdoc/check-tag-names": [
"error",
{
definedTags: ["category"],
},
],
"jsdoc/check-tag-names": ["error", { definedTags: ["category"] }],

// These off-by-default rules work well for this repo and we like them on.
"jsdoc/informative-docs": "error",
"jsdoc/informative-docs": ["error", { excludedTags: ["category"] }],
"logical-assignment-operators": [
"error",
"always",
Expand Down Expand Up @@ -83,6 +86,7 @@ module.exports = {
files: ["*.json", "*.jsonc"],
parser: "jsonc-eslint-parser",
rules: {
"jsonc/comma-dangle": "off",
"jsonc/sort-keys": "error",
},
},
Expand All @@ -92,6 +96,12 @@ module.exports = {
"jsonc/no-comments": "off",
},
},
{
extends: ["plugin:package-json/recommended"],
files: ["package.json"],
parser: "jsonc-eslint-parser",
plugins: ["package-json"],
},
{
files: "**/*.test.ts",
rules: {
Expand Down Expand Up @@ -129,7 +139,6 @@ module.exports = {
"@typescript-eslint",
"deprecation",
"jsdoc",
"no-only-tests",
"perfectionist",
"regexp",
"vitest",
Expand All @@ -142,7 +151,6 @@ module.exports = {
"error",
{ argsIgnorePattern: "^_", 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",
Expand All @@ -156,6 +164,8 @@ module.exports = {
"error",
{ blankLine: "always", next: "*", prev: "block-like" },
],
"no-useless-rename": "error",
"object-shorthand": "error",
"perfectionist/sort-objects": [
"error",
{
Expand Down
1 change: 0 additions & 1 deletion .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ Each should be shown in VS Code, and can be run manually on the command-line:
- `pnpm lint:knip` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports
- `pnpm lint:knip:production` ([knip](https://github.com/webpro/knip)): The same as `lint:knip` but looks purely at production code/dependencies
- `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:packages` ([pnpm-deduplicate](https://github.com/ocavue/pnpm-deduplicate)): Deduplicates packages in the `pnpm-lock.yml` file
- `pnpm lint:spelling` ([cspell](https://cspell.org)): Spell checks across all source files

Expand Down
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/03-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ body:
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
options:
- label: I have tried restarting my IDE and the issue persists.
required: true
- label: I have pulled the latest `main` branch of the repository.
required: true
- label: I have [searched for related issues](https://github.com/JoshuaKGoldberg/ts-api-utils/issues?q=is%3Aissue) and found none that matched my issue.
Expand Down
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/accessibility-alt-text-bot@v1.4.0

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
15 changes: 0 additions & 15 deletions .github/workflows/lint-package-json.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .npmpackagejsonlintrc.json

This file was deleted.

5 changes: 1 addition & 4 deletions .prettierrc → .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"overrides": [
{ "files": ".*rc", "options": { "parser": "json" } },
{ "files": ".nvmrc", "options": { "parser": "yaml" } }
],
"overrides": [{ "files": ".nvmrc", "options": { "parser": "yaml" } }],
"plugins": ["prettier-plugin-curly", "prettier-plugin-packagejson"],
"useTabs": true
}
4 changes: 1 addition & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" },
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.rulers": [80],
Expand Down
35 changes: 16 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
<h1 align="center">TypeScript API Utils</h1>

<p align="center">
Utility functions for working with TypeScript's API.
Successor to the wonderful <a href="https://github.com/ajafff/tsutils">tsutils</a>. 🛠️️
Utility functions for working with TypeScript's API.
Successor to the wonderful tsutils.
🛠️️
</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: 6 👪" src="https://img.shields.io/badge/all_contributors-6_👪-21bb42.svg" />
<!-- prettier-ignore-start -->
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a href="#contributors" target="_blank"><img alt="👪 All Contributors: 6" src="https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-6-21bb42.svg" /></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<!-- prettier-ignore-end -->
</a>
<a href="https://codecov.io/gh/JoshuaKGoldberg/ts-api-utils" target="_blank"><img alt="Codecov Test Coverage" src="https://codecov.io/gh/JoshuaKGoldberg/ts-api-utils/branch/main/graph/badge.svg"/></a>
<a href="https://github.com/JoshuaKGoldberg/ts-api-utils/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank"><img alt="Contributor Covenant" src="https://img.shields.io/badge/code_of_conduct-enforced-21bb42" /></a>
<a href="https://github.com/JoshuaKGoldberg/ts-api-utils/blob/main/LICENSE.md" target="_blank"><img alt="License: MIT" src="https://img.shields.io/github/license/JoshuaKGoldberg/ts-api-utils?color=21bb42"></a>
<a href="https://github.com/sponsors/JoshuaKGoldberg" target="_blank"><img alt="Sponsor: On GitHub" src="https://img.shields.io/badge/sponsor-on_github-21bb42.svg" /></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/ts-api-utils?color=21bb42" />
<!-- prettier-ignore-end -->
<a href="https://github.com/JoshuaKGoldberg/ts-api-utils/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/ts-api-utils" target="_blank"><img alt="🧪 Coverage" src="https://img.shields.io/codecov/c/github/JoshuaKGoldberg/ts-api-utils?label=%F0%9F%A7%AA%20coverage" /></a>
<a href="https://github.com/JoshuaKGoldberg/ts-api-utils/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/ts-api-utils"><img alt="📦 npm version" src="https://img.shields.io/npm/v/ts-api-utils?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>

## Usage
Expand Down Expand Up @@ -60,11 +57,11 @@ Many thanks to [@ajafff](https://github.com/ajafff) for creating the original [`
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://effectivetypescript.com"><img src="https://avatars.githubusercontent.com/u/98301?v=4?s=100" width="100px;" alt="Dan Vanderkam"/><br /><sub><b>Dan Vanderkam</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/ts-api-utils/issues?q=author%3Adanvk" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://blog.jmchor.dev"><img src="https://avatars.githubusercontent.com/u/110151013?v=4?s=100" width="100px;" alt="Johannes Chorzempa"/><br /><sub><b>Johannes Chorzempa</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=jmchor" title="Documentation">📖</a> <a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=jmchor" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://www.joshuakgoldberg.com"><img src="https://avatars.githubusercontent.com/u/3335181?v=4?s=100" width="100px;" alt="Josh Goldberg"/><br /><sub><b>Josh Goldberg</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/ts-api-utils/issues?q=author%3AJoshuaKGoldberg" title="Bug reports">🐛</a> <a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=JoshuaKGoldberg" title="Code">💻</a> <a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=JoshuaKGoldberg" title="Documentation">📖</a> <a href="#projectManagement-JoshuaKGoldberg" title="Project Management">📆</a> <a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=JoshuaKGoldberg" title="Tests">⚠️</a> <a href="#tool-JoshuaKGoldberg" title="Tools">🔧</a> <a href="#maintenance-JoshuaKGoldberg" title="Maintenance">🚧</a> <a href="#infra-JoshuaKGoldberg" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#ideas-JoshuaKGoldberg" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://blog.jmchor.dev"><img src="https://avatars.githubusercontent.com/u/110151013?v=4?s=100" width="100px;" alt="Johannes Chorzempa"/><br /><sub><b>Johannes Chorzempa</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=jmchor" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://www.joshuakgoldberg.com"><img src="https://avatars.githubusercontent.com/u/3335181?v=4?s=100" width="100px;" alt="Josh Goldberg"/><br /><sub><b>Josh Goldberg</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/ts-api-utils/issues?q=author%3AJoshuaKGoldberg" title="Bug reports">🐛</a> <a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=JoshuaKGoldberg" title="Code">💻</a> <a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=JoshuaKGoldberg" title="Documentation">📖</a> <a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=JoshuaKGoldberg" title="Tests">⚠️</a> <a href="#tool-JoshuaKGoldberg" title="Tools">🔧</a> <a href="#maintenance-JoshuaKGoldberg" title="Maintenance">🚧</a> <a href="#infra-JoshuaKGoldberg" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#ideas-JoshuaKGoldberg" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/kirjs"><img src="https://avatars.githubusercontent.com/u/2545357?v=4?s=100" width="100px;" alt="Kirill Cherkashin"/><br /><sub><b>Kirill Cherkashin</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=kirjs" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ajafff"><img src="https://avatars.githubusercontent.com/u/11968040?v=4?s=100" width="100px;" alt="Klaus Meinhardt"/><br /><sub><b>Klaus Meinhardt</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=ajafff" title="Code">💻</a> <a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=ajafff" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RebeccaStevens"><img src="https://avatars.githubusercontent.com/u/7224206?v=4?s=100" width="100px;" alt="Rebecca Stevens"/><br /><sub><b>Rebecca Stevens</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/ts-api-utils/issues?q=author%3ARebeccaStevens" title="Bug reports">🐛</a> <a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=RebeccaStevens" title="Code">💻</a> <a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=RebeccaStevens" title="Documentation">📖</a> <a href="#projectManagement-RebeccaStevens" title="Project Management">📆</a> <a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=RebeccaStevens" title="Tests">⚠️</a> <a href="#tool-RebeccaStevens" title="Tools">🔧</a> <a href="#infra-RebeccaStevens" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-RebeccaStevens" title="Maintenance">🚧</a> <a href="#ideas-RebeccaStevens" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RebeccaStevens"><img src="https://avatars.githubusercontent.com/u/7224206?v=4?s=100" width="100px;" alt="Rebecca Stevens"/><br /><sub><b>Rebecca Stevens</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/ts-api-utils/issues?q=author%3ARebeccaStevens" title="Bug reports">🐛</a> <a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=RebeccaStevens" title="Code">💻</a> <a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=RebeccaStevens" title="Documentation">📖</a> <a href="https://github.com/JoshuaKGoldberg/ts-api-utils/commits?author=RebeccaStevens" title="Tests">⚠️</a> <a href="#tool-RebeccaStevens" title="Tools">🔧</a> <a href="#infra-RebeccaStevens" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-RebeccaStevens" title="Maintenance">🚧</a> <a href="#ideas-RebeccaStevens" title="Ideas, Planning, & Feedback">🤔</a></td>
</tr>
</tbody>
</table>
Expand All @@ -77,6 +74,6 @@ Many thanks to [@ajafff](https://github.com/ajafff) for creating the original [`
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

> 💙 This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).
> 💙 This package was templated with [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).
> _"My tools! I have to have my tools!" - Dennis Reynolds_
File renamed without changes.
47 changes: 22 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@
"docs": "typedoc",
"docs:serve": "npx --yes http-server docs/generated",
"format": "prettier \"**/*\" --ignore-unknown",
"lint": "eslint . .*js --max-warnings 0 --report-unused-disable-directives",
"lint": "eslint . .*js --max-warnings 0",
"lint:docs": "typedoc --validation --treatValidationWarningsAsErrors",
"lint:knip": "knip",
"lint:knip:production": "knip --config knip.production.jsonc --production",
"lint:md": "markdownlint \"**/*.md\" \".github/**/*.md\" --rules sentences-per-line",
"lint:package-json": "npmPkgJsonLint .",
"lint:packages": "pnpm dedupe --check",
"lint:spelling": "cspell \"**\" \".github/**/*\"",
"prepare": "husky install",
Expand All @@ -53,48 +52,46 @@
"devDependencies": {
"@phenomnomnominal/tsquery": "^6.1.3",
"@release-it/conventional-changelog": "^8.0.1",
"@types/eslint": "^8.56.0",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "7.3.1",
"@types/eslint": "^8.56.5",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"@typescript/vfs": "^1.5.0",
"@vitest/coverage-v8": "^1.1.0",
"@vitest/coverage-v8": "^1.3.1",
"console-fail-test": "^0.2.3",
"cspell": "^8.2.3",
"eslint": "^8.56.0",
"cspell": "^8.6.0",
"eslint": "^8.57.0",
"eslint-plugin-deprecation": "^2.0.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-jsdoc": "^48.0.0",
"eslint-plugin-jsonc": "^2.11.2",
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-n": "^16.5.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-perfectionist": "^2.5.0",
"eslint-plugin-regexp": "^2.1.2",
"eslint-plugin-vitest": "^0.3.18",
"eslint-plugin-yml": "^1.11.0",
"husky": "^9.0.0",
"eslint-plugin-jsdoc": "^48.2.1",
"eslint-plugin-jsonc": "^2.13.0",
"eslint-plugin-markdown": "^4.0.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-package-json": "^0.12.0",
"eslint-plugin-perfectionist": "^2.6.0",
"eslint-plugin-regexp": "^2.3.0",
"eslint-plugin-vitest": "^0.3.24",
"eslint-plugin-yml": "^1.12.2",
"husky": "^9.0.11",
"jsonc-eslint-parser": "^2.4.0",
"knip": "^5.0.0",
"lint-staged": "^15.2.0",
"knip": "^5.0.3",
"lint-staged": "^15.2.2",
"markdownlint": "^0.33.0",
"markdownlint-cli": "^0.39.0",
"npm-package-json-lint": "^7.1.0",
"npm-package-json-lint-config-default": "^6.0.0",
"prettier": "^3.1.1",
"prettier-plugin-curly": "^0.1.3",
"prettier-plugin-curly": "^0.2.1",
"prettier-plugin-packagejson": "^2.4.7",
"release-it": "^17.0.1",
"sentences-per-line": "^0.2.1",
"should-semantic-release": "^0.2.1",
"tsup": "^8.0.1",
"tsup": "^8.0.2",
"typedoc": "^0.24.8",
"typedoc-plugin-coverage": "^3.0.0",
"typedoc-plugin-custom-validation": "^1.1.1",
"typedoc-plugin-konamimojisplosion": "^0.0.2",
"typedoc-plugin-mdn-links": "^3.1.8",
"typedoc-plugin-versions": "^0.2.4",
"typescript": "^5.3.3",
"vitest": "^1.1.0",
"vitest": "^1.3.1",
"yaml-eslint-parser": "^1.2.2"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit 01d39d8

Please sign in to comment.