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

Make quotations in markdown consistent #32

Merged
merged 1 commit into from
May 3, 2018
Merged

Make quotations in markdown consistent #32

merged 1 commit into from
May 3, 2018

Conversation

cassiewallace
Copy link
Contributor

No description provided.

@levino
Copy link
Collaborator

levino commented May 2, 2018

Good contribution. I recommend also making the markdown linting more strict and check for the quotes to be consistent in the future (allow only double quotes). Do you feel like adding this @cassiewallace ?

Copy link
Collaborator

@levino levino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is helpful but should be enforced in the future by markdown linting.

@cassiewallace
Copy link
Contributor Author

Ack, will do!

@ericwindmill
Copy link
Owner

This is actually really important. In past versions of Gatsby (any maybe current), GraphQl queries will fail if there are descrepencies there. Thanks for catching.

@ericwindmill
Copy link
Owner

@cassiewallace This may be ingornance, but what exactly is "remark-lint-link-title-style"?

@cassiewallace
Copy link
Contributor Author

@ericwindmill

It's a package that enforces consistency in link and definition titles (NPM link). It is included in some other MD lint presets, such as remark-preset-lint-consistent, but not remark-preset-lint-recommended which is already used in gatsby-starter-docs.

Alternatively, all of the consistent preset could be included here instead, but I chose to use just the part which was called out for this particular issue.

@levino levino closed this May 3, 2018
@levino levino reopened this May 3, 2018
@levino
Copy link
Collaborator

levino commented May 3, 2018

The linting plugin does not work for our scenario. It will only check the titles in links, not in the frontmatter entries. See also this issue.

As a side note:

  • Even if it worked, it should be a dev dependency, because we do not need it at runtime.
  • Frontmatter allows also to not wrap things in quotes at all, maybe that would be even better.

As I do not have write access to this branch: @cassiewallace please remove the commit with the plugin and force push to the branch so the history does not get too cluttered. I will then approve and merge the PR.

package.json Outdated
@@ -74,7 +75,8 @@
},
"remarkConfig": {
"plugins": [
"remark-preset-lint-recommended"
"remark-preset-lint-recommended",
"remark-lint-link-title-style"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave it a spin by setting one title to use single quotes and then running npm run lint. It did not throw an error, thus the plugin does not work for frontmatter.

@cassiewallace
Copy link
Contributor Author

Done!

Copy link
Collaborator

@levino levino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mucho ado... ;) Thanks.

@levino levino merged commit 1c944d5 into ericwindmill:master May 3, 2018
@cassiewallace cassiewallace deleted the resolve-quote-inconsistency branch May 3, 2018 19:49
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

Successfully merging this pull request may close these issues.

3 participants