Skip to content

Upgrade vue-eslint-parser to 7.6.0 #1448

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

Merged
merged 1 commit into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"eslint-utils": "^2.1.0",
"natural-compare": "^1.4.0",
"semver": "^7.3.2",
"vue-eslint-parser": "^7.5.0"
"vue-eslint-parser": "^7.6.0"
},
"devDependencies": {
"@types/eslint": "^7.2.0",
Expand Down
11 changes: 11 additions & 0 deletions tests/fixtures/html-indent/address-component-01.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--{}-->
<template>
<div>
<p>
<Address
value=""
onchange="await setTokenAddress(event.target.value)"/>
</p>
</div>
</template>
<!-- https://github.com/vuejs/eslint-plugin-vue/issues/1403 -->
11 changes: 11 additions & 0 deletions tests/fixtures/html-indent/input-component-01.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--{}-->
<template>
<div>
<Input>
<template #suffix>
<Icon name="user"></Icon>
</template>
</Input>
</div>
</template>
<!-- https://github.com/vuejs/eslint-plugin-vue/issues/1292 -->
9 changes: 9 additions & 0 deletions tests/fixtures/html-indent/input-component-02.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--{}-->
<template>
<Input>
<template #prepend>
<p class="abc" v-if="true">123</p>
</template>
</Input>
</template>
<!-- https://github.com/vuejs/eslint-plugin-vue/issues/1300 -->
16 changes: 16 additions & 0 deletions tests/lib/rules/html-end-tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,22 @@ tester.run('html-end-tags', rule, {
{
filename: 'test.vue',
code: '<template><div><svg><![CDATA[test</svg></div></template>'
},

// https://github.com/vuejs/eslint-plugin-vue/issues/1403
{
code: `
<template>
<div>
<p>
<Address
value=""
onchange="await setTokenAddress(event.target.value)"/>
</p>
</div>
</template>
`,
filename: 'test.vue'
}
],
invalid: [
Expand Down
18 changes: 17 additions & 1 deletion tests/lib/rules/html-self-closing.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,23 @@ tester.run('html-self-closing', rule, {

// Invalid EOF
'<template><div a=">test</div></template>',
'<template><div><!--test</div></template>'
'<template><div><!--test</div></template>',

// https://github.com/vuejs/eslint-plugin-vue/issues/1403
{
code: `
<template>
<div>
<p>
<Address
value=""
onchange="await setTokenAddress(event.target.value)"/>
</p>
</div>
</template>
`,
filename: 'test.vue'
}

// other cases are in `invalid` tests.
],
Expand Down
18 changes: 18 additions & 0 deletions tests/lib/rules/no-multiple-template-root.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,24 @@ ruleTester.run('no-multiple-template-root', rule, {
filename: 'test.vue',
code:
'<template><div v-if="foo"></div><div v-else-if="bar"></div></template>'
},

// https://github.com/vuejs/eslint-plugin-vue/issues/1439
{
code: `
<template>
<Link :to="to" class="flex items-center">
<span v-if="prefixIcon || $slots.prefix" class="mr-1">
<slot name="prefix">
<FontAwesomeIcon v-if="prefixIcon" :icon="prefixIcon" fixedWidth />
</slot>
</span>

<slot />
</Link>
</template>
`,
filename: 'test.vue'
}
],
invalid: [
Expand Down
18 changes: 17 additions & 1 deletion tests/lib/rules/no-parsing-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,23 @@ tester.run('no-parsing-error', rule, {
},
'<template><div/></template>',
'<template><div v-show="">hello</div></template>',
'<template><div>{{ }}</div></template>'
'<template><div>{{ }}</div></template>',

// https://github.com/vuejs/eslint-plugin-vue/issues/1403
{
code: `
<template>
<div>
<p>
<Address
value=""
onchange="await setTokenAddress(event.target.value)"/>
</p>
</div>
</template>
`,
filename: 'test.vue'
}
],
invalid: [
{
Expand Down