question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not sorting imports in .vue files

See original GitHub issue

Hi, I have a following config:

{
  "importOrder": [
    "^vue/(.*)$",
    "^[^@v](.*)$",
    "^@(.*)$",
    "^[./]"
  ],
  "importOrderSeparation": true,
}

And an App.vue file (already formatted with prettier):

<script>
import Vue from 'vue'
import TheNavBar from '@/components/TheNavBar'
import dayjs from 'dayjs'
</script>

When I copy its content to .ts file, it gets formatted as expected:

import Vue from 'vue'

import dayjs from 'dayjs'

import TheNavBar from '@/components/TheNavBar'

Is it possible to somehow enable .vue files support?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
blake-newmancommented, Oct 10, 2022

I’ve added the base support for .vue files; i’ve successfully applied the patch via yarn patch and working successfully in a large project.

2reactions
muetycommented, Nov 18, 2021

I’m looking forward to Vue support! 🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to order imports in a Vue file? - Stack Overflow
1 Answer 1. Sorted by: Reset to default. Highest score (default) ...
Read more >
Style Guide - Vue.js
Style Guide. This is the official style guide for Vue-specific code. If you use Vue in a project, it's a great reference to...
Read more >
vue3 import .vue file autocomplete does not add extension
When importing one component into another autocompete add path without extension, e.g. import AppHeader from './components/Header.vue';...
Read more >
.vue files not working - Laracasts
I've got no errors in the console and the gulp runs just fine. This is what my main file looks like import Vue...
Read more >
How to Import a Sass File into Every Vue Component in an App
How? · You will need to shut down and restart your local development server to make any of these changes take hold. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found