-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[v2] fix eslint warnings #5121
[v2] fix eslint warnings #5121
Conversation
@@ -119,11 +118,13 @@ async function findGraphQLTags(file, text): Promise<Array<DefinitionNode>> { | |||
TaggedTemplateExpression(path) { | |||
if ( | |||
(`descendant of query`, | |||
// eslint-disable-next-line no-undef |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't figure out how to get babel-eslint to like the optional chaining here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, noticed that too — it must not be setup to use or repo babel setup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one specific minor version that it works with...I'll find it I have it set in another project but don't remember off the top of my head :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that'd be ace, thanks :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its 8.2.1
and earlier i think, you can pin to that specific version tho, any higher and it's broken. babel/babel-eslint#595
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, thanks!
packages/gatsby/src/redux/actions.js
Outdated
@@ -347,12 +345,6 @@ actions.deleteNodes = (nodes: any[], plugin: Plugin) => { | |||
plugin, | |||
payload: nodes, | |||
} | |||
|
|||
if (deleteDescendantsActions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this as eslint marked it as unreachable. Should deleting descendants still be included?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah — this might be a bad merge. If you look at deleteNode
, it finds descendant nodes to delete above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reverted this, handling it in #5106 instead.
This is ready for another look. |
🙏nice work! |
* Fix lint errors * Revert this, handled in PR 5106 * Pin babel-eslint to a version that supports @babel/plugin-proposal-optional-chaining
build
anddevelop
works locally on gatsbygram, I've not tested these changes any further.