-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add jest config #38
Comments
You can specify any amount of
Doing the above would add support for both react as well as jest variables. Or are you suggesting that There has also been some discussion from people who actually want to import these variables rather than having them be global: jestjs/jest#4473 Curious to hear your/others thoughts on this. |
I guarantee that 90% of react devs are using Jest for testing. Also I think the discussion about these variables going non-global in Jest is not relevant, as status quo for this moment is that they are global and Lynt is supposed to be "Zero configuration by default" :) |
Also, I tried |
Hmm, that's strange. I've been testing it out on a couple of my larger projects as well as a new project I just made with Example: https://github.com/saadq/issues/tree/master/lynt-jest I just ran: create-react-app lynt-jest And once that was done, in the project I just ran:
Which installed Running Not that it should matter, but could you give a bit of info on whether you have |
Hmm suddenly it's working for me as well, I think it's because I've experimented with .lyntrc and made something like this and forgot about it:
It seems such .lyntrc is incorrect overrides CLI flag (usually CLI flags have priority over configuration). |
(I used such configuration in my .eslintrc) |
Ah, I see. I currently didn't have tests for both CLI and config files existing simultaneously, so I should definitely add that. I am currently overriding the CLI args with the config file, but I definitely agree it should be the other way around. Opened #44 for this problem. I think the reason your issue was happening was that the Going to close this out as I think it is currently working, but automatically adding |
React folks often use Jest. I think it would be good to add it's config by default.
I get lots of errors like:
I guess better defaults would be to allow them in test files
The text was updated successfully, but these errors were encountered: