Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(typescript-estree): support const modifiers for type parameters #6600

Merged
merged 27 commits into from Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fa88b40
test(ast-spec): update `@babel/parser`
sosukesuzuki Mar 11, 2023
f891dc2
test(ast-spec): move tests for `export type *`
sosukesuzuki Mar 11, 2023
13ebf46
test(typescript-estree): update snapshots
sosukesuzuki Mar 11, 2023
7acfa72
feat: update to typescript 5.0
sosukesuzuki Mar 5, 2023
66691e8
chore: update patch files
sosukesuzuki Mar 5, 2023
5a51f52
chore: update `api-extractor`
sosukesuzuki Mar 5, 2023
ada8993
chore: update `downlevel-dts`
sosukesuzuki Mar 5, 2023
9cc788a
chore(typescript-estree): use `@ts-ignore` for removed properties
sosukesuzuki Mar 5, 2023
4d106ea
chore(type-utils): use `@ts-ignore` comment for invalid enum assignment
sosukesuzuki Mar 5, 2023
37c4b46
test(typescript-estree): update snapshots for `convert.test.ts`
sosukesuzuki Mar 5, 2023
dfdf031
feat(typescript-estree): add `5.0.0-rc` to supported version
sosukesuzuki Mar 5, 2023
2be5f17
feat(typescript-estree): set `experimentalDecorators: true`
sosukesuzuki Mar 5, 2023
7f47fac
feat(scope-manager): run `generate:lib`
sosukesuzuki Mar 5, 2023
8d16dff
feat(types): run `generate:lib`
sosukesuzuki Mar 5, 2023
ace455d
chore: fixes linting problems
sosukesuzuki Mar 5, 2023
fb02bac
chore: use `ts.identifierToKeywordKind` instead of `originalKeywordKind`
sosukesuzuki Mar 5, 2023
a226649
fix(eslint-plugin): fix printing BigInt literal
sosukesuzuki Mar 5, 2023
5caeeae
chore(website): add `@ts-expect-error` for imcompatible types
sosukesuzuki Mar 5, 2023
e08f203
feat(typescript-estree): disable `experimentalDecorators`
sosukesuzuki Mar 6, 2023
02b6087
chore: use `@ts-expect-error` instead of `@ts-ignore`
sosukesuzuki Mar 6, 2023
500db72
chore(eslint-plugin): move the branch for printing BigInt literal
sosukesuzuki Mar 11, 2023
e162a91
feat(ast-spec): add `const` to `TSTypeParameter`
sosukesuzuki Mar 11, 2023
ef7be39
feat(typescript-estree): set `const` modifier for `TSTypeParameter`
sosukesuzuki Mar 11, 2023
325bc96
test(ast-spec): update exists fixtures snapshots
sosukesuzuki Mar 11, 2023
ba79f83
test(ast-spec): add fixtures for `const` modifiers
sosukesuzuki Mar 12, 2023
76ca8e2
chore: update `.prettierignore`
sosukesuzuki Mar 12, 2023
fe38c86
Merge branch 'main' into pr/sosukesuzuki/6600
bradzacher Mar 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .prettierignore
Expand Up @@ -14,6 +14,9 @@ packages/ast-spec/src/*/*/fixtures/_error_/*/fixture.ts
# prettier doesn't yet support auto-accessors
packages/ast-spec/src/element/AccessorProperty/fixtures

# prettier doesn't yet support `const` modifiers for type parameters
packages/ast-spec/src/special/TSTypeParameter/fixtures

# Ignore CHANGELOG.md files to avoid issues with automated release job
CHANGELOG.md

Expand Down
Expand Up @@ -32,6 +32,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand Down
Expand Up @@ -36,6 +36,7 @@ exports[`AST Fixtures declaration ClassDeclaration type-param AST Alignment - AS
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand Down
Expand Up @@ -71,6 +71,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand Down
Expand Up @@ -75,6 +75,7 @@ exports[`AST Fixtures declaration ClassDeclaration type-parameters-extends-type-
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand Down
Expand Up @@ -35,6 +35,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand All @@ -56,6 +57,7 @@ Program {
},
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand All @@ -77,6 +79,7 @@ Program {
},
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand Down
Expand Up @@ -39,6 +39,7 @@ exports[`AST Fixtures declaration FunctionDeclaration type-param-many AST Alignm
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand All @@ -61,6 +62,7 @@ exports[`AST Fixtures declaration FunctionDeclaration type-param-many AST Alignm
},
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand All @@ -83,6 +85,7 @@ exports[`AST Fixtures declaration FunctionDeclaration type-param-many AST Alignm
},
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand Down
Expand Up @@ -35,6 +35,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand Down
Expand Up @@ -39,6 +39,7 @@ exports[`AST Fixtures declaration FunctionDeclaration type-param-one AST Alignme
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand Down
Expand Up @@ -26,6 +26,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand All @@ -47,6 +48,7 @@ Program {
},
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand All @@ -68,6 +70,7 @@ Program {
},
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand Down
Expand Up @@ -30,6 +30,7 @@ exports[`AST Fixtures declaration TSDeclareFunction type-param-many AST Alignmen
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand All @@ -52,6 +53,7 @@ exports[`AST Fixtures declaration TSDeclareFunction type-param-many AST Alignmen
},
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand All @@ -74,6 +76,7 @@ exports[`AST Fixtures declaration TSDeclareFunction type-param-many AST Alignmen
},
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand Down
Expand Up @@ -26,6 +26,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand Down
Expand Up @@ -30,6 +30,7 @@ exports[`AST Fixtures declaration TSDeclareFunction type-param-one AST Alignment
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand Down
Expand Up @@ -31,6 +31,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand All @@ -52,6 +53,7 @@ Program {
},
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand All @@ -73,6 +75,7 @@ Program {
},
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand Down
Expand Up @@ -35,6 +35,7 @@ exports[`AST Fixtures declaration TSInterfaceDeclaration type-param-many AST Ali
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand All @@ -57,6 +58,7 @@ exports[`AST Fixtures declaration TSInterfaceDeclaration type-param-many AST Ali
},
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand All @@ -79,6 +81,7 @@ exports[`AST Fixtures declaration TSInterfaceDeclaration type-param-many AST Ali
},
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand Down
Expand Up @@ -31,6 +31,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand Down
Expand Up @@ -35,6 +35,7 @@ exports[`AST Fixtures declaration TSInterfaceDeclaration type-param-one AST Alig
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand Down
Expand Up @@ -41,6 +41,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand Down
Expand Up @@ -45,6 +45,7 @@ exports[`AST Fixtures declaration TSTypeAliasDeclaration type-param-many AST Ali
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand Down
Expand Up @@ -41,6 +41,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand All @@ -62,6 +63,7 @@ Program {
},
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand All @@ -83,6 +85,7 @@ Program {
},
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand Down
Expand Up @@ -45,6 +45,7 @@ exports[`AST Fixtures declaration TSTypeAliasDeclaration type-param-one AST Alig
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand All @@ -67,6 +68,7 @@ exports[`AST Fixtures declaration TSTypeAliasDeclaration type-param-one AST Alig
},
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand All @@ -89,6 +91,7 @@ exports[`AST Fixtures declaration TSTypeAliasDeclaration type-param-one AST Alig
},
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand Down
Expand Up @@ -35,6 +35,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand Down
Expand Up @@ -39,6 +39,7 @@ exports[`AST Fixtures legacy-fixtures babylon-convergence type-parameter-whitesp
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand Down
Expand Up @@ -35,6 +35,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
constraint: TSObjectKeyword {
type: "TSObjectKeyword",

Expand Down
Expand Up @@ -39,6 +39,7 @@ exports[`AST Fixtures legacy-fixtures babylon-convergence type-parameters AST Al
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
constraint: TSObjectKeyword {
type: 'TSObjectKeyword',

Expand Down
Expand Up @@ -115,6 +115,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand Down
Expand Up @@ -119,6 +119,7 @@ exports[`AST Fixtures legacy-fixtures basics arrow-function-with-type-parameters
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand Down
Expand Up @@ -74,6 +74,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand Down Expand Up @@ -163,6 +164,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
in: false,
name: Identifier {
type: "Identifier",
Expand Down
Expand Up @@ -80,6 +80,7 @@ exports[`AST Fixtures legacy-fixtures basics call-signatures-with-generics AST A
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand Down Expand Up @@ -172,6 +173,7 @@ exports[`AST Fixtures legacy-fixtures basics call-signatures-with-generics AST A
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
- in: false,
- name: Identifier {
- type: 'Identifier',
Expand Down
Expand Up @@ -90,6 +90,7 @@ Program {
params: Array [
TSTypeParameter {
type: "TSTypeParameter",
const: false,
constraint: TSTypeReference {
type: "TSTypeReference",
typeName: Identifier {
Expand Down
Expand Up @@ -94,6 +94,7 @@ exports[`AST Fixtures legacy-fixtures basics class-with-extends-generic-multiple
params: Array [
TSTypeParameter {
type: 'TSTypeParameter',
- const: false,
constraint: TSTypeReference {
type: 'TSTypeReference',
typeName: Identifier {
Expand Down