Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Support linting in Vue single-file components #406

Closed
wants to merge 3 commits into from

Conversation

jonboiser
Copy link

This adds the source.css.scss.embedded.html scope (used for style tags in vue single page components) in order to enable stylelint linting in .vue files.

Fixes #403

@gluxon
Copy link

gluxon commented Jul 15, 2018

This looks cool. Should we add the other scopes language-vue supports? Adding source.css.embedded.html makes sense to me. Not sure about the other ones.

@1000ch
Copy link
Member

1000ch commented Jul 16, 2018

Please add specs which test .vue file. I guess language-vue is required in those specs.

@emuvente
Copy link
Contributor

I think we would want to add the embedded scopes for things like css and less when doing this, not just scss. Also, there are other use cases where adding scopes would add support for certain files (i.e. react styled-components and typescript), but I don't think we want to just continuously add to the scopes definition each time this comes up. I would rather see us provide a configuration option where scopes could be added by the end user when they needed them; something similar to my comments on #235.

@jonboiser
Copy link
Author

@1000ch I added test for the Vue + SCSS case. I guess it would make sense to add support for other languages. I could extend this PR to handle it if somebody could give me a list of what else to add.

@jonboiser jonboiser force-pushed the patch-1 branch 2 times, most recently from d327750 to 4b64b4e Compare July 20, 2018 19:20
@ai ai mentioned this pull request Sep 17, 2018
@losbeekos
Copy link

Would be great to see this one get merged in.

@mrleblanc101
Copy link

What's missing for this to be merged ?

@drewbaker

This comment has been minimized.

@jonboiser
Copy link
Author

@Arcanemagus Can we get this merged in? I don't think I can add the other languages suggested in the thread (LESS and CSS in Vue SFC), but I think this is a good start that somebody else can copy.

@jonboiser jonboiser force-pushed the patch-1 branch 3 times, most recently from 7e5ad9a to f269c79 Compare June 24, 2019 22:17
@hex-ci
Copy link

hex-ci commented Aug 6, 2019

I forked a linter-stylelint-plus package that supports custom scopes and stylelint configOverrides. https://atom.io/packages/linter-stylelint-plus

@fcomrqz
Copy link

fcomrqz commented Jan 10, 2021

The linter is breaking Fuzzy Finder when we add to scope source.css.embedded.html.

image

image

macOS 11.1 Big Sur
Atom 1.53.0

Atom packages
linter 3.2.3
linter-ui-default 2.4.0
linter-stylelint 4.5.1

Fuzzy Finder had this related issues:
atom/fuzzy-finder#205
atom/fuzzy-finder#309

I tried deactivating ripgrep for Fuzzy Finder and doesn't works.

Is there anyone else with this problem?

@jonboiser jonboiser closed this Jul 1, 2022
@jonboiser jonboiser deleted the patch-1 branch July 1, 2022 22:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vue.js files
10 participants