-
-
Notifications
You must be signed in to change notification settings - Fork 209
Exporting Typescript enums from components raises a warning #573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
TypeScript transpiles `export enum A` to `export var A`, which the compiler will warn about. Silence this edge case. sveltejs#573
TypeScript transpiles `export enum A` to `export var A`, which the compiler will warn about. Silence this edge case. #573
I know this is a bit out of context, but couldn't find the docs and this issue seemed most relevant. I think you guys can help an eslint configuration to convert this warning into error... I've tried a configuration like this - ...
plugins: ["react", "svelte3"],
overrides: [
{
files: ["**/*.svelte"],
processor: "svelte3/svelte3",
rules: {
"unused-export-let": ["error"]
}
},
...
] but it doesn't seem to fail even when running eslint manually. Any help is appreciated @dummdidumm |
The warning does not come from ESLint, it comes from the Svelte compiler. You'll want to use this setting for VS Code and the --compiler-warnings setting for svelte-check. |
Describe the bug
Exporting a typescript
enum
orconst enum
from a<script context="module" lang="ts">
block raises a "svelte(unused-export-let)" warning.Expected behavior
Exporting enums is allowed without warning.
Screenshots

System (please complete the following information):
Additional context
Exporting a
type
or aninterface
does not raise this warning.The text was updated successfully, but these errors were encountered: