Skip to content

Commit 745d28e

Browse files
committed
test: update test script to use proper CLI arguments
1 parent b9bb616 commit 745d28e

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

test/index.spec.js

+12-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ const eslintPath = path.resolve(__dirname, '../node_modules/.bin/eslint')
55

66
async function lintProject (name) {
77
const projectPath = path.resolve(__dirname, 'fixtures', name)
8-
const filesToLint = path.resolve(projectPath, '**')
98

109
try {
11-
return await execa(eslintPath, [`${filesToLint}`], {
12-
cwd: projectPath
13-
})
10+
return await execa(
11+
eslintPath,
12+
[
13+
`${projectPath}/`,
14+
'--ext',
15+
'.vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts',
16+
'--no-ignore'
17+
],
18+
{
19+
cwd: projectPath,
20+
}
21+
)
1422
} catch (e) {
1523
return e
1624
}

0 commit comments

Comments
 (0)