I'm trying to set up a new project which uses both ESLint and Jest. I also want to use eslint-plugin-jest, to get Jest-specific linting rules. I don't want those rules to apply to non-test files, though.
Usually, the way I'd accomplish something like this is to create a root .eslintrc.js in the root of the project and a folder-specific .eslintrc.js in the folder needing special rules. This appears to work fine for ESLint, but Jest tries to execute __tests__/.eslintrc.js as a test file and complains that it doesn't have any tests.
How can I tell Jest to ignore my ESLint configuration file?
Project structure:
.eslintrc.jspackage.jsonjest.config.jslib/index.js
__tests__/.eslintrc.jsindex.test.js