@gitlab/eslint-plugin
Version:
GitLab package for our custom eslint rules
31 lines (26 loc) • 715 B
Markdown
# /vue-no-hardcoded-urls
We should not hardcode or construct URLs on the frontend. See https://docs.gitlab.com/development/urls_in_gitlab/ for more information.
## Options
Nothing
```json
{
"@gitlab/vue-no-hardcoded-urls": [
"error",
{
"allowedVueComponents": ["help-page-link"],
"allowedKeys": ["path", "redirect"],
"allowedFunctions": ["helpPagePath"],
"allowedInterpolationVariables": [
"FORUM_URL",
"DOCS_URL",
"PROMO_URL",
"CONTRIBUTE_URL",
"DOCS_URL_IN_EE_DIR",
"CUSTOMERS_PORTAL_URL"
],
"allowedPatterns": ["\\/api\\/:version"],
"disallowedObjectProperties": ["relative_url_root"]
}
]
}
```