require-bitbucket-pipelines-config-file
Require bitbucket-pipelines.yml at the repository root.
Targeted pattern scopeâ
This rule checks the repository root for bitbucket-pipelines.yml.
What this rule reportsâ
This rule reports repositories that enable Bitbucket-oriented presets without a Bitbucket Pipelines configuration file.
Why this rule existsâ
Bitbucket Pipelines automation starts with bitbucket-pipelines.yml.
Without that file, later Bitbucket-specific rules about default pipelines, branch handling, or step naming have nothing real to validate.
â Incorrectâ
// Repository files
// .
// âââ README.md
// âââ package.json
// âââ src/
//
// Missing: bitbucket-pipelines.yml
â Correctâ
// Repository files
// .
// âââ bitbucket-pipelines.yml
// âââ README.md
// âââ package.json
ESLint flat config exampleâ
import repoPlugin from "eslint-plugin-repo";
export default [
repoPlugin.configs.bitbucket,
{
plugins: { "repo-compliance": repoPlugin },
rules: {
"repo-compliance/require-bitbucket-pipelines-config-file": "error",
},
},
];
When not to use itâ
Disable this rule only if the repository does not use Bitbucket Pipelines.
Rule catalog ID: R015