Update APM linting dev doc with instructions about how to install the pre-commit hook and a link to the Kibana guide (#115924)

This commit is contained in:
Giorgos Bamparopoulos 2021-10-25 10:24:00 +01:00 committed by GitHub
parent 262d0cdafd
commit 6b5b06fc03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,3 +19,12 @@ yarn prettier "./x-pack/plugins/apm/**/*.{tsx,ts,js}" --write
```
node scripts/eslint.js x-pack/plugins/apm
```
## Install pre-commit hook (optional)
In case you want to run a couple of checks like linting or check the file casing of the files to commit, we provide a way to install a pre-commit hook. To configure it you just need to run the following:
`node scripts/register_git_hook`
After the script completes the pre-commit hook will be created within the file .git/hooks/pre-commit. If you choose to not install it, dont worry, we still run a quick CI check to provide feedback earliest as we can about the same checks.
More information about linting can be found in the [Kibana Guide](https://www.elastic.co/guide/en/kibana/current/kibana-linting.html).