mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-27 07:50:47 +00:00
df7a014c91
As part of follow-up changes, we need a list of fields that could be used in templates as part of a linting rule. To avoid the `tools` directory importing from `lib`, we can make sure that we generate the list of fields. Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
22 lines
650 B
TypeScript
22 lines
650 B
TypeScript
import { validMatchFields } from '../../lib/modules/manager/custom/utils.ts';
|
|
import {
|
|
allowedFields,
|
|
exposedConfigOptions,
|
|
} from '../../lib/util/template/index.ts';
|
|
import { templatableFields } from '../../tools/lint/rules/templatable-fields.generated.ts';
|
|
|
|
describe('other/validate-templatable-fields', () => {
|
|
// if this test fails, run `pnpm generate`
|
|
it('generated templatable fields are up to date', () => {
|
|
const expected = [
|
|
...new Set([
|
|
...validMatchFields,
|
|
...exposedConfigOptions,
|
|
...Object.keys(allowedFields),
|
|
]),
|
|
].sort();
|
|
|
|
expect(templatableFields).toEqual(expected);
|
|
});
|
|
});
|