I have a problem with eslint and jest setup in my nx monorepo.
My test-setup.ts looks like in docs:
// @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment
globalThis.ngJest = {
testEnvironmentOptions: {
errorOnUnknownElements: true,
errorOnUnknownProperties: true,
},
};
import 'jest-preset-angular/setup-jest';
The last line, causes an error:
ESLint: Import in body of module; reorder to top.(import/first)
What is the best way to get rid of this error?
- Reorder it? Its not specified in the docs if order in this file is necessary.
- Add
// eslint-disable-next-line import/first
on top of last line?