no-empty-template-file-pattern
Rule catalog ID: R060
Targeted pattern scopeโ
filePatterns entries in workflow-templates/*.properties.json files.
What this rule reportsโ
Reports entries that are empty or whitespace-only strings.
Why this rule existsโ
Template matching requires meaningful regex patterns.
โ Incorrectโ
{ "filePatterns": [" "] }
โ Correctโ
{ "filePatterns": ["package.json$"] }
Behavior and migration notesโ
The autofixer removes empty or whitespace-only entries from the filePatterns array while preserving the remaining valid items. If the array only contains invalid entries, the fix leaves an empty array behind so you can add the intended patterns explicitly.
Additional examplesโ
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
ESLint flat config exampleโ
import githubActions from "eslint-plugin-github-actions-2";
export default [
{
files: ["**/*.{yml,yaml}"],
plugins: {
"github-actions": githubActions,
},
rules: {
"github-actions/no-empty-template-file-pattern": "error",
},
},
];
When not to use itโ
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.