Skip to content

Commit b03f6ed

Browse files
authoredFeb 16, 2023
fix: ignore autogenerated file linting (#320)
1 parent 638ebaf commit b03f6ed

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎src/core/ctx.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function createContext(options: Options = {}, root = process.cwd()) {
3838
declaration(dts) {
3939
if (!dts.endsWith('\n'))
4040
dts += '\n'
41-
return `// Generated by 'unplugin-auto-import'\n${dts}`
41+
return `/* eslint-disable */\n/* prettier-ignore */\n// Generated by 'unplugin-auto-import'\n${dts}`
4242
},
4343
},
4444
],

‎test/__snapshots__/dts.test.ts.snap

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// Vitest Snapshot v1
22

33
exports[`dts 1`] = `
4-
"// Generated by 'unplugin-auto-import'
4+
"/* eslint-disable */
5+
/* prettier-ignore */
6+
// Generated by 'unplugin-auto-import'
57
export {}
68
declare global {
79
const $$: typeof import('vue/macros')['$$']

0 commit comments

Comments
 (0)
Please sign in to comment.