Skip to content
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

Fix Svelte compiler warnings #57

Closed
wants to merge 3 commits into from

Conversation

davidroeca
Copy link

There are a number of compiler warnings that pop up when importing svelma in a svelte component with the latest version of svelte. One such warning was mentioned here

Here were the ones that I saw:

WARNING in ./node_modules/svelma/src/components/Dialog/Dialog.svelte
Module Warning (from ./node_modules/svelte-loader-hot/index.js):
Dialog has unused export property 'promise'. If it is for external reference only, please consider using `export const promise` (87:13)
85:   // export let showClose = true
86:   let resolve
87:   export let promise = new Promise((fulfil) => (resolve = fulfil))
                 ^
88:
89:   // TODO: programmatic subcomponents
 @ ./node_modules/svelma/src/components/Dialog/index.js 1:0-36 6:21-27 35:0-6 36:0-6 37:0-6 39:15-21
 @ ./node_modules/svelma/src/index.js
WARNING in ./node_modules/svelma/src/components/Dialog/Dialog.svelte
Module Warning (from ./node_modules/svelte-loader-hot/index.js):
Dialog has unused export property 'subComponent'. If it is for external reference only, please consider using `export const subComponent` (90:13)
88:
89:   // TODO: programmatic subcomponents
90:   export let subComponent = null
                 ^
91:   export let appendToBody = true
92:
 @ ./node_modules/svelma/src/components/Dialog/index.js 1:0-36 6:21-27 35:0-6 36:0-6 37:0-6 39:15-21
 @ ./node_modules/svelma/src/index.js
WARNING in ./node_modules/svelma/src/components/Message.svelte
Module Warning (from ./node_modules/svelte-loader-hot/index.js):
Message has unused export property 'ariaCloseLabel'. If it is for external reference only, please consider using `export const ariaCloseLabel` (14:13)
12:   export let size = ''
13:   export let iconSize = ''
14:   export let ariaCloseLabel = 'delete'
                 ^
15:
16:   let icon
 @ ./node_modules/svelma/src/index.js 8:0-49 17:0-33:1 42:2-9
WARNING in ./node_modules/svelma/src/components/Modal/Modal.svelte
Module Warning (from ./node_modules/svelte-loader-hot/index.js):
Modal has unused export property 'subComponent'. If it is for external reference only, please consider using `export const subComponent` (10:13)
 8:   export let size = ''
 9:   export let showClose = true
10:   export let subComponent = null
                 ^
11:   export let onBody = true
12:
 @ ./node_modules/svelma/src/components/Modal/index.js 1:0-34 3:0-5 5:15-20 8:20-25
 @ ./node_modules/svelma/src/index.js

This PR simply aims to fix them.

@davidroeca
Copy link
Author

@abbychau is this PR still necessary? Looks like the only changes are formatting-related

@abbychau
Copy link
Collaborator

@davidroeca
I think they are not needed. I have updated the project with a new Svelte Loader.
Thank you.

@abbychau abbychau closed this Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants