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

Trailing comma in quasar import statement results in build failure #10049

Closed
2 of 14 tasks
tvkit opened this issue Jul 11, 2021 · 4 comments
Closed
2 of 14 tasks

Trailing comma in quasar import statement results in build failure #10049

tvkit opened this issue Jul 11, 2021 · 4 comments
Labels

Comments

@tvkit
Copy link

tvkit commented Jul 11, 2021

Describe the bug
A trailing comma in a quasar import statement results in build failure.

Codepen/jsFiddle/Codesandbox (required)
https://github.com/tvkit/quasar-comma-bug

To Reproduce
clone, yarn, and run quasar dev

Expected behavior
successful build

Screenshots
image

Platform (please complete the following information):
Quasar Version: 2.0.2
@quasar/app Version: 3.0.2

Quasar mode:

  • SPA
  • SSR
  • PWA
  • Electron
  • Cordova
  • Capacitor
  • BEX

Tested on:

  • SPA
  • SSR
  • PWA
  • Electron
  • Cordova
  • Capacitor
  • BEX

OS: Windows 10
Node: 12.22.1
NPM: 6.14.12
Yarn: 1.22.5
Browsers: n/a
iOS: n/a
Android: n/a
Electron: n/a

Additional context

A new quasar-generated project was created to demonstrate the behavior.

This results in failure:
import { QTable, useQuasar, } from 'quasar';

This does not:
import { QTable, useQuasar } from 'quasar';

A pesky vs-code extension insisted on the trailing comma. I've since removed the extension.

@tvkit tvkit added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels Jul 11, 2021
@hawkeye64
Copy link
Member

This would be a result of whatever linter you are using and how the rules are set up.

@tvkit
Copy link
Author

tvkit commented Jul 13, 2021

@hawkeye64

Not a linter violation, but a compilation failure.

The issue is likely caused by an empty identifier on the following comma split:

@hawkeye64
Copy link
Member

@tvkit Good catch, since trailing commas are legal and quite common in JavaScript.

@rstoenescu
Copy link
Member

Fix will be available in "@quasar/app" v3.1.7.
This does not happen for non-TS though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants