k6-docs icon indicating copy to clipboard operation
k6-docs copied to clipboard

chore: fix ESLint errors

Open heitortsergent opened this issue 1 year ago • 1 comments

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 start command locally and verified that the changes look good.
  • [x] I have made my changes in the docs/sources/next folder 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)

heitortsergent avatar May 16 '24 20:05 heitortsergent

@codebien this should take care of the errors you saw when creating the v0.51.x release. 🙇

heitortsergent avatar May 16 '24 21:05 heitortsergent

@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.

heitortsergent avatar May 20 '24 21:05 heitortsergent