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 front-matter, part 2 #26178

Merged
merged 3 commits into from
Apr 13, 2023
Merged

Lint front-matter, part 2 #26178

merged 3 commits into from
Apr 13, 2023

Conversation

OnkarRuikar
Copy link
Contributor

@OnkarRuikar OnkarRuikar requested review from a team as code owners April 13, 2023 07:31
@OnkarRuikar OnkarRuikar requested review from sideshowbarker, schalkneethling and estelle and removed request for a team April 13, 2023 07:31
@github-actions github-actions bot added Content:Accessibility Accessibility docs Content:CSS Cascading Style Sheets docs Content:HTML Hypertext Markup Language docs Content:JS JavaScript docs Content:WebAPI Web API docs labels Apr 13, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 13, 2023

Preview URLs (59 pages)
Flaws (19)

Note! 51 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/Element/transitionend_event
Title: Element: transitionend event
Flaw count: 3

  • macros:
    • /en-US/docs/Web/API/Document/transitionend_event redirects to /en-US/docs/Web/API/Element/transitionend_event
    • /en-US/docs/Web/API/Window/transitionend_event redirects to /en-US/docs/Web/API/Element/transitionend_event
  • broken_links:
    • Can't resolve /en-US/docs/Web/API/Window/transitioncancel_event

URL: /en-US/docs/Web/API/Element/animationiteration_event
Title: Element: animationiteration event
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/Document/animationiteration_event redirects to /en-US/docs/Web/API/Element/animationiteration_event
    • /en-US/docs/Web/API/Window/animationiteration_event redirects to /en-US/docs/Web/API/Element/animationiteration_event

URL: /en-US/docs/Web/API/Element/transitioncancel_event
Title: Element: transitioncancel event
Flaw count: 4

  • macros:
    • /en-US/docs/Web/API/Document/transitioncancel_event redirects to /en-US/docs/Web/API/Element/transitioncancel_event
    • /en-US/docs/Web/API/Window/transitioncancel_event redirects to /en-US/docs/Web/API/Element/transitioncancel_event
  • broken_links:
    • Can't resolve /en-US/docs/Web/API/Window/transitioncancel_event
    • Can't resolve /en-US/docs/Web/API/Window/transitionend_event

URL: /en-US/docs/Web/API/Element/transitionstart_event
Title: Element: transitionstart event
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/Document/transitionstart_event redirects to /en-US/docs/Web/API/Element/transitionstart_event
    • /en-US/docs/Web/API/Window/transitionstart_event redirects to /en-US/docs/Web/API/Element/transitionstart_event

URL: /en-US/docs/Web/API/Element/animationcancel_event
Title: Element: animationcancel event
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/Document/animationcancel_event redirects to /en-US/docs/Web/API/Element/animationcancel_event
    • /en-US/docs/Web/API/Window/animationcancel_event redirects to /en-US/docs/Web/API/Element/animationcancel_event

URL: /en-US/docs/Web/API/Element/animationend_event
Title: Element: animationend event
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/Document/animationend_event redirects to /en-US/docs/Web/API/Element/animationend_event
    • /en-US/docs/Web/API/Window/animationend_event redirects to /en-US/docs/Web/API/Element/animationend_event

URL: /en-US/docs/Web/API/Element/animationstart_event
Title: Element: animationstart event
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/Document/animationstart_event redirects to /en-US/docs/Web/API/Element/animationstart_event
    • /en-US/docs/Web/API/Window/animationstart_event redirects to /en-US/docs/Web/API/Element/animationstart_event

URL: /en-US/docs/Web/API/Element/transitionrun_event
Title: Element: transitionrun event
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/Document/transitionrun_event redirects to /en-US/docs/Web/API/Element/transitionrun_event
    • /en-US/docs/Web/API/Window/transitionrun_event redirects to /en-US/docs/Web/API/Element/transitionrun_event

(comment last updated: 2023-04-13 13:27:38)

@@ -1,6 +1,6 @@
---
title: "Accelerometer: y property"
short-title: y
short-title: "y"
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason for this one?

Copy link
Contributor Author

@OnkarRuikar OnkarRuikar Apr 13, 2023

Choose a reason for hiding this comment

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

The js-yaml library is doing this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why "y" and not "x"?

Copy link
Contributor Author

@OnkarRuikar OnkarRuikar Apr 13, 2023

Choose a reason for hiding this comment

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

Haha, welcome to the world of YAML!

In YAML boolean value can be y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE |on|On|ON|off|Off|OFF.[ref]
So short-title: y is treated as short-title: true, hence short-title: "y" is technically correct. 🤓

How do you want to handle this? We can leave it as it is. Or in front matter schema define short-title as string or boolean type, this would be technically very wrong.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ha! That makes sense. Thank you!

Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

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

Besides the many odd "y" (but no "x" 🤣 ), this looks ok.

Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

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

👍 Now that I know that y = true in YAML 😄

Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

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

And this is why we really need a linter!

@teoli2003 teoli2003 merged commit 7b3ccae into mdn:main Apr 13, 2023
@OnkarRuikar OnkarRuikar deleted the fix_frontmatter branch April 13, 2023 13:28
Mehrm0 pushed a commit to Mehrm0/content that referenced this pull request Apr 14, 2023
* Lint front-matter

* Fix status array

* Fix order and single char values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Accessibility Accessibility docs Content:CSS Cascading Style Sheets docs Content:HTML Hypertext Markup Language docs Content:JS JavaScript docs Content:WebAPI Web API docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants