Skip to content

Commit

Permalink
test: update test script to use proper CLI arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
haoqunjiang committed Jun 10, 2022
1 parent 8c3628c commit eab2037
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@ const eslintPath = path.resolve(__dirname, '../node_modules/.bin/eslint')

async function lintProject (name) {
const projectPath = path.resolve(__dirname, 'fixtures', name)
const filesToLint = path.resolve(projectPath, '**')

try {
return await execa(eslintPath, [`${filesToLint}`], {
cwd: projectPath
})
return await execa(
eslintPath,
[
`${projectPath}/`,
'--ext',
'.vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts',
'--no-ignore'
],
{
cwd: projectPath,
}
)
} catch (e) {
return e
}
Expand Down

0 comments on commit eab2037

Please sign in to comment.