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 warnings consistent in the JS docs #4609

Merged
merged 1 commit into from
Apr 30, 2021

Conversation

wbamberg
Copy link
Collaborator

This is like #4504 , but for warnings.

After this PR we should have consistent markup for .warning elements in the JS docs:

  • all are attached to <div> elements
  • all contain a <p> as the first element child
  • the <p> contains a <strong> as the first element child
  • the textContent of the <strong> is "Warning:"

This ought to make it reasonably easy for the converter to turn these into "Markdown notes" as discussed in #3483.

@wbamberg wbamberg requested a review from a team as a code owner April 30, 2021 00:23
@wbamberg wbamberg requested review from Rumyra and removed request for a team April 30, 2021 00:24
@github-actions
Copy link
Contributor

Preview URLs

Flaws

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

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare
Title: String.prototype.localeCompare()
on GitHub
Flaw count: 5

  • macros:
    • /en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator redirects to /en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator
    • /en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/compare redirects to /en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/compare
    • /en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator redirects to /en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator
  • broken_links:
    • Can't resolve /en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/Collator
  • bad_pre_tags:
    • <pre><code>CODE can be just <pre>CODE

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split
Title: String.prototype.split()
on GitHub
Flaw count: 2

  • macros:
    • /en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators redirects to /en-US/docs/Web/JavaScript/Reference/Operators
  • broken_links:
    • http:// external links are not allowed (will be forced to https:// at build-time)

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
Title: Error
on GitHub
Flaw count: 6

  • macros:
    • /en-US/docs/Web/JavaScript/Reference/eval redirects to /en-US/docs/Web/JavaScript/Reference/Global_Objects/eval
    • /en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/captureStackTrace does not exist
    • /en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/description does not exist
    • /en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/number does not exist
  • broken_links:
    • Can't resolve /en-US/docs/Web/JavaScript/Guide/Statements#Exception_handling_statements
    • http:// external links are not allowed (will be forced to https:// at build-time)

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join
Title: Array.prototype.join()
on GitHub
Flaw count: 1

  • broken_links:
    • Anchor not lowercase

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineSetter__
Title: Object.prototype.__defineSetter__()
on GitHub
Flaw count: 1

  • broken_links:
    • http:// external links are not allowed (will be forced to https:// at build-time)

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt
Title: parseInt()
on GitHub
Flaw count: 1

  • broken_links:
    • Anchor not lowercase

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch
Title: Promise.prototype.catch()
on GitHub
Flaw count: 1

  • broken_links:
    • Anchor not lowercase

URL: /en-US/docs/Web/JavaScript/Reference/Classes
Title: Classes
on GitHub
Flaw count: 2

  • bad_bcd_links:
    • no explanation!
    • no explanation!

URL: /en-US/docs/Web/JavaScript/Reference/Statements/async_function
Title: async function
on GitHub
Flaw count: 1

  • broken_links:
    • http:// external links are not allowed (will be forced to https:// at build-time)

URL: /en-US/docs/Web/JavaScript/Reference/Statements/with
Title: with
on GitHub
Flaw count: 4

  • macros:
    • /en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype does not exist
    • /en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype does not exist
  • broken_links:
    • Can't resolve /en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/Strict_mode
    • Can't resolve /en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/Strict_mode

URL: /en-US/docs/Web/JavaScript/Reference/Operators/yield
Title: yield
on GitHub
Flaw count: 2

  • broken_links:
    • Anchor not lowercase
    • Can't resolve /en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol

URL: /en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer
Title: Object initializer
on GitHub
Flaw count: 2

  • broken_links:
    • Can't resolve /en-US/docs/Glossary/primitive
    • Can't resolve /en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator

URL: /en-US/docs/Web/JavaScript/Reference/Lexical_grammar
Title: Lexical grammar
on GitHub
Flaw count: 4

  • broken_links:
    • Anchor not lowercase
    • Anchor not lowercase
    • http:// external links are not allowed (will be forced to https:// at build-time)
    • http:// external links are not allowed (will be forced to https:// at build-time)

URL: /en-US/docs/Web/JavaScript/Reference/Functions/arguments/callee
Title: arguments.callee
on GitHub
Flaw count: 2

  • broken_links:
    • Can't resolve /en-US/docs/JavaScript/Reference/Functions_and_function_scope/Strict_mode
    • http:// external links are not allowed (will be forced to https:// at build-time)

URL: /en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features/The_legacy_Iterator_protocol
Title: The legacy Iterator protocol
on GitHub
Flaw count: 2

  • macros:
    • /en-US/docs/Web/JavaScript/Reference/Global_Objects/StopIteration does not exist
    • /en-US/docs/Web/JavaScript/Reference/Global_Objects/StopIteration does not exist

URL: /en-US/docs/Web/JavaScript/Guide/Grammar_and_types
Title: Grammar and types
on GitHub
Flaw count: 1

  • broken_links:
    • No need for the pathname in anchor links if it's the same page

External URLs

URL: /en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain
Title: Inheritance and the prototype chain
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/values
Title: TypedArray.prototype.values()
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/collation
Title: Intl.Locale.prototype.collation
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/calendar
Title: Intl.Locale.prototype.calendar
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/unescape
Title: unescape()
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare
Title: String.prototype.localeCompare()
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split
Title: String.prototype.split()
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/String/anchor
Title: String.prototype.anchor()
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
Title: Error
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/escape
Title: escape()
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join
Title: Array.prototype.join()
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values
Title: Array.prototype.values()
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineSetter__
Title: Object.prototype.__defineSetter__()
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__
Title: Object.prototype.__defineGetter__()
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiate
Title: WebAssembly.instantiate()
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance/Instance
Title: WebAssembly.Instance() constructor
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module/Module
Title: WebAssembly.Module() constructor
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt
Title: parseInt()
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch
Title: Promise.prototype.catch()
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Classes
Title: Classes
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Statements/async_function
Title: async function
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Statements/with
Title: with
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Operators/yield
Title: yield
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer
Title: Object initializer
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Lexical_grammar
Title: Lexical grammar
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Functions/arguments/callee
Title: arguments.callee
on GitHub


URL: /en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features/The_legacy_Iterator_protocol
Title: The legacy Iterator protocol
on GitHub

No external URLs

URL: /en-US/docs/Web/JavaScript/Guide/Grammar_and_types
Title: Grammar and types
on GitHub

@Elchi3 Elchi3 merged commit 9791f3a into mdn:main Apr 30, 2021
wbamberg pushed a commit to wbamberg/content that referenced this pull request Apr 30, 2021
* upstream/main:
  Fix some typos: (mdn#4620)
  Fix information for fullscreenchange event (mdn#4603)
  FF89 large ArrayBuffers (mdn#4470)
  fix: HTML Validation issues (mdn#4612)
  Make warnings consistent in the JS docs (mdn#4609)
  fixed typo (mdn#4617)
  chore(deps): bump @mdn/yari from 0.4.412 to 0.4.413 (mdn#4616)
  chore(deps): bump technote-space/get-diff-action from v4.0.6 to v4.1.1 (mdn#4615)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants