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

Vale config rules (tweaks) #3

Open
agentolivia opened this issue Nov 27, 2019 · 5 comments
Open

Vale config rules (tweaks) #3

agentolivia opened this issue Nov 27, 2019 · 5 comments

Comments

@agentolivia
Copy link
Contributor

agentolivia commented Nov 27, 2019

  • ignore warning "Use 'administration' instead of 'admin' when 'admin' appears in a path. (We often have something like the following (admin/structure/views).)
  • ignore warning "'Additional' is too wordy when it is a heading (i.e. ## Additional resources).
  • vale is checking words beyond the <!-- vale off --> tag.

Will add more as I use the tool...

@eojthebrave
Copy link
Collaborator

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. :/

eojthebrave added a commit that referenced this issue Dec 9, 2019
@agentolivia
Copy link
Contributor Author

~/S/tutorials ❯❯❯ vale --version
vale version 1.7.1
~/S/tutorials ❯❯❯ npm run review tutorials/views/add-filter.md

> [email protected] 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
Copy link
Collaborator

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

> [email protected] 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
Copy link
Contributor Author

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
Copy link
Collaborator

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. :)

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