File tree Expand file tree Collapse file tree 3 files changed +23
-10
lines changed
Expand file tree Collapse file tree 3 files changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -10,17 +10,12 @@ cache:
1010before_install :
1111 - curl -o- -L https://yarnpkg.com/install.sh | bash
1212 - export PATH="$HOME/.yarn/bin:$PATH"
13- - curl -o $HOME/gpgkey.asc $GPG_KEY
14- - gpg --import $HOME/gpgkey.asc
15- - git config --global user.name 'JounQin'
16- -
git config --global user.email '[email protected] ' 17- - git config --global commit.gpgsign true
18- - git config --global tag.gpgsign true
13+ - git config --global user.name "JounQin"
14+ -
git config --global user.email "[email protected] " 1915
2016install : yarn --frozen-lockfile
2117
2218script :
23- - set -e
2419 - yarn lint
2520 - yarn build
2621 - yarn test
Original file line number Diff line number Diff line change 11{
22 "$schema" : " http://json.schemastore.org/lerna" ,
3- "version" : " 0.9.6 " ,
3+ "version" : " 0.9.7 " ,
44 "npmClient" : " yarn" ,
55 "useWorkspaces" : true ,
66 "changelog" : {
Original file line number Diff line number Diff line change @@ -196,7 +196,25 @@ export class Parser {
196196 const value = node . value as string
197197
198198 // wrap into single Fragment, so that it won't break on adjacent JSX nodes
199- const program = this . _eslintParse ( `<>${ value } </>` ) . ast
199+ let program : AST . Program
200+
201+ try {
202+ program = this . _eslintParse ( `<>${ value } </>` ) . ast
203+ } catch ( e ) {
204+ if ( hasProperties < LocationError > ( e , LOC_ERROR_PROPERTIES ) ) {
205+ const {
206+ position : { start } ,
207+ } = node
208+
209+ e . index += start . offset - 3
210+ e . column = e . lineNumber > 1 ? e . column : e . column + start . column - 3
211+ e . lineNumber += start . line - 1
212+
213+ throw e
214+ }
215+
216+ return node
217+ }
200218
201219 const { expression } = program . body [ 0 ] as ExpressionStatement
202220
@@ -266,7 +284,7 @@ export class Parser {
266284 } catch ( e ) {
267285 if ( hasProperties < LocationError > ( e , LOC_ERROR_PROPERTIES ) ) {
268286 e . index += start
269- e . column += loc . start . column
287+ e . column = e . lineNumber > 1 ? e . column : e . column + loc . start . column
270288 e . lineNumber += startLine
271289 }
272290
You can’t perform that action at this time.
0 commit comments