Skip to content

Commit f38728c

Browse files
committed
Merge branch 'main' into v8
2 parents 2a05336 + 6b92aa5 commit f38728c

File tree

133 files changed

+487
-1276
lines changed

Some content is hidden

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

133 files changed

+487
-1276
lines changed

.cspell.json

+12
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,18 @@
5353
"allowdefaultproject",
5454
"allowdefaultprojectforfiles",
5555
"ambiently",
56+
"Arka",
5657
"Armano",
5758
"astexplorer",
5859
"Astro",
5960
"ASTs",
61+
"Aubut",
6062
"autofix",
6163
"autofixers",
6264
"autofixes",
6365
"automations",
6466
"auvred",
67+
"Bachman",
6568
"backticks",
6669
"bigint",
6770
"bivariant",
@@ -71,6 +74,7 @@
7174
"camelcase",
7275
"canonicalize",
7376
"Cena",
77+
"Chaudhuri",
7478
"codebases",
7579
"Codecov",
7680
"contravariant",
@@ -81,6 +85,7 @@
8185
"destructures",
8286
"discoverability",
8387
"dprint",
88+
"dummypkg",
8489
"errored",
8590
"erroring",
8691
"ESLint",
@@ -92,6 +97,8 @@
9297
"extrafileextensions",
9398
"falsiness",
9499
"globby",
100+
"Hasegawa",
101+
"Huchedé",
95102
"IDE's",
96103
"ignoreconditionaltests",
97104
"IIFE",
@@ -104,6 +111,7 @@
104111
"markdownlint",
105112
"metastring",
106113
"multipass",
114+
"Nandi",
107115
"necroing",
108116
"nocheck",
109117
"noninteractive",
@@ -119,6 +127,7 @@
119127
"pluggable",
120128
"postprocess",
121129
"postprocessor",
130+
"Pratim",
122131
"preact",
123132
"Premade",
124133
"prettier's",
@@ -132,9 +141,11 @@
132141
"reimplement",
133142
"resync",
134143
"ROADMAP",
144+
"Rosenwasser",
135145
"ruleset",
136146
"rulesets",
137147
"serializers",
148+
"Sheetal",
138149
"Sourcegraph",
139150
"stringification",
140151
"stringifying",
@@ -161,6 +172,7 @@
161172
"useprojectservice",
162173
"Waiblinger",
163174
"warnonunsupportedtypescriptversion",
175+
"Yukihiro",
164176
"Zacher"
165177
],
166178
"overrides": [

.github/actions/breaking-pr-check/index.js

+22-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
// @ts-check
2+
/* eslint-disable jsdoc/no-types */
3+
14
const core = require('@actions/core');
25
const github = require('@actions/github');
36

4-
function raiseError(message) {
5-
throw new Error(message);
6-
}
7-
87
async function getPullRequest() {
9-
const client = github.getOctokit(process.env.GITHUB_TOKEN);
8+
const token = process.env.GITHUB_TOKEN;
9+
if (!token) {
10+
throw new Error(
11+
'The GITHUB_TOKEN environment variable is required to run this action.',
12+
);
13+
}
14+
const client = github.getOctokit(token);
1015

1116
const pr = github.context.payload.pull_request;
1217
if (!pr) {
@@ -27,27 +32,34 @@ async function getPullRequest() {
2732
return data;
2833
}
2934

35+
/**
36+
* @param {string} title The PR title to check
37+
*/
3038
function checkTitle(title) {
3139
if (/^[a-z]+(\([a-z-]+\))?!: /.test(title)) {
32-
raiseError(
40+
throw new Error(
3341
`Do not use exclamation mark ('!') to indicate breaking change in the PR Title.`,
3442
);
3543
}
3644
}
3745

46+
/**
47+
* @param {string} body The body of the PR
48+
* @param {any[]} labels The labels applied to the PR
49+
*/
3850
function checkDescription(body, labels) {
3951
if (!labels.some(label => label.name === 'breaking change')) {
4052
return;
4153
}
4254
const [firstLine, secondLine] = body.split(/\r?\n/);
4355

4456
if (!firstLine || !/^BREAKING CHANGE:/.test(firstLine)) {
45-
raiseError(
57+
throw new Error(
4658
`Breaking change PR body should start with "BREAKING CHANGE:". See https://typescript-eslint.io/maintenance/releases#2-merging-breaking-changes.`,
4759
);
4860
}
4961
if (!secondLine) {
50-
raiseError(
62+
throw new Error(
5163
`The description of breaking change is missing. See https://typescript-eslint.io/maintenance/releases#2-merging-breaking-changes.`,
5264
);
5365
}
@@ -57,8 +69,8 @@ async function run() {
5769
const pullRequest = await getPullRequest();
5870
try {
5971
checkTitle(pullRequest.title);
60-
checkDescription(pullRequest.body, pullRequest.labels);
61-
} catch (e) {
72+
checkDescription(pullRequest.body ?? '', pullRequest.labels);
73+
} catch (/** @type {any} */ e) {
6274
core.setFailed(e.message);
6375
}
6476
}

.github/actions/wait-for-netlify/action.yml

-15
This file was deleted.

.github/actions/wait-for-netlify/index.js

-108
This file was deleted.

.github/workflows/ci.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ jobs:
171171
'eslint-plugin',
172172
'eslint-plugin-internal',
173173
'parser',
174-
'repo-tools',
175174
'rule-schema-to-typescript-types',
176175
'scope-manager',
177176
'type-utils',
@@ -292,7 +291,7 @@ jobs:
292291
uses: ./.github/actions/prepare-build
293292

294293
- name: Figure out and apply the next canary version
295-
run: npx nx run repo-tools:apply-canary-version
294+
run: npx tsx tools/release/apply-canary-version.mts
296295

297296
- name: Publish all packages to npm with the canary tag
298297
# NOTE: this needs to be npx, rather than yarn, to make sure the authenticated npm registry is used
@@ -325,7 +324,7 @@ jobs:
325324
uses: ./.github/actions/prepare-build
326325

327326
- name: Figure out and apply the next canary version
328-
run: OVERRIDE_MAJOR_VERSION=8 npx nx run repo-tools:apply-canary-version
327+
run: OVERRIDE_MAJOR_VERSION=8 npx tsx tools/release/apply-canary-version.mts
329328

330329
- name: Publish all packages to npm with the canary tag
331330
# NOTE: this needs to be npx, rather than yarn, to make sure the authenticated npm registry is used

eslint.config.mjs

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export default tseslint.config(
2727
// register all of the plugins up-front
2828
{
2929
// note - intentionally uses computed syntax to make it easy to sort the keys
30+
/* eslint-disable no-useless-computed-key */
3031
plugins: {
3132
['@typescript-eslint']: tseslint.plugin,
3233
['@typescript-eslint/internal']: tseslintInternalPlugin,
@@ -47,6 +48,7 @@ export default tseslint.config(
4748
['simple-import-sort']: simpleImportSortPlugin,
4849
['unicorn']: unicornPlugin,
4950
},
51+
/* eslint-enable no-useless-computed-key */
5052
},
5153
{
5254
// config with just ignores is the replacement for `.eslintignore`
@@ -59,6 +61,8 @@ export default tseslint.config(
5961
'**/__snapshots__/**',
6062
'**/.docusaurus/**',
6163
'**/build/**',
64+
'.nx/*',
65+
'.yarn/*',
6266
// Files copied as part of the build
6367
'packages/types/src/generated/**/*.ts',
6468
// Playground types downloaded from the web
@@ -411,7 +415,6 @@ export default tseslint.config(
411415
files: [
412416
'**/tools/**/*.{ts,tsx,cts,mts}',
413417
'**/tests/**/*.{ts,tsx,cts,mts}',
414-
'packages/repo-tools/**/*.{ts,tsx,cts,mts}',
415418
'packages/integration-tests/**/*.{ts,tsx,cts,mts}',
416419
],
417420
rules: {

knip.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { KnipConfig } from 'knip';
1+
import type { KnipConfig } from 'knip' with { 'resolution-mode': 'import' };
22

33
export default {
44
rules: {
@@ -20,18 +20,14 @@ export default {
2020
'@babel/parser',
2121
'@babel/types',
2222
'@nx/workspace',
23-
'cross-fetch',
2423
'glob',
2524
'husky',
2625
'jest-specific-snapshot',
2726
'make-dir',
2827
'ncp',
2928
'tmp',
30-
31-
// imported in eslint.config.js
32-
'@typescript-eslint/utils',
3329
],
34-
entry: ['tools/release/changelog-renderer.js'],
30+
entry: ['tools/release/changelog-renderer.js', 'tools/scripts/**/*.mts'],
3531
ignoreBinaries: [
3632
// https://github.com/webpro/knip/issues/433
3733
'stylelint',

nx.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "./node_modules/nx/schemas/nx-schema.json",
33
"nxCloudAccessToken": "YjIzMmMxMWItMjhiMS00NWY2LTk1NWYtYWU3YWQ0YjE4YjBlfHJlYWQ=",
44
"release": {
5-
"projects": ["*"],
5+
"projects": ["*", "!repo"],
66
"changelog": {
77
"workspaceChangelog": {
88
"createRelease": "github",

0 commit comments

Comments
 (0)