Could not parse ... syntax error
This module doesn't work with code that has async/await
const adapter = require('../adapters/github')
const remark = require('remark')
const remarkConfig = remark().use(require('foobar'))
const checkReadme = async repo => {
const readme = await adapter.getReadme(repo)
const results = await remarkConfig().process(readme)
return results
}
module.exports = checkReadme
Could not parse checkers/readme.js. There is a syntax error in file
Thanks!
I'll look into it.
If you want to take a shot at it,
auto-install uses detective and detective-es6 to parse code.
Hm. detective-es6 uses node-source-walk, which uses babylon. Babylon supports async/await. I'm not sure why this isn't working. A useful feature of auto-install would be to print the syntax error, rather than just saying that there is a syntax error.
That's a great idea 👍
OK, I did some digging.
The error is coming from detective, not detective-es6. detective uses acorn instead of babylon, but acorn supports async/await as well
i got the same issue