-
Notifications
You must be signed in to change notification settings - Fork 78
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
Question: On Lint on Save and the breaking of Templater scripts #994
Comments
I am not 100% sure what is happening here since I have used this plugin for years now and have not hit the issue where I have linted Templater files since I added them to my ignore path. So I would like to better understand the problem since I believe that, except for manually telling a file to be linted, it should be checking that the file is a markdown file and that it is not ignored. How are you currently able to lint your Templater files if they are in your ignored path? It may be a bug in the Linter unless you are using the rule/logic that is meant to bypass that. |
|
Note: Lint on save is checking that the file is a markdown file and that it is ignored. I am not sure how you are linting ignored folders (not sure if that is where your Templater scripts live), but if they do, a reproducible example would help greatly in getting to the bottom of this. Thanks! |
Turns out the command I was using with the key combo was actually a Commander macro (with the same name) that contained the single command 'lint the current file' -- probably I needed that on mobile where I cannot press key combinations...? Indeed, when one lints on save, the ignored folders are respected. Sorry about the trouble. Cheers |
No worries. The commander macro can use lint unless ignored and that should take care of it. I am glad this is fixed for you! |
Hey there,
My question is about the purpose of ignored folders and lint on save.
Not for the first time -- probably about the 3rd or 4th time -- I inadvertently linted Templater files. Which means I had YAML created with date modified key and value and soft line breaks on each line. Neither are very beneficial, to say the least. It breaks one's template (I'm using Templater js to carry out small daily janitor jobs, so these are not really templates, but bits of code).
Last time around, I probably hit CNTRL + S or linted one of my templates I was editing and had the offending changes happening.
Then I realized that -- after having had to switch off 'lint file change' as you may remember the other thread -- I'd be better off switching off 'lint on save' as well.
As a workaround, I added the hotkey CNTRL + S for 'lint current file unless ignored'.
Goes without saying the template folder is among those on the list of ignored folders.
At this point, my question actually turns into a suggestion: would you consider adding support for:
I'm guessing No 1. would be more feasible to achieve.
Thanks a lot
Regards,
Z.
The text was updated successfully, but these errors were encountered: