- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 680
token.type.endsWith is not a function with vue/script-indent #349
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
Comments
Thank you for this issue. This looks like a bug of |
Same thing's happening here: search (val) {
if (!val) {
this.docSearch.autocomplete.autocomplete.close()
}
} |
Having the same issue, is there any workarounds until the upstream issue is solved? |
The fix was finally released in babel-eslint 8.2.1, so it just needs to be updated in this project. |
Updating the following resolved the issue for me:
|
Just a note, after updating
Tell us about your environment:
Please show your full configuration:
What did you do? Please include the actual source code causing the issue. I ran the lint to a file that contains: const typeGroup = obj =>
!emptyObject(obj) && !typeLeaf(obj) What actually happened? Please include the actual, raw output from ESLint.
It works fine including the braces and return: const typeGroup = obj => {
return !emptyObject(obj) && !typeLeaf(obj)
} With inline statement: const typeGroup = obj => !emptyObject(obj) && !typeLeaf(obj) or with parent: const typeGroup = obj =>
(!emptyObject(obj) && !typeLeaf(obj)) But got this issue doing this: const typeGroup = obj =>
!emptyObject(obj) && !typeLeaf(obj) |
I'm running into this as well, with a similar setup as above. However, my error is happening internally in a library I have installed, Vuetify. I can't upgrade the chain of deps for babel because of this error. |
I debugged the "isComment" function that's erroring and am seeing token is not a string in this case:
That's what the token looks like and is clearly different than the rest. I'm not entirely sure why. |
Actually, it has nothing to do with the library. It really is as described by @rafaelkendrik . Break a conditional statement to a new line and it'll break your builds. I was able to work around it by removing those breaks, but it's definitely an issue somewhere in the stream. |
This was resolved. Please upgrade Thank you. |
@mysticatea quick question. Is it fixed the the 9.0.0 beta? Or 8.2.6? |
@gabaum10 It was 8.2.2. |
to solve: remove babel-eslint add .eslintrc.js success |
Thanks @Titans1001, I ended up with
|
i faced the same issue and fixed by updating |
TypeError: token.type.endsWith is not a function |
in my case solved by change to disabled instead of readonly
i use |
这个需要升级eslint 配置,原来的作者不推荐使用了
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2022年9月25日(星期天) 中午11:31
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [vuejs/eslint-plugin-vue] token.type.endsWith is not a function with vue/script-indent (#349)
in my case solved by change to disabled instead of readonly
<vue-autosuggest id="vi-boat-name" v-model="form.dm_river_boat.boat_name" v-uppercase :suggestions="[{ data: form.dm_river_boat.dm_river_boats }]" :get-suggestion-value="getSuggestionValue" :input-props="{ id: 'autosuggest__input', class: 'form-control', placeholder: 'Boat Name', readonly: $can('manage', 'special') ? true : $router.currentRoute.params.id !== undefined ? false : null solved by change to disabled instead of readonly disabled: $can('manage', 'special') ? true : $router.currentRoute.params.id !== undefined ? false : null }" @Focus="getSuggestionValueFocus($event, 'dm_river_boat', 'boat_name')" @input="searchForm($event, 'dm_river_boat/', 'dm_river_boat', 'boat_name')" >
i use "vue-autosuggest": "2.2.0", no need to update everything is fine with me.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Uh oh!
There was an error while loading. Please reload this page.
Tell us about your environment
Please show your full configuration:
What did you do? Please include the actual source code causing the issue.
What actually happened? Please include the actual, raw output from ESLint.
The token passed into
isComment
: (it's the!
before the regexp)The text was updated successfully, but these errors were encountered: