Closed mattbrannon closed 2 years ago
I'm not sure why don't you post issue or fixing PR on https://github.com/kentcdodds/eslint-config-kentcdodds first? An ESLint config package is much more than a parser.
cc @kentcdodds
I'm not sure why don't you post issue or fixing PR on https://github.com/kentcdodds/eslint-config-kentcdodds first? An ESLint config package is much more than a parser.
I understand that, hence the WIP title. I haven't posted an issue on the other repo because it's not clear to me the underlying cause at this point.
I understand that, hence the WIP title.
You should mark this PR as draft then, I've changed it for you.
I understand that, hence the WIP title.
You should mark this PR as draft then, I've changed it for you.
Ah, yes I see. Thank you.
I believe your issue if caused by @rushstack/eslint-patch
which is used by eslint-config-next
.
https://github.com/prettier/prettier-eslint-cli/issues/434#issuecomment-1207331852
@JounQin I'm not sure I understand. #434 Is the reason I started digging into the codebase but is otherwise unrelated I believe. Maybe I should have been more specific about the goal here. I submitted this PR to try and have a discussion about possible solutions to validation tests failing during the initial setup process. Specifically step 3 of the contributing guide which says,
$ npm start validate
to validate you've got it working
Running npm start validate
causes the errors mentioned above. While the errors may indeed be due to a conflict with @rushstack/eslint-patch
it seems odd to pass this off as a problem on their end.
OK, I may misunderstood what you were trying to resolve, but what you're trying to change in this PR is definitely not a solution for what you want to fix. They are just bypassing the expected checks.
I'd be happy if you provide a more specific PR for fixing your mentioned issue. Feel free to create a new PR. Thanks.
I can reproduce it on CI now
https://github.com/prettier/prettier-eslint-cli/runs/7797880791?check_suite_focus=true#step:5:16
If you have a good solution to fix this, feel free to share!
Fixed at 46f2a6e
(#437)
@JounQin I cloned your branch and installed locally on my machine. I ran the validate
script without any errors this time. Nice work. Thanks for putting in the time on this.
I recently forked this project and wanted to try tackling some issues. However, I ran into problems with the validation script
npm start validate
. The first set of tests ran normally but the second set, which internally runsnps test.cli
failed in 4 out of 7 tests with the error messageEnvironment key \"jest/globals\" is unknown
which the packageeslint-config-kentcdodds
uses in it's configuration.Removing the
extends
field and adding@babel/eslint-parser
as a parser allows the tests to run normally.Specifically this PR does the following:
@babel/eslint-parser
to dev dependencies@babel/eslint-parser
as parser in.eslintrc.js
eslint-config-kentcdodds
as a dev dependencyPlease let me know if there's anything that needs to change. This is quick fix that allows the tests to run to completion without blowing up halfway through. I assume that Kent knows what he's doing in terms of his eslint + jest configuration but, at the moment, it appears to be causing an issue. It's unclear to me exactly where in the chain the problem occurs.