Skip to content

Commit 16f76cf

Browse files
feat: onboard to create-typescript-app with pnpm support (#1435)
## PR Checklist - [x] Addresses an existing issue: fixes #1318 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/TypeStat/labels/status%3A%20accepting%20prs) ## Overview In preparation for a full monorepo migration and rename (#1314), this migrates as-is to `create-typescript-app`. That way I can get all these rote changes (more linting, tabs, etc.) out of the way before making the big jump to a monorepo & separate packages. As part of this, adds a fix for pnpm's `node_modules/` symlink resolution: 1e989a7 Replaces the `mz` runtime dependency with `node:fs` and `node:fs/promises` uses. 💖
1 parent 5031b2e commit 16f76cf

File tree

467 files changed

+20765
-17423
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

467 files changed

+20765
-17423
lines changed

.all-contributorsrc

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"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>",
3+
"commit": false,
4+
"commitConvention": "angular",
5+
"commitType": "docs",
6+
"contributors": [
7+
{
8+
"login": "beyang",
9+
"name": "Beyang Liu",
10+
"avatar_url": "https://avatars.githubusercontent.com/u/1646931?v=4",
11+
"profile": "https://sourcegraph.com/",
12+
"contributions": ["code"]
13+
},
14+
{
15+
"login": "bitsnaps",
16+
"name": "Ibrahim H.",
17+
"avatar_url": "https://avatars.githubusercontent.com/u/1217741?v=4",
18+
"profile": "https://stackoverflow.com/users/5494094/ibrahim-h",
19+
"contributions": ["code"]
20+
},
21+
{
22+
"login": "danstiner",
23+
"name": "Daniel Stiner",
24+
"avatar_url": "https://avatars.githubusercontent.com/u/52513?v=4",
25+
"profile": "https://danstiner.me/",
26+
"contributions": ["bug"]
27+
},
28+
{
29+
"login": "emday4prez",
30+
"name": "Emerson",
31+
"avatar_url": "https://avatars.githubusercontent.com/u/35363144?v=4",
32+
"profile": "https://github.com/emday4prez",
33+
"contributions": ["code"]
34+
},
35+
{
36+
"login": "ghost",
37+
"name": "Deleted user",
38+
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
39+
"profile": "https://github.com/ghost",
40+
"contributions": ["maintenance"]
41+
},
42+
{
43+
"login": "girishsontakke",
44+
"name": "Girish Sontakke",
45+
"avatar_url": "https://avatars.githubusercontent.com/u/61848210?v=4",
46+
"profile": "https://girish.netlify.app/",
47+
"contributions": ["code"]
48+
},
49+
{
50+
"login": "gutenye",
51+
"name": "Guten",
52+
"avatar_url": "https://avatars.githubusercontent.com/u/377544?v=4",
53+
"profile": "https://maps.guten.me/",
54+
"contributions": ["bug"]
55+
},
56+
{
57+
"login": "JoshuaKGoldberg",
58+
"name": "Josh Goldberg ✨",
59+
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
60+
"profile": "http://www.joshuakgoldberg.com/",
61+
"contributions": ["maintenance", "bug", "tool", "code", "infra", "doc"]
62+
},
63+
{
64+
"login": "markjm",
65+
"name": "Mark Molinaro",
66+
"avatar_url": "https://avatars.githubusercontent.com/u/16494982?v=4",
67+
"profile": "https://www.linkedin.com/in/markjm-1/",
68+
"contributions": ["bug", "code"]
69+
},
70+
{
71+
"login": "micrology",
72+
"name": "Nigel Gilbert",
73+
"avatar_url": "https://avatars.githubusercontent.com/u/1449986?v=4",
74+
"profile": "https://cress.soc.surrey.ac.uk/web/people/ngilbert",
75+
"contributions": ["bug"]
76+
},
77+
{
78+
"login": "orionna319",
79+
"name": "orionna319",
80+
"avatar_url": "https://avatars.githubusercontent.com/u/85230052?v=4",
81+
"profile": "https://orionna.me/",
82+
"contributions": ["bug"]
83+
}
84+
],
85+
"contributorsPerLine": 7,
86+
"contributorsSortAlphabetically": true,
87+
"files": ["README.md"],
88+
"imageSize": 100,
89+
"projectName": "TypeStat",
90+
"projectOwner": "JoshuaKGoldberg",
91+
"repoHost": "https://github.com",
92+
"repoType": "github"
93+
}

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.cjs

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
/** @type {import("@types/eslint").Linter.Config} */
2+
module.exports = {
3+
env: {
4+
es2022: true,
5+
node: true,
6+
},
7+
extends: [
8+
"eslint:recommended",
9+
"plugin:eslint-comments/recommended",
10+
"plugin:n/recommended",
11+
"plugin:perfectionist/recommended-natural",
12+
"plugin:regexp/recommended",
13+
"plugin:vitest/recommended",
14+
],
15+
ignorePatterns: [
16+
"!.*",
17+
"coverage",
18+
"lib",
19+
"node_modules",
20+
"test/cases",
21+
"pnpm-lock.yaml",
22+
],
23+
overrides: [
24+
{
25+
extends: ["plugin:markdown/recommended-legacy"],
26+
files: ["**/*.md"],
27+
processor: "markdown/markdown",
28+
},
29+
{
30+
extends: [
31+
"plugin:jsdoc/recommended-typescript-error",
32+
"plugin:@typescript-eslint/strict",
33+
"plugin:@typescript-eslint/stylistic",
34+
],
35+
files: ["**/*.ts"],
36+
parser: "@typescript-eslint/parser",
37+
rules: {
38+
// These off-by-default rules work well for this repo and we like them on.
39+
"jsdoc/informative-docs": "error",
40+
"logical-assignment-operators": [
41+
"error",
42+
"always",
43+
{ enforceForIfStatements: true },
44+
],
45+
"operator-assignment": "error",
46+
47+
// These on-by-default rules don't work well for this repo and we like them off.
48+
"jsdoc/require-jsdoc": "off",
49+
"jsdoc/require-param": "off",
50+
"jsdoc/require-property": "off",
51+
"jsdoc/require-returns": "off",
52+
"no-undef": "error",
53+
},
54+
},
55+
{
56+
files: "**/*.md/*.ts",
57+
rules: {
58+
"n/no-missing-import": ["error", { allowModules: ["TypeStat"] }],
59+
},
60+
},
61+
{
62+
excludedFiles: ["**/*.md/*.ts"],
63+
extends: [
64+
"plugin:@typescript-eslint/strict-type-checked",
65+
"plugin:@typescript-eslint/stylistic-type-checked",
66+
],
67+
files: ["**/*.ts"],
68+
parser: "@typescript-eslint/parser",
69+
parserOptions: {
70+
project: "./tsconfig.eslint.json",
71+
},
72+
rules: {
73+
// These off-by-default rules work well for this repo and we like them on.
74+
"deprecation/deprecation": "error",
75+
76+
// These too-strict-by-default rules work well for this repo, once configured.
77+
"@typescript-eslint/restrict-template-expressions": [
78+
"error",
79+
{
80+
allowNumber: true,
81+
},
82+
],
83+
},
84+
},
85+
{
86+
excludedFiles: ["package.json"],
87+
extends: ["plugin:jsonc/recommended-with-json"],
88+
files: ["*.json", "*.jsonc"],
89+
parser: "jsonc-eslint-parser",
90+
rules: {
91+
"jsonc/comma-dangle": "off",
92+
"jsonc/sort-keys": "error",
93+
},
94+
},
95+
{
96+
files: ["*.jsonc"],
97+
rules: {
98+
"jsonc/no-comments": "off",
99+
},
100+
},
101+
{
102+
extends: ["plugin:package-json/recommended"],
103+
files: ["package.json"],
104+
parser: "jsonc-eslint-parser",
105+
plugins: ["package-json"],
106+
},
107+
{
108+
files: "**/*.test.ts",
109+
rules: {
110+
// These on-by-default rules aren't useful in test files.
111+
"@typescript-eslint/no-unsafe-assignment": "off",
112+
"@typescript-eslint/no-unsafe-call": "off",
113+
},
114+
},
115+
{
116+
extends: ["plugin:yml/standard", "plugin:yml/prettier"],
117+
files: ["**/*.{yml,yaml}"],
118+
parser: "yaml-eslint-parser",
119+
rules: {
120+
"yml/file-extension": ["error", { extension: "yml" }],
121+
"yml/sort-keys": [
122+
"error",
123+
{
124+
order: { type: "asc" },
125+
pathPattern: "^.*$",
126+
},
127+
],
128+
"yml/sort-sequence-values": [
129+
"error",
130+
{
131+
order: { type: "asc" },
132+
pathPattern: "^.*$",
133+
},
134+
],
135+
},
136+
},
137+
],
138+
parser: "@typescript-eslint/parser",
139+
plugins: [
140+
"@typescript-eslint",
141+
"deprecation",
142+
"jsdoc",
143+
"perfectionist",
144+
"regexp",
145+
"vitest",
146+
],
147+
reportUnusedDisableDirectives: true,
148+
root: true,
149+
rules: {
150+
// These off/less-strict-by-default rules work well for this repo and we like them on.
151+
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],
152+
"no-undef": "off",
153+
154+
// These on-by-default rules don't work well for this repo and we like them off.
155+
"no-case-declarations": "off",
156+
"no-constant-condition": "off",
157+
"no-inner-declarations": "off",
158+
"no-mixed-spaces-and-tabs": "off",
159+
160+
// Stylistic concerns that don't interfere with Prettier
161+
"@typescript-eslint/padding-line-between-statements": [
162+
"error",
163+
{ blankLine: "always", next: "*", prev: "block-like" },
164+
],
165+
"no-useless-rename": "error",
166+
"object-shorthand": "error",
167+
"perfectionist/sort-objects": [
168+
"error",
169+
{
170+
order: "asc",
171+
"partition-by-comment": true,
172+
type: "natural",
173+
},
174+
],
175+
},
176+
};

.eslintrc.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)