8000 Merge branch 'main' into docs/update-vitest-setup · c0sta/typescript-eslint@980de3e · GitHub
[go: up one dir, main page]

Skip to content

Commit 980de3e

Browse files
authored
Merge branch 'main' into docs/update-vitest-setup
2 parents af8a9c9 + 14f3ff0 commit 980de3e

Some content is hidden

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

50 files changed

+428
-132
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
10000
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28)
7+
8+
9+
### Bug Fixes
10+
11+
* 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))
12+
13+
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.
14+
15+
16+
17+
18+
619
# [6.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27)
720

821

docs/packages/Parser.mdx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ interface ParserOptions {
4040
ecmaVersion?: number | 'latest';
4141
emitDecoratorMetadata?: boolean;
4242
extraFileExtensions?: string[];
43+
jsDocParsingMode?: 'all' | 'none' | 'type-info';
4344
jsxFragmentName?: string | null;
4445
jsxPragma?: string | null;
4546
lib?: string[];
46-
program?: import('typescript').Program;
47+
programs?: import('typescript').Program;
4748
project?: string | string[] | true;
4849
projectFolderIgnoreList?: string[];
4950
tsconfigRootDir?: string;
@@ -118,6 +119,21 @@ This option allows you to provide one or more additional file extensions which s
118119
The default extensions are `['.js', '.mjs', '.cjs', '.jsx', '.ts', '.mts', '.cts', '.tsx']`.
119120
Add extensions starting with `.`, followed by the file extension. E.g. for a `.vue` file use `"extraFileExtensions": [".vue"]`.
120121

122+
### `jsDocParsingMode`
123+
124+
> Default if `parserOptions.project` is set, then `'all'`, otherwise `'none'`
125+
126+
When TS parses a file it will also parse JSDoc comments into the AST - which can then be consumed by lint rules.
127+
If you are using TypeScript version >=5.3 then this option can be used as a performance optimization.
128+
129+
The valid values for this rule are:
130+
131+
- `'all'` - parse all JSDoc comments, always.
132+
- `'none'` - parse no JSDoc comments, ever.
133+
- `'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.
134+
135+
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.
136+
121137
### `jsxFragmentName`
122138

123139
> Default `null`
@@ -149,7 +165,7 @@ Specifies the TypeScript `lib`s that are available. This is used by the scope an
149165

150166
If you provide `parserOptions.project`, you do not need to set this, as it will automatically detected from the compiler.
151167

152-
### `program`
168+
### `programs`
153169

154170
> Default `undefined`.
155171

docs/packages/TypeScript_ESTree.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@ interface ParseOptions {
7070
*/
7171
filePath?: string;
7272

73+
/**
74+
* If you are using TypeScript version >=5.3 then this option can be used as a performance optimization.
75+
*
76+
* The valid values for this rule are:
77+
* - `'all'` - parse all JSDoc comments, always.
78+
* - `'none'` - parse no JSDoc comments, ever.
79+
* - `'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.
80+
*
81+
* If you do not rely on JSDoc tags from the TypeScript AST, then you can safely set this to `'none'` to improve performance.
82+
*/
83+
jsDocParsingMode?: JSDocParsingMode;
84+
7385
/**
7486
* Enable parsing of JSX.
7587
* For more details, see https://www.typescriptlang.org/docs/handbook/jsx.html
@@ -111,6 +123,7 @@ interface ParseOptions {
111123
const PARSE_DEFAULT_OPTIONS: ParseOptions = {
112124
comment: false,
113125
filePath: 'estree.ts', // or 'estree.tsx', if you pass jsx: true
126+
jsDocParsingMode: 'all',
114127
jsx: false,
115128
loc: false,
116129
loggerFn: undefined,

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "6.13.0",
3+
"version": "6.13.1",
44
"npmClient": "yarn",
55
"stream": true,
66
"command": {

packages/ast-spec/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28)
7+
8+
**Note:** Version bump only for package @typescript-eslint/ast-spec
9+
10+
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.
11+
12+
13+
14+
15+
616
# [6.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27)
717

818
**Note:** Version bump only for package @typescript-eslint/ast-spec

packages/ast-spec/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@typescript-eslint/ast-spec",
3-
"version": "6.13.0",
3+
"version": "6.13.1",
44
"description": "Complete specification for the TypeScript-ESTree AST",
55
"private": true,
66
"keywords": [

packages/eslint-plugin-internal/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28)
7+
8+
**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal
9+
10+
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.
11+
12+
13+
14+
15+
616
# [6.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27)
717

818
**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal

packages/eslint-plugin-internal/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@typescript-eslint/eslint-plugin-internal",
3-
"version": "6.13.0",
3+
"version": "6.13.1",
44
"private": true,
55
"main": "dist/index.js",
66
"scripts": {
@@ -14,10 +14,10 @@
1414
},
1515
"dependencies": {
1616
"@prettier/sync": "*",
17-
"@typescript-eslint/rule-tester": "6.13.0",
18-
"@typescript-eslint/scope-manager": "6.13.0",
19-
"@typescript-eslint/type-utils": "6.13.0",
20-
"@typescript-eslint/utils": "6.13.0",
17+
"@typescript-eslint/rule-tester": "6.13.1",
18+
"@typescript-eslint/scope-manager": "6.13.1",
19+
"@typescript-eslint/type-utils": "6.13.1",
20+
"@typescript-eslint/utils": "6.13.1",
2121
"prettier": "^3.0.3"
2222
},
2323
"devDependencies": {

packages/eslint-plugin-tslint/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28)
7+
8+
**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint
9+
10+
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.
11+
12+
13+
14+
15+
616
# [6.13.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.12.0...v6.13.0) (2023-11-27)
717

818
**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint

packages/eslint-plugin-tslint/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@typescript-eslint/eslint-plugin-tslint",
3-
"version": "6.13.0",
3+
"version": "6.13.1",
44
"main": "dist/index.js",
55
"typings": "src/index.ts",
66
"description": "ESLint plugin that wraps a TSLint configuration and lints the whole source using TSLint",
@@ -46,7 +46,7 @@
4646
"typecheck": "tsc -p tsconfig.json --noEmit"
4747
},
4848
"dependencies": {
49-
"@typescript-eslint/utils": "6.13.0"
49+
"@typescript-eslint/utils": "6.13.1"
5050
},
5151
"peerDependencies": {
5252
"eslint": "^7.0.0 || ^8.0.0",
@@ -55,7 +55,7 @@
5555
},
5656
"devDependencies": {
5757
"@types/lodash": "*",
58-
"@typescript-eslint/parser": "6.13.0",
58+
"@typescript-eslint/parser": "6.13.1",
5959
"jest": "29.7.0",
6060
"prettier": "^3.0.3",
6161
"rimraf": "*"

0 commit comments

Comments
 (0)
0