Skip to content

Commit 97346e1

Browse files
authoredJul 10, 2024··
fix: refresh tooling with create-typescript-app@1.62 (#574)
## PR Checklist - [x] Addresses an existing open issue: fixes #531 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/console-fail-test/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/console-fail-test/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Runs `npx create-typescript-app --auto --mode migrate`. Also runs an `ncu -u` for everything (except `eslint`, as `typescript-eslint` doesn't support ESLint v9 in stable yet). This doesn't actually change build settings directly. But I'm betting that getting all build-related packages up-to-date will resolve any build oddities.
1 parent 3bc0eff commit 97346e1

22 files changed

+836
-2124
lines changed
 

‎.all-contributorsrc

+49-66
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,51 @@
11
{
2-
"badgeTemplate": "<img alt=\"All Contributors: <%= contributors.length %> 👪\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_👪-21bb42.svg\" />",
3-
"commit": false,
4-
"commitConvention": "angular",
5-
"contributors": [
6-
{
7-
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
8-
"contributions": [
9-
"tool",
10-
"code",
11-
"maintenance",
12-
"infra",
13-
"ideas"
14-
],
15-
"login": "JoshuaKGoldberg",
16-
"name": "Josh Goldberg",
17-
"profile": "http://www.joshuakgoldberg.com"
18-
},
19-
{
20-
"login": "kopax-polyconseil",
21-
"name": "Dimitri Kopriwa",
22-
"avatar_url": "https://avatars.githubusercontent.com/u/77674046?v=4",
23-
"profile": "https://www.kop.ax/",
24-
"contributions": [
25-
"code"
26-
]
27-
},
28-
{
29-
"login": "mackenco",
30-
"name": "Colin MacKenzie",
31-
"avatar_url": "https://avatars.githubusercontent.com/u/4284340?v=4",
32-
"profile": "https://github.com/mackenco",
33-
"contributions": [
34-
"code",
35-
"ideas"
36-
]
37-
},
38-
{
39-
"login": "sosukesuzuki",
40-
"name": "SUZUKI Sosuke",
41-
"avatar_url": "https://avatars.githubusercontent.com/u/14838850?v=4",
42-
"profile": "https://github.com/sosukesuzuki",
43-
"contributions": [
44-
"code"
45-
]
46-
},
47-
{
48-
"login": "joel-daros",
49-
"name": "Joel",
50-
"avatar_url": "https://avatars.githubusercontent.com/u/992049?v=4",
51-
"profile": "https://www.linkedin.com/in/joel-darós-95536a21/?locale=en_US",
52-
"contributions": [
53-
"ideas"
54-
]
55-
}
56-
],
57-
"contributorsPerLine": 7,
58-
"contributorsSortAlphabetically": true,
59-
"files": [
60-
"README.md"
61-
],
62-
"imageSize": 100,
63-
"projectName": "console-fail-test",
64-
"projectOwner": "JoshuaKGoldberg",
65-
"repoHost": "https://github.com",
66-
"repoType": "github",
67-
"commitType": "docs"
2+
"badgeTemplate": "<img alt=\"All Contributors: <%= contributors.length %> 👪\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_👪-21bb42.svg\" />",
3+
"commit": false,
4+
"commitConvention": "angular",
5+
"contributors": [
6+
{
7+
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
8+
"contributions": ["tool", "code", "maintenance", "infra", "ideas"],
9+
"login": "JoshuaKGoldberg",
10+
"name": "Josh Goldberg",
11+
"profile": "http://www.joshuakgoldberg.com"
12+
},
13+
{
14+
"login": "kopax-polyconseil",
15+
"name": "Dimitri Kopriwa",
16+
"avatar_url": "https://avatars.githubusercontent.com/u/77674046?v=4",
17+
"profile": "https://www.kop.ax/",
18+
"contributions": ["code"]
19+
},
20+
{
21+
"login": "mackenco",
22+
"name": "Colin MacKenzie",
23+
"avatar_url": "https://avatars.githubusercontent.com/u/4284340?v=4",
24+
"profile": "https://github.com/mackenco",
25+
"contributions": ["code", "ideas"]
26+
},
27+
{
28+
"login": "sosukesuzuki",
29+
"name": "SUZUKI Sosuke",
30+
"avatar_url": "https://avatars.githubusercontent.com/u/14838850?v=4",
31+
"profile": "https://github.com/sosukesuzuki",
32+
"contributions": ["code"]
33+
},
34+
{
35+
"login": "joel-daros",
36+
"name": "Joel",
37+
"avatar_url": "https://avatars.githubusercontent.com/u/992049?v=4",
38+
"profile": "https://www.linkedin.com/in/joel-darós-95536a21/?locale=en_US",
39+
"contributions": ["ideas"]
40+
}
41+
],
42+
"contributorsPerLine": 7,
43+
"contributorsSortAlphabetically": true,
44+
"files": ["README.md"],
45+
"imageSize": 100,
46+
"projectName": "console-fail-test",
47+
"projectOwner": "JoshuaKGoldberg",
48+
"repoHost": "https://github.com",
49+
"repoType": "github",
50+
"commitType": "docs"
6851
}

‎.eslintignore

-5
This file was deleted.

‎.eslintrc.cjs

-183
This file was deleted.

‎.github/DEVELOPMENT.md

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Each should be shown in VS Code, and can be run manually on the command-line:
4444
- `pnpm lint` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files
4545
- `pnpm lint:knip` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports
4646
- `pnpm lint:md` ([Markdownlint](https://github.com/DavidAnson/markdownlint)): Checks Markdown source files
47-
- `pnpm lint:package-json` ([npm-package-json-lint](https://npmpackagejsonlint.org/)): Lints the `package.json` file
4847
- `pnpm lint:packages` ([pnpm dedupe --check](https://pnpm.io/cli/dedupe)): Checks for unnecessarily duplicated packages in the `pnpm-lock.yml` file
4948
- `pnpm lint:spelling` ([cspell](https://cspell.org)): Spell checks across all source files
5049

‎.github/ISSUE_TEMPLATE/03-feature.yml

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ body:
33
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
44
label: Bug Report Checklist
55
options:
6-
- label: I have tried restarting my IDE and the issue persists.
7-
required: true
86
- label: I have pulled the latest `main` branch of the repository.
97
required: true
108
- label: I have [searched for related issues](https://github.com/JoshuaKGoldberg/console-fail-test/issues?q=is%3Aissue) and found none that matched my issue.

‎.github/actions/prepare/action.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ name: Prepare
55
runs:
66
steps:
77
- uses: pnpm/action-setup@v2
8+
with:
9+
version: 9
810
- uses: actions/setup-node@v4
911
with:
1012
cache: pnpm
11-
node-version: "18"
13+
node-version: "20"
1214
- run: pnpm install --frozen-lockfile
1315
shell: bash
1416
using: composite

‎.github/renovate.json

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"automerge": true,
4+
"extends": ["config:best-practices", "replacements:all"],
5+
"ignoreDeps": ["codecov/codecov-action"],
46
"internalChecksFilter": "strict",
57
"labels": ["dependencies"],
68
"minimumReleaseAge": "3 days",

‎.github/workflows/accessibility-alt-text-bot.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
jobs:
22
accessibility_alt_text_bot:
3+
if: ${{ !endsWith(github.actor, '[bot]') }}
34
runs-on: ubuntu-latest
45
steps:
56
- uses: github/accessibility-alt-text-bot@v1.5.0

‎.github/workflows/lint-package-json.yml

-15
This file was deleted.

‎.npmpackagejsonlintrc.json

-4
This file was deleted.

‎.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.all-contributorsrc
2+
.husky/
23
coverage/
34
lib/
45
pnpm-lock.yaml

‎.prettierrc.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "http://json.schemastore.org/prettierrc",
3+
"overrides": [{ "files": ".nvmrc", "options": { "parser": "yaml" } }],
4+
"plugins": [
5+
"prettier-plugin-curly",
6+
"prettier-plugin-sh",
7+
"prettier-plugin-packagejson"
8+
],
9+
"useTabs": true
10+
}

‎.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"editor.codeActionsOnSave": { "source.fixAll.eslint": true },
2+
"editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" },
33
"editor.defaultFormatter": "esbenp.prettier-vscode",
44
"editor.formatOnSave": true,
55
"editor.rulers": [80],
@@ -14,5 +14,6 @@
1414
"yaml"
1515
],
1616
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
17+
"eslint.useFlatConfig": true,
1718
"typescript.tsdk": "node_modules/typescript/lib"
1819
}

‎.vscode/tasks.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"tasks": [
3+
{
4+
"detail": "Build the project",
5+
"label": "build",
6+
"script": "build",
7+
"type": "npm"
8+
}
9+
],
10+
"version": "2.0.0"
11+
}

‎cspell.json

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"packagejson",
2323
"quickstart",
2424
"whoopsies",
25+
"tseslint",
2526
"tsup",
2627
"wontfix"
2728
]

‎eslint.config.js

+151
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
import eslint from "@eslint/js";
2+
import comments from "@eslint-community/eslint-plugin-eslint-comments/configs";
3+
import jsdoc from "eslint-plugin-jsdoc";
4+
import jsonc from "eslint-plugin-jsonc";
5+
import markdown from "eslint-plugin-markdown";
6+
import n from "eslint-plugin-n";
7+
import packageJson from "eslint-plugin-package-json/configs/recommended";
8+
import perfectionistNatural from "eslint-plugin-perfectionist/configs/recommended-natural";
9+
import * as regexp from "eslint-plugin-regexp";
10+
import vitest from "eslint-plugin-vitest";
11+
import yml from "eslint-plugin-yml";
12+
import tseslint from "typescript-eslint";
13+
14+
export default tseslint.config(
15+
{
16+
ignores: [
17+
"coverage*",
18+
"lib",
19+
"node_modules",
20+
"pnpm-lock.yaml",
21+
"**/*.snap",
22+
],
23+
},
24+
{
25+
linterOptions: {
26+
reportUnusedDisableDirectives: "error",
27+
},
28+
},
29+
eslint.configs.recommended,
30+
...jsonc.configs["flat/recommended-with-json"],
31+
...markdown.configs.recommended,
32+
...yml.configs["flat/recommended"],
33+
...yml.configs["flat/prettier"],
34+
comments.recommended,
35+
jsdoc.configs["flat/recommended-typescript-error"],
36+
n.configs["flat/recommended"],
37+
packageJson,
38+
perfectionistNatural,
39+
regexp.configs["flat/recommended"],
40+
...tseslint.config({
41+
extends: [
42+
...tseslint.configs.strictTypeChecked,
43+
...tseslint.configs.stylisticTypeChecked,
44+
],
45+
files: ["**/*.js", "**/*.ts"],
46+
languageOptions: {
47+
parserOptions: {
48+
EXPERIMENTAL_useProjectService: {
49+
allowDefaultProjectForFiles: ["./*.*s", "eslint.config.js"],
50+
defaultProject: "./tsconfig.json",
51+
},
52+
},
53+
},
54+
rules: {
55+
// TODO: Eventually, it'd be nice to enable these...
56+
"@typescript-eslint/ban-types": "off",
57+
"@typescript-eslint/no-confusing-void-expression": "off",
58+
"@typescript-eslint/no-explicit-any": "off",
59+
"@typescript-eslint/no-non-null-assertion": "off",
60+
"@typescript-eslint/no-redundant-type-constituents": "off",
61+
"@typescript-eslint/no-unsafe-assignment": "off",
62+
"@typescript-eslint/no-unsafe-call": "off",
63+
"@typescript-eslint/no-unsafe-member-access": "off",
64+
"@typescript-eslint/no-unsafe-return": "off",
65+
"@typescript-eslint/restrict-template-expressions": "off",
66+
"@typescript-eslint/unbound-method": "off",
67+
68+
// These off-by-default rules work well for this repo and we like them on.
69+
"jsdoc/informative-docs": "error",
70+
"logical-assignment-operators": [
71+
"error",
72+
"always",
73+
{ enforceForIfStatements: true },
74+
],
75+
"operator-assignment": "error",
76+
77+
// These on-by-default rules don't work well for this repo and we like them off.
78+
"@typescript-eslint/no-var-requires": "off",
79+
"jsdoc/require-jsdoc": "off",
80+
"jsdoc/require-param": "off",
81+
"jsdoc/require-property": "off",
82+
"jsdoc/require-returns": "off",
83+
"n/no-missing-require": "off",
84+
"no-constant-condition": "off",
85+
86+
// These on-by-default rules work well for this repo if configured
87+
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],
88+
"perfectionist/sort-objects": [
89+
"error",
90+
{
91+
order: "asc",
92+
"partition-by-comment": true,
93+
type: "natural",
94+
},
95+
],
96+
97+
// Stylistic concerns that don't interfere with Prettier
98+
"no-useless-rename": "error",
99+
"object-shorthand": "error",
100+
},
101+
}),
102+
{
103+
files: ["*.jsonc"],
104+
rules: {
105+
"jsonc/comma-dangle": "off",
106+
"jsonc/no-comments": "off",
107+
"jsonc/sort-keys": "error",
108+
},
109+
},
110+
{
111+
extends: [tseslint.configs.disableTypeChecked],
112+
files: ["**/*.md/*.*s"],
113+
rules: {
114+
"n/no-missing-import": ["error", { allowModules: ["console-fail-test"] }],
115+
},
116+
},
117+
{
118+
files: ["**/*.test.*"],
119+
languageOptions: {
120+
globals: vitest.environments.env.globals,
121+
},
122+
plugins: { vitest },
123+
rules: {
124+
...vitest.configs.recommended.rules,
125+
126+
// These on-by-default rules aren't useful in test files.
127+
"@typescript-eslint/no-unsafe-assignment": "off",
128+
"@typescript-eslint/no-unsafe-call": "off",
129+
},
130+
},
131+
{
132+
files: ["**/*.{yml,yaml}"],
133+
rules: {
134+
"yml/file-extension": ["error", { extension: "yml" }],
135+
"yml/sort-keys": [
136+
"error",
137+
{
138+
order: { type: "asc" },
139+
pathPattern: "^.*$",
140+
},
141+
],
142+
"yml/sort-sequence-values": [
143+
"error",
144+
{
145+
order: { type: "asc" },
146+
pathPattern: "^.*$",
147+
},
148+
],
149+
},
150+
},
151+
);

‎knip.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://unpkg.com/knip@latest/schema.json",
3+
"entry": ["src/index.ts!"],
4+
"ignoreExportsUsedInFile": { "interface": true, "type": true },
5+
"project": ["src/**/*.ts!"]
6+
}

‎knip.jsonc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"$schema": "https://unpkg.com/knip@latest/schema.json",
33
"entry": ["src/cft.ts!", "src/index.ts!"],
44
"ignoreExportsUsedInFile": { "interface": true, "type": true },
5-
"project": ["src/**/*.ts!"]
5+
"project": ["src/**/*.ts!"],
66
}

‎package.json

+31-34
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"name": "JoshuaKGoldberg",
1212
"email": "npm@joshuakgoldberg.com"
1313
},
14-
"type": "commonjs",
14+
"type": "module",
1515
"exports": {
1616
".": {
1717
"types": {
@@ -31,14 +31,13 @@
3131
],
3232
"scripts": {
3333
"build": "tsup",
34-
"format": "prettier \"**/*\" --ignore-unknown",
35-
"lint": "eslint . .*js --max-warnings 0 --report-unused-disable-directives",
34+
"format": "prettier .",
35+
"lint": "eslint . --max-warnings 0",
3636
"lint:knip": "knip",
3737
"lint:md": "markdownlint \"**/*.md\" \".github/**/*.md\" --rules sentences-per-line",
38-
"lint:package-json": "npmPkgJsonLint .",
3938
"lint:packages": "pnpm dedupe --check",
4039
"lint:spelling": "cspell \"**\" \".github/**/*\"",
41-
"prepare": "husky install",
40+
"prepare": "husky",
4241
"should-semantic-release": "should-semantic-release --verbose",
4342
"test": "vitest",
4443
"tsc": "tsc"
@@ -47,42 +46,40 @@
4746
"*": "prettier --ignore-unknown --write"
4847
},
4948
"devDependencies": {
49+
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
50+
"@eslint/js": "^9.6.0",
5051
"@release-it/conventional-changelog": "^8.0.1",
51-
"@types/eslint": "^8.44.7",
52-
"@typescript-eslint/eslint-plugin": "^7.0.0",
53-
"@typescript-eslint/parser": "^7.0.0",
54-
"@vitest/coverage-v8": "1.6.0",
55-
"cspell": "^8.0.0",
52+
"@types/eslint-plugin-markdown": "^2.0.2",
53+
"@types/eslint__js": "^8.42.3",
54+
"@vitest/coverage-v8": "2.0.1",
55+
"cspell": "^8.10.4",
5656
"eslint": "^8.53.0",
57-
"eslint-plugin-deprecation": "^3.0.0",
58-
"eslint-plugin-eslint-comments": "^3.2.0",
59-
"eslint-plugin-jsdoc": "^48.0.0",
60-
"eslint-plugin-jsonc": "^2.10.0",
61-
"eslint-plugin-markdown": "^3.0.1",
62-
"eslint-plugin-n": "^17.0.0",
63-
"eslint-plugin-no-only-tests": "^3.1.0",
64-
"eslint-plugin-perfectionist": "^2.3.0",
65-
"eslint-plugin-regexp": "^2.1.1",
66-
"eslint-plugin-vitest": "^0.4.0",
67-
"eslint-plugin-yml": "^1.10.0",
68-
"husky": "^9.0.0",
57+
"eslint-plugin-jsdoc": "^48.6.0",
58+
"eslint-plugin-jsonc": "^2.16.0",
59+
"eslint-plugin-markdown": "^5.0.0",
60+
"eslint-plugin-n": "^17.9.0",
61+
"eslint-plugin-package-json": "^0.15.0",
62+
"eslint-plugin-perfectionist": "^2.11.0",
63+
"eslint-plugin-regexp": "^2.6.0",
64+
"eslint-plugin-vitest": "^0.5.4",
65+
"eslint-plugin-yml": "^1.14.0",
66+
"husky": "^9.0.11",
6967
"jsonc-eslint-parser": "^2.4.0",
70-
"knip": "^5.0.0",
71-
"lint-staged": "^15.1.0",
68+
"knip": "^5.25.1",
69+
"lint-staged": "^15.2.7",
7270
"markdownlint": "^0.34.0",
7371
"markdownlint-cli": "^0.41.0",
74-
"npm-package-json-lint": "^8.0.0",
75-
"npm-package-json-lint-config-default": "^7.0.0",
76-
"prettier": "^3.0.3",
77-
"prettier-plugin-curly": "^0.2.0",
78-
"prettier-plugin-packagejson": "^2.4.6",
79-
"release-it": "^17.0.0",
72+
"prettier": "^3.3.2",
73+
"prettier-plugin-curly": "^0.2.1",
74+
"prettier-plugin-packagejson": "^2.5.0",
75+
"prettier-plugin-sh": "^0.14.0",
76+
"release-it": "^17.5.0",
8077
"sentences-per-line": "^0.2.1",
8178
"should-semantic-release": "^0.3.0",
82-
"tsup": "^8.0.0",
83-
"typescript": "^5.2.2",
84-
"vitest": "^1.0.0",
85-
"yaml-eslint-parser": "^1.2.2"
79+
"tsup": "^8.1.0",
80+
"typescript": "^5.5.3",
81+
"typescript-eslint": "^7.16.0",
82+
"vitest": "^2.0.1"
8683
},
8784
"packageManager": "pnpm@9.4.0",
8885
"engines": {

‎pnpm-lock.yaml

+563-1,807
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/environments/ava.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ declare interface Ava {
88
meta: {
99
file: string;
1010
};
11-
serial: Function & {
11+
serial: {
1212
cb: Function;
13-
};
13+
} & Function;
1414
}
1515

1616
const isAva = (testFramework: unknown): testFramework is Ava => {

‎src/spies/sinon.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { SpyCallArgs, SpyFactory, SpyFactoryGetter } from "./spyTypes.js";
22

3-
type SinonSpy = Function & {
3+
type SinonSpy = {
44
getCalls(): SpyCallArgs[];
55
restore(): void;
6-
};
6+
} & Function;
77

88
declare interface Sinon {
99
spy(callback: Function): SinonSpy;

0 commit comments

Comments
 (0)
Please sign in to comment.