Skip to content

Commit abc6315

Browse files
authored
fix: no-unused-vars rule false positives for Props interfaces (#141)
* fix: no-unused-vars rule false positives for Props interfaces * Create popular-cooks-bake.md
1 parent 4514ab7 commit abc6315

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

.changeset/popular-cooks-bake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"astro-eslint-parser": patch
3+
---
4+
5+
fix: no-unused-vars rule false positives for Props interfaces

src/parser/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ export function parseForESLint(
6363
propsVariable.identifiers[0],
6464
propsVariable,
6565
scope,
66-
{}
66+
{
67+
read: true,
68+
}
6769
);
6870
}
6971
// analyze Astro, and Fragment references

tests/fixtures/parser/ast/ts-astro-type01-no-unused-vars-result.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)