@@ -101,7 +101,10 @@ Our code is automatically formatted with [Prettier](https://prettier.io) to foll
...
@@ -101,7 +101,10 @@ Our code is automatically formatted with [Prettier](https://prettier.io) to foll
### Editor
### Editor
The easiest way to include prettier in your workflow is by setting up your preferred editor (all major editors are supported) accordingly. We suggest setting up prettier to run automatically when each file is saved. Find [here](https://prettier.io/docs/en/editors.html) the best way to set it up in your preferred editor.
The recommended method to include Prettier in your workflow is to set up your
preferred editor (all major editors are supported) accordingly. We suggest
setting up Prettier to run when each file is saved. For instructions about using
Prettier in your preferred editor, see the [Prettier documentation](https://prettier.io/docs/en/editors.html).
Please take care that you only let Prettier format the same file types as the global Yarn script does (`.js`, `.vue`, `.graphql`, and `.scss`). In VSCode by example you can easily exclude file formats in your settings file:
Please take care that you only let Prettier format the same file types as the global Yarn script does (`.js`, `.vue`, `.graphql`, and `.scss`). In VSCode by example you can easily exclude file formats in your settings file:
@@ -32,8 +32,9 @@ When using Vuex at GitLab, separate these concerns into different files to impro
...
@@ -32,8 +32,9 @@ When using Vuex at GitLab, separate these concerns into different files to impro
└── mutation_types.js # mutation types
└── mutation_types.js # mutation types
```
```
The following example shows an application that lists and adds users to the state.
The following example shows an application that lists and adds users to the
(For a more complex example implementation take a look at the security applications store in [here](https://gitlab.com/gitlab-org/gitlab/tree/master/ee/app/assets/javascripts/vue_shared/security_reports/store))
state. (For a more complex example implementation, review the security
applications stored in this [repository](https://gitlab.com/gitlab-org/gitlab/tree/master/ee/app/assets/javascripts/vue_shared/security_reports/store)).
@@ -82,7 +82,8 @@ This Ruby Regex specialty can have security impact, as often regular expressions
...
@@ -82,7 +82,8 @@ This Ruby Regex specialty can have security impact, as often regular expressions
#### Examples
#### Examples
GitLab specific examples can be found [here](https://gitlab.com/gitlab-org/gitlab/-/issues/36029#note_251262187) and [there](https://gitlab.com/gitlab-org/gitlab/-/issues/33569).
GitLab-specific examples can be found in the following [path traversal](https://gitlab.com/gitlab-org/gitlab/-/issues/36029#note_251262187)
and [open redirect](https://gitlab.com/gitlab-org/gitlab/-/issues/33569) issues.
Another example would be this fictional Ruby on Rails controller:
Another example would be this fictional Ruby on Rails controller: