-
Notifications
You must be signed in to change notification settings - Fork 15
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
chore: fix linting errors #116
Conversation
src/__tests__/gatsby-node.ts
Outdated
writeFile: jest.fn(), | ||
} | ||
}) | ||
/* eslint-disable import/first, max-nested-callbacks */ |
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.
Probably best to add a general override, disabling this for all test files, like we've done in the build plugins: https://github.com/netlify/netlify-plugin-gatsby/blob/main/.eslintrc.js#L21
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.
Ah, thanks. I was trying to do this by adding another .eslintrc file to the test folder, but couldn't figure out a neat way to get Jest to ignore it. This is a much better solution.
@@ -1,4 +1,4 @@ | |||
import _ from "lodash" | |||
import _ from 'lodash' |
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.
One day we should see if we can remove lodash. The gatsby codebase is littered with pointless use of it.
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.
Good call. I've added a draft ticket to the board.
* chore: fix linting errors * chore: fix linting errors * chore: add general eslint override for test files * chore: switch fs promises to fs-extra so tests lint correctly
This PR fixes all lint errors on the repo, potentially introduced by changes to @netlify/eslint-config-node. There are still a number of lint warnings, mainly regarding
type: any
, which I will open an internal issue about.