Commit 7979e3f
Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 1) (#17224)
* test: reduce jest-diff noises from different location prototype
* add more ts-eslint integration tests
* fix: provide optional properties for some ts-eslint AST
* update Babel parser AST fixtures
* Update packages/babel-parser/src/plugins/estree.ts
Co-authored-by: Nicolò Ribaudo <[email protected]>
* simplify castNodeTo usage
* use castNodeTo for TSEmptyBodyFunctionExpression
* add a few test cases
* handle TSAbstractMethodDefinition
* update Babel 8 AST fixtures
* fix AST checks
* parser type cleanup
---------
Co-authored-by: Nicolò Ribaudo <[email protected]>1 parent 7264384 commit 7979e3f
40 files changed
Lines changed: 1062 additions & 322 deletions
File tree
- eslint/babel-eslint-parser
- src/convert
- test
- packages/babel-parser
- src
- plugins
- typescript
- test/fixtures/estree
- class-method
- typescript-babel-7
- typescript-type-param-babel-7
- typescript-type-params-ranges-true-babel-7
- typescript-type-params-ranges-true
- typescript-type-params
- typescript
- class-private-method
- typescript-invalid-abstract-babel-7
- typescript-invalid-abstract
- class-private-property
- typescript-babel-7
- typescript-invalid-abstract-babel-7
- typescript-invalid-abstract
- typescript
- class-property
- typescript-babel-7
- typescript
- object-method
- typescript-babel-7
- typescript
- typescript
- enum-babel-7
- enum
- getter-setter
- import-babel-7
- import-dot-this-babel-7
- import-dot-this
- import-require-babel-7
- import-require
- import-with-options-babel-7
- import-with-options
- import
- invalid-class-method-empty-body-babel-7
- invalid-class-method-empty-body
- literals
- loc-index-property-babel-7
- loc-index-property
- optional-chaining-babel-7
- optional-chaining
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
55 | 72 | | |
56 | 73 | | |
57 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| |||
203 | 205 | | |
204 | 206 | | |
205 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
206 | 222 | | |
207 | 223 | | |
208 | 224 | | |
| |||
Lines changed: 62 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
107 | 105 | | |
108 | 106 | | |
109 | 107 | | |
110 | | - | |
111 | 108 | | |
112 | 109 | | |
113 | | - | |
114 | 110 | | |
115 | 111 | | |
116 | | - | |
| 112 | + | |
117 | 113 | | |
118 | 114 | | |
119 | 115 | | |
| 116 | + | |
120 | 117 | | |
121 | 118 | | |
122 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
123 | 168 | | |
124 | 169 | | |
125 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
126 | 182 | | |
127 | 183 | | |
128 | 184 | | |
| |||
0 commit comments