From 4a3f0a562a45a684ae84f7339176ee021de6c10d Mon Sep 17 00:00:00 2001 From: James Tu Date: Tue, 25 Jun 2024 16:33:51 -0700 Subject: [PATCH 1/2] feat: add tsconfig and .ts files to forceignore --- packages/lightning-lsp-common/src/context.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/lightning-lsp-common/src/context.ts b/packages/lightning-lsp-common/src/context.ts index 106a41ef..3fd64ac2 100644 --- a/packages/lightning-lsp-common/src/context.ts +++ b/packages/lightning-lsp-common/src/context.ts @@ -557,7 +557,9 @@ export class WorkspaceContext { private async updateForceIgnoreFile(ignoreFile: string): Promise { await utils.appendLineIfMissing(ignoreFile, '**/jsconfig.json'); + await utils.appendLineIfMissing(ignoreFile, '**/tsconfig.json'); await utils.appendLineIfMissing(ignoreFile, '**/.eslintrc.json'); + await utils.appendLineIfMissing(ignoreFile, '**/*.ts'); } /** From 620496aa0e34030f304d43de74b48767ae4fda42 Mon Sep 17 00:00:00 2001 From: James Tu Date: Tue, 25 Jun 2024 16:34:31 -0700 Subject: [PATCH 2/2] test: add unit tests --- packages/lightning-lsp-common/src/__tests__/context.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/lightning-lsp-common/src/__tests__/context.test.ts b/packages/lightning-lsp-common/src/__tests__/context.test.ts index 8aff4932..d7f26b84 100644 --- a/packages/lightning-lsp-common/src/__tests__/context.test.ts +++ b/packages/lightning-lsp-common/src/__tests__/context.test.ts @@ -199,7 +199,9 @@ it('configureSfdxProject()', async () => { // .forceignore const forceignoreContent = fs.readFileSync(forceignorePath, 'utf8'); expect(forceignoreContent).toContain('**/jsconfig.json'); + expect(forceignoreContent).toContain('**/tsconfig.json'); expect(forceignoreContent).toContain('**/.eslintrc.json'); + expect(forceignoreContent).toContain('**/*.ts'); // typings expect(join(sfdxTypingsPath, 'lds.d.ts')).toExist();