You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -16,4 +16,4 @@
16
16
17
17
## 0.0.1
18
18
19
-
-[`1c76c20`](https://github.com/ota-meshi/typescript-eslint-parser-for-extra-files/commit/1c76c20cf7c7617b157356e44eb2dc7e463dfb6f)Thanks [@ota-meshi](https://github.com/ota-meshi)! - First release 🎉
19
+
-[`1c76c20`](https://github.com/ota-meshi/typescript-eslint-parser-for-extra-files/commit/1c76c20cf7c7617b157356e44eb2dc7e463dfb6f) First release 🎉
Copy file name to clipboardExpand all lines: README.md
+22-4
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,25 @@ This parser is in the ***experimental stages*** of development.
10
10
11
11
A custom ESLint parser that provides type information when importing `*.vue`, `*.svelte`, and `*.astro` files.
12
12
13
-
`@typescript-eslint/parser` provides type information mostly well, but if you import extra files (other than `*.ts`, `*.tsx`, `*.d.ts`, `*.js`, `*.jsx`, and `*.json`) it treats it as `any` type.
13
+
`@typescript-eslint/parser` provides type information mostly well, but if you import extra files (other than `*.ts`, `*.tsx`, `*.d.ts`, `*.js`, `*.jsx`, and `*.json`) it treats it as `any` type.
14
+
15
+
e.g.
16
+
17
+
```vue
18
+
<script lang="ts">
19
+
import HelloWorld from './components/HelloWorld.vue' // <- typescript program can't parse it. because it will read including template and style.
20
+
21
+
export default {
22
+
name: 'App',
23
+
components: {
24
+
HelloWorld // <- so type information is `any`
25
+
}
26
+
}
27
+
</script>
28
+
```
29
+
30
+
See also <https://github.com/vuejs/vue-eslint-parser/issues/104>, and <https://github.com/typescript-eslint/typescript-eslint/issues/2865>.
31
+
14
32
This parser can be used to provide type information for importing `*.vue`, `*.svelte`, and `*.astro` files.
15
33
16
34
This parser is used in combination with [vue-eslint-parser], [svelte-eslint-parser], and [astro-eslint-parser].
0 commit comments