module.exports = {
	// Exclude auto-generated models from linting
	'src/**/*.ts': (filenames) => {
		const filtered = filenames.filter((f) => !f.startsWith('src/models/'));
		if (filtered.length === 0) return [];
		return ['pnpm run lint:fix', `prettier --write ${filtered.join(' ')}`];
	},
	'tests/**/*.ts': (filenames) => {
		return ['pnpm run lint:fix', `prettier --write ${filenames.join(' ')}`];
	},
	'*.{js,jsx,ts,tsx,json,md,yml,yaml}': (filenames) => {
		const filtered = filenames.filter((f) => !f.startsWith('src/models/'));
		if (filtered.length === 0) return [];
		return [`prettier --write ${filtered.join(' ')}`];
	},
};
