Comments (6)
@ntwb In your readme, under Usage header, you list Vue (vue, vue-html, vue-postcss)
by linking it to Vetur...
What are the officially recommended setup configs for using Stylelint in VS Code with VueJS framework (.vue files)? Now that ESLint acts as a formatter, do I still need to use Vetur (thats ok if it still brings something vital to the mix)?
I've opened and self-answered this StackOverflow question on the optimal linting and formatting setup with VueJS in TypeScript and Vue CLI4 (yet biased to using Airbnb rules and stylelint-config-recommended-scss): How to configure Vue CLI 4 with ESLint + Airbnb rules + TypeScript + Stylelint for SCSS, in VS Code editor with autofix on save?
I've opted to use Stylelint with your VS Code extension and a webpack plugin, so I may not need Vetur.
However, I found out there is still something from with my Stylelint setup configs. It seems autofix on save doesn't work and neither does NPM script or webpack plugin during builds. Any suggestions?
from vscode-stylelint.
Thanks @ux-engineer, since the stylelint org taking over this extension we have not had much time to explore such things :(
I had a quick glance at your Q & A on SO, lots of details there, perhaps you could advise us?
What are the pain points you have had? Docs or functionality?
Our docs are quite limited right now, maybe you could submit a PR to update the readme.mdd if you think we should remove Vetur and add section on how best to configure the extension with Vue? (It would be greatly appreciated)
Edit: Autofix should be working as expected, are you using the latest release? Creating a new issue for that would be best if you are using the latest
from vscode-stylelint.
Thanks @ux-engineer Let's keep the formatter discussion to #25
For VUE SFCs I just tested this:
p.s. I just noticed I used the menu command in the above, setting "editor.formatOnSave": true
will also autofix the issue on save.
You also need the latest v0.70.0 of the extension for this to work, I published this a couple of hours ago.
from vscode-stylelint.
Thanks for the info. I'll debug my Stylelint setup more in the following weeks, and with any feedback to my SO question... Will get back to this later.
from vscode-stylelint.
while stylelint works with stylus in .styl files with stylelint-plugin-stylus
it does not with <style lang="stylus">
in vue sfc
from vscode-stylelint.
For those who may be interested, I have written a small vscode extension name prettylus
(available in vscode market place) that can format Vue SFCs using Prettier for <template>
(works with pug with @prettier/plugin-pug) and <script>
, and using Stylus Supremacy for <style lang="stylus">
. This is early implementation. It is not much configurable, all config must be placed in a prettier rc config file or a .stylusrc
(this file name can be configured) where you place your rules.
It may be setup to work with stylelint
too I guess.
https://github.com/qnp/prettylus
from vscode-stylelint.
Related Issues (20)
- [Feature]: Update bundled StyleLint to version 15. HOT 1
- [Bug]: ESM-only stylelint plugins fail to import with Yarn PnP HOT 8
- [Feature]: enable markdown in error messages
- [Bug]: Prettier plugins cannot be resolved when package.json is not in the root folder HOT 1
- stylelint slowing down VS Code when saving files HOT 1
- VSCode extension does not respect folder settings! HOT 2
- [Bug]: format can't trigger auto fix HOT 13
- [Feature]: Surface "Error: No rules found within configuration. Have you provided a "rules" property?"
- The JS/TS language service immediately crashed 5 times. The service will not be restarted HOT 1
- CSS properties in comments increase indefinitely. HOT 24
- Fix double slash comments being appended to the nearest property in VSCode HOT 21
- Standardize labels HOT 17
- [Bug]: Sorting properties not work HOT 21
- [Bug]: Formatting is impossible with stylelint HOT 2
- i
- [Bug]: Unsure if extension works with stylelint v16 HOT 2
- Stylelint ignoring stylelint.validate setting
- [Feature]: If you manually specify the configPath path in VScode's stylelint extension, the.stylelintignore file will no longer be recognized, not even the array in the ignoreFiles property of the configuration object
- [Feature]: Use NODE_COMPILE_CACHE when detecting node v22+
- [Bug]: Double slash comments cause wrong position for syntax highlights in scss files
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 vscode-stylelint.