The plugins doesn't work for vue files for me. #254
Unanswered
adampolyanskiy
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Good time of the day, everyone. I have troubles running the plugin for .vue files.
Here is the prettier config:
{ "$schema": "https://json.schemastore.org/prettierrc", "semi": true, "tabWidth": 2, "singleQuote": true, "printWidth": 100, "trailingComma": "none", "singleAttributePerLine": true, "bracketSameLine": true, "plugins": ["@trivago/prettier-plugin-sort-imports"], "importOrderParserPlugins": ["typescript"], "importOrder": [ "^vue(.*)$", "^@/app/(.*)$", "^@/pages/(.*)$", "^@/modules/(.*)$", "^@/entities/(.*)$", "^@/shared/(.*)$", "<THIRD_PARTY_MODULES>", "^[./]" ], "importOrderSeparation": true, "importOrderSortSpecifiers": true }
It works totally fine for .ts files, but when I try to run it on a file like this:
src/app/App.vue
`<script setup lang="ts">
stub <style scoped></style>`import AppHeader from '@/modules/header';
import { theme } from '@/app/providers';
</script>
It doesn't work.
Here is package.json dependencies:
"dependencies": { "@tanstack/vue-query": "^4.34.0", "ant-design-vue": "^4.0.1", "lodash-es": "^4.17.21", "pinia": "^2.1.6", "vue": "^3.3.4", "vue-router": "^4.2.4" }, "devDependencies": { "@rushstack/eslint-patch": "^1.3.2", "@trivago/prettier-plugin-sort-imports": "^4.2.0", "@tsconfig/node18": "^18.2.0", "@types/jsdom": "^21.1.1", "@types/lodash-es": "^4.17.9", "@types/node": "^18.17.5", "@vitejs/plugin-vue": "^4.3.1", "@vue/eslint-config-prettier": "^8.0.0", "@vue/eslint-config-typescript": "^11.0.3", "@vue/test-utils": "^2.4.1", "@vue/tsconfig": "^0.4.0", "eslint": "^8.46.0", "eslint-plugin-vue": "^9.16.1", "husky": "^8.0.3", "jsdom": "^22.1.0", "lint-staged": "^14.0.1", "npm-run-all": "^4.1.5", "prettier": "^3.0.0", "typescript": "~5.1.6", "unplugin-vue-components": "^0.25.2", "vite": "^4.4.9", "vitest": "^0.34.2", "vue-tsc": "^1.8.8" }
What could be an issue?
Beta Was this translation helpful? Give feedback.
All reactions