Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint active tabs in the editor, when opened or modified. #76

Open
phoenisx opened this issue Sep 21, 2022 · 5 comments
Open

Lint active tabs in the editor, when opened or modified. #76

phoenisx opened this issue Sep 21, 2022 · 5 comments
Milestone

Comments

@phoenisx
Copy link
Contributor

phoenisx commented Sep 21, 2022

One question, i noticed that i need to open (and focus) the erroring file in order to find the errors. i had suggested the problems tab idea because i was hoping i would be able to see errors in closed workspace files so that i know which files i need to open and fix. is that impossible?

CleanShot.2022-09-20.at.22.46.28.mp4

Originally posted by @jjenzz in #73 (comment)

@phoenisx phoenisx changed the title Lint all usages of CSS variables with/without the Tab's being active Lint all usages of CSS variables with/without the Tabs being active Sep 21, 2022
@jjenzz
Copy link

jjenzz commented Sep 21, 2022

@phoenisx in response to your #73 (comment), could a "lint on save" option work? for example, if i am in a file type that the extension watches and i remove a var, hitting CMD+S would activate linter for all files and list issues in problems tab?

@phoenisx
Copy link
Contributor Author

It should! Even I was thinking of only looking for file stats to recalculate the dependent files using the CSS variables.

A few queries before I start working on this (which would be possible only after the next week, as I will be away):

  • I guess you are looking for something like --watch mode, that recalculates the linting warn/errors for all dependent files the moment any source file changes?
  • Or are you looking for linting updates only for all the open tabs?

I think it's the former. Correct me if I am wrong 👍🏽

@jjenzz
Copy link

jjenzz commented Sep 21, 2022

yes, something like the former but not sure if continually watching is necessary if it is going to cause the cpu issues you had described before.

i was thinking that when i add/remove a var from any of the files listed in cssvar.files and then save, the save could trigger a lint check across all files (no watching) and list errors in problems tab. then the lint check can behave like it does now when i open an erroring file - resolving the error would lint focused file only because it is the only file that changed.

which would be possible only after the next week, as I will be away

no problem at all, no rush ofc. i'm super grateful that you're even paying attention to my ideas 😅

@jjenzz
Copy link

jjenzz commented Sep 22, 2022

on second thoughts, i wonder if any of this is really needed given my comment here #77 (comment)

@phoenisx
Copy link
Contributor Author

I still feel adding a watch mode to this extension would be great. Since this extension now already supports linting.
Using a separate library just to enable CSS custom property lints would be too much if they are not using stylelint or any other lint system.

Anyways, that's an option left for the users to decide!! 😉

@phoenisx phoenisx added this to the 2.4.0 milestone Sep 23, 2022
@phoenisx phoenisx modified the milestones: 2.4.0, 2.6.0 Oct 5, 2022
@phoenisx phoenisx changed the title Lint all usages of CSS variables with/without the Tabs being active Lint active tabs in the editor, when opened or modified. Nov 1, 2022
@phoenisx phoenisx mentioned this issue Nov 1, 2022
8 tasks
@phoenisx phoenisx modified the milestones: 2.6.0, v3.0 Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants