require-aws-amplify-artifacts-base-directory-relative-path
Require AWS Amplify artifacts.baseDirectory values to be repository-relative.
Targeted pattern scopeâ
baseDirectory:values in Amplify build specs.
What this rule reportsâ
This rule reports absolute artifacts base directory values such as /dist.
Why this rule existsâ
Absolute output paths are brittle across environments and make repository-driven build output conventions harder to enforce.
â Incorrectâ
frontend:
artifacts:
baseDirectory: /dist
â Correctâ
frontend:
artifacts:
baseDirectory: dist
When not to use itâ
Disable this rule if your Amplify build environment intentionally requires absolute output paths.
Rule catalog ID: R095