Skip to content
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

Merged
merged 5 commits into from
Apr 14, 2022
Merged

chore: fix linting errors #116

merged 5 commits into from
Apr 14, 2022

Conversation

orinokai
Copy link
Contributor

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.

@orinokai orinokai requested a review from a team April 14, 2022 09:31
@orinokai orinokai self-assigned this Apr 14, 2022
@github-actions github-actions bot added the type: bug code to address defects in shipped code label Apr 14, 2022
@orinokai orinokai added type: chore work needed to keep the product and development running smoothly and removed type: bug code to address defects in shipped code labels Apr 14, 2022
@orinokai orinokai changed the title Fix linting errors (chore): fix linting errors Apr 14, 2022
@orinokai orinokai changed the title (chore): fix linting errors chore: fix linting errors Apr 14, 2022
writeFile: jest.fn(),
}
})
/* eslint-disable import/first, max-nested-callbacks */
Copy link
Contributor

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

Copy link
Contributor Author

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'
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@orinokai orinokai requested a review from ascorbic April 14, 2022 11:38
@kodiakhq kodiakhq bot merged commit 5b9d6a3 into main Apr 14, 2022
@kodiakhq kodiakhq bot deleted the fix/linting branch April 14, 2022 12:04
sarahetter pushed a commit that referenced this pull request Apr 19, 2022
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants