diff --git a/CHANGELOG.md b/CHANGELOG.md index beb0f5e11726..fe35764b6c57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + + +### Bug Fixes + +* default to parse all JSDoc and provide options to configure it ([#7999](https://github.com/typescript-eslint/typescript-eslint/issues/7999)) ([779e13e](https://github.com/typescript-eslint/typescript-eslint/commit/779e13ec86f92b94a96ecdf81cbc36120a132ff6)) + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) diff --git a/docs/packages/Parser.mdx b/docs/packages/Parser.mdx index 3fc4fed317b1..efaa66924ce5 100644 --- a/docs/packages/Parser.mdx +++ b/docs/packages/Parser.mdx @@ -40,10 +40,11 @@ interface ParserOptions { ecmaVersion?: number | 'latest'; emitDecoratorMetadata?: boolean; extraFileExtensions?: string[]; + jsDocParsingMode?: 'all' | 'none' | 'type-info'; jsxFragmentName?: string | null; jsxPragma?: string | null; lib?: string[]; - program?: import('typescript').Program; + programs?: import('typescript').Program; project?: string | string[] | true; projectFolderIgnoreList?: string[]; tsconfigRootDir?: string; @@ -118,6 +119,21 @@ This option allows you to provide one or more additional file extensions which s The default extensions are `['.js', '.mjs', '.cjs', '.jsx', '.ts', '.mts', '.cts', '.tsx']`. Add extensions starting with `.`, followed by the file extension. E.g. for a `.vue` file use `"extraFileExtensions": [".vue"]`. +### `jsDocParsingMode` + +> Default if `parserOptions.project` is set, then `'all'`, otherwise `'none'` + +When TS parses a file it will also parse JSDoc comments into the AST - which can then be consumed by lint rules. +If you are using TypeScript version >=5.3 then this option can be used as a performance optimization. + +The valid values for this rule are: + +- `'all'` - parse all JSDoc comments, always. +- `'none'` - parse no JSDoc comments, ever. +- `'type-info'` - parse just JSDoc comments that are required to provide correct type-info. TS will always parse JSDoc in non-TS files, but never in TS files. + +If you do not use lint rules like `eslint-plugin-deprecation` that rely on TS's JSDoc tag representation, then you can set this to `'none'` to improve parser performance. + ### `jsxFragmentName` > Default `null` @@ -149,7 +165,7 @@ Specifies the TypeScript `lib`s that are available. This is used by the scope an If you provide `parserOptions.project`, you do not need to set this, as it will automatically detected from the compiler. -### `program` +### `programs` > Default `undefined`. diff --git a/docs/packages/TypeScript_ESTree.mdx b/docs/packages/TypeScript_ESTree.mdx index 6354565e8282..610f641d384d 100644 --- a/docs/packages/TypeScript_ESTree.mdx +++ b/docs/packages/TypeScript_ESTree.mdx @@ -70,6 +70,18 @@ interface ParseOptions { */ filePath?: string; + /** + * If you are using TypeScript version >=5.3 then this option can be used as a performance optimization. + * + * The valid values for this rule are: + * - `'all'` - parse all JSDoc comments, always. + * - `'none'` - parse no JSDoc comments, ever. + * - `'type-info'` - parse just JSDoc comments that are required to provide correct type-info. TS will always parse JSDoc in non-TS files, but never in TS files. + * + * If you do not rely on JSDoc tags from the TypeScript AST, then you can safely set this to `'none'` to improve performance. + */ + jsDocParsingMode?: JSDocParsingMode; + /** * Enable parsing of JSX. * For more details, see https://www.typescriptlang.org/docs/handbook/jsx.html @@ -111,6 +123,7 @@ interface ParseOptions { const PARSE_DEFAULT_OPTIONS: ParseOptions = { comment: false, filePath: 'estree.ts', // or 'estree.tsx', if you pass jsx: true + jsDocParsingMode: 'all', jsx: false, loc: false, loggerFn: undefined, diff --git a/lerna.json b/lerna.json index c75f3a8786af..79835e11b586 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "6.13.0", + "version": "6.13.1", "npmClient": "yarn", "stream": true, "command": { diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 15ed5791867c..56f409bc51b9 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index f3377892d4d9..ee7b0e755100 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "6.13.0", + "version": "6.13.1", "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 6055857d5235..5aa29daa8560 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 414003f2427f..58ab53ff7bc0 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.13.0", + "version": "6.13.1", "private": true, "main": "dist/index.js", "scripts": { @@ -14,10 +14,10 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/rule-tester": "6.13.0", - "@typescript-eslint/scope-manager": "6.13.0", - "@typescript-eslint/type-utils": "6.13.0", - "@typescript-eslint/utils": "6.13.0", + "@typescript-eslint/rule-tester": "6.13.1", + "@typescript-eslint/scope-manager": "6.13.1", + "@typescript-eslint/type-utils": "6.13.1", + "@typescript-eslint/utils": "6.13.1", "prettier": "^3.0.3" }, "devDependencies": { diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 9c932a5ab1f7..03accc8c1623 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 892c694c298a..bc72e31d9701 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.13.0", + "version": "6.13.1", "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.13.0" + "@typescript-eslint/utils": "6.13.1" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0", @@ -55,7 +55,7 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "6.13.0", + "@typescript-eslint/parser": "6.13.1", "jest": "29.7.0", "prettier": "^3.0.3", "rimraf": "*" diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 383448d96df6..68f15e01b189 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index a8c76d03cb1e..0b429e0c4602 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "6.13.0", + "version": "6.13.1", "description": "TypeScript plugin for ESLint", "files": [ "dist", @@ -57,10 +57,10 @@ }, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.13.0", - "@typescript-eslint/type-utils": "6.13.0", - "@typescript-eslint/utils": "6.13.0", - "@typescript-eslint/visitor-keys": "6.13.0", + "@typescript-eslint/scope-manager": "6.13.1", + "@typescript-eslint/type-utils": "6.13.1", + "@typescript-eslint/utils": "6.13.1", + "@typescript-eslint/visitor-keys": "6.13.1", "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.13.0", - "@typescript-eslint/rule-tester": "6.13.0", + "@typescript-eslint/rule-schema-to-typescript-types": "6.13.1", + "@typescript-eslint/rule-tester": "6.13.1", "ajv": "^6.12.6", "chalk": "^5.3.0", "cross-fetch": "*", diff --git a/packages/integration-tests/CHANGELOG.md b/packages/integration-tests/CHANGELOG.md index b352e16613fd..cd58f2cbaa05 100644 --- a/packages/integration-tests/CHANGELOG.md +++ b/packages/integration-tests/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + +**Note:** Version bump only for package @typescript-eslint/integration-tests + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package @typescript-eslint/integration-tests diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index 5ac6bedd9dcd..9d042d89b813 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/integration-tests", - "version": "6.13.0", + "version": "6.13.1", "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 8b364f91b046..1745c51c134b 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + +**Note:** Version bump only for package @typescript-eslint/parser + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index b3288dd28f78..525a45f0b95d 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "6.13.0", + "version": "6.13.1", "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.13.0", - "@typescript-eslint/types": "6.13.0", - "@typescript-eslint/typescript-estree": "6.13.0", - "@typescript-eslint/visitor-keys": "6.13.0", + "@typescript-eslint/scope-manager": "6.13.1", + "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/typescript-estree": "6.13.1", + "@typescript-eslint/visitor-keys": "6.13.1", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/repo-tools/CHANGELOG.md b/packages/repo-tools/CHANGELOG.md index 459ed220f5b8..03511b2b0cb6 100644 --- a/packages/repo-tools/CHANGELOG.md +++ b/packages/repo-tools/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + +**Note:** Version bump only for package @typescript-eslint/repo-tools + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index 0643eead82c6..5d7bc098ca5a 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/repo-tools", - "version": "6.13.0", + "version": "6.13.1", "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 7d5e7a739069..4ca2cecc2aaa 100644 --- a/packages/rule-schema-to-typescript-types/CHANGELOG.md +++ b/packages/rule-schema-to-typescript-types/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + +**Note:** Version bump only for package @typescript-eslint/rule-schema-to-typescript-types + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package @typescript-eslint/rule-schema-to-typescript-types diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index f2938992c088..834243c2834c 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.13.0", + "version": "6.13.1", "private": true, "type": "commonjs", "exports": { @@ -34,8 +34,8 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/type-utils": "6.13.0", - "@typescript-eslint/utils": "6.13.0", + "@typescript-eslint/type-utils": "6.13.1", + "@typescript-eslint/utils": "6.13.1", "natural-compare": "^1.4.0", "prettier": "^3.0.3" }, diff --git a/packages/rule-tester/CHANGELOG.md b/packages/rule-tester/CHANGELOG.md index f12ea31fc89a..f7e46b2adfdb 100644 --- a/packages/rule-tester/CHANGELOG.md +++ b/packages/rule-tester/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + +**Note:** Version bump only for package @typescript-eslint/rule-tester + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package @typescript-eslint/rule-tester diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json index 822d1b0fbe9e..88b72ecd80e4 100644 --- a/packages/rule-tester/package.json +++ b/packages/rule-tester/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-tester", - "version": "6.13.0", + "version": "6.13.1", "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.13.0", - "@typescript-eslint/utils": "6.13.0", + "@typescript-eslint/typescript-estree": "6.13.1", + "@typescript-eslint/utils": "6.13.1", "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.13.0", + "@typescript-eslint/parser": "6.13.1", "chai": "^4.3.7", "mocha": "^10.0.0", "sinon": "^16.0.0", diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index a8a74b6ac8ed..b4d559ea5053 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package @typescript-eslint/scope-manager diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 806145b8655f..4df4583a9d37 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "6.13.0", + "version": "6.13.1", "description": "TypeScript scope analyser for ESLint", "files": [ "dist", @@ -44,13 +44,13 @@ "typecheck": "nx typecheck" }, "dependencies": { - "@typescript-eslint/types": "6.13.0", - "@typescript-eslint/visitor-keys": "6.13.0" + "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/visitor-keys": "6.13.1" }, "devDependencies": { "@prettier/sync": "*", "@types/glob": "*", - "@typescript-eslint/typescript-estree": "6.13.0", + "@typescript-eslint/typescript-estree": "6.13.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/type-utils/CHANGELOG.md b/packages/type-utils/CHANGELOG.md index aabaafe2a509..86b2f5d5f981 100644 --- a/packages/type-utils/CHANGELOG.md +++ b/packages/type-utils/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + +**Note:** Version bump only for package @typescript-eslint/type-utils + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package @typescript-eslint/type-utils diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index ec5a2a0c4a83..cf40c2d87913 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/type-utils", - "version": "6.13.0", + "version": "6.13.1", "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.13.0", - "@typescript-eslint/utils": "6.13.0", + "@typescript-eslint/typescript-estree": "6.13.1", + "@typescript-eslint/utils": "6.13.1", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "devDependencies": { - "@typescript-eslint/parser": "6.13.0", + "@typescript-eslint/parser": "6.13.1", "ajv": "^6.10.0", "downlevel-dts": "*", "jest": "29.7.0", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 2771930ba916..31bd17ae3404 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + + +### Bug Fixes + +* default to parse all JSDoc and provide options to configure it ([#7999](https://github.com/typescript-eslint/typescript-eslint/issues/7999)) ([779e13e](https://github.com/typescript-eslint/typescript-eslint/commit/779e13ec86f92b94a96ecdf81cbc36120a132ff6)) + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index b4270fa651ba..326d04f3bfb1 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "6.13.0", + "version": "6.13.1", "description": "Types for the TypeScript-ESTree AST spec", "files": [ "dist", diff --git a/packages/types/src/parser-options.ts b/packages/types/src/parser-options.ts index bf1655125dc3..885645f4bbae 100644 --- a/packages/types/src/parser-options.ts +++ b/packages/types/src/parser-options.ts @@ -32,6 +32,9 @@ type EcmaVersion = type SourceTypeClassic = 'module' | 'script'; type SourceType = SourceTypeClassic | 'commonjs'; +type JSDocParsingMode = 'all' | 'none' | 'type-info'; + +// If you add publicly visible options here, make sure they're also documented in `docs/packages/Parser.mdx` interface ParserOptions { ecmaFeatures?: { globalReturn?: boolean; @@ -57,8 +60,9 @@ interface ParserOptions { EXPERIMENTAL_useSourceOfProjectReferenceRedirect?: boolean; // purposely undocumented for now extraFileExtensions?: string[]; filePath?: string; + jsDocParsingMode?: JSDocParsingMode; loc?: boolean; - program?: Program | null; + programs?: Program | null; project?: string[] | string | true | null; projectFolderIgnoreList?: (RegExp | string)[]; range?: boolean; @@ -77,6 +81,7 @@ export { CacheDurationSeconds, DebugLevel, EcmaVersion, + JSDocParsingMode, ParserOptions, SourceType, }; diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 7042225938bb..8903add9e001 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + + +### Bug Fixes + +* default to parse all JSDoc and provide options to configure it ([#7999](https://github.com/typescript-eslint/typescript-eslint/issues/7999)) ([779e13e](https://github.com/typescript-eslint/typescript-eslint/commit/779e13ec86f92b94a96ecdf81cbc36120a132ff6)) + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index e6bd7d8dadd5..743c4b2ba4b8 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "6.13.0", + "version": "6.13.1", "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.13.0", - "@typescript-eslint/visitor-keys": "6.13.0", + "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/visitor-keys": "6.13.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", diff --git a/packages/typescript-estree/src/create-program/createDefaultProgram.ts b/packages/typescript-estree/src/create-program/createDefaultProgram.ts index e9660337f93c..b42ec76c678b 100644 --- a/packages/typescript-estree/src/create-program/createDefaultProgram.ts +++ b/packages/typescript-estree/src/create-program/createDefaultProgram.ts @@ -59,7 +59,7 @@ function createDefaultProgram( [parseSettings.filePath], { ...commandLine.options, - jsDocParsingMode: ts.JSDocParsingMode?.ParseForTypeInfo, + jsDocParsingMode: parseSettings.jsDocParsingMode, }, compilerHost, ); diff --git a/packages/typescript-estree/src/create-program/createIsolatedProgram.ts b/packages/typescript-estree/src/create-program/createIsolatedProgram.ts index ae646e6ad7ba..fbe92867dcc8 100644 --- a/packages/typescript-estree/src/create-program/createIsolatedProgram.ts +++ b/packages/typescript-estree/src/create-program/createIsolatedProgram.ts @@ -65,7 +65,7 @@ function createIsolatedProgram( const program = ts.createProgram( [parseSettings.filePath], { - jsDocParsingMode: ts.JSDocParsingMode?.ParseForTypeInfo, + jsDocParsingMode: parseSettings.jsDocParsingMode, noResolve: true, target: ts.ScriptTarget.Latest, jsx: parseSettings.jsx ? ts.JsxEmit.Preserve : undefined, diff --git a/packages/typescript-estree/src/create-program/createProjectService.ts b/packages/typescript-estree/src/create-program/createProjectService.ts index 0bd4cefd40bf..380dec18f4cc 100644 --- a/packages/typescript-estree/src/create-program/createProjectService.ts +++ b/packages/typescript-estree/src/create-program/createProjectService.ts @@ -9,7 +9,9 @@ const createStubFileWatcher = (): ts.FileWatcher => ({ export type TypeScriptProjectService = ts.server.ProjectService; -export function createProjectService(): TypeScriptProjectService { +export function createProjectService( + jsDocParsingMode?: ts.JSDocParsingMode, +): TypeScriptProjectService { // We import this lazily to avoid its cost for users who don't use the service // TODO: Once we drop support for TS<5.3 we can import from "typescript" directly const tsserver = require('typescript/lib/tsserverlibrary') as typeof ts; @@ -45,6 +47,6 @@ export function createProjectService(): TypeScriptProjectService { startGroup: doNothing, }, session: undefined, - jsDocParsingMode: tsserver.JSDocParsingMode?.ParseForTypeInfo, + jsDocParsingMode, }); } diff --git a/packages/typescript-estree/src/create-program/createSourceFile.ts b/packages/typescript-estree/src/create-program/createSourceFile.ts index cd021bfced38..bb5bc9d7b8fc 100644 --- a/packages/typescript-estree/src/create-program/createSourceFile.ts +++ b/packages/typescript-estree/src/create-program/createSourceFile.ts @@ -22,7 +22,7 @@ function createSourceFile(parseSettings: ParseSettings): ts.SourceFile { parseSettings.codeFullText, { languageVersion: ts.ScriptTarget.Latest, - jsDocParsingMode: ts.JSDocParsingMode?.ParseNone, + jsDocParsingMode: parseSettings.jsDocParsingMode, }, /* setParentNodes */ true, getScriptKind(parseSettings.filePath, parseSettings.jsx), diff --git a/packages/typescript-estree/src/create-program/getWatchProgramsForProjects.ts b/packages/typescript-estree/src/create-program/getWatchProgramsForProjects.ts index c0175245f8ee..21178000ee5e 100644 --- a/packages/typescript-estree/src/create-program/getWatchProgramsForProjects.ts +++ b/packages/typescript-estree/src/create-program/getWatchProgramsForProjects.ts @@ -267,7 +267,7 @@ function createWatchProgram( // eslint-disable-next-line @typescript-eslint/no-empty-function /*reportWatchStatus*/ () => {}, ) as WatchCompilerHostOfConfigFile; - watchCompilerHost.jsDocParsingMode = ts.JSDocParsingMode?.ParseForTypeInfo; + watchCompilerHost.jsDocParsingMode = parseSettings.jsDocParsingMode; // ensure readFile reads the code being linted instead of the copy on disk const oldReadFile = watchCompilerHost.readFile; diff --git a/packages/typescript-estree/src/parseSettings/createParseSettings.ts b/packages/typescript-estree/src/parseSettings/createParseSettings.ts index 537ad85baad0..50c39898f491 100644 --- a/packages/typescript-estree/src/parseSettings/createParseSettings.ts +++ b/packages/typescript-estree/src/parseSettings/createParseSettings.ts @@ -1,5 +1,5 @@ import debug from 'debug'; -import type * as ts from 'typescript'; +import * as ts from 'typescript'; import type { TypeScriptProjectService } from '../create-program/createProjectService'; import { createProjectService } from '../create-program/createProjectService'; @@ -23,6 +23,15 @@ const log = debug( let TSCONFIG_MATCH_CACHE: ExpiringCache | null; let TSSERVER_PROJECT_SERVICE: TypeScriptProjectService | null = null; +// NOTE - we intentionally use "unnecessary" `?.` here because in TS<5.3 this enum doesn't exist +// This object exists so we can centralize these for tracking and so we don't proliferate these across the file +const JSDocParsingMode = { + ParseAll: ts.JSDocParsingMode?.ParseAll, + ParseNone: ts.JSDocParsingMode?.ParseNone, + ParseForTypeErrors: ts.JSDocParsingMode?.ParseForTypeErrors, + ParseForTypeInfo: ts.JSDocParsingMode?.ParseForTypeInfo, +} as const; + export function createParseSettings( code: ts.SourceFile | string, options: Partial = {}, @@ -34,6 +43,22 @@ export function createParseSettings( ? options.tsconfigRootDir : process.cwd(); const passedLoggerFn = typeof options.loggerFn === 'function'; + const jsDocParsingMode = ((): ts.JSDocParsingMode => { + switch (options.jsDocParsingMode) { + case 'all': + return JSDocParsingMode.ParseAll; + + case 'none': + return JSDocParsingMode.ParseNone; + + case 'type-info': + return JSDocParsingMode.ParseForTypeInfo; + + default: + return JSDocParsingMode.ParseAll; + } + })(); + const parseSettings: MutableParseSettings = { allowInvalidAST: options.allowInvalidAST === true, code, @@ -56,7 +81,7 @@ export function createParseSettings( process.env.TYPESCRIPT_ESLINT_EXPERIMENTAL_TSSERVER !== 'false') || (process.env.TYPESCRIPT_ESLINT_EXPERIMENTAL_TSSERVER === 'true' && options.EXPERIMENTAL_useProjectService !== false) - ? (TSSERVER_PROJECT_SERVICE ??= createProjectService()) + ? (TSSERVER_PROJECT_SERVICE ??= createProjectService(jsDocParsingMode)) : undefined, EXPERIMENTAL_useSourceOfProjectReferenceRedirect: options.EXPERIMENTAL_useSourceOfProjectReferenceRedirect === true, @@ -71,6 +96,7 @@ export function createParseSettings( : getFileName(options.jsx), tsconfigRootDir, ), + jsDocParsingMode, jsx: options.jsx === true, loc: options.loc === true, log: @@ -136,6 +162,17 @@ export function createParseSettings( }); } + // No type-aware linting which means that cross-file (or even same-file) JSDoc is useless + // So in this specific case we default to 'none' if no value was provided + if ( + options.jsDocParsingMode == null && + parseSettings.projects.length === 0 && + parseSettings.programs == null && + parseSettings.EXPERIMENTAL_projectService == null + ) { + parseSettings.jsDocParsingMode = JSDocParsingMode.ParseNone; + } + warnAboutTSVersion(parseSettings, passedLoggerFn); return parseSettings; diff --git a/packages/typescript-estree/src/parseSettings/index.ts b/packages/typescript-estree/src/parseSettings/index.ts index da093dedfed9..352798be158f 100644 --- a/packages/typescript-estree/src/parseSettings/index.ts +++ b/packages/typescript-estree/src/parseSettings/index.ts @@ -7,6 +7,12 @@ import type { CacheLike } from './ExpiringCache'; type DebugModule = 'eslint' | 'typescript-eslint' | 'typescript'; +// Workaround to support new TS version features for consumers on old TS versions +declare module 'typescript' { + // Added in TypeScript 5.3 + enum JSDocParsingMode {} +} + /** * Internal settings used by the parser to run on a file. */ @@ -84,6 +90,11 @@ export interface MutableParseSettings { */ filePath: string; + /** + * JSDoc parsing style to pass through to TypeScript + */ + jsDocParsingMode: ts.JSDocParsingMode; + /** * Whether parsing of JSX is enabled. * diff --git a/packages/typescript-estree/src/parser-options.ts b/packages/typescript-estree/src/parser-options.ts index 711ef4bca34b..badd40ae8cfa 100644 --- a/packages/typescript-estree/src/parser-options.ts +++ b/packages/typescript-estree/src/parser-options.ts @@ -1,6 +1,7 @@ import type { CacheDurationSeconds, DebugLevel, + JSDocParsingMode, } from '@typescript-eslint/types'; import type * as ts from 'typescript'; @@ -45,6 +46,18 @@ interface ParseOptions { */ filePath?: string; + /** + * If you are using TypeScript version >=5.3 then this option can be used as a performance optimization. + * + * The valid values for this rule are: + * - `'all'` - parse all JSDoc comments, always. + * - `'none'` - parse no JSDoc comments, ever. + * - `'type-info'` - parse just JSDoc comments that are required to provide correct type-info. TS will always parse JSDoc in non-TS files, but never in TS files. + * + * If you do not rely on JSDoc tags from the TypeScript AST, then you can safely set this to `'none'` to improve performance. + */ + jsDocParsingMode?: JSDocParsingMode; + /** * Enable parsing of JSX. * For more details, see https://www.typescriptlang.org/docs/handbook/jsx.html diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index d1b9de4bf22d..49d86902638c 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + +**Note:** Version bump only for package @typescript-eslint/utils + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package @typescript-eslint/utils diff --git a/packages/utils/package.json b/packages/utils/package.json index d46134a1360e..497b7b514980 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/utils", - "version": "6.13.0", + "version": "6.13.1", "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.13.0", - "@typescript-eslint/types": "6.13.0", - "@typescript-eslint/typescript-estree": "6.13.0", + "@typescript-eslint/scope-manager": "6.13.1", + "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/typescript-estree": "6.13.1", "semver": "^7.5.4" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0" }, "devDependencies": { - "@typescript-eslint/parser": "6.13.0", + "@typescript-eslint/parser": "6.13.1", "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 201e033cca09..e0d38fd4599c 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package @typescript-eslint/visitor-keys diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index aa6b0a24eab6..c26a01434e5a 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "6.13.0", + "version": "6.13.1", "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.13.0", + "@typescript-eslint/types": "6.13.1", "eslint-visitor-keys": "^3.4.1" }, "devDependencies": { diff --git a/packages/website-eslint/CHANGELOG.md b/packages/website-eslint/CHANGELOG.md index 23cdb13ed7b7..c3b22f99a0cd 100644 --- a/packages/website-eslint/CHANGELOG.md +++ b/packages/website-eslint/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + + +### Bug Fixes + +* default to parse all JSDoc and provide options to configure it ([#7999](https://github.com/typescript-eslint/typescript-eslint/issues/7999)) ([779e13e](https://github.com/typescript-eslint/typescript-eslint/commit/779e13ec86f92b94a96ecdf81cbc36120a132ff6)) + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package @typescript-eslint/website-eslint diff --git a/packages/website-eslint/build.ts b/packages/website-eslint/build.ts index 85fb695499b3..ef316770155e 100644 --- a/packages/website-eslint/build.ts +++ b/packages/website-eslint/build.ts @@ -80,6 +80,9 @@ async function buildPackage(name: string, file: string): Promise { assert: requireResolved('./src/mock/assert.js'), path: requireResolved('./src/mock/path.js'), typescript: requireResolved('./src/mock/typescript.js'), + 'typescript/lib/tsserverlibrary': requireResolved( + './src/mock/typescript.js', + ), 'lru-cache': requireResolved('./src/mock/lru-cache.js'), }, plugins: [ diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index 09abdba74445..a831aa6ddc16 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/website-eslint", - "version": "6.13.0", + "version": "6.13.1", "private": true, "description": "ESLint which works in browsers.", "files": [ @@ -23,16 +23,16 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.13.0", - "@typescript-eslint/utils": "6.13.0" + "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/utils": "6.13.1" }, "devDependencies": { "@eslint/js": "8.53.0", - "@typescript-eslint/eslint-plugin": "6.13.0", - "@typescript-eslint/parser": "6.13.0", - "@typescript-eslint/scope-manager": "6.13.0", - "@typescript-eslint/typescript-estree": "6.13.0", - "@typescript-eslint/visitor-keys": "6.13.0", + "@typescript-eslint/eslint-plugin": "6.13.1", + "@typescript-eslint/parser": "6.13.1", + "@typescript-eslint/scope-manager": "6.13.1", + "@typescript-eslint/typescript-estree": "6.13.1", + "@typescript-eslint/visitor-keys": "6.13.1", "esbuild": "~0.19.0", "eslint": "*", "esquery": "*", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md index 5d887a745699..5043de5df09e 100644 --- a/packages/website/CHANGELOG.md +++ b/packages/website/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) + + +### Bug Fixes + +* default to parse all JSDoc and provide options to configure it ([#7999](https://github.com/typescript-eslint/typescript-eslint/issues/7999)) ([779e13e](https://github.com/typescript-eslint/typescript-eslint/commit/779e13ec86f92b94a96ecdf81cbc36120a132ff6)) + +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.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27) **Note:** Version bump only for package website diff --git a/packages/website/package.json b/packages/website/package.json index 198941a8a4f5..92e9843191d0 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "6.13.0", + "version": "6.13.1", "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.13.0", - "@typescript-eslint/website-eslint": "6.13.0", + "@typescript-eslint/parser": "6.13.1", + "@typescript-eslint/website-eslint": "6.13.1", "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.13.0", - "@typescript-eslint/rule-schema-to-typescript-types": "6.13.0", - "@typescript-eslint/types": "6.13.0", + "@typescript-eslint/eslint-plugin": "6.13.1", + "@typescript-eslint/rule-schema-to-typescript-types": "6.13.1", + "@typescript-eslint/types": "6.13.1", "copy-webpack-plugin": "^11.0.0", "cross-fetch": "*", "globby": "^11.1.0", diff --git a/packages/website/src/components/linter/config.ts b/packages/website/src/components/linter/config.ts index d3c7319a8aa7..4ae0a5987b6f 100644 --- a/packages/website/src/components/linter/config.ts +++ b/packages/website/src/components/linter/config.ts @@ -17,6 +17,7 @@ export const defaultParseSettings: ParseSettings = { EXPERIMENTAL_useSourceOfProjectReferenceRedirect: false, extraFileExtensions: [], filePath: '', + jsDocParsingMode: window.ts?.JSDocParsingMode?.ParseAll, jsx: true, loc: true, log: console.log, diff --git a/yarn.lock b/yarn.lock index 6e17a71500c0..8a92f0ae534c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5824,10 +5824,10 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-internal@workspace:packages/eslint-plugin-internal" dependencies: "@prettier/sync": "*" - "@typescript-eslint/rule-tester": 6.13.0 - "@typescript-eslint/scope-manager": 6.13.0 - "@typescript-eslint/type-utils": 6.13.0 - "@typescript-eslint/utils": 6.13.0 + "@typescript-eslint/rule-tester": 6.13.1 + "@typescript-eslint/scope-manager": 6.13.1 + "@typescript-eslint/type-utils": 6.13.1 + "@typescript-eslint/utils": 6.13.1 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5839,8 +5839,8 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-tslint@workspace:packages/eslint-plugin-tslint" dependencies: "@types/lodash": "*" - "@typescript-eslint/parser": 6.13.0 - "@typescript-eslint/utils": 6.13.0 + "@typescript-eslint/parser": 6.13.1 + "@typescript-eslint/utils": 6.13.1 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5851,7 +5851,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/eslint-plugin@6.13.0, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": +"@typescript-eslint/eslint-plugin@6.13.1, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": version: 0.0.0-use.local resolution: "@typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin" dependencies: @@ -5860,12 +5860,12 @@ __metadata: "@types/debug": "*" "@types/marked": "*" "@types/natural-compare": "*" - "@typescript-eslint/rule-schema-to-typescript-types": 6.13.0 - "@typescript-eslint/rule-tester": 6.13.0 - "@typescript-eslint/scope-manager": 6.13.0 - "@typescript-eslint/type-utils": 6.13.0 - "@typescript-eslint/utils": 6.13.0 - "@typescript-eslint/visitor-keys": 6.13.0 + "@typescript-eslint/rule-schema-to-typescript-types": 6.13.1 + "@typescript-eslint/rule-tester": 6.13.1 + "@typescript-eslint/scope-manager": 6.13.1 + "@typescript-eslint/type-utils": 6.13.1 + "@typescript-eslint/utils": 6.13.1 + "@typescript-eslint/visitor-keys": 6.13.1 ajv: ^6.12.6 chalk: ^5.3.0 cross-fetch: "*" @@ -5904,15 +5904,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/parser@6.13.0, @typescript-eslint/parser@workspace:packages/parser": +"@typescript-eslint/parser@6.13.1, @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.13.0 - "@typescript-eslint/types": 6.13.0 - "@typescript-eslint/typescript-estree": 6.13.0 - "@typescript-eslint/visitor-keys": 6.13.0 + "@typescript-eslint/scope-manager": 6.13.1 + "@typescript-eslint/types": 6.13.1 + "@typescript-eslint/typescript-estree": 6.13.1 + "@typescript-eslint/visitor-keys": 6.13.1 debug: ^4.3.4 downlevel-dts: "*" glob: "*" @@ -5943,26 +5943,26 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/rule-schema-to-typescript-types@6.13.0, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": +"@typescript-eslint/rule-schema-to-typescript-types@6.13.1, @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.13.0 - "@typescript-eslint/utils": 6.13.0 + "@typescript-eslint/type-utils": 6.13.1 + "@typescript-eslint/utils": 6.13.1 natural-compare: ^1.4.0 prettier: ^3.0.3 languageName: unknown linkType: soft -"@typescript-eslint/rule-tester@6.13.0, @typescript-eslint/rule-tester@workspace:packages/rule-tester": +"@typescript-eslint/rule-tester@6.13.1, @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.13.0 - "@typescript-eslint/typescript-estree": 6.13.0 - "@typescript-eslint/utils": 6.13.0 + "@typescript-eslint/parser": 6.13.1 + "@typescript-eslint/typescript-estree": 6.13.1 + "@typescript-eslint/utils": 6.13.1 ajv: ^6.10.0 chai: ^4.3.7 lodash.merge: 4.6.2 @@ -5976,15 +5976,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/scope-manager@6.13.0, @typescript-eslint/scope-manager@workspace:packages/scope-manager": +"@typescript-eslint/scope-manager@6.13.1, @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.13.0 - "@typescript-eslint/typescript-estree": 6.13.0 - "@typescript-eslint/visitor-keys": 6.13.0 + "@typescript-eslint/types": 6.13.1 + "@typescript-eslint/typescript-estree": 6.13.1 + "@typescript-eslint/visitor-keys": 6.13.1 glob: "*" jest-specific-snapshot: "*" make-dir: "*" @@ -6003,13 +6003,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@6.13.0, @typescript-eslint/type-utils@workspace:packages/type-utils": +"@typescript-eslint/type-utils@6.13.1, @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.13.0 - "@typescript-eslint/typescript-estree": 6.13.0 - "@typescript-eslint/utils": 6.13.0 + "@typescript-eslint/parser": 6.13.1 + "@typescript-eslint/typescript-estree": 6.13.1 + "@typescript-eslint/utils": 6.13.1 ajv: ^6.10.0 debug: ^4.3.4 downlevel-dts: "*" @@ -6026,7 +6026,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/types@6.13.0, @typescript-eslint/types@workspace:packages/types": +"@typescript-eslint/types@6.13.1, @typescript-eslint/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@typescript-eslint/types@workspace:packages/types" dependencies: @@ -6115,14 +6115,14 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/typescript-estree@6.13.0, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": +"@typescript-eslint/typescript-estree@6.13.1, @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.13.0 - "@typescript-eslint/visitor-keys": 6.13.0 + "@typescript-eslint/types": 6.13.1 + "@typescript-eslint/visitor-keys": 6.13.1 debug: ^4.3.4 glob: "*" globby: ^11.1.0 @@ -6160,17 +6160,17 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@6.13.0, @typescript-eslint/utils@^6.0.0, @typescript-eslint/utils@workspace:packages/utils": +"@typescript-eslint/utils@6.13.1, @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.13.0 - "@typescript-eslint/scope-manager": 6.13.0 - "@typescript-eslint/types": 6.13.0 - "@typescript-eslint/typescript-estree": 6.13.0 + "@typescript-eslint/parser": 6.13.1 + "@typescript-eslint/scope-manager": 6.13.1 + "@typescript-eslint/types": 6.13.1 + "@typescript-eslint/typescript-estree": 6.13.1 downlevel-dts: "*" jest: 29.7.0 prettier: ^3.0.3 @@ -6200,12 +6200,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@6.13.0, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": +"@typescript-eslint/visitor-keys@6.13.1, @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.13.0 + "@typescript-eslint/types": 6.13.1 downlevel-dts: "*" eslint-visitor-keys: ^3.4.1 jest: 29.7.0 @@ -6225,18 +6225,18 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/website-eslint@6.13.0, @typescript-eslint/website-eslint@workspace:packages/website-eslint": +"@typescript-eslint/website-eslint@6.13.1, @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.53.0 - "@typescript-eslint/eslint-plugin": 6.13.0 - "@typescript-eslint/parser": 6.13.0 - "@typescript-eslint/scope-manager": 6.13.0 - "@typescript-eslint/types": 6.13.0 - "@typescript-eslint/typescript-estree": 6.13.0 - "@typescript-eslint/utils": 6.13.0 - "@typescript-eslint/visitor-keys": 6.13.0 + "@typescript-eslint/eslint-plugin": 6.13.1 + "@typescript-eslint/parser": 6.13.1 + "@typescript-eslint/scope-manager": 6.13.1 + "@typescript-eslint/types": 6.13.1 + "@typescript-eslint/typescript-estree": 6.13.1 + "@typescript-eslint/utils": 6.13.1 + "@typescript-eslint/visitor-keys": 6.13.1 esbuild: ~0.19.0 eslint: "*" esquery: "*" @@ -20968,11 +20968,11 @@ __metadata: "@types/react": "*" "@types/react-helmet": ^6.1.6 "@types/react-router-dom": ^5.3.3 - "@typescript-eslint/eslint-plugin": 6.13.0 - "@typescript-eslint/parser": 6.13.0 - "@typescript-eslint/rule-schema-to-typescript-types": 6.13.0 - "@typescript-eslint/types": 6.13.0 - "@typescript-eslint/website-eslint": 6.13.0 + "@typescript-eslint/eslint-plugin": 6.13.1 + "@typescript-eslint/parser": 6.13.1 + "@typescript-eslint/rule-schema-to-typescript-types": 6.13.1 + "@typescript-eslint/types": 6.13.1 + "@typescript-eslint/website-eslint": 6.13.1 clsx: ^2.0.0 copy-webpack-plugin: ^11.0.0 cross-fetch: "*"