Skip to content

Commit

Permalink
feat: add tsconfig and .ts file extensions to .forceignore (#590)
Browse files Browse the repository at this point in the history
* feat: add tsconfig and .ts files to forceignore

* test: add unit tests
  • Loading branch information
jmsjtu authored Jul 4, 2024
1 parent 565e8a0 commit 81e6bc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/lightning-lsp-common/src/__tests__/context.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions packages/lightning-lsp-common/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,9 @@ export class WorkspaceContext {

private async updateForceIgnoreFile(ignoreFile: string): Promise<void> {
await utils.appendLineIfMissing(ignoreFile, '**/jsconfig.json');
await utils.appendLineIfMissing(ignoreFile, '**/tsconfig.json');
await utils.appendLineIfMissing(ignoreFile, '**/.eslintrc.json');
await utils.appendLineIfMissing(ignoreFile, '**/*.ts');
}

/**
Expand Down

0 comments on commit 81e6bc7

Please sign in to comment.