Comments (2)
Hi @JounQin . Thanks for your contribution to prettier & eslint ecosystem!
It would be nice for eslint-plugin-prettier to support those features natively. But I think this fork might not be an ideal implementation:
- It still have some unresolved bugs like #13 - simply splitting sfc into separate blocks will lose the file-level context.
- The way it uses to process custom blocks is utilizing vue's sfc compiler. I'm afraid it's not suitable for other frameworks.
- Maybe a prettier plugin could be a better choice?
Based on your knowledgement about prettier, I believe that you can find a better way to support similar features. Let me know if I could help anything.
from eslint-plugin-prettier-vue.
It would be nice for eslint-plugin-prettier to support those features natively. But I think this fork might not be an ideal implementation:
- Try like this one: https://github.com/un-ts/prettier/blob/80e1909d40d0c2957a40e79f50be13054f27665c/packages/sql/src/index.ts#L106-L110, I can raise a PR for it
- I mean mark
@vue/compiler-sfc
as optional peer dependency, for other frameworks, we use other compiler/parser instead - Yes, I was just talking with the author of https://github.com/Sec-ant/prettier-plugin-embed and custom blocks could be some kind of embed languages
Based on your knowledgement about prettier, I believe that you can find a better way to support similar features. Let me know if I could help anything.
Thanks, I do have some ideas as described above, I'm thinking what's the best choice or we may be able to support all choices.
The benefit of eslint-plugin-prettier
is that it can be reported by tools like VSCode ESLint plugin, while VSCode prettier won't check the file on editing.
from eslint-plugin-prettier-vue.
Related Issues (19)
- Deletes style tag iteratively HOT 2
- Failed to load plugin 'prettier-vue' declared in '.eslintrc.js': HOT 7
- prettier 'vueIndentScriptAndStyle=true' doesnt work HOT 7
- Issues with end of line for Vue SFC blocks with CLRF/LF HOT 5
- Consider making `eslint-config-prettier` optional dependency. HOT 1
- self-closing rule not working HOT 2
- Overriding "prettier-vue/prettier" as "error" breaks Vite HOT 1
- How can I change all error to warning? HOT 2
- Upgrading @vue/compiler-sfc to 3.1.x causes lint to fail, tries to add 20 blank lines around the <template> section HOT 9
- Plugin hides actual ESLint rule involved HOT 1
- Fixing a .vue file inserts nine blank lines If endofline is set to 'crlf' or 'auto'
- Support Typescript 3.7 HOT 1
- Possibility to transfer it nicely when using tailwindcss HOT 1
- Prettier 3.0 is out HOT 1
- Tab settings ignored HOT 1
- Problem with eslint `space-before-function-paren` rule in .js files HOT 1
- prettier 2.0 is out HOT 6
- Parsing error: '=' expected HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-prettier-vue.