diff --git a/.eslintrc.js b/.eslintrc.js index f4d869788ce9..1398b8f04d87 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -51,9 +51,6 @@ module.exports = { // make sure we're not leveraging any deprecated APIs 'deprecation/deprecation': 'error', - // TODO(#7338): Investigate enabling these soon ✨ - '@typescript-eslint/prefer-nullish-coalescing': 'off', - // TODO(#7130): Investigate changing these in or removing these from presets '@typescript-eslint/no-confusing-void-expression': 'off', '@typescript-eslint/prefer-string-starts-ends-with': 'off', @@ -109,6 +106,13 @@ module.exports = { 'error', { varsIgnorePattern: '^_', argsIgnorePattern: '^_' }, ], + '@typescript-eslint/prefer-nullish-coalescing': [ + 'error', + { + ignoreConditionalTests: true, + ignorePrimitives: true, + }, + ], // // Internal repo rules diff --git a/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml b/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml index 2ea82b2ad19e..6c808be0b1bd 100644 --- a/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml +++ b/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml @@ -14,7 +14,7 @@ body: options: - label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3A%22enhancement%3A+plugin+rule+option%22) and found none that match my proposal. required: true - - label: I have searched the [current rule list](https://typescript-eslint.io/rules/#supported-rules) and found no rules that match my proposal. + - label: I have searched the [current rule list](https://typescript-eslint.io/rules/#rules) and found no rules that match my proposal. required: true - label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed. required: true diff --git a/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml b/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml index dd9bf8b0f1a1..3f2f96d7357d 100644 --- a/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml +++ b/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml @@ -14,7 +14,7 @@ body: options: - label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3A%22enhancement%3A+new+plugin+rule%22) and found none that match my proposal. required: true - - label: I have searched the [current rule list](https://typescript-eslint.io/rules/#supported-rules) and found no rules that match my proposal. + - label: I have searched the [current rule list](https://typescript-eslint.io/rules/#rules) and found no rules that match my proposal. required: true - label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed. required: true diff --git a/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml b/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml index 28f6699b3fb7..f1e4a8fc3132 100644 --- a/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml +++ b/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml @@ -21,7 +21,7 @@ body: options: - label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3A%22enhancement%3A+new+base+rule+extension%22) and found none that match my proposal. required: true - - label: I have searched the [current extension rule list](https://typescript-eslint.io/rules/#extension-rules) and found no rules that match my proposal. + - label: I have searched the [current extension rule list](https://typescript-eslint.io/rules/?=extension#rules) and found no rules that match my proposal. required: true - label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed. required: true diff --git a/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml b/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml index 2d586fc7c8ba..f383970cf440 100644 --- a/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml +++ b/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml @@ -13,7 +13,7 @@ body: options: - label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3A%22enhancement%3A+plugin+rule+option%22) and found none that match my proposal. required: true - - label: I have searched the [current rule list](https://typescript-eslint.io/rules/#supported-rules) and found no rules that match my proposal. + - label: I have searched the [current rule list](https://typescript-eslint.io/rules/#rules) and found no rules that match my proposal. required: true - label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed. required: true diff --git a/.github/replies.yml b/.github/replies.yml index a10137241409..352c3fe57cf3 100644 --- a/.github/replies.yml +++ b/.github/replies.yml @@ -16,7 +16,7 @@ replies: \ name: Extension Rule - Reject Due to Enhancement - body: | - The fix has been merged to main, and will be released Monday, as per our [release schedule](https://github.com/typescript-eslint/typescript-eslint#versioning) + The fix has been merged to main, and will be released Monday, as per our [release schedule](https://typescript-eslint.io/users/releases/#latest) \ If you need it sooner, please try the `canary` tag on NPM. name: Fix Has Been Merged @@ -62,7 +62,7 @@ replies: Closing this PR as it's been stale for ~6 weeks without activity. Feel free to reopen @{{ author }} if you have time - but no worries if not! If anybody wants to drive it forward, please do post your own PR - and if you use this as a start, consider adding `Co-authored-by: @{{ author }}` at the end of your PR description. Thanks! 😊 name: Pruning Stale PR - body: | - As per [our contributing guidelines](https://github.com/typescript-eslint/typescript-eslint/blob/master/CONTRIBUTING.md#addressing-feedback-and-beyond) this PR is in the queue of PRs to reviewed, and will be reviewed when we are able. + As per [our contributing guidelines](https://typescript-eslint.io/contributing/pull-requests#addressing-feedback-and-beyond) this PR is in the queue of PRs to reviewed, and will be reviewed when we are able. \ This project is run by volunteer maintainers, so it might be a bit before we can find the time to get to it. name: Review Queue diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ba4d93cad77..088f152496b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +## 6.20.0 (2024-01-29) + + +### 🚀 Features + +- **eslint-plugin:** [member-ordering] allow easy reuse of the default ordering ([#8248](https://github.com/typescript-eslint/typescript-eslint/pull/8248)) + +### 🩹 Fixes + +- **eslint-plugin:** [no-useless-template-literals] incorrect bigint autofix result ([#8283](https://github.com/typescript-eslint/typescript-eslint/pull/8283)) +- **eslint-plugin:** [prefer-nullish-coalescing] treat any/unknown as non-nullable ([#8262](https://github.com/typescript-eslint/typescript-eslint/pull/8262)) +- **eslint-plugin:** [no-useless-template-literals] report Infinity & NaN ([#8295](https://github.com/typescript-eslint/typescript-eslint/pull/8295)) +- **eslint-plugin:** [prefer-readonly] disable checking accessors ([#8300](https://github.com/typescript-eslint/typescript-eslint/pull/8300)) + +### ❤️ Thank You + +- Alex Parloti @parloti +- auvred @auvred +- James Browning +- StyleShit @StyleShit +- YeonJuan @yeonjuan + +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. + ## 6.19.1 (2024-01-22) diff --git a/docs/linting/troubleshooting/Performance.mdx b/docs/linting/troubleshooting/Performance.mdx index ec90afca02eb..71523c0db210 100644 --- a/docs/linting/troubleshooting/Performance.mdx +++ b/docs/linting/troubleshooting/Performance.mdx @@ -85,6 +85,7 @@ We recommend you do not use the following rules, as TypeScript provides the same - `import/namespace` - `import/default` - `import/no-named-as-default-member` +- `import/no-unresolved` (as long as you are using [`import` over `require`](https://typescript-eslint.io/rules/no-var-requires/)) The following rules do not have equivalent checks in TypeScript, so we recommend that you only run them at CI/push time, to lessen the local performance burden. diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index aaf0e9f4566e..f074d88c84ee 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +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. + ## 6.19.1 (2024-01-22) This was a version bump only for ast-spec to align it with other projects, there were no code changes. diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 565734c9c5ca..4919b30dbe16 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "6.19.1", + "version": "6.20.0", "description": "Complete specification for the TypeScript-ESTree AST", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 76c8d7f3786b..9987d209069c 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +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. + ## 6.19.1 (2024-01-22) This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes. diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 394dd5ac8b1f..06347f372c2c 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-internal", - "version": "6.19.1", + "version": "6.20.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,10 +14,10 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/rule-tester": "6.19.1", - "@typescript-eslint/scope-manager": "6.19.1", - "@typescript-eslint/type-utils": "6.19.1", - "@typescript-eslint/utils": "6.19.1", + "@typescript-eslint/rule-tester": "6.20.0", + "@typescript-eslint/scope-manager": "6.20.0", + "@typescript-eslint/type-utils": "6.20.0", + "@typescript-eslint/utils": "6.20.0", "prettier": "^3.0.3" }, "devDependencies": { diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index d6803a2ae82d..41595443e428 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for eslint-plugin-tslint 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. + ## 6.19.1 (2024-01-22) This was a version bump only for eslint-plugin-tslint to align it with other projects, there were no code changes. diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 4cde53c4a132..24e236920088 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-tslint", - "version": "6.19.1", + "version": "6.20.0", "main": "dist/index.js", "typings": "src/index.ts", "description": "ESLint plugin that wraps a TSLint configuration and lints the whole source using TSLint", @@ -46,7 +46,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/utils": "6.19.1" + "@typescript-eslint/utils": "6.20.0" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0", @@ -55,7 +55,7 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "6.19.1", + "@typescript-eslint/parser": "6.20.0", "jest": "29.7.0", "prettier": "^3.0.3", "rimraf": "*" diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index ac21a7141869..1dda2647a499 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,3 +1,32 @@ +## 6.20.0 (2024-01-29) + + +### 🚀 Features + +- **eslint-plugin:** [member-ordering] allow easy reuse of the default ordering + + +### 🩹 Fixes + +- **eslint-plugin:** [no-useless-template-literals] incorrect bigint autofix result + +- **eslint-plugin:** [prefer-nullish-coalescing] treat any/unknown as non-nullable + +- **eslint-plugin:** [no-useless-template-literals] report Infinity & NaN + +- **eslint-plugin:** [prefer-readonly] disable checking accessors + + +### ❤️ Thank You + +- Alex Parloti +- auvred +- James Browning +- StyleShit +- YeonJuan + +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. + ## 6.19.1 (2024-01-22) diff --git a/packages/eslint-plugin/docs/rules/member-ordering.md b/packages/eslint-plugin/docs/rules/member-ordering.md index 711d590728c1..74fa2127b392 100644 --- a/packages/eslint-plugin/docs/rules/member-ordering.md +++ b/packages/eslint-plugin/docs/rules/member-ordering.md @@ -25,7 +25,7 @@ type OrderConfig = MemberType[] | SortedOrderConfig | 'never'; interface SortedOrderConfig { memberTypes?: MemberType[] | 'never'; optionalityOrder?: 'optional-first' | 'required-first'; - order: + order?: | 'alphabetically' | 'alphabetically-case-insensitive' | 'as-written' @@ -80,176 +80,178 @@ The default configuration looks as follows: ```jsonc { - "default": [ - // Index signature - "signature", - "call-signature", + "default": { + "memberTypes": [ + // Index signature + "signature", + "call-signature", - // Fields - "public-static-field", - "protected-static-field", - "private-static-field", - "#private-static-field", + // Fields + "public-static-field", + "protected-static-field", + "private-static-field", + "#private-static-field", - "public-decorated-field", - "protected-decorated-field", - "private-decorated-field", + "public-decorated-field", + "protected-decorated-field", + "private-decorated-field", - "public-instance-field", - "protected-instance-field", - "private-instance-field", - "#private-instance-field", + "public-instance-field", + "protected-instance-field", + "private-instance-field", + "#private-instance-field", - "public-abstract-field", - "protected-abstract-field", + "public-abstract-field", + "protected-abstract-field", - "public-field", - "protected-field", - "private-field", - "#private-field", + "public-field", + "protected-field", + "private-field", + "#private-field", - "static-field", - "instance-field", - "abstract-field", + "static-field", + "instance-field", + "abstract-field", - "decorated-field", + "decorated-field", - "field", + "field", - // Static initialization - "static-initialization", + // Static initialization + "static-initialization", - // Constructors - "public-constructor", - "protected-constructor", - "private-constructor", + // Constructors + "public-constructor", + "protected-constructor", + "private-constructor", - "constructor", + "constructor", - // Accessors - "public-static-accessor", - "protected-static-accessor", - "private-static-accessor", - "#private-static-accessor", + // Accessors + "public-static-accessor", + "protected-static-accessor", + "private-static-accessor", + "#private-static-accessor", - "public-decorated-accessor", - "protected-decorated-accessor", - "private-decorated-accessor", + "public-decorated-accessor", + "protected-decorated-accessor", + "private-decorated-accessor", - "public-instance-accessor", - "protected-instance-accessor", - "private-instance-accessor", - "#private-instance-accessor", + "public-instance-accessor", + "protected-instance-accessor", + "private-instance-accessor", + "#private-instance-accessor", - "public-abstract-accessor", - "protected-abstract-accessor", + "public-abstract-accessor", + "protected-abstract-accessor", - "public-accessor", - "protected-accessor", - "private-accessor", - "#private-accessor", + "public-accessor", + "protected-accessor", + "private-accessor", + "#private-accessor", - "static-accessor", - "instance-accessor", - "abstract-accessor", + "static-accessor", + "instance-accessor", + "abstract-accessor", - "decorated-accessor", + "decorated-accessor", - "accessor", + "accessor", - // Getters - "public-static-get", - "protected-static-get", - "private-static-get", - "#private-static-get", + // Getters + "public-static-get", + "protected-static-get", + "private-static-get", + "#private-static-get", - "public-decorated-get", - "protected-decorated-get", - "private-decorated-get", + "public-decorated-get", + "protected-decorated-get", + "private-decorated-get", - "public-instance-get", - "protected-instance-get", - "private-instance-get", - "#private-instance-get", + "public-instance-get", + "protected-instance-get", + "private-instance-get", + "#private-instance-get", - "public-abstract-get", - "protected-abstract-get", + "public-abstract-get", + "protected-abstract-get", - "public-get", - "protected-get", - "private-get", - "#private-get", + "public-get", + "protected-get", + "private-get", + "#private-get", - "static-get", - "instance-get", - "abstract-get", + "static-get", + "instance-get", + "abstract-get", - "decorated-get", + "decorated-get", - "get", + "get", - // Setters - "public-static-set", - "protected-static-set", - "private-static-set", - "#private-static-set", + // Setters + "public-static-set", + "protected-static-set", + "private-static-set", + "#private-static-set", - "public-decorated-set", - "protected-decorated-set", - "private-decorated-set", + "public-decorated-set", + "protected-decorated-set", + "private-decorated-set", - "public-instance-set", - "protected-instance-set", - "private-instance-set", - "#private-instance-set", + "public-instance-set", + "protected-instance-set", + "private-instance-set", + "#private-instance-set", - "public-abstract-set", - "protected-abstract-set", + "public-abstract-set", + "protected-abstract-set", - "public-set", - "protected-set", - "private-set", - "#private-set", + "public-set", + "protected-set", + "private-set", + "#private-set", - "static-set", - "instance-set", - "abstract-set", + "static-set", + "instance-set", + "abstract-set", - "decorated-set", + "decorated-set", - "set", + "set", - // Methods - "public-static-method", - "protected-static-method", - "private-static-method", - "#private-static-method", + // Methods + "public-static-method", + "protected-static-method", + "private-static-method", + "#private-static-method", - "public-decorated-method", - "protected-decorated-method", - "private-decorated-method", + "public-decorated-method", + "protected-decorated-method", + "private-decorated-method", - "public-instance-method", - "protected-instance-method", - "private-instance-method", - "#private-instance-method", + "public-instance-method", + "protected-instance-method", + "private-instance-method", + "#private-instance-method", - "public-abstract-method", - "protected-abstract-method", + "public-abstract-method", + "protected-abstract-method", - "public-method", - "protected-method", - "private-method", - "#private-method", + "public-method", + "protected-method", + "private-method", + "#private-method", - "static-method", - "instance-method", - "abstract-method", + "static-method", + "instance-method", + "abstract-method", - "decorated-method", + "decorated-method", - "method" - ] + "method" + ] + } } ``` @@ -792,7 +794,8 @@ type Foo = { #### Sorting Alphabetically Within Member Groups This config specifies that within each `memberTypes` group, members are in an alphabetic case-sensitive order. -You can copy and paste the default order from [Default Configuration](#default-configuration). +The default member order will be applied if `memberTypes` is not specified. +You can see the default order in [Default Configuration](#default-configuration). ```jsonc // .eslintrc.json @@ -802,9 +805,6 @@ You can copy and paste the default order from [Default Configuration](#default-c "error", { "default": { - "memberTypes": [ - /* */ - ], "order": "alphabetically" } } @@ -817,7 +817,7 @@ You can copy and paste the default order from [Default Configuration](#default-c ##### ❌ Incorrect -```ts option='{"default":{"memberTypes":["signature","call-signature","public-static-field","protected-static-field","private-static-field","#private-static-field","public-decorated-field","protected-decorated-field","private-decorated-field","public-instance-field","protected-instance-field","private-instance-field","#private-instance-field","public-abstract-field","protected-abstract-field","public-field","protected-field","private-field","#private-field","static-field","instance-field","abstract-field","decorated-field","field","static-initialization","public-constructor","protected-constructor","private-constructor","constructor","public-static-get","protected-static-get","private-static-get","#private-static-get","public-decorated-get","protected-decorated-get","private-decorated-get","public-instance-get","protected-instance-get","private-instance-get","#private-instance-get","public-abstract-get","protected-abstract-get","public-get","protected-get","private-get","#private-get","static-get","instance-get","abstract-get","decorated-get","get","public-static-set","protected-static-set","private-static-set","#private-static-set","public-decorated-set","protected-decorated-set","private-decorated-set","public-instance-set","protected-instance-set","private-instance-set","#private-instance-set","public-abstract-set","protected-abstract-set","public-set","protected-set","private-set","#private-set","static-set","instance-set","abstract-set","decorated-set","set","public-static-method","protected-static-method","private-static-method","#private-static-method","public-decorated-method","protected-decorated-method","private-decorated-method","public-instance-method","protected-instance-method","private-instance-method","#private-instance-method","public-abstract-method","protected-abstract-method","public-method","protected-method","private-method","#private-method","static-method","instance-method","abstract-method","decorated-method","method"],"order":"alphabetically"}}' +```ts option='{"default":{"order":"alphabetically"}}' interface Foo { a: x; B: x; @@ -831,7 +831,7 @@ interface Foo { ##### ✅ Correct -```ts option='{"default":{"memberTypes":["signature","call-signature","public-static-field","protected-static-field","private-static-field","#private-static-field","public-decorated-field","protected-decorated-field","private-decorated-field","public-instance-field","protected-instance-field","private-instance-field","#private-instance-field","public-abstract-field","protected-abstract-field","public-field","protected-field","private-field","#private-field","static-field","instance-field","abstract-field","decorated-field","field","static-initialization","public-constructor","protected-constructor","private-constructor","constructor","public-static-get","protected-static-get","private-static-get","#private-static-get","public-decorated-get","protected-decorated-get","private-decorated-get","public-instance-get","protected-instance-get","private-instance-get","#private-instance-get","public-abstract-get","protected-abstract-get","public-get","protected-get","private-get","#private-get","static-get","instance-get","abstract-get","decorated-get","get","public-static-set","protected-static-set","private-static-set","#private-static-set","public-decorated-set","protected-decorated-set","private-decorated-set","public-instance-set","protected-instance-set","private-instance-set","#private-instance-set","public-abstract-set","protected-abstract-set","public-set","protected-set","private-set","#private-set","static-set","instance-set","abstract-set","decorated-set","set","public-static-method","protected-static-method","private-static-method","#private-static-method","public-decorated-method","protected-decorated-method","private-decorated-method","public-instance-method","protected-instance-method","private-instance-method","#private-instance-method","public-abstract-method","protected-abstract-method","public-method","protected-method","private-method","#private-method","static-method","instance-method","abstract-method","decorated-method","method"],"order":"alphabetically"}}' +```ts option='{"default":{"order":"alphabetically"}}' interface Foo { B: x; a: x; @@ -843,10 +843,62 @@ interface Foo { } ``` +#### Sorting Alphabetically Within Custom Member Groups + +This config specifies that within each custom `memberTypes` group, members are in an alphabetic case-sensitive order. + +```jsonc +// .eslintrc.json +{ + "rules": { + "@typescript-eslint/member-ordering": [ + "error", + { + "default": { + "memberTypes": ["method", "field"], + "order": "alphabetically" + } + } + ] + } +} +``` + + + +##### ❌ Incorrect + +```ts option='{"default":{"memberTypes":["method","field"],"order":"alphabetically"}}' +interface Foo { + B(): void; + c(): void; + a(): void; + + a: x; + B: x; + c: x; +} +``` + +##### ✅ Correct + +```ts option='{"default":{"memberTypes":["method","field"],"order":"alphabetically"}}' +interface Foo { + B(): void; + a(): void; + c(): void; + + B: x; + a: x; + c: x; +} +``` + #### Sorting Alphabetically Case Insensitive Within Member Groups This config specifies that within each `memberTypes` group, members are in an alphabetic case-insensitive order. -You can copy and paste the default order from [Default Configuration](#default-configuration). +The default member order will be applied if `memberTypes` is not specified. +You can see the default order in [Default Configuration](#default-configuration). ```jsonc // .eslintrc.json @@ -856,9 +908,6 @@ You can copy and paste the default order from [Default Configuration](#default-c "error", { "default": { - "memberTypes": [ - /* */ - ], "order": "alphabetically-case-insensitive" } } @@ -871,7 +920,7 @@ You can copy and paste the default order from [Default Configuration](#default-c ##### ❌ Incorrect -```ts option='{"default":{"memberTypes":["signature","call-signature","public-static-field","protected-static-field","private-static-field","#private-static-field","public-decorated-field","protected-decorated-field","private-decorated-field","public-instance-field","protected-instance-field","private-instance-field","#private-instance-field","public-abstract-field","protected-abstract-field","public-field","protected-field","private-field","#private-field","static-field","instance-field","abstract-field","decorated-field","field","static-initialization","public-constructor","protected-constructor","private-constructor","constructor","public-static-get","protected-static-get","private-static-get","#private-static-get","public-decorated-get","protected-decorated-get","private-decorated-get","public-instance-get","protected-instance-get","private-instance-get","#private-instance-get","public-abstract-get","protected-abstract-get","public-get","protected-get","private-get","#private-get","static-get","instance-get","abstract-get","decorated-get","get","public-static-set","protected-static-set","private-static-set","#private-static-set","public-decorated-set","protected-decorated-set","private-decorated-set","public-instance-set","protected-instance-set","private-instance-set","#private-instance-set","public-abstract-set","protected-abstract-set","public-set","protected-set","private-set","#private-set","static-set","instance-set","abstract-set","decorated-set","set","public-static-method","protected-static-method","private-static-method","#private-static-method","public-decorated-method","protected-decorated-method","private-decorated-method","public-instance-method","protected-instance-method","private-instance-method","#private-instance-method","public-abstract-method","protected-abstract-method","public-method","protected-method","private-method","#private-method","static-method","instance-method","abstract-method","decorated-method","method"],"order":"alphabetically-case-insensitive"}}' +```ts option='{"default":{"order":"alphabetically-case-insensitive"}}' interface Foo { B: x; a: x; @@ -885,7 +934,7 @@ interface Foo { ##### ✅ Correct -```ts option='{"default":{"memberTypes":["signature","call-signature","public-static-field","protected-static-field","private-static-field","#private-static-field","public-decorated-field","protected-decorated-field","private-decorated-field","public-instance-field","protected-instance-field","private-instance-field","#private-instance-field","public-abstract-field","protected-abstract-field","public-field","protected-field","private-field","#private-field","static-field","instance-field","abstract-field","decorated-field","field","static-initialization","public-constructor","protected-constructor","private-constructor","constructor","public-static-get","protected-static-get","private-static-get","#private-static-get","public-decorated-get","protected-decorated-get","private-decorated-get","public-instance-get","protected-instance-get","private-instance-get","#private-instance-get","public-abstract-get","protected-abstract-get","public-get","protected-get","private-get","#private-get","static-get","instance-get","abstract-get","decorated-get","get","public-static-set","protected-static-set","private-static-set","#private-static-set","public-decorated-set","protected-decorated-set","private-decorated-set","public-instance-set","protected-instance-set","private-instance-set","#private-instance-set","public-abstract-set","protected-abstract-set","public-set","protected-set","private-set","#private-set","static-set","instance-set","abstract-set","decorated-set","set","public-static-method","protected-static-method","private-static-method","#private-static-method","public-decorated-method","protected-decorated-method","private-decorated-method","public-instance-method","protected-instance-method","private-instance-method","#private-instance-method","public-abstract-method","protected-abstract-method","public-method","protected-method","private-method","#private-method","static-method","instance-method","abstract-method","decorated-method","method"],"order":"alphabetically-case-insensitive"}}' +```ts option='{"default":{"order":"alphabetically-case-insensitive"}}' interface Foo { a: x; B: x; diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 04800761b834..c10641310051 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "6.19.1", + "version": "6.20.0", "description": "TypeScript plugin for ESLint", "files": [ "dist", @@ -57,10 +57,10 @@ }, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.19.1", - "@typescript-eslint/type-utils": "6.19.1", - "@typescript-eslint/utils": "6.19.1", - "@typescript-eslint/visitor-keys": "6.19.1", + "@typescript-eslint/scope-manager": "6.20.0", + "@typescript-eslint/type-utils": "6.20.0", + "@typescript-eslint/utils": "6.20.0", + "@typescript-eslint/visitor-keys": "6.20.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -73,8 +73,8 @@ "@types/debug": "*", "@types/marked": "*", "@types/natural-compare": "*", - "@typescript-eslint/rule-schema-to-typescript-types": "6.19.1", - "@typescript-eslint/rule-tester": "6.19.1", + "@typescript-eslint/rule-schema-to-typescript-types": "6.20.0", + "@typescript-eslint/rule-tester": "6.20.0", "ajv": "^6.12.6", "chalk": "^5.3.0", "cross-fetch": "*", diff --git a/packages/eslint-plugin/src/rules/class-methods-use-this.ts b/packages/eslint-plugin/src/rules/class-methods-use-this.ts index 6940f11a7ae8..42991c40f499 100644 --- a/packages/eslint-plugin/src/rules/class-methods-use-this.ts +++ b/packages/eslint-plugin/src/rules/class-methods-use-this.ts @@ -50,7 +50,7 @@ export default createRule({ }, ignoreOverrideMethods: { type: 'boolean', - description: 'Ingore members marked with the `override` modifier', + description: 'Ignore members marked with the `override` modifier', }, ignoreClassesThatImplementAnInterface: { oneOf: [ diff --git a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts index b0bcb7d442f8..092179f8187d 100644 --- a/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts +++ b/packages/eslint-plugin/src/rules/explicit-module-boundary-types.ts @@ -81,7 +81,7 @@ export default createRule({ }, allowTypedFunctionExpressions: { description: - 'Whether to ignore type annotations on the variable of a function expresion.', + 'Whether to ignore type annotations on the variable of a function expression.', type: 'boolean', }, }, diff --git a/packages/eslint-plugin/src/rules/member-ordering.ts b/packages/eslint-plugin/src/rules/member-ordering.ts index c404823dfd80..34fed637e6c8 100644 --- a/packages/eslint-plugin/src/rules/member-ordering.ts +++ b/packages/eslint-plugin/src/rules/member-ordering.ts @@ -70,7 +70,7 @@ type Order = AlphabeticalOrder | 'as-written'; interface SortedOrderConfig { memberTypes?: MemberType[] | 'never'; optionalityOrder?: OptionalityOrder; - order: Order; + order?: Order; } type OrderConfig = MemberType[] | SortedOrderConfig | 'never'; @@ -739,7 +739,9 @@ export default createRule({ }, defaultOptions: [ { - default: defaultOrder, + default: { + memberTypes: defaultOrder, + }, }, ], create(context, [options]) { diff --git a/packages/eslint-plugin/src/rules/no-useless-template-literals.ts b/packages/eslint-plugin/src/rules/no-useless-template-literals.ts index d5a8a602b6b4..e80216fd5cbf 100644 --- a/packages/eslint-plugin/src/rules/no-useless-template-literals.ts +++ b/packages/eslint-plugin/src/rules/no-useless-template-literals.ts @@ -6,6 +6,7 @@ import { createRule, getConstrainedTypeAtLocation, getParserServices, + getStaticStringValue, isTypeFlagSet, isUndefinedIdentifier, } from '../util'; @@ -52,6 +53,24 @@ export default createRule<[], MessageId>({ return isString(type); } + function isLiteral(expression: TSESTree.Expression): boolean { + return expression.type === AST_NODE_TYPES.Literal; + } + + function isInfinityIdentifier(expression: TSESTree.Expression): boolean { + return ( + expression.type === AST_NODE_TYPES.Identifier && + expression.name === 'Infinity' + ); + } + + function isNaNIdentifier(expression: TSESTree.Expression): boolean { + return ( + expression.type === AST_NODE_TYPES.Identifier && + expression.name === 'NaN' + ); + } + return { TemplateLiteral(node: TSESTree.TemplateLiteral): void { if (node.parent.type === AST_NODE_TYPES.TaggedTemplateExpression) { @@ -90,13 +109,15 @@ export default createRule<[], MessageId>({ return; } - const literalsOrUndefinedExpressions = node.expressions.filter( + const fixableExpressions = node.expressions.filter( (expression): expression is TSESTree.Literal | TSESTree.Identifier => - expression.type === AST_NODE_TYPES.Literal || - isUndefinedIdentifier(expression), + isLiteral(expression) || + isUndefinedIdentifier(expression) || + isInfinityIdentifier(expression) || + isNaNIdentifier(expression), ); - literalsOrUndefinedExpressions.forEach(expression => { + fixableExpressions.forEach(expression => { context.report({ node: expression, messageId: 'noUselessTemplateLiteral', @@ -118,16 +139,10 @@ export default createRule<[], MessageId>({ ]), ]; - // Remove quotes for string literals (i.e. `'a'` will become `a`). - const isStringLiteral = - isUnderlyingTypeString(expression) && - expression.type === AST_NODE_TYPES.Literal; + const stringValue = getStaticStringValue(expression); - if (isStringLiteral) { - const escapedValue = expression.value.replace( - /([`$\\])/g, - '\\$1', - ); + if (stringValue != null) { + const escapedValue = stringValue.replace(/([`$\\])/g, '\\$1'); fixes.push(fixer.replaceText(expression, escapedValue)); } diff --git a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts index 4359cd5d0876..563bc8e99ec9 100644 --- a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts +++ b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts @@ -476,7 +476,7 @@ function verifyForAlways( } return true; }, - }) || nextNode; + }) ?? nextNode; const insertText = isTokenOnSameLine(prevToken, nextToken) ? '\n\n' : '\n'; diff --git a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts index c688d75d2771..144aa08641b5 100644 --- a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts +++ b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts @@ -10,8 +10,8 @@ import { getTypeFlags, isLogicalOrOperator, isNodeEqual, - isNullableType, isNullLiteral, + isTypeFlagSet, isUndefinedIdentifier, nullThrows, NullThrowsReasons, @@ -309,7 +309,7 @@ export default createRule({ ): void { const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node); const type = checker.getTypeAtLocation(tsNode.left); - if (!isNullableType(type)) { + if (!isTypeFlagSet(type, ts.TypeFlags.Null | ts.TypeFlags.Undefined)) { return; } diff --git a/packages/eslint-plugin/src/rules/prefer-readonly.ts b/packages/eslint-plugin/src/rules/prefer-readonly.ts index ea4ff0e1bc4c..faf8db39a55c 100644 --- a/packages/eslint-plugin/src/rules/prefer-readonly.ts +++ b/packages/eslint-plugin/src/rules/prefer-readonly.ts @@ -299,7 +299,10 @@ class ClassScope { tsutils.isModifierFlagSet(node, ts.ModifierFlags.Private) || node.name.kind === ts.SyntaxKind.PrivateIdentifier ) || - tsutils.isModifierFlagSet(node, ts.ModifierFlags.Readonly) || + tsutils.isModifierFlagSet( + node, + ts.ModifierFlags.Accessor | ts.ModifierFlags.Readonly, + ) || ts.isComputedPropertyName(node.name) ) { return; diff --git a/packages/eslint-plugin/src/rules/unified-signatures.ts b/packages/eslint-plugin/src/rules/unified-signatures.ts index 0d4b8e8035d3..9b5edbe0afba 100644 --- a/packages/eslint-plugin/src/rules/unified-signatures.ts +++ b/packages/eslint-plugin/src/rules/unified-signatures.ts @@ -369,7 +369,7 @@ export default createRule({ } return typeContainsTypeParameter( - (type as Partial).typeAnnotation || + (type as Partial).typeAnnotation ?? (type as TSESTree.TSArrayType).elementType, ); } @@ -523,7 +523,7 @@ export default createRule({ key ??= getOverloadKey(signature); if ( currentScope && - (containingNode || signature).parent === currentScope.parent + (containingNode ?? signature).parent === currentScope.parent ) { const overloads = currentScope.overloads.get(key); if (overloads !== undefined) { diff --git a/packages/eslint-plugin/tests/rules/member-ordering.test.ts b/packages/eslint-plugin/tests/rules/member-ordering.test.ts index 47019dfe5ab5..6ebcb82e3aaa 100644 --- a/packages/eslint-plugin/tests/rules/member-ordering.test.ts +++ b/packages/eslint-plugin/tests/rules/member-ordering.test.ts @@ -1649,6 +1649,31 @@ class Foo { }, ], }, + { + name: 'default member types with alphabetically-case-insensitive order', + code: ` +// no accessibility === public +class Foo { + [A: string]: any; + [a: string]: any; + static C: boolean; + static d: boolean; + b: any; + B: any; + get e(): string {} + get E(): string {} + private imPrivate() {} + private ImPrivate() {} +} + `, + options: [ + { + default: { + order: 'alphabetically-case-insensitive', + }, + }, + ], + }, { code: ` class Foo { @@ -2032,6 +2057,46 @@ class Foo { }, ], }, + { + name: 'default member types with alphabetically order', + code: ` +// no accessibility === public +class Foo { + [A: string]: any; + [B: string]: any; + [a: string]: any; + [b: string]: any; + static C: boolean; + static d: boolean; + get E(): string {} + get e(): string {} + private ImPrivate() {} + private imPrivate() {} +} + `, + options: [ + { + default: { + order: 'alphabetically', + }, + }, + ], + }, + { + name: 'alphabetically order without member types', + code: ` +// no accessibility === public +interface Foo { + A: string; + B: string; + [Z: string]: any; + c(); + new (); + r(); +} + `, + options: [{ default: { memberTypes: 'never', order: 'alphabetically' } }], + }, { code: ` class Foo { @@ -4802,6 +4867,57 @@ class Foo { }, ], }, + { + name: 'default member types with alphabetically order', + code: ` +// no accessibility === public +class Foo { + static C: boolean; + [B: string]: any; + private A() {} +} + `, + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'B', + rank: 'public static field', + }, + line: 5, + column: 3, + }, + ], + options: [ + { + default: { + order: 'alphabetically', + }, + }, + ], + }, + { + name: 'alphabetically order without member types', + code: ` +// no accessibility === public +class Foo { + static C: boolean; + [B: string]: any; +} + `, + errors: [ + { + messageId: 'incorrectOrder', + data: { + member: 'B', + beforeMember: 'C', + }, + line: 5, + column: 3, + }, + ], + options: [{ default: { memberTypes: 'never', order: 'alphabetically' } }], + }, { name: '#private and private member order', code: ` diff --git a/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts b/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts index 674b4ccefe77..0653e2506505 100644 --- a/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts +++ b/packages/eslint-plugin/tests/rules/no-useless-template-literals.test.ts @@ -17,7 +17,6 @@ ruleTester.run('no-useless-template-literals', rule, { valid: [ "const string = 'a';", 'const string = `a`;', - ` declare const string: 'a'; \`\${string}b\`; @@ -147,6 +146,30 @@ ruleTester.run('no-useless-template-literals', rule, { }, ], }, + { + code: '`${1n}`;', + output: '`1`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + line: 1, + column: 4, + endColumn: 6, + }, + ], + }, + { + code: '`${/a/}`;', + output: '`/a/`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + line: 1, + column: 4, + endColumn: 7, + }, + ], + }, { code: noFormat`\`\${ 1 }\`;`, @@ -257,6 +280,32 @@ ruleTester.run('no-useless-template-literals', rule, { ], }, + { + code: '`${Infinity}`;', + output: '`Infinity`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + line: 1, + column: 4, + endColumn: 12, + }, + ], + }, + + { + code: '`${NaN}`;', + output: '`NaN`;', + errors: [ + { + messageId: 'noUselessTemplateLiteral', + line: 1, + column: 4, + endColumn: 7, + }, + ], + }, + { code: "`${'a'} ${'b'}`;", output: '`a b`;', diff --git a/packages/eslint-plugin/tests/rules/prefer-nullish-coalescing.test.ts b/packages/eslint-plugin/tests/rules/prefer-nullish-coalescing.test.ts index 334754454f1c..c37a9431dae7 100644 --- a/packages/eslint-plugin/tests/rules/prefer-nullish-coalescing.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-nullish-coalescing.test.ts @@ -222,6 +222,21 @@ x || y; `, options: [{ ignorePrimitives: true }], })), + ` + declare const x: any; + declare const y: number; + x || y; + `, + ` + declare const x: unknown; + declare const y: number; + x || y; + `, + ` + declare const x: never; + declare const y: number; + x || y; + `, ], invalid: [ ...nullishTypeInvalidTest((nullish, type) => ({ diff --git a/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts b/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts index 39262c6fbb4e..3b1c25e75f11 100644 --- a/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-readonly.test.ts @@ -717,6 +717,26 @@ class Foo { } } `, + ` + class TestStaticPrivateAccessor { + private static accessor staticAcc = 1; + } + `, + ` + class TestStaticPrivateFieldAccessor { + static accessor #staticAcc = 1; + } + `, + ` + class TestPrivateAccessor { + private accessor acc = 3; + } + `, + ` + class TestPrivateFieldAccessor { + accessor #acc = 3; + } + `, ], invalid: [ { diff --git a/packages/eslint-plugin/tests/schema-snapshots/class-methods-use-this.shot b/packages/eslint-plugin/tests/schema-snapshots/class-methods-use-this.shot index 97e773bac407..ccecd0a0f6a9 100644 --- a/packages/eslint-plugin/tests/schema-snapshots/class-methods-use-this.shot +++ b/packages/eslint-plugin/tests/schema-snapshots/class-methods-use-this.shot @@ -35,7 +35,7 @@ exports[`Rule schemas should be convertible to TS types for documentation purpos ] }, "ignoreOverrideMethods": { - "description": "Ingore members marked with the \`override\` modifier", + "description": "Ignore members marked with the \`override\` modifier", "type": "boolean" } }, @@ -60,7 +60,7 @@ type Options = [ | boolean /** Ignore only the public fields of classes that implement an interface */ | 'public-fields'; - /** Ingore members marked with the \`override\` modifier */ + /** Ignore members marked with the \`override\` modifier */ ignoreOverrideMethods?: boolean; }, ]; diff --git a/packages/eslint-plugin/tests/schema-snapshots/explicit-module-boundary-types.shot b/packages/eslint-plugin/tests/schema-snapshots/explicit-module-boundary-types.shot index cd004e5a22bf..aa3494b2c238 100644 --- a/packages/eslint-plugin/tests/schema-snapshots/explicit-module-boundary-types.shot +++ b/packages/eslint-plugin/tests/schema-snapshots/explicit-module-boundary-types.shot @@ -28,7 +28,7 @@ exports[`Rule schemas should be convertible to TS types for documentation purpos "type": "boolean" }, "allowTypedFunctionExpressions": { - "description": "Whether to ignore type annotations on the variable of a function expresion.", + "description": "Whether to ignore type annotations on the variable of a function expression.", "type": "boolean" } }, @@ -53,7 +53,7 @@ type Options = [ * You must still type the parameters of the function. */ allowHigherOrderFunctions?: boolean; - /** Whether to ignore type annotations on the variable of a function expresion. */ + /** Whether to ignore type annotations on the variable of a function expression. */ allowTypedFunctionExpressions?: boolean; /** An array of function/method names that will not have their arguments or return values checked. */ allowedNames?: string[]; diff --git a/packages/integration-tests/CHANGELOG.md b/packages/integration-tests/CHANGELOG.md index e0bd38b1bf57..ba8e54fa00ac 100644 --- a/packages/integration-tests/CHANGELOG.md +++ b/packages/integration-tests/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for integration-tests 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. + ## 6.19.1 (2024-01-22) This was a version bump only for integration-tests to align it with other projects, there were no code changes. diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index f10c71fbe117..468aa5a844b4 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/integration-tests", - "version": "6.19.1", + "version": "6.20.0", "private": true, "scripts": { "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 88aa48e06499..b45909752734 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for parser 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. + ## 6.19.1 (2024-01-22) This was a version bump only for parser to align it with other projects, there were no code changes. diff --git a/packages/parser/package.json b/packages/parser/package.json index 1a68fac66293..4e337c40ee35 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "6.19.1", + "version": "6.20.0", "description": "An ESLint custom parser which leverages TypeScript ESTree", "files": [ "dist", @@ -51,10 +51,10 @@ "eslint": "^7.0.0 || ^8.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "6.19.1", - "@typescript-eslint/types": "6.19.1", - "@typescript-eslint/typescript-estree": "6.19.1", - "@typescript-eslint/visitor-keys": "6.19.1", + "@typescript-eslint/scope-manager": "6.20.0", + "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/visitor-keys": "6.20.0", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/repo-tools/CHANGELOG.md b/packages/repo-tools/CHANGELOG.md index ffbaa2c4bb7e..7684d33a68a2 100644 --- a/packages/repo-tools/CHANGELOG.md +++ b/packages/repo-tools/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for repo-tools 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. + ## 6.19.1 (2024-01-22) This was a version bump only for repo-tools to align it with other projects, there were no code changes. diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index d3fa46e2eee3..e791791d6d9b 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/repo-tools", - "version": "6.19.1", + "version": "6.20.0", "private": true, "scripts": { "//": "NOTE: intentionally no build step in this package", diff --git a/packages/rule-schema-to-typescript-types/CHANGELOG.md b/packages/rule-schema-to-typescript-types/CHANGELOG.md index 31d14f226f38..1fb5c4f9b06f 100644 --- a/packages/rule-schema-to-typescript-types/CHANGELOG.md +++ b/packages/rule-schema-to-typescript-types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for rule-schema-to-typescript-types 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. + ## 6.19.1 (2024-01-22) This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index aec08d59afa2..c4d76eb4ec13 100644 --- a/packages/rule-schema-to-typescript-types/package.json +++ b/packages/rule-schema-to-typescript-types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-schema-to-typescript-types", - "version": "6.19.1", + "version": "6.20.0", "private": true, "type": "commonjs", "exports": { @@ -34,8 +34,8 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/type-utils": "6.19.1", - "@typescript-eslint/utils": "6.19.1", + "@typescript-eslint/type-utils": "6.20.0", + "@typescript-eslint/utils": "6.20.0", "natural-compare": "^1.4.0", "prettier": "^3.0.3" }, diff --git a/packages/rule-tester/CHANGELOG.md b/packages/rule-tester/CHANGELOG.md index c2b3ca916d7a..b8103de73e2b 100644 --- a/packages/rule-tester/CHANGELOG.md +++ b/packages/rule-tester/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for rule-tester 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. + ## 6.19.1 (2024-01-22) This was a version bump only for rule-tester to align it with other projects, there were no code changes. diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json index e99f75099698..c2cfbe6ab2ec 100644 --- a/packages/rule-tester/package.json +++ b/packages/rule-tester/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-tester", - "version": "6.19.1", + "version": "6.20.0", "description": "Tooling to test ESLint rules", "files": [ "dist", @@ -47,8 +47,8 @@ }, "//": "NOTE - AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70", "dependencies": { - "@typescript-eslint/typescript-estree": "6.19.1", - "@typescript-eslint/utils": "6.19.1", + "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/utils": "6.20.0", "ajv": "^6.10.0", "lodash.merge": "4.6.2", "semver": "^7.5.4" @@ -59,7 +59,7 @@ }, "devDependencies": { "@types/lodash.merge": "4.6.9", - "@typescript-eslint/parser": "6.19.1", + "@typescript-eslint/parser": "6.20.0", "chai": "^4.3.7", "mocha": "^10.0.0", "sinon": "^16.0.0", diff --git a/packages/rule-tester/src/utils/getRuleOptionsSchema.ts b/packages/rule-tester/src/utils/getRuleOptionsSchema.ts index 1ff81d658e8e..f00ff1de6c94 100644 --- a/packages/rule-tester/src/utils/getRuleOptionsSchema.ts +++ b/packages/rule-tester/src/utils/getRuleOptionsSchema.ts @@ -33,5 +33,5 @@ export function getRuleOptionsSchema( } // Given a full schema, leave it alone - return schema || null; + return schema ?? null; } diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 3f28bdd40218..e1aace5de4c4 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for scope-manager 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. + ## 6.19.1 (2024-01-22) This was a version bump only for scope-manager to align it with other projects, there were no code changes. diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index ce447d544b09..65848a158e44 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "6.19.1", + "version": "6.20.0", "description": "TypeScript scope analyser for ESLint", "files": [ "dist", @@ -44,13 +44,13 @@ "typecheck": "npx nx typecheck" }, "dependencies": { - "@typescript-eslint/types": "6.19.1", - "@typescript-eslint/visitor-keys": "6.19.1" + "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/visitor-keys": "6.20.0" }, "devDependencies": { "@prettier/sync": "*", "@types/glob": "*", - "@typescript-eslint/typescript-estree": "6.19.1", + "@typescript-eslint/typescript-estree": "6.20.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/type-utils/CHANGELOG.md b/packages/type-utils/CHANGELOG.md index 5add03e038f6..1dd061652d95 100644 --- a/packages/type-utils/CHANGELOG.md +++ b/packages/type-utils/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for type-utils 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. + ## 6.19.1 (2024-01-22) diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index 40bb807c187a..b0fd360c091a 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/type-utils", - "version": "6.19.1", + "version": "6.20.0", "description": "Type utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -45,13 +45,13 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/typescript-estree": "6.19.1", - "@typescript-eslint/utils": "6.19.1", + "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/utils": "6.20.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "devDependencies": { - "@typescript-eslint/parser": "6.19.1", + "@typescript-eslint/parser": "6.20.0", "ajv": "^6.10.0", "downlevel-dts": "*", "jest": "29.7.0", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 71e200aa690d..7366b2ac2e2a 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for types 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. + ## 6.19.1 (2024-01-22) This was a version bump only for types to align it with other projects, there were no code changes. diff --git a/packages/types/package.json b/packages/types/package.json index ffe604a3beab..b1f9da3d3532 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "6.19.1", + "version": "6.20.0", "description": "Types for the TypeScript-ESTree AST spec", "files": [ "dist", diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 8fef02eac6ec..6931645a22f1 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for typescript-estree 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. + ## 6.19.1 (2024-01-22) This was a version bump only for typescript-estree to align it with other projects, there were no code changes. diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index a250df8f0bc9..61990bc01979 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "6.19.1", + "version": "6.20.0", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "files": [ "dist", @@ -52,8 +52,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.19.1", - "@typescript-eslint/visitor-keys": "6.19.1", + "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/visitor-keys": "6.20.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index a446dfdfec02..6b57bb6e8eab 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for utils 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. + ## 6.19.1 (2024-01-22) This was a version bump only for utils to align it with other projects, there were no code changes. diff --git a/packages/utils/package.json b/packages/utils/package.json index 84a88ffc53b6..d0e7c0c25acd 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/utils", - "version": "6.19.1", + "version": "6.20.0", "description": "Utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -68,16 +68,16 @@ "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.19.1", - "@typescript-eslint/types": "6.19.1", - "@typescript-eslint/typescript-estree": "6.19.1", + "@typescript-eslint/scope-manager": "6.20.0", + "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/typescript-estree": "6.20.0", "semver": "^7.5.4" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0" }, "devDependencies": { - "@typescript-eslint/parser": "6.19.1", + "@typescript-eslint/parser": "6.20.0", "downlevel-dts": "*", "jest": "29.7.0", "prettier": "^3.0.3", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 25dd6ea911ce..fc174105863a 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for visitor-keys 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. + ## 6.19.1 (2024-01-22) This was a version bump only for visitor-keys to align it with other projects, there were no code changes. diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index b35a7886c91a..caebea3803fc 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "6.19.1", + "version": "6.20.0", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "files": [ "dist", @@ -45,7 +45,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.19.1", + "@typescript-eslint/types": "6.20.0", "eslint-visitor-keys": "^3.4.1" }, "devDependencies": { diff --git a/packages/website-eslint/CHANGELOG.md b/packages/website-eslint/CHANGELOG.md index b8d2b86118a1..f0a4c4dc7f66 100644 --- a/packages/website-eslint/CHANGELOG.md +++ b/packages/website-eslint/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for website-eslint 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. + ## 6.19.1 (2024-01-22) This was a version bump only for website-eslint to align it with other projects, there were no code changes. diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index ebee17153dce..ecd3a502b886 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/website-eslint", - "version": "6.19.1", + "version": "6.20.0", "private": true, "description": "ESLint which works in browsers.", "files": [ @@ -23,16 +23,16 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.19.1", - "@typescript-eslint/utils": "6.19.1" + "@typescript-eslint/types": "6.20.0", + "@typescript-eslint/utils": "6.20.0" }, "devDependencies": { "@eslint/js": "8.56.0", - "@typescript-eslint/eslint-plugin": "6.19.1", - "@typescript-eslint/parser": "6.19.1", - "@typescript-eslint/scope-manager": "6.19.1", - "@typescript-eslint/typescript-estree": "6.19.1", - "@typescript-eslint/visitor-keys": "6.19.1", + "@typescript-eslint/eslint-plugin": "6.20.0", + "@typescript-eslint/parser": "6.20.0", + "@typescript-eslint/scope-manager": "6.20.0", + "@typescript-eslint/typescript-estree": "6.20.0", + "@typescript-eslint/visitor-keys": "6.20.0", "esbuild": "~0.19.0", "eslint": "*", "esquery": "*", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md index 26edbcf98fac..7c5f8dfe31fd 100644 --- a/packages/website/CHANGELOG.md +++ b/packages/website/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.20.0 (2024-01-29) + +This was a version bump only for website 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. + ## 6.19.1 (2024-01-22) This was a version bump only for website to align it with other projects, there were no code changes. diff --git a/packages/website/blog/2022-12-05-asts-and-typescript-eslint.md b/packages/website/blog/2022-12-05-asts-and-typescript-eslint.md index 7e0bb8c43dee..8e15ac35bb3b 100644 --- a/packages/website/blog/2022-12-05-asts-and-typescript-eslint.md +++ b/packages/website/blog/2022-12-05-asts-and-typescript-eslint.md @@ -14,6 +14,8 @@ Programmers who work with tools like [ESLint](https://eslint.org) and [Prettier] But what is an AST, why is it useful for these kinds of tools, and how does that interact with ESLint and TypeScript tooling? Let's dig in! + + ## What's an AST? _Static analysis_ tools are those that look at code without running it. diff --git a/packages/website/blog/2023-02-24-consistent-type-exports-and-imports-why-and-how.md b/packages/website/blog/2023-02-24-consistent-type-exports-and-imports-why-and-how.md index 2135f6e3b3b5..5e0f1e02de58 100644 --- a/packages/website/blog/2023-02-24-consistent-type-exports-and-imports-why-and-how.md +++ b/packages/website/blog/2023-02-24-consistent-type-exports-and-imports-why-and-how.md @@ -16,7 +16,19 @@ They were added as part of the [ECMAScript Modules (ESM)](https://nodejs.org/api When writing TypeScript code with ESM, it can sometimes be desirable to import or export a type only in the type system. Code may wish to refer to a _type_, but not actually import or export a corresponding _value_. -For that purpose, TypeScript 3.8 [added type-only imports and exports](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) to the TypeScript language: +Type-only imports and exports are not emitted as runtime code when code is transpiled to JavaScript. +This brings up two questions: + +- Why would you want to use these type-only imports and exports? +- How can you enforce a project use them whenever necessary? + +Let's dig in! + + + +## Recap: Type-Only Imports and Exports + +TypeScript 3.8 [added type-only imports and exports](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) to the TypeScript language: ```ts import type { SomeThing } from './some-module.js'; @@ -41,16 +53,6 @@ TypeScript 4.5 also added [inline type qualifiers](https://www.typescriptlang.or import { type SomeType, SomeValue } from './some-module.js'; ``` -Type-only imports and exports are not emitted as runtime code when code is transpiled to JavaScript. -This brings up two questions: - -- Why would you want to use these type-only imports and exports? -- How can you enforce a project use them whenever necessary? - -Let's Dig In! - - - ## Benefits of Enforcing Type-only Imports/Exports ### Avoiding Unintentional Side Effects diff --git a/packages/website/data/sponsors.json b/packages/website/data/sponsors.json index 45f8d72856f6..81dd7057d652 100644 --- a/packages/website/data/sponsors.json +++ b/packages/website/data/sponsors.json @@ -83,6 +83,13 @@ "totalDonations": 114800, "website": "https://sentry.io/welcome/" }, + { + "id": "THANKS.DEV", + "image": "https://images.opencollective.com/thanks-dev/ed78b39/logo.png", + "name": "THANKS.DEV", + "totalDonations": 91083, + "website": "https://thanks.dev" + }, { "id": "EY Doberman", "image": "https://images.opencollective.com/ey-doberman/b269462/logo.png", @@ -230,13 +237,6 @@ "totalDonations": 15000, "website": "https://paddn.com/" }, - { - "id": "THANKS.DEV", - "image": "https://images.opencollective.com/thanks-dev/ed78b39/logo.png", - "name": "THANKS.DEV", - "totalDonations": 14761, - "website": "https://thanks.dev" - }, { "id": "Now4real", "image": "https://images.opencollective.com/now4real/54ca7d9/logo.png", diff --git a/packages/website/docusaurusConfig.ts b/packages/website/docusaurusConfig.ts index cc283cfc2993..3b0f04dbe801 100644 --- a/packages/website/docusaurusConfig.ts +++ b/packages/website/docusaurusConfig.ts @@ -19,6 +19,9 @@ const beforeDefaultRemarkPlugins: MDXPlugin[] = [tabsPlugin]; const githubUrl = 'https://github.com/typescript-eslint/typescript-eslint'; const presetClassicOptions: PresetClassicOptions = { + blog: { + blogSidebarCount: 'ALL', + }, docs: { id: 'rules-docs', path: '../eslint-plugin/docs/rules', diff --git a/packages/website/package.json b/packages/website/package.json index 5b55982f1fa3..4e44898dd98e 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "6.19.1", + "version": "6.20.0", "private": true, "scripts": { "build": "docusaurus build", @@ -24,8 +24,8 @@ "@docusaurus/theme-common": "~2.4.1", "@mdx-js/react": "1.6.22", "@prettier/sync": "*", - "@typescript-eslint/parser": "6.19.1", - "@typescript-eslint/website-eslint": "6.19.1", + "@typescript-eslint/parser": "6.20.0", + "@typescript-eslint/website-eslint": "6.20.0", "clsx": "^2.0.0", "eslint": "*", "json-schema": "^0.4.0", @@ -50,9 +50,9 @@ "@types/react": "*", "@types/react-helmet": "^6.1.6", "@types/react-router-dom": "^5.3.3", - "@typescript-eslint/eslint-plugin": "6.19.1", - "@typescript-eslint/rule-schema-to-typescript-types": "6.19.1", - "@typescript-eslint/types": "6.19.1", + "@typescript-eslint/eslint-plugin": "6.20.0", + "@typescript-eslint/rule-schema-to-typescript-types": "6.20.0", + "@typescript-eslint/types": "6.20.0", "copy-webpack-plugin": "^11.0.0", "cross-fetch": "*", "globby": "^11.1.0", diff --git a/packages/website/src/css/custom.css b/packages/website/src/css/custom.css index 8cfb3dc2c0f7..7e1e417c8692 100644 --- a/packages/website/src/css/custom.css +++ b/packages/website/src/css/custom.css @@ -191,3 +191,7 @@ h6 { [data-theme='dark'] .code-block-added-line { background-color: #00ff9510; } + +.markdown a { + text-decoration: underline; +} diff --git a/packages/website/src/css/prism.css b/packages/website/src/css/prism.css index d5a7c9f6b99d..392cf22277bf 100644 --- a/packages/website/src/css/prism.css +++ b/packages/website/src/css/prism.css @@ -6,16 +6,16 @@ --token-color-doctype: #008000; --token-color-string: #a31515; --token-color-operator: #393a34; - --token-color-symbol: #36acaa; + --token-color-symbol: #277c7b; --token-color-number: #098658; --token-color-keyword: #00f; - --token-color-function: #569cd6; + --token-color-function: #2b74b1; --token-color-function-variable: #000; --token-color-important: #e90; - --token-color-class-name: #2b91af; + --token-color-class-name: #237690; --token-color-selector: #800000; --token-color-regexp: #800000; - --token-color-property: #d00; + --token-color-property: #c70000; --token-color-builtin: #00f; --token-color-boolean: #00f; --token-color-inserted: #247e81; @@ -28,9 +28,9 @@ html[data-theme='dark'] { --token-color: #f8f8f2; --token-background: var(--ifm-background-surface-color); --token-border: #414458; - --token-color-comment: #737373; + --token-color-comment: #9e9e9e; --token-color-doctype: #6a9955; - --token-color-string: #6a9955; + --token-color-string: #78a861; --token-color-operator: #d4d4d4; --token-color-symbol: #b5cea8; --token-color-number: #b5cea8; diff --git a/yarn.lock b/yarn.lock index 5138bd091421..4ad56931c684 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5055,13 +5055,13 @@ __metadata: linkType: hard "@types/react@npm:^18.2.14": - version: 18.2.42 - resolution: "@types/react@npm:18.2.42" + version: 18.2.48 + resolution: "@types/react@npm:18.2.48" dependencies: "@types/prop-types": "*" "@types/scheduler": "*" csstype: ^3.0.2 - checksum: d2019afdf48303a3a598a97cc9dd2284e3c04b369e791f6ba3c33232b7f8645daff97b093a19f8b3ce75ac8a261b47552cb4513226ab16d843eb9443b0f91844 + checksum: c9ca43ed2995389b7e09492c24e6f911a8439bb8276dd17cc66a2fbebbf0b42daf7b2ad177043256533607c2ca644d7d928fdfce37a67af1f8646d2bac988900 languageName: node linkType: hard @@ -5221,10 +5221,10 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-internal@workspace:packages/eslint-plugin-internal" dependencies: "@prettier/sync": "*" - "@typescript-eslint/rule-tester": 6.19.1 - "@typescript-eslint/scope-manager": 6.19.1 - "@typescript-eslint/type-utils": 6.19.1 - "@typescript-eslint/utils": 6.19.1 + "@typescript-eslint/rule-tester": 6.20.0 + "@typescript-eslint/scope-manager": 6.20.0 + "@typescript-eslint/type-utils": 6.20.0 + "@typescript-eslint/utils": 6.20.0 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5236,8 +5236,8 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-tslint@workspace:packages/eslint-plugin-tslint" dependencies: "@types/lodash": "*" - "@typescript-eslint/parser": 6.19.1 - "@typescript-eslint/utils": 6.19.1 + "@typescript-eslint/parser": 6.20.0 + "@typescript-eslint/utils": 6.20.0 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5248,7 +5248,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/eslint-plugin@6.19.1, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": +"@typescript-eslint/eslint-plugin@6.20.0, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": version: 0.0.0-use.local resolution: "@typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin" dependencies: @@ -5257,12 +5257,12 @@ __metadata: "@types/debug": "*" "@types/marked": "*" "@types/natural-compare": "*" - "@typescript-eslint/rule-schema-to-typescript-types": 6.19.1 - "@typescript-eslint/rule-tester": 6.19.1 - "@typescript-eslint/scope-manager": 6.19.1 - "@typescript-eslint/type-utils": 6.19.1 - "@typescript-eslint/utils": 6.19.1 - "@typescript-eslint/visitor-keys": 6.19.1 + "@typescript-eslint/rule-schema-to-typescript-types": 6.20.0 + "@typescript-eslint/rule-tester": 6.20.0 + "@typescript-eslint/scope-manager": 6.20.0 + "@typescript-eslint/type-utils": 6.20.0 + "@typescript-eslint/utils": 6.20.0 + "@typescript-eslint/visitor-keys": 6.20.0 ajv: ^6.12.6 chalk: ^5.3.0 cross-fetch: "*" @@ -5301,15 +5301,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/parser@6.19.1, @typescript-eslint/parser@workspace:packages/parser": +"@typescript-eslint/parser@6.20.0, @typescript-eslint/parser@workspace:packages/parser": version: 0.0.0-use.local resolution: "@typescript-eslint/parser@workspace:packages/parser" dependencies: "@types/glob": "*" - "@typescript-eslint/scope-manager": 6.19.1 - "@typescript-eslint/types": 6.19.1 - "@typescript-eslint/typescript-estree": 6.19.1 - "@typescript-eslint/visitor-keys": 6.19.1 + "@typescript-eslint/scope-manager": 6.20.0 + "@typescript-eslint/types": 6.20.0 + "@typescript-eslint/typescript-estree": 6.20.0 + "@typescript-eslint/visitor-keys": 6.20.0 debug: ^4.3.4 downlevel-dts: "*" glob: "*" @@ -5341,26 +5341,26 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/rule-schema-to-typescript-types@6.19.1, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": +"@typescript-eslint/rule-schema-to-typescript-types@6.20.0, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types" dependencies: "@prettier/sync": "*" - "@typescript-eslint/type-utils": 6.19.1 - "@typescript-eslint/utils": 6.19.1 + "@typescript-eslint/type-utils": 6.20.0 + "@typescript-eslint/utils": 6.20.0 natural-compare: ^1.4.0 prettier: ^3.0.3 languageName: unknown linkType: soft -"@typescript-eslint/rule-tester@6.19.1, @typescript-eslint/rule-tester@workspace:packages/rule-tester": +"@typescript-eslint/rule-tester@6.20.0, @typescript-eslint/rule-tester@workspace:packages/rule-tester": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-tester@workspace:packages/rule-tester" dependencies: "@types/lodash.merge": 4.6.9 - "@typescript-eslint/parser": 6.19.1 - "@typescript-eslint/typescript-estree": 6.19.1 - "@typescript-eslint/utils": 6.19.1 + "@typescript-eslint/parser": 6.20.0 + "@typescript-eslint/typescript-estree": 6.20.0 + "@typescript-eslint/utils": 6.20.0 ajv: ^6.10.0 chai: ^4.3.7 lodash.merge: 4.6.2 @@ -5374,15 +5374,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/scope-manager@6.19.1, @typescript-eslint/scope-manager@workspace:packages/scope-manager": +"@typescript-eslint/scope-manager@6.20.0, @typescript-eslint/scope-manager@workspace:packages/scope-manager": version: 0.0.0-use.local resolution: "@typescript-eslint/scope-manager@workspace:packages/scope-manager" dependencies: "@prettier/sync": "*" "@types/glob": "*" - "@typescript-eslint/types": 6.19.1 - "@typescript-eslint/typescript-estree": 6.19.1 - "@typescript-eslint/visitor-keys": 6.19.1 + "@typescript-eslint/types": 6.20.0 + "@typescript-eslint/typescript-estree": 6.20.0 + "@typescript-eslint/visitor-keys": 6.20.0 glob: "*" jest-specific-snapshot: "*" make-dir: "*" @@ -5401,13 +5401,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@6.19.1, @typescript-eslint/type-utils@workspace:packages/type-utils": +"@typescript-eslint/type-utils@6.20.0, @typescript-eslint/type-utils@workspace:packages/type-utils": version: 0.0.0-use.local resolution: "@typescript-eslint/type-utils@workspace:packages/type-utils" dependencies: - "@typescript-eslint/parser": 6.19.1 - "@typescript-eslint/typescript-estree": 6.19.1 - "@typescript-eslint/utils": 6.19.1 + "@typescript-eslint/parser": 6.20.0 + "@typescript-eslint/typescript-estree": 6.20.0 + "@typescript-eslint/utils": 6.20.0 ajv: ^6.10.0 debug: ^4.3.4 downlevel-dts: "*" @@ -5424,7 +5424,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/types@6.19.1, @typescript-eslint/types@workspace:packages/types": +"@typescript-eslint/types@6.20.0, @typescript-eslint/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@typescript-eslint/types@workspace:packages/types" dependencies: @@ -5515,14 +5515,14 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/typescript-estree@6.19.1, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": +"@typescript-eslint/typescript-estree@6.20.0, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": version: 0.0.0-use.local resolution: "@typescript-eslint/typescript-estree@workspace:packages/typescript-estree" dependencies: "@babel/code-frame": "*" "@babel/parser": "*" - "@typescript-eslint/types": 6.19.1 - "@typescript-eslint/visitor-keys": 6.19.1 + "@typescript-eslint/types": 6.20.0 + "@typescript-eslint/visitor-keys": 6.20.0 debug: ^4.3.4 glob: "*" globby: ^11.1.0 @@ -5561,17 +5561,17 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@6.19.1, @typescript-eslint/utils@^6.0.0, @typescript-eslint/utils@workspace:packages/utils": +"@typescript-eslint/utils@6.20.0, @typescript-eslint/utils@^6.0.0, @typescript-eslint/utils@workspace:packages/utils": version: 0.0.0-use.local resolution: "@typescript-eslint/utils@workspace:packages/utils" dependencies: "@eslint-community/eslint-utils": ^4.4.0 "@types/json-schema": ^7.0.12 "@types/semver": ^7.5.0 - "@typescript-eslint/parser": 6.19.1 - "@typescript-eslint/scope-manager": 6.19.1 - "@typescript-eslint/types": 6.19.1 - "@typescript-eslint/typescript-estree": 6.19.1 + "@typescript-eslint/parser": 6.20.0 + "@typescript-eslint/scope-manager": 6.20.0 + "@typescript-eslint/types": 6.20.0 + "@typescript-eslint/typescript-estree": 6.20.0 downlevel-dts: "*" jest: 29.7.0 prettier: ^3.0.3 @@ -5601,12 +5601,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@6.19.1, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": +"@typescript-eslint/visitor-keys@6.20.0, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": version: 0.0.0-use.local resolution: "@typescript-eslint/visitor-keys@workspace:packages/visitor-keys" dependencies: "@types/eslint-visitor-keys": "*" - "@typescript-eslint/types": 6.19.1 + "@typescript-eslint/types": 6.20.0 downlevel-dts: "*" eslint-visitor-keys: ^3.4.1 jest: 29.7.0 @@ -5626,18 +5626,18 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/website-eslint@6.19.1, @typescript-eslint/website-eslint@workspace:packages/website-eslint": +"@typescript-eslint/website-eslint@6.20.0, @typescript-eslint/website-eslint@workspace:packages/website-eslint": version: 0.0.0-use.local resolution: "@typescript-eslint/website-eslint@workspace:packages/website-eslint" dependencies: "@eslint/js": 8.56.0 - "@typescript-eslint/eslint-plugin": 6.19.1 - "@typescript-eslint/parser": 6.19.1 - "@typescript-eslint/scope-manager": 6.19.1 - "@typescript-eslint/types": 6.19.1 - "@typescript-eslint/typescript-estree": 6.19.1 - "@typescript-eslint/utils": 6.19.1 - "@typescript-eslint/visitor-keys": 6.19.1 + "@typescript-eslint/eslint-plugin": 6.20.0 + "@typescript-eslint/parser": 6.20.0 + "@typescript-eslint/scope-manager": 6.20.0 + "@typescript-eslint/types": 6.20.0 + "@typescript-eslint/typescript-estree": 6.20.0 + "@typescript-eslint/utils": 6.20.0 + "@typescript-eslint/visitor-keys": 6.20.0 esbuild: ~0.19.0 eslint: "*" esquery: "*" @@ -18863,11 +18863,11 @@ __metadata: "@types/react": "*" "@types/react-helmet": ^6.1.6 "@types/react-router-dom": ^5.3.3 - "@typescript-eslint/eslint-plugin": 6.19.1 - "@typescript-eslint/parser": 6.19.1 - "@typescript-eslint/rule-schema-to-typescript-types": 6.19.1 - "@typescript-eslint/types": 6.19.1 - "@typescript-eslint/website-eslint": 6.19.1 + "@typescript-eslint/eslint-plugin": 6.20.0 + "@typescript-eslint/parser": 6.20.0 + "@typescript-eslint/rule-schema-to-typescript-types": 6.20.0 + "@typescript-eslint/types": 6.20.0 + "@typescript-eslint/website-eslint": 6.20.0 clsx: ^2.0.0 copy-webpack-plugin: ^11.0.0 cross-fetch: "*"