OsioLabs / osiolabs-copyeditor

Scripts to aid in reviewing content.
MIT License
2 stars 0 forks source link

Vale config rules (tweaks) #3

Open agentolivia opened 4 years ago

agentolivia commented 4 years ago

Will add more as I use the tool...

eojthebrave commented 4 years ago

Which version of Vale are you using? vale --version? And could you point me to a file that you know of where the <!-- vale off --> is being ignored? I'm trying to replicate that locally and in my tests on localhost at least the tag is working. :/

agentolivia commented 4 years ago
~/S/tutorials ❯❯❯ vale --version
vale version 1.7.1
~/S/tutorials ❯❯❯ npm run review tutorials/views/add-filter.md

> drupalizeme_tutorials@1.0.0 review /Users/ambermatz/Sites/tutorials
> vale --no-wrap --config='./node_modules/osiolabs-copyeditor/.vale.ini' "tutorials/views/add-filter.md"

 tutorials/views/add-filter.md
 29:65   warning  Use 'administration' instead of 'admin'                                  base.replacements   
 163:47  warning  'is published' may be passive voice. Use active voice if you can.        write-good.Passive  
 171:47  warning  'is published' may be passive voice. Use active voice if you can.        write-good.Passive  
 230:4   warning  'Additional' is too wordy                                                write-good.TooWordy 
 240:3   warning  Heading 'Duplicate the Baseball Awards view' should be in sentence case  base.heading-case   

✖ 0 errors, 5 warnings and 0 suggestions in 1 file.

Here's lines 234-247:

<!-- lint disable -->

<!-- vale off -->

----- internal ---------------------------

- Duplicate the Baseball Awards view
- Add filter for Notes = "LF"
- Add filter for Notes = "RF"
- Add filter for Notes = "CF"
- Rearrange filters
  - Create new filter group "or"
  - Move the 3 notes filters to the "or" group
- Add sort on Year DESC
eojthebrave commented 4 years ago

It seems like something is off between when you run these commands and when I run them. And the only thing I can think that's different is the version of Vale. I've currently got 2.0.0 installed.

I guess it could be a need to run npm update osiolabs-copyeditor in the tutorial repo, which would pull in updated configs, but I don't think anything in the config related to this changed.

Additionally, I'm assuming this is in your local copy of the daggerhart/views branch since I'm not seeing any <!-- vale off --> in that branch right now in the add-filters.md file. But, when I add the <!-- vale off --> locally it works.

e.g.

npm run review tutorials/views/add-filter.md                                                                760ms

> drupalizeme_tutorials@1.0.0 review /Users/joe/Sites/_lullabot/tutorials
> vale --no-wrap --config='./node_modules/osiolabs-copyeditor/.vale.ini' "tutorials/views/add-filter.md"

 tutorials/views/add-filter.md

.. <snip> ..

 169:28   warning  Consider replacing 'click' with a non device-specific action.                   base.ui-interactions
 176:4    warning  Consider replacing 'Click' with a non device-specific action.                   base.ui-interactions
 190:18   warning  Consider replacing 'clicking' with a non device-specific action.                base.ui-interactions

✖ 0 errors, 20 warnings and 0 suggestions in 1 file.

I added some known violations to the end and they don't show.

Additionally, I don't see the warning about 'Additional' is too wordy. Which leads me to believe something is off between what I have locally and what you have. :/

Aside, what editor do you use for editing the .md files? I wonder if the <!-- vale off --> is getting converted to HTML entities?

agentolivia commented 4 years ago

I'm now running Vale v2.0.0 and have pulled the latest update of the osiolabs-copyeditor with npm update osiolabs-copyeditor.

The <!-- vale off --> tag sometimes works and sometimes doesn't. (Mostly it doesn't work.)

I am getting the error about Additional being too wordy, but it's not a big deal.

eojthebrave commented 4 years ago

Hmm. :/ still not sure what's causing the <!-- vale off --> issues. I'm still wondering if this could be some kind of encoding issue with the editor you're using? I've been using VS Code without issue FWIW. But a lot of the WYSIWYG style Markdown editors probably convert <!-- vale off --> to the HTML entities equivalent. Something like &lt;!-- vale off -&gt;

If that's not it could you maybe .zip a file that's giving you these issues and email it to me?

The "Additionally" header is still a known issue, without an easy fix. So I'm mostly just ignoring it for the moment. :)