Remove last remaining inline JavaScript
## Priority 1: `eval` of Views We need to clean those as soon as possible as they might oppose a risk. JS views that are `eval`ed by jQuery using `script` tags (find app/views -name "*.js.*"): - [x] [app/views/projects/group_links/update.js.haml](app/views/projects/group_links/update.js.haml) -> gitlab-org/gitlab#250655 (removed in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42745) - [x] [app/views/projects/remove_fork.js.haml](app/views/projects/remove_fork.js.haml) => gitlab-org/gitlab#250697 ~~(Seems to be not in use anymore)~~ Removed with https://gitlab.com/gitlab-org/gitlab/-/issues/345124 - [x] [app/views/projects/transfer.js.haml](app/views/projects/transfer.js.haml) => gitlab-org/gitlab#250697 ~~(Seems to be not in use anymore)~~ https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72361. - [x] [app/views/projects/tags/destroy.js.haml](app/views/projects/tags/destroy.js.haml) => gitlab-org/gitlab#250834 (in use, fairly easy to move) - [x] [app/views/projects/refs/logs_tree.js.haml](app/views/projects/refs/logs_tree.js.haml) => Deleted already - [x] [app/views/projects/milestones/update.js.haml](app/views/projects/milestones/update.js.haml) => gitlab-org/gitlab#250835 (We should be able to simply delete) - [x] [app/views/projects/update.js.haml](app/views/projects/update.js.haml) => gitlab-org/gitlab#250837 (Might be more complex to port) - [x] [app/views/admin/labels/destroy.js.haml](app/views/admin/labels/destroy.js.haml) => gitlab-org/gitlab#250839 - [x] [app/views/admin/runners/update.js.haml](app/views/admin/runners/update.js.haml) => Deleted already - [ ] [app/views/shared/snippets/show.js.haml](app/views/shared/snippets/show.js.haml) => gitlab-org/gitlab#250840 (Should be easily moveable) - [x] [app/views/shared/members/update.js.haml](app/views/shared/members/update.js.haml) => gitlab-org/gitlab#250843 (Removed in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/44048) - [X] [app/views/groups/labels/destroy.js.haml](app/views/groups/labels/destroy.js.haml) => gitlab-org/gitlab#250845 (deleted in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42643) - [x] [app/views/profiles/preferences/update.js.erb](app/views/profiles/preferences/update.js.erb) => gitlab-org/gitlab#250846 (more complex) => Currently being worked on by @mlunoe - [x] [app/views/import/bitbucket/deploy_key.js.haml](app/views/import/bitbucket/deploy_key.js.haml) => gitlab-org/gitlab#250847 (should be easy) - [x] [app/views/help/shortcuts.js.haml](app/views/help/shortcuts.js.haml) => gitlab-org/gitlab#250848 (should be easy) - [x] [ee/app/views/users/available_group_templates.js.haml](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/ee/app/views/users/available_group_templates.js.haml) #353339 - [x] [ee/app/views/users/available_project_templates.js.haml](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/ee/app/views/users/available_project_templates.js.haml) #353340 ## Priority Low: Disabled Linters Different Linter Warnings or disabled Linters that would be nice to fix but no imminent risk. There are still a few places where we disable the `InlineJavaScript` haml linter that was introduced in gitlab-ce!9742 (`git grep 'InlineJavaScript'`): - [x] [app/views/layouts/_google_analytics.html.haml](app/views/layouts/_google_analytics.html.haml) (TZ: Is a `javascript_tag`by now) - [x] [app/views/layouts/_init_auto_complete.html.haml](app/views/layouts/_init_auto_complete.html.haml) (TZ: Is a `javascript_tag`by now) - [x] [app/views/layouts/_piwik.html.haml](app/views/layouts/_piwik.html.haml) (TZ: Is a `javascript_tag`by now) - [x] [app/views/layouts/group.html.haml](app/views/layouts/group.html.haml) (TZ: Is a `javascript_tag`by now) - [x] [app/views/layouts/project.html.haml](app/views/layouts/project.html.haml) (TZ: Is a `javascript_tag`by now) - [x] [app/views/layouts/snippets.html.haml](app/views/layouts/snippets.html.haml) (TZ: Is a `javascript_tag`by now) - [x] [app/views/projects/merge_requests/show.html.haml](app/views/projects/merge_requests/show.html.haml) (TZ: JSON serialization uses html_safe - [x] [app/views/u2f/_register.html.haml](app/views/u2f/_register.html.haml) (TZ: Doesn't exist anymore) - [x] [app/views/u2f/_authenticate.html.haml](app/views/u2f/_authenticate.html.haml) (TZ: Doesn't exist anymore) - [x] [app/views/shared/notes/_notes_with_form.html.haml](app/views/shared/notes/_notes_with_form.html.haml) (TZ: gitlab-org/gitlab!42574) - [x] [app/views/shared/issuable/_sidebar.html.haml](app/views/shared/issuable/_sidebar.html.haml) (TZ: gitlab-org/gitlab!42574) - [x] [app/views/shared/boards/_show.html.haml](app/views/shared/boards/_show.html.haml) (TZ: gitlab-org/gitlab!42574) - [x] [app/views/projects/tags/new.html.haml](app/views/projects/tags/new.html.haml) (TZ: gitlab-org/gitlab!42574) - [x] [app/views/projects/branches/new.html.haml](app/views/projects/branches/new.html.haml) (TZ: gitlab-org/gitlab!42574) - [x] [app/views/projects/edit.html.haml](app/views/projects/edit.html.haml) (TZ: No inline script anymore) - [x] [app/views/projects/graphs/charts.html.haml](app/views/projects/graphs/charts.html.haml) (TZ: No inline script anymore) - [x] [app/views/projects/issues/show.html.haml](app/views/projects/issues/show.html.haml) (EK: No inline script anymore gitlab-org/gitlab!42667) - [x] [app/views/projects/pipelines/charts/_pipeline_times.haml](app/views/projects/pipelines/charts/_pipeline_times.haml) - [x] [app/views/projects/pipelines/charts/_pipelines.haml](app/views/projects/pipelines/charts/_pipelines.haml) - [x] [app/views/projects/pipelines/new.html.haml](app/views/projects/pipelines/new.html.haml) - [x] [ee/app/views/groups/analytics/show.html.haml](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/ee/app/views/groups/analytics/show.html.haml) (TZ: Doesn't exist anymore) - [ ] [ee/app/views/profiles/slacks/edit.html.haml](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/ee/app/views/profiles/slacks/edit.html.haml) - [x] [app/views/projects/blob/_header.html.haml](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/app/views/projects/blob/_header.html.haml) (TZ: No inline JS anymore) Previous issues: gitlab-ce#19866 gitlab-ce#34903 cc: @ClemMakesApps @winh
issue