k6-docs
k6-docs copied to clipboard
chore: fix ESLint errors
What?
Update code samples with ESLint errors by making code samples valid or disabling ESLint rules.
Checklist
- [x] I have used a meaningful title for the PR.
- [x] I have described the changes I've made in the "What?" section above.
- [x] I have performed a self-review of my changes.
- [x] I have run the
npm startcommand locally and verified that the changes look good.
- [x] I have made my changes in the
docs/sources/nextfolder of the documentation. - [x] I have reflected my changes in the
docs/sources/v{most_recent_release}folder of the documentation. - [ ] I have reflected my changes in the relevant folders of the two previous k6 versions of the documentation (if still applicable to previous versions).
Related PR(s)/Issue(s)
@codebien this should take care of the errors you saw when creating the v0.51.x release. 🙇
@codebien that's a fair point. I think for tutorials, it makes sense to have snippets that are shorter and don't have all the required imports or variables. Right now, it's only a few files that require us to disable the rule, so I think it's ok to keep it this way, and it would unblock us from seeing the errors in this next release.
I want to spend a bit more time looking at the overall ESLint configuration for the repo and seeing if there's anything else we can change to make sure we have valid examples, while keeping the tutorials clear and concise.