Skip to content

Commit

Permalink
Merge branch 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed May 18, 2024
2 parents 5c80828 + 510153b commit 87a0a48
Show file tree
Hide file tree
Showing 58 changed files with 1,208 additions and 373 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
lint-task: ['lint', 'typecheck']
lint-task: ['lint', 'typecheck', 'knip']
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## 7.9.0 (2024-05-13)


### 🚀 Features

- **rule-tester:** check for missing placeholder data in the message ([#9039](https://github.com/typescript-eslint/typescript-eslint/pull/9039))

### 🩹 Fixes

- do not pass tsconfig canonical file name to typescript API to get program details for config file ([#9042](https://github.com/typescript-eslint/typescript-eslint/pull/9042))
- **eslint-plugin:** [explicit-function-return-types] fix false positive on default parameters ([#9045](https://github.com/typescript-eslint/typescript-eslint/pull/9045))

### ❤️ Thank You

- Kirk Waiblinger
- Sheetal Nandi
- Vinccool96

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.8.0 (2024-04-29)


Expand Down
6 changes: 3 additions & 3 deletions docs/Contributing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ If you're new to open source, you may also find the [How to Contribute to Open S

## Next Steps

1. [Finding or opening an issue](https://typescript-eslint.io/contributing/issues): In the issue tab, find the pr currently tagged with `accepting prs` or create a new issue.
2. [Setting up a local environment](https://typescript-eslint.io/contributing/local-development): Let's learn how to set up the local environment to start development.
3. [Making a PR](https://typescript-eslint.io/contributing/pull-requests): you've got changes locally that address an issue, take a look at that topic.
1. [Finding or opening an issue](./contributing/Issues.mdx): In the issue tab, find the pr currently tagged with `accepting prs` or create a new issue.
2. [Setting up a local environment](./contributing/Local_Development.mdx): Let's learn how to set up the local environment to start development.
3. [Making a PR](./contributing/Pull_Requests.mdx): you've got changes locally that address an issue, take a look at that topic.
3 changes: 1 addition & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @ts-check

// TODO - https://github.com/eslint/eslint/pull/17909
// either it gets back-ported (https://github.com/eslint/eslint/issues/17966) or we wait till v9
// TODO - https://github.com/nrwl/nx/issues/22576

/** @type {import('@typescript-eslint/utils/ts-eslint').FlatConfig.ConfigPromise} */
const config = (async () => (await import('./eslint.config.mjs')).default)();
Expand Down
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
'use strict';

// @ts-check
const { getJestProjects } = require('@nx/jest');

/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
projects: getJestProjects(),
};
128 changes: 128 additions & 0 deletions knip.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
import type { KnipConfig } from 'knip';

export default {
rules: {
classMembers: 'off',
duplicates: 'off',
enumMembers: 'off',
exports: 'off',
nsExports: 'off',
nsTypes: 'off',
types: 'off',
unresolved: 'off',
},
workspaces: {
'.': {
ignoreDependencies: [
'@babel/code-frame',
'@babel/core',
'@babel/eslint-parser',
'@babel/parser',
'@babel/types',
'@nx/workspace',
'cross-fetch',
'glob',
'husky',
'jest-specific-snapshot',
'make-dir',
'ncp',
'tmp',

// imported in eslint.config.js
'@typescript-eslint/utils',
// imported in eslint.config.mjs
'@typescript-eslint/eslint-plugin-internal',
],
entry: ['tools/release/changelog-renderer.js'],
ignoreBinaries: [
// https://github.com/webpro/knip/issues/433
'stylelint',
],
},
'packages/ast-spec': {
ignore: [
'src/**/fixtures/**',
'tests/*.type-test.ts',
// @typescript-eslint/typescript-estree is not listed in dependencies to avoid circular dependency errors
// You can check a more detailed explanation in this file
'tests/util/parsers/typescript-estree-import.ts',
],
},
'packages/eslint-plugin': {
ignore: ['tests/fixtures/**'],
},
'packages/eslint-plugin-internal': {
ignore: ['tests/fixtures/**'],
},
'packages/integration-tests': {
ignore: ['fixtures/**'],
},
'packages/parser': {
ignore: ['tests/fixtures/**'],
},
'packages/scope-manager': {
ignore: ['tests/fixtures/**'],
},
'packages/type-utils': {
ignore: ['tests/fixtures/**'],
},
'packages/typescript-estree': {
entry: ['src/use-at-your-own-risk.ts'],
ignore: ['tests/fixtures/**'],
},
'packages/website': {
entry: [
'docusaurus.config.mts',
'src/pages/**/*.tsx',

// imported in MDX docs
'src/components/**/*.tsx',

// used by Docusaurus
'src/theme/**/*.tsx',
'src/theme/prism-include-languages.js',
],
ignoreDependencies: [
// used in MDX docs
'raw-loader',

// it's imported only as type (esquery types are forked and defined in packages/website/typings/esquery.d.ts)
'esquery',

'@babel/runtime',
'@docusaurus/mdx-loader',
'@docusaurus/types',
'@docusaurus/plugin-content-docs',
'@docusaurus/theme-search-algolia',
'@docusaurus/ExecutionEnvironment',
'@docusaurus/Link',
'@docusaurus/router',
'@docusaurus/useDocusaurusContext',
'@docusaurus/useBaseUrl',
'@docusaurus/BrowserOnly',
'@docusaurus/theme-classic',
'@generated/docusaurus.config',
'^@theme/.*',
'^@theme-original/.*',
],
},
'packages/website-eslint': {
ignoreDependencies: [
// virtual module
'vt',
],
entry: [
'src/index.js',
'src/mock/assert.js',
'src/mock/empty.js',
'src/mock/eslint-rules.js',
'src/mock/eslint.js',
'src/mock/lru-cache.js',
'src/mock/path.js',
'src/mock/typescript.js',
'src/mock/util.js',
],
},
'tools/dummypkg': {},
},
} satisfies KnipConfig;
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@babel/types": "^7.24.0",
"@eslint/eslintrc": "^2.1.4",
"@eslint/js": "^8.57.0",
"@jest/types": "29.6.3",
"@nx/eslint": "18.2.3",
"@nx/jest": "18.2.3",
"@nx/workspace": "18.2.3",
Expand All @@ -75,7 +76,6 @@
"@types/is-glob": "^4.0.4",
"@types/jest": "29.5.12",
"@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",
Expand Down Expand Up @@ -104,9 +104,8 @@
"globals": "^15.0.0",
"husky": "^8.0.3",
"jest": "29.7.0",
"jest-diff": "^29.7.0",
"jest-snapshot": "^29.7.0",
"jest-specific-snapshot": "^8.0.0",
"knip": "^5.9.4",
"lint-staged": "^15.2.2",
"make-dir": "^4.0.0",
"markdownlint-cli": "^0.39.0",
Expand All @@ -115,9 +114,8 @@
"nx": "18.2.3",
"prettier": "3.2.5",
"pretty-format": "^29.7.0",
"raw-loader": "^4.0.2",
"rimraf": "^5.0.5",
"tmp": "^0.2.3",
"tmp": "^0.2.1",
"tsx": "*",
"typescript": ">=4.8.4 <5.5.0",
"typescript-eslint": "workspace:^",
Expand All @@ -140,6 +138,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",
"tmp": "0.2.1",
"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
6 changes: 6 additions & 0 deletions packages/ast-spec/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 7.9.0 (2024-05-13)

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

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.8.0 (2024-04-29)

This was a version bump only for ast-spec to align it with other projects, there were no code changes.
Expand Down
7 changes: 3 additions & 4 deletions packages/ast-spec/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/ast-spec",
"version": "7.8.0",
"version": "7.9.0",
"description": "Complete specification for the TypeScript-ESTree AST",
"private": true,
"keywords": [
Expand Down Expand Up @@ -37,7 +37,7 @@
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "npx nx lint",
"test": "jest",
"typecheck": "tsc -p tsconfig.json --noEmit"
"typecheck": "tsc --noEmit"
},
"funding": {
"type": "opencollective",
Expand All @@ -47,12 +47,11 @@
"@babel/code-frame": "*",
"@babel/core": "*",
"@babel/eslint-parser": "*",
"@babel/parser": "*",
"@jest/types": "29.6.3",
"@microsoft/api-extractor": "^7.43.0",
"glob": "*",
"jest": "29.7.0",
"jest-diff": "^29.7.0",
"jest-snapshot": "^29.7.0",
"jest-specific-snapshot": "^8.0.0",
"make-dir": "*",
"prettier": "^3.2.5",
Expand Down
6 changes: 6 additions & 0 deletions packages/eslint-plugin-internal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 7.9.0 (2024-05-13)

This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes.

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.8.0 (2024-04-29)

This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes.
Expand Down
13 changes: 7 additions & 6 deletions packages/eslint-plugin-internal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/eslint-plugin-internal",
"version": "7.8.0",
"version": "7.9.0",
"private": true,
"main": "dist/index.js",
"types": "index.d.ts",
Expand All @@ -11,17 +11,18 @@
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "npx nx lint",
"test": "jest --coverage",
"typecheck": "tsc -p tsconfig.json --noEmit"
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@prettier/sync": "^0.5.1",
"@typescript-eslint/rule-tester": "7.8.0",
"@typescript-eslint/scope-manager": "7.8.0",
"@typescript-eslint/type-utils": "7.8.0",
"@typescript-eslint/utils": "7.8.0",
"@typescript-eslint/rule-tester": "7.9.0",
"@typescript-eslint/scope-manager": "7.9.0",
"@typescript-eslint/type-utils": "7.9.0",
"@typescript-eslint/utils": "7.9.0",
"prettier": "^3.2.5"
},
"devDependencies": {
"@jest/types": "29.6.3",
"jest": "29.7.0",
"rimraf": "*"
}
Expand Down
16 changes: 16 additions & 0 deletions packages/eslint-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 7.9.0 (2024-05-13)


### 🩹 Fixes

- **eslint-plugin:** [explicit-function-return-types] fix false positive on default parameters


### ❤️ Thank You

- Kirk Waiblinger
- Sheetal Nandi
- Vinccool96

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.8.0 (2024-04-29)


Expand Down
23 changes: 23 additions & 0 deletions packages/eslint-plugin/docs/rules/sort-type-constituents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,29 @@ type T4 =

## Options

### `caseSensitive`

Whether to sort using case sensitive string comparisons.

Examples of code with `{ "caseSensitive": true }`:

<Tabs>
<TabItem value="❌ Incorrect">

```ts option='{ "caseSensitive": true }'
type T = 'DeletedAt' | 'DeleteForever';
```

</TabItem>
<TabItem value="✅ Correct">

```ts option='{ "caseSensitive": true }'
type T = 'DeleteForever' | 'DeletedAt';
```

</TabItem>
</Tabs>

### `checkIntersections`

Whether to check intersection types (`&`).
Expand Down

0 comments on commit 87a0a48

Please sign in to comment.