diff --git a/packages/cli/src/utils/lintProject.test.ts b/packages/cli/src/utils/lintProject.test.ts index ed5df9f36a..0ce2eb0c67 100644 --- a/packages/cli/src/utils/lintProject.test.ts +++ b/packages/cli/src/utils/lintProject.test.ts @@ -914,6 +914,19 @@ describe("multiple_root_compositions", () => { expect(finding).toBeUndefined(); }); + it("ignores macOS AppleDouble HTML metadata files", async () => { + const project = makeProject(validHtml()); + writeFileSync(join(project, "._index.html"), validHtml()); + mkdirSync(join(project, "compositions"), { recursive: true }); + writeFileSync(join(project, "compositions", "._scene.html"), validHtml("scene")); + const { results } = await lintProject(project); + const finding = results[0]?.result.findings.find( + (f) => f.code === "multiple_root_compositions", + ); + expect(finding).toBeUndefined(); + expect(results.some((result) => result.file.includes("._"))).toBe(false); + }); + it("ignores HTML files without data-composition-id", async () => { const project = makeProject(validHtml()); writeFileSync(join(project, "readme.html"), "
Not a composition"); diff --git a/packages/lint/src/project.ts b/packages/lint/src/project.ts index 6b5c9967da..3419eed4a9 100644 --- a/packages/lint/src/project.ts +++ b/packages/lint/src/project.ts @@ -200,7 +200,9 @@ export async function lintProject(projectDir: string): Promise