File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import vueParser from 'vue-eslint-parser'
66import pluginVue from 'eslint-plugin-vue'
77
88import fg from 'fast-glob'
9+ import path from 'node:path'
910
1011type ExtendableConfigName = keyof typeof tseslint . configs
1112type ScriptLang = 'ts' | 'tsx' | 'js' | 'jsx'
@@ -33,7 +34,8 @@ export default function createConfig({
3334 } )
3435 . reduce (
3536 ( acc , file ) => {
36- const contents = fs . readFileSync ( file , 'utf8' )
37+ const absolutePath = path . resolve ( rootDir , file )
38+ const contents = fs . readFileSync ( absolutePath , 'utf8' )
3739 // contents matches the <script lang="ts"> (there can be anything but `>` between `script` and `lang`)
3840 if ( / < s c r i p t [ ^ > ] * \b l a n g \s * = \s * " t s " [ ^ > ] * > / i. test ( contents ) ) {
3941 acc . vueFilesWithScriptTs . push ( file )
You can’t perform that action at this time.
0 commit comments