IanVS / prettier-plugin-sort-imports

An opinionated but flexible prettier plugin to sort import statements
Apache License 2.0
951 stars 21 forks source link

Use correct parser plugins for TS and Vue #91

Closed IanVS closed 1 year ago

IanVS commented 1 year ago

This fixes a few issues with parser plugins.

It fixes https://github.com/IanVS/prettier-plugin-sort-imports/issues/78 by removing the jsx parser plugin when the file is named .ts (typescript requires the use of .tsx extension for jsx).

It also applies similar logic for .vue files, ensuring that the correct parser plugins are used, with similar logic to the vue compiler itself.