Skip to content

Add custom linter for inline JavaScript to haml_lint

What does this MR do?

Fail the build for inline JavaScript in HAML templates unless the file is explicitly ignored. This is done by introducing a custom linter to haml_lint.

Why was this MR needed?

Inline JavaScript in views is discouraged.

Screenshot

linting-errors

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/34903

Edited by Winnie Hellmann

Merge request reports

Loading