Open jakeherp opened 4 years ago
Are you able to run eslint by itself?
Yes, eslint runs just fine on its own, it also runs within Jest if run alone, but not within projects.
Should transform
be applying to all projects, and moduleNameMapper
? it seems like a lot of those should be moved down into the tests project.
@jakeherp don't suppose you ever found a solution for this?
I have the same issue that without the projects configuration set the tests run, if i set the projects with just the lint config it runs the linter, but having the test
project set will cause the tests to fail with unexpected token (linting still runs)?
Specifically the error it states is SyntaxError: Cannot use import statement outside a module
pointing to the import of react-native, I've tried adding this to the transformIgnorePatterns etc, no idea what to do with it. Surely something weird going on considering the tests all run fine if i run jest from command line or indeed without the test project set in the config.
My project is react-native (expo bare workflow) + typescript. I created a fresh rn-expo project without typescript and it still occurred mind you.
I have the same issue and have been trying to find a solution for days without success :(
I am getting the message
for all my unit tests when setting up
jest-runner-eslint
in projects:Removing
projects
results in all tests passing, so I assume it has to do with my implementation? This is within a Gatsby site following their implementation for TypeScript: https://www.gatsbyjs.org/docs/unit-testing/#using-typescript