-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix no-missing-import getting confused on incremental file changes (#338
- Loading branch information
1 parent
6408719
commit 9f44f6f
Showing
8 changed files
with
80 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
packages/lit-analyzer/src/lib/analyze/store/analyzer-dependency-store.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,3 @@ | ||
export interface AnalyzerDependencyStore { | ||
hasTagNameBeenImported(fileName: string, tagName: string): boolean; | ||
} | ||
|
||
//importedComponentDefinitionsInFile = new Map<string, ComponentDefinition[]>(); | ||
|
||
/** | ||
* Returns if a component for a specific file has been imported. | ||
* @param fileName | ||
* @param tagName | ||
*/ | ||
/*hasTagNameBeenImported(fileName: string, tagName: string): boolean { | ||
for (const file of this.importedComponentDefinitionsInFile.get(fileName) || []) { | ||
if (file.tagName === tagName) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
}*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/vscode-lit-plugin/src/test/fixtures/missing-import.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import "./my-defined-element.js"; | ||
|
||
// Pretending this is the Lit html function | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
declare const html: any; | ||
|
||
html`<my-defined-element></my-defined-element><my-other-element></my-other-element>`; |
9 changes: 9 additions & 0 deletions
9
packages/vscode-lit-plugin/src/test/fixtures/my-defined-element.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export class MyDefinedElement extends HTMLElement {} | ||
|
||
customElements.define("my-defined-element", MyDefinedElement); | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
"my-defined-element": MyDefinedElement; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/vscode-lit-plugin/src/test/fixtures/my-other-element.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export class MyOtherElement extends HTMLElement {} | ||
|
||
customElements.define("my-other-element", MyOtherElement); | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
"my-other-element": MyOtherElement; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters