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'
6
6
import pluginVue from 'eslint-plugin-vue'
7
7
8
8
import fg from 'fast-glob'
9
+ import path from 'node:path'
9
10
10
11
type ExtendableConfigName = keyof typeof tseslint . configs
11
12
type ScriptLang = 'ts' | 'tsx' | 'js' | 'jsx'
@@ -33,7 +34,8 @@ export default function createConfig({
33
34
} )
34
35
. reduce (
35
36
( acc , file ) => {
36
- const contents = fs . readFileSync ( file , 'utf8' )
37
+ const absolutePath = path . resolve ( rootDir , file )
38
+ const contents = fs . readFileSync ( absolutePath , 'utf8' )
37
39
// contents matches the <script lang="ts"> (there can be anything but `>` between `script` and `lang`)
38
40
if ( / < s c r i p t [ ^ > ] * \b l a n g \s * = \s * " t s " [ ^ > ] * > / i. test ( contents ) ) {
39
41
acc . vueFilesWithScriptTs . push ( file )
You can’t perform that action at this time.
0 commit comments