k6-docs
k6-docs copied to clipboard
Add information on how to format and lint k6 scripts
Prompted by https://community.k6.io/t/linting-k6-scripts/1277
https://k6.io/blog/how-to-lint-k6-tests-and-add-a-pre-commit-hook/ touches more extensively this topic.
Perhaps, instead of a dedicated section, we could cover this as part of a more general tutorial for recommendations to set up your k6 project.
Any updates? On top of documentation, it would be nice if k6 provided a eslint extension that we could use to extend our .eslintrc files.
@matthewbordas, this project has a .eslintrc file used to validate the documentation examples.
Another related issue: https://github.com/grafana/k6/issues/2992