Skip to content

Commit f6baed8

Browse files
authoredFeb 8, 2023
fix: ignore autogenerated file linting (#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

+3-1
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

+18-6
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

+6
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)
Please sign in to comment.