Skip to content

Commit

Permalink
Merge branch 'main' of github.com:abrahamguo/typescript-eslint into l…
Browse files Browse the repository at this point in the history
…int-top-level
  • Loading branch information
abrahamguo committed Apr 10, 2024
2 parents 6ac4c2d + 2db8f4e commit 57bed67
Show file tree
Hide file tree
Showing 71 changed files with 2,483 additions and 1,280 deletions.
2 changes: 2 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"IIFEs",
"jameshenry",
"joshuakgoldberg",
"kirkwaiblinger",
"linebreaks",
"lzstring",
"markdownlint",
Expand Down Expand Up @@ -149,6 +150,7 @@
"unoptimized",
"unprefixed",
"upsert",
"Waiblinger",
"warnonunsupportedtypescriptversion",
"Zacher"
],
Expand Down
8 changes: 5 additions & 3 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
'globby',
// this dep is now ESM only
'execa',
// Some kind of weird caching issue:
// https://github.com/typescript-eslint/typescript-eslint/issues/6230
'ts-node',
// the nx packages get updated using the nx migrate CLI
'@nrwl/cli',
'@nx/cli',
Expand Down Expand Up @@ -83,6 +80,11 @@
matchPackagePrefixes: ['@eslint'],
groupName: 'eslint',
},
{
matchPackageNames: ['stylelint'],
matchPackagePrefixes: ['@stylelint'],
groupName: 'stylelint',
},
],
postUpdateOptions: [
// run yarn dedupe to cleanup the lockfile after updates
Expand Down
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
yarnPath: .yarn/releases/yarn-3.8.1.cjs
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'

yarnPath: .yarn/releases/yarn-3.8.1.cjs
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## 7.6.0 (2024-04-08)


### 🚀 Features

- add `name` field to shared configs and flat config types ([#8863](https://github.com/typescript-eslint/typescript-eslint/pull/8863))
- bump npm dependency ranges ([#8860](https://github.com/typescript-eslint/typescript-eslint/pull/8860))
- **utils:** add types for both flat and legacy eslint classes ([#8861](https://github.com/typescript-eslint/typescript-eslint/pull/8861))

### 🩹 Fixes

- **typescript-eslint:** fix type errors when using `exactOptionalPropertyTypes` ([#8786](https://github.com/typescript-eslint/typescript-eslint/pull/8786))

### ❤️ Thank You

- Abraham Guo
- auvred @auvred
- Brad Zacher @bradzacher

You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.

## 7.5.0 (2024-04-01)


Expand Down
5 changes: 5 additions & 0 deletions docs/maintenance/Team.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ TypeScript linting experience great.
name: 'auvred',
username: 'auvred',
},
{
description: 'Dotting my "j"s and crossing my "z"s.',
name: 'Kirk Waiblinger',
username: 'kirkwaiblinger',
},
]}
description="Code committers who regularly work on the code in the repository."
explanation="Committers triage issues, review pull requests, and write code to push the project's functionality and stability forward."
Expand Down
61 changes: 54 additions & 7 deletions docs/maintenance/pull-requests/Dependency_Version_Upgrades.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,54 @@ id: dependency-version-upgrades
title: Dependency Version Upgrades
---

## Babel
## Renovate

We rely on [renovate bot](https://github.com/renovatebot/renovate/) to automatically raise PRs to update our dependencies using [this configuration](https://github.com/typescript-eslint/typescript-eslint/blob/main/.github/renovate.json5).

### Dependency Dashboard

Renovate is configured to manage a [dependency dashboard issue](https://github.com/typescript-eslint/typescript-eslint/issues/6687) which can be used to understand the tool's state:

- What dependency bumps require approval for renovate to action (eg because they are major bumps)
- What dependency bumps it is working on (i.e. pending)
- What dependency bumps are currently open and awaiting review + merge
- Note that renovate is an asynchronous tools so this list will lag behind a bit after you merge PRs
- What dependency bumps have been ignored

Ticking a checkbox in this issue will cause renovate to action the dependency:

- If you tick one in the "Pending Approval" list it will approve it and renovate will raise a PR.
- If you tick one in the "Pending Status Checks" list it will cause renovate to create the PR before its internal status checks are complete.
- If you tick one in the "Open" list it will cause renovate to rebase the PR (if there are no manual changes) or recreate the PR (if there are manual changes).
- If you tick one in the "Ignored or Blocked" list it will cause renovate to recreate the PR.

### Merging Renovate PRs

Renovate will not automatically merge its dependency PRs because we have branch protection turned on. Renovate PRs must go through the same workflow as human PRs: i.e. all PRs must be approved with passing status checks before they can be merged.

Renovate will automatically update a PR if there is a conflict with `main`. You can also force it to rebase a PR by ticking the box in the PR's description, or ticking the relevant box on the dependency dashboard.

You should generally avoid clicking the "Update branch" button in the Github UI as this will create a human commit - which cause renovate to treat the branch as "dirty" and it will no longer automatically. Only click it if you are planning on merging the PR manually ASAP.

## Manual Dependency Updates

Occasionally it will be desirable to manually bump the dependencies in one commit rather than relying on renovate's many PRs. Doing so is just a matter of:

1. `git checkout main && git pull`
1. `yarn install`
1. `yarn update-interactive` - this will start yarn's prompt to update the deps.
1. Ignore the lines with `*` deps as these are intentionally set as such.
1. Avoid changing the dep ranges like the complex range we have for TypeScript (eg `>=4.7.4 <5.5.0`).
1. Once you're ready, hit `enter` and yarn will make the changes and rerun the install.
1. Run all of the relevant checks locally so you can action any failures before raising a PR:
1. `yarn build`
1. `yarn typecheck`
1. `yarn lint`
1. `yarn test`
1. `yarn integration-test`
1. Create a new branch (a name like `update-deps-20231201` is good just to keep it unique), create, and land a PR.

### Babel

Our published packages only depend on `@babel/*` packages as devDependencies.
You can generally upgrade those dependencies with:
Expand All @@ -13,7 +60,7 @@ You can generally upgrade those dependencies with:

The fixtures under `packages/ast-spec/` describe how the files are parsed under both Babel and our (TSESTree) parser.

## ESLint
### ESLint

The typescript-eslint repository contains four kinds of version ranges for the `eslint` package:

Expand All @@ -26,14 +73,14 @@ The typescript-eslint repository contains four kinds of version ranges for the `
Whenever you discover any new areas of work that are blocked by dropping an old ESLint version, such as new ESLint API deprecations, add a _TODO_ comment that will be caught by the regular expressions under [Removing Support for an Old ESLint Version](#removing-support-for-an-old-eslint-version).
:::

### Adding Support for a New ESLint Version
#### Adding Support for a New ESLint Version

1. Upgrade the root `package.json` `devDependency` to the latest ESLint
1. Add the new major version to the explicit `peerDependency` versions
1. Check [`eslint-visitor-keys`](https://www.npmjs.com/package/eslint-visitor-keys) for a new version to be upgraded to as well.
1. Update [Users > Dependency Versions > ESLint](../../users/Dependency_Versions.mdx#eslint)

### Removing Support for an Old ESLint Version
#### Removing Support for an Old ESLint Version

1. Increase the integration tests to the next lowest supported major version (`*.0.0`)
1. Remove the old major versions from packages with explicit `peerDependency` versions
Expand All @@ -46,7 +93,7 @@ Whenever you discover any new areas of work that are blocked by dropping an old

See [chore: drop support for ESLint v6](https://github.com/typescript-eslint/typescript-eslint/pull/5972) for reference.

## Node
### Node

The typescript-eslint repository contains three kinds of version ranges for Node:

Expand All @@ -58,9 +105,9 @@ Change those numbers accordingly when adding support for a new Node version or r

See [feat: drop support for node v12](https://github.com/typescript-eslint/typescript-eslint/pull/5918) + [chore: test node v14 on ci.yml](https://github.com/typescript-eslint/typescript-eslint/pull/5512) for reference.

## TypeScript
### TypeScript

### Adding Support for a New TypeScript Version
#### Adding Support for a New TypeScript Version

We generally start the process of supporting a new TypeScript version just after the first beta release for that version is made available.

Expand Down
4 changes: 2 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export default tseslint.config(

// extends ...
eslint.configs.recommended,
...compat.config(eslintPluginPlugin.configs.recommended),
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
jsdocPlugin.configs['flat/recommended-typescript-error'],
Expand Down Expand Up @@ -350,7 +349,6 @@ export default tseslint.config(
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'eslint-plugin/consistent-output': 'off', // Might eventually be removed from `eslint-plugin/recommended`: https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/issues/284
'jest/no-disabled-tests': 'error',
'jest/no-focused-tests': 'error',
'jest/no-alias-methods': 'error',
Expand Down Expand Up @@ -416,6 +414,8 @@ export default tseslint.config(
rules: {
'@typescript-eslint/internal/no-typescript-estree-import': 'error',
},

extends: [...compat.config(eslintPluginPlugin.configs.recommended)],
},
{
files: [
Expand Down
4 changes: 2 additions & 2 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"default",
"{workspaceRoot}/eslint.config.js",
"{workspaceRoot}/eslint.config.mjs",
"{workspaceRoot}/yarn.lock",
{
"dependentTasksOutputFiles": "**/*.js",
"transitive": false
Expand All @@ -79,7 +78,8 @@
},
{
"runtime": "yarn -v"
}
},
"{workspaceRoot}/yarn.lock"
],
"production": [
"default",
Expand Down
78 changes: 39 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"lint-fix": "yarn lint --fix",
"lint-markdown-fix": "yarn lint-markdown --fix",
"lint-markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore",
"lint-stylelint": "npx nx lint website stylelint",
"lint": "npx nx lint eslint-plugin --skip-nx-cache && npx nx run-many --target=lint --parallel --exclude eslint-plugin && eslint . --ignore-pattern=packages --cache",
"postinstall": "npx nx run repo-tools:postinstall-script",
"pre-commit": "yarn lint-staged",
Expand All @@ -54,71 +55,70 @@
"node": "^18.18.0 || >=20.0.0"
},
"devDependencies": {
"@actions/core": "^1.10.0",
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
"@babel/code-frame": "^7.23.5",
"@babel/core": "^7.24.0",
"@babel/eslint-parser": "^7.23.10",
"@babel/parser": "^7.24.0",
"@babel/code-frame": "^7.24.2",
"@babel/core": "^7.24.4",
"@babel/eslint-parser": "^7.24.1",
"@babel/parser": "^7.24.4",
"@babel/types": "^7.24.0",
"@eslint/eslintrc": "^2.1.4",
"@eslint/js": "^8.56.0",
"@nx/eslint": "18.2.2",
"@nx/jest": "18.2.2",
"@nx/workspace": "18.2.2",
"@swc/core": "^1.4.0",
"@swc/jest": "^0.2.26",
"@types/babel__code-frame": "^7.0.3",
"@types/babel__core": "^7.20.1",
"@types/debug": "^4.1.8",
"@types/is-glob": "^4.0.2",
"@eslint/js": "^8.57.0",
"@nx/eslint": "18.2.3",
"@nx/jest": "18.2.3",
"@nx/workspace": "18.2.3",
"@swc/core": "^1.4.12",
"@swc/jest": "^0.2.36",
"@types/babel__code-frame": "^7.0.6",
"@types/babel__core": "^7.20.5",
"@types/debug": "^4.1.12",
"@types/is-glob": "^4.0.4",
"@types/jest": "29.5.12",
"@types/jest-specific-snapshot": "^0.5.6",
"@types/marked": "^5.0.0",
"@types/natural-compare": "^1.4.1",
"@types/ncp": "^2.0.5",
"@types/node": "^20.0.0",
"@types/semver": "^7.5.0",
"@types/tmp": "^0.2.3",
"@types/jest-specific-snapshot": "^0.5.9",
"@types/marked": "^5.0.2",
"@types/natural-compare": "^1.4.3",
"@types/ncp": "^2.0.8",
"@types/node": "^20.12.5",
"@types/semver": "^7.5.8",
"@types/tmp": "^0.2.6",
"@types/yargs": "^17.0.32",
"@typescript-eslint/eslint-plugin-internal": "workspace:^",
"console-fail-test": "^0.2.3",
"cross-fetch": "^4.0.0",
"cspell": "^8.0.0",
"cspell": "^8.6.1",
"downlevel-dts": ">=0.11.0",
"eslint": "8.57.0",
"eslint-plugin-deprecation": "^2.0.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-eslint-plugin": "^5.2.1",
"eslint-plugin-eslint-plugin": "^5.5.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.6.3",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsdoc": "^47.0.2",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-unicorn": "^50.0.1",
"execa": "7.1.1",
"glob": "^10.3.3",
"execa": "7.2.0",
"glob": "^10.3.12",
"globals": "^15.0.0",
"husky": "^8.0.3",
"jest": "29.7.0",
"jest-diff": "^29.6.2",
"jest-snapshot": "^29.6.2",
"jest-diff": "^29.7.0",
"jest-snapshot": "^29.7.0",
"jest-specific-snapshot": "^8.0.0",
"lint-staged": "^15.0.0",
"lint-staged": "^15.2.2",
"make-dir": "^4.0.0",
"markdownlint-cli": "^0.39.0",
"ncp": "^2.0.0",
"netlify": "^13.1.9",
"nx": "18.2.2",
"netlify": "^13.1.14",
"nx": "18.2.3",
"prettier": "3.2.5",
"pretty-format": "^29.6.2",
"pretty-format": "^29.7.0",
"raw-loader": "^4.0.2",
"rimraf": "^5.0.1",
"tmp": "^0.2.1",
"ts-node": "10.7.0",
"tsx": "^4.6.2",
"rimraf": "^5.0.5",
"tmp": "^0.2.3",
"tsx": "*",
"typescript": ">=4.7.4 <5.5.0",
"typescript-eslint": "workspace:^",
"yargs": "17.7.2"
Expand All @@ -140,7 +140,7 @@
"jest-util": "^29",
"pretty-format": "^29",
"react-split-pane@^0.1.92": "patch:react-split-pane@npm%3A0.1.92#./.yarn/patches/react-split-pane-npm-0.1.92-93dbf51dff.patch",
"tsx": "^4.6.2",
"tsx": "^4.7.2",
"typescript": "5.4.3",
"@nx/eslint@17.3.1": "patch:@nx/eslint@npm%3A17.3.1#./.yarn/patches/@nx-eslint-npm-17.3.1-a2f85d8c50.patch"
},
Expand Down
16 changes: 16 additions & 0 deletions packages/ast-spec/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 7.6.0 (2024-04-08)


### 🚀 Features

- bump npm dependency ranges


### ❤️ Thank You

- Abraham Guo
- auvred
- Brad Zacher

You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.

## 7.5.0 (2024-04-01)

This was a version bump only for ast-spec to align it with other projects, there were no code changes.
Expand Down

0 comments on commit 57bed67

Please sign in to comment.