Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
feat: support parsingsatisfies
operators#5717
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
bradzacher merged 18 commits intotypescript-eslint:mainfromsosukesuzuki:support-satisfies-operatorsNov 18, 2022
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
18 commits Select commitHold shift + click to select a range
be7a623
feat: update typescript to 4.9.1
sosukesuzuki00882c2
fix: add patch file for 4.9.1-beta
sosukesuzuki692b86c
feat(typescript-estree): update version range
sosukesuzuki7e68835
feat: run `generate-lib` script
sosukesuzuki2b3bbcd
chore: update patch for typescript
sosukesuzuki154f540
fix: run `lint-fix`
sosukesuzukie6432a9
feat(ast-spec): add `TSSatisfiesExpression` node
sosukesuzukieee4b69
feat(typescript-estree): support `satisfies` operator
sosukesuzukid97f5a2
feat(visitor-keys): add `TSSatisfiesExpression`
sosukesuzuki687d1cd
test(typescript-estree): add tests for `satisfies`
sosukesuzuki2ea0aac
fix: fix type-only imports
sosukesuzuki816ebe8
Merge branch 'main' into support-satisfies-operators
JoshuaKGoldberg3e69a54
Increased ranges to stable
JoshuaKGoldbergfd6bb05
Added one more line to satisfies-expression test
JoshuaKGoldberg21d9a62
Correct range to <5.0.0
JoshuaKGoldberg94fbc45
Merge branch 'main' into pr/sosukesuzuki/5717
bradzachere39feeb
switch tests to ast-spec fixtures and update babel
bradzacher5419dea
ignore satisfies fixtures from prettier
bradzacherFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
3 changes: 3 additions & 0 deletions.prettierignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionREADME.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletionspackage.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionspackages/ast-spec/src/ast-node-types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionspackages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/array-array/fixture.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[1,2,3] satisfies [1, 2, 3]; |
149 changes: 149 additions & 0 deletions...c/src/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/1-TSESTree-AST.shot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
exports[`AST Fixtures expression TSSatisfiesExpression array-array TSESTree - AST 1`] = ` | ||
Program { | ||
type: "Program", | ||
body: Array [ | ||
ExpressionStatement { | ||
type: "ExpressionStatement", | ||
expression: TSSatisfiesExpression { | ||
type: "TSSatisfiesExpression", | ||
expression: ArrayExpression { | ||
type: "ArrayExpression", | ||
elements: Array [ | ||
Literal { | ||
type: "Literal", | ||
raw: "1", | ||
value: 1, | ||
range: [1, 2], | ||
loc: { | ||
start: { column: 1, line: 1 }, | ||
end: { column: 2, line: 1 }, | ||
}, | ||
}, | ||
Literal { | ||
type: "Literal", | ||
raw: "2", | ||
value: 2, | ||
range: [3, 4], | ||
loc: { | ||
start: { column: 3, line: 1 }, | ||
end: { column: 4, line: 1 }, | ||
}, | ||
}, | ||
Literal { | ||
type: "Literal", | ||
raw: "3", | ||
value: 3, | ||
range: [5, 6], | ||
loc: { | ||
start: { column: 5, line: 1 }, | ||
end: { column: 6, line: 1 }, | ||
}, | ||
}, | ||
], | ||
range: [0, 7], | ||
loc: { | ||
start: { column: 0, line: 1 }, | ||
end: { column: 7, line: 1 }, | ||
}, | ||
}, | ||
typeAnnotation: TSTupleType { | ||
type: "TSTupleType", | ||
elementTypes: Array [ | ||
TSLiteralType { | ||
type: "TSLiteralType", | ||
literal: Literal { | ||
type: "Literal", | ||
raw: "1", | ||
value: 1, | ||
range: [19, 20], | ||
loc: { | ||
start: { column: 19, line: 1 }, | ||
end: { column: 20, line: 1 }, | ||
}, | ||
}, | ||
range: [19, 20], | ||
loc: { | ||
start: { column: 19, line: 1 }, | ||
end: { column: 20, line: 1 }, | ||
}, | ||
}, | ||
TSLiteralType { | ||
type: "TSLiteralType", | ||
literal: Literal { | ||
type: "Literal", | ||
raw: "2", | ||
value: 2, | ||
range: [22, 23], | ||
loc: { | ||
start: { column: 22, line: 1 }, | ||
end: { column: 23, line: 1 }, | ||
}, | ||
}, | ||
range: [22, 23], | ||
loc: { | ||
start: { column: 22, line: 1 }, | ||
end: { column: 23, line: 1 }, | ||
}, | ||
}, | ||
TSLiteralType { | ||
type: "TSLiteralType", | ||
literal: Literal { | ||
type: "Literal", | ||
raw: "3", | ||
value: 3, | ||
range: [25, 26], | ||
loc: { | ||
start: { column: 25, line: 1 }, | ||
end: { column: 26, line: 1 }, | ||
}, | ||
}, | ||
range: [25, 26], | ||
loc: { | ||
start: { column: 25, line: 1 }, | ||
end: { column: 26, line: 1 }, | ||
}, | ||
}, | ||
], | ||
range: [18, 27], | ||
loc: { | ||
start: { column: 18, line: 1 }, | ||
end: { column: 27, line: 1 }, | ||
}, | ||
}, | ||
range: [0, 27], | ||
loc: { | ||
start: { column: 0, line: 1 }, | ||
end: { column: 27, line: 1 }, | ||
}, | ||
}, | ||
range: [0, 28], | ||
loc: { | ||
start: { column: 0, line: 1 }, | ||
end: { column: 28, line: 1 }, | ||
}, | ||
}, | ||
], | ||
sourceType: "script", | ||
range: [0, 29], | ||
loc: { | ||
start: { column: 0, line: 1 }, | ||
end: { column: 0, line: 2 }, | ||
}, | ||
} | ||
`; |
166 changes: 166 additions & 0 deletions...rc/expression/TSSatisfiesExpression/fixtures/array-array/snapshots/2-TSESTree-Tokens.shot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
exports[`AST Fixtures expression TSSatisfiesExpression array-array TSESTree - Tokens 1`] = ` | ||
Array [ | ||
Punctuator { | ||
type: "Punctuator", | ||
value: "[", | ||
range: [0, 1], | ||
loc: { | ||
start: { column: 0, line: 1 }, | ||
end: { column: 1, line: 1 }, | ||
}, | ||
}, | ||
Numeric { | ||
type: "Numeric", | ||
value: "1", | ||
range: [1, 2], | ||
loc: { | ||
start: { column: 1, line: 1 }, | ||
end: { column: 2, line: 1 }, | ||
}, | ||
}, | ||
Punctuator { | ||
type: "Punctuator", | ||
value: ",", | ||
range: [2, 3], | ||
loc: { | ||
start: { column: 2, line: 1 }, | ||
end: { column: 3, line: 1 }, | ||
}, | ||
}, | ||
Numeric { | ||
type: "Numeric", | ||
value: "2", | ||
range: [3, 4], | ||
loc: { | ||
start: { column: 3, line: 1 }, | ||
end: { column: 4, line: 1 }, | ||
}, | ||
}, | ||
Punctuator { | ||
type: "Punctuator", | ||
value: ",", | ||
range: [4, 5], | ||
loc: { | ||
start: { column: 4, line: 1 }, | ||
end: { column: 5, line: 1 }, | ||
}, | ||
}, | ||
Numeric { | ||
type: "Numeric", | ||
value: "3", | ||
range: [5, 6], | ||
loc: { | ||
start: { column: 5, line: 1 }, | ||
end: { column: 6, line: 1 }, | ||
}, | ||
}, | ||
Punctuator { | ||
type: "Punctuator", | ||
value: "]", | ||
range: [6, 7], | ||
loc: { | ||
start: { column: 6, line: 1 }, | ||
end: { column: 7, line: 1 }, | ||
}, | ||
}, | ||
Identifier { | ||
type: "Identifier", | ||
value: "satisfies", | ||
range: [8, 17], | ||
loc: { | ||
start: { column: 8, line: 1 }, | ||
end: { column: 17, line: 1 }, | ||
}, | ||
}, | ||
Punctuator { | ||
type: "Punctuator", | ||
value: "[", | ||
range: [18, 19], | ||
loc: { | ||
start: { column: 18, line: 1 }, | ||
end: { column: 19, line: 1 }, | ||
}, | ||
}, | ||
Numeric { | ||
type: "Numeric", | ||
value: "1", | ||
range: [19, 20], | ||
loc: { | ||
start: { column: 19, line: 1 }, | ||
end: { column: 20, line: 1 }, | ||
}, | ||
}, | ||
Punctuator { | ||
type: "Punctuator", | ||
value: ",", | ||
range: [20, 21], | ||
loc: { | ||
start: { column: 20, line: 1 }, | ||
end: { column: 21, line: 1 }, | ||
}, | ||
}, | ||
Numeric { | ||
type: "Numeric", | ||
value: "2", | ||
range: [22, 23], | ||
loc: { | ||
start: { column: 22, line: 1 }, | ||
end: { column: 23, line: 1 }, | ||
}, | ||
}, | ||
Punctuator { | ||
type: "Punctuator", | ||
value: ",", | ||
range: [23, 24], | ||
loc: { | ||
start: { column: 23, line: 1 }, | ||
end: { column: 24, line: 1 }, | ||
}, | ||
}, | ||
Numeric { | ||
type: "Numeric", | ||
value: "3", | ||
range: [25, 26], | ||
loc: { | ||
start: { column: 25, line: 1 }, | ||
end: { column: 26, line: 1 }, | ||
}, | ||
}, | ||
Punctuator { | ||
type: "Punctuator", | ||
value: "]", | ||
range: [26, 27], | ||
loc: { | ||
start: { column: 26, line: 1 }, | ||
end: { column: 27, line: 1 }, | ||
}, | ||
}, | ||
Punctuator { | ||
type: "Punctuator", | ||
value: ";", | ||
range: [27, 28], | ||
loc: { | ||
start: { column: 27, line: 1 }, | ||
end: { column: 28, line: 1 }, | ||
}, | ||
}, | ||
] | ||
`; |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.