Skip to content

Commit f6baed8

Browse files
fix: ignore autogenerated file linting (unplugin#597)
1 parent b652c66 commit f6baed8

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

src/core/declaration.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ export {}
124124
125125
declare module '@vue/runtime-core' {`
126126

127-
let code = `// generated by unplugin-vue-components
127+
let code = `/* eslint-disable */
128+
/* prettier-ignore */
129+
// generated by unplugin-vue-components
128130
// We suggest you to commit this file into source control
129131
// Read more: https://github.com/vuejs/core/pull/3399
130132
${head}`

test/__snapshots__/dts.test.ts.snap

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// Vitest Snapshot v1
22

33
exports[`dts > components only 1`] = `
4-
"// generated by unplugin-vue-components
4+
"/* eslint-disable */
5+
/* prettier-ignore */
6+
// generated by unplugin-vue-components
57
// We suggest you to commit this file into source control
68
// Read more: https://github.com/vuejs/core/pull/3399
79
import '@vue/runtime-core'
@@ -19,7 +21,9 @@ declare module '@vue/runtime-core' {
1921
`;
2022

2123
exports[`dts > directive only 1`] = `
22-
"// generated by unplugin-vue-components
24+
"/* eslint-disable */
25+
/* prettier-ignore */
26+
// generated by unplugin-vue-components
2327
// We suggest you to commit this file into source control
2428
// Read more: https://github.com/vuejs/core/pull/3399
2529
import '@vue/runtime-core'
@@ -35,7 +39,9 @@ declare module '@vue/runtime-core' {
3539
`;
3640

3741
exports[`dts > getDeclaration 1`] = `
38-
"// generated by unplugin-vue-components
42+
"/* eslint-disable */
43+
/* prettier-ignore */
44+
// generated by unplugin-vue-components
3945
// We suggest you to commit this file into source control
4046
// Read more: https://github.com/vuejs/core/pull/3399
4147
import '@vue/runtime-core'
@@ -93,7 +99,9 @@ exports[`dts > parseDeclaration 1`] = `
9399
`;
94100

95101
exports[`dts > vue 2.7 components only 1`] = `
96-
"// generated by unplugin-vue-components
102+
"/* eslint-disable */
103+
/* prettier-ignore */
104+
// generated by unplugin-vue-components
97105
// We suggest you to commit this file into source control
98106
// Read more: https://github.com/vuejs/core/pull/3399
99107
export {}
@@ -109,7 +117,9 @@ declare module 'vue' {
109117
`;
110118

111119
exports[`dts > writeDeclaration - keep unused 1`] = `
112-
"// generated by unplugin-vue-components
120+
"/* eslint-disable */
121+
/* prettier-ignore */
122+
// generated by unplugin-vue-components
113123
// We suggest you to commit this file into source control
114124
// Read more: https://github.com/vuejs/core/pull/3399
115125
import '@vue/runtime-core'
@@ -133,7 +143,9 @@ declare module '@vue/runtime-core' {
133143
`;
134144

135145
exports[`dts > writeDeclaration 1`] = `
136-
"// generated by unplugin-vue-components
146+
"/* eslint-disable */
147+
/* prettier-ignore */
148+
// generated by unplugin-vue-components
137149
// We suggest you to commit this file into source control
138150
// Read more: https://github.com/vuejs/core/pull/3399
139151
import '@vue/runtime-core'

test/dts.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ const _directive_loading = _resolveDirective("loading")`
123123

124124
test('parseDeclaration', async () => {
125125
const code = `
126+
/* eslint-disable */
127+
/* prettier-ignore */
126128
// generated by unplugin-vue-components
127129
// We suggest you to commit this file into source control
128130
// Read more: https://github.com/vuejs/core/pull/3399
@@ -144,6 +146,8 @@ declare module '@vue/runtime-core' {
144146

145147
test('parseDeclaration - has icon component like <IMdi:diceD12>', async () => {
146148
const code = `
149+
/* eslint-disable */
150+
/* prettier-ignore */
147151
// generated by unplugin-vue-components
148152
// We suggest you to commit this file into source control
149153
// Read more: https://github.com/vuejs/core/pull/3399
@@ -165,6 +169,8 @@ declare module '@vue/runtime-core' {
165169

166170
test('parseDeclaration - with directives', async () => {
167171
const code = `
172+
/* eslint-disable */
173+
/* prettier-ignore */
168174
// generated by unplugin-vue-components
169175
// We suggest you to commit this file into source control
170176
// Read more: https://github.com/vuejs/core/pull/3399

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy