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

zh-cn: Format /web/javascript using Prettier (part 5) #14701

Merged
merged 4 commits into from
Jul 29, 2023

Conversation

queengooborg
Copy link
Collaborator

This PR formats the /web/javascript folder of the Simplified Chinese locale using Prettier. This is the fifth part.

@queengooborg queengooborg requested a review from a team as a code owner July 29, 2023 06:41
@queengooborg queengooborg requested review from yin1999 and removed request for a team July 29, 2023 06:41
@github-actions github-actions bot added l10n-zh Issues related to Chinese content. system Infrastructure and configuration for the project labels Jul 29, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 29, 2023

Preview URLs (93 pages)
Flaws (135)

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

URL: /zh-CN/docs/Web/JavaScript/Reference/Lexical_grammar
Title: 词法文法
Flaw count: 10

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/Statements/default does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Statements/switch
  • broken_links:
    • Anchor not lowercase
    • Anchor not lowercase
    • Can't resolve /zh-CN/docs/Web/JavaScript/Reference/template_strings
    • Is currently http:// but can become https://
    • Anchor not lowercase
    • and 3 more flaws omitted
  • translation_differences:
    • Differences in the important macros (2 in common of 3 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/function*
Title: function*
Flaw count: 3

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/Functions_and_function_scope redirects to /zh-CN/docs/Web/JavaScript/Reference/Functions
  • broken_links:
    • Can't resolve /zh-CN/docs/Web/JavaScript/Guide/The_Iterator_protocol
    • Is currently http:// but can become https://

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/for...of
Title: for...of
Flaw count: 11

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/arguments does not exist
    • /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/prototype does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
    • /zh-CN/docs/Web/JavaScript/Reference/Array/prototype does not exist
  • broken_links:
    • Can't resolve /zh-CN/docs/Web/JavaScript/Guide/iterable
    • Can't resolve /zh-CN/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments
  • heading_links:
    • h3 heading contains an <a> tag
    • h3 heading contains an <a> tag
    • h3 heading contains an <a> tag
    • h3 heading contains an <a> tag
    • h3 heading contains an <a> tag
    • and 1 more flaws omitted

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/Empty
Title: empty
Flaw count: 1

  • translation_differences:
    • Differences in the important macros (3 in common of 4 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/for-await...of
Title: for await...of
Flaw count: 1

  • translation_differences:
    • Differences in the important macros (3 in common of 4 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/do...while
Title: do...while
Flaw count: 1

  • translation_differences:
    • Differences in the important macros (3 in common of 5 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/const
Title: const
Flaw count: 2

  • broken_links:
    • Anchor not lowercase
    • Anchor not lowercase

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/throw
Title: throw
Flaw count: 1

  • broken_links:
    • Anchor not lowercase

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/break
Title: break
Flaw count: 1

  • translation_differences:
    • Differences in the important macros (3 in common of 4 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/return
Title: return
Flaw count: 1

  • broken_links:
    • Can't resolve /zh-CN/docs/Web/JavaScript/Guide/Closures

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/for...in
Title: for...in
Flaw count: 2

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/Statements/for_each...in does not exist
  • translation_differences:
    • Differences in the important macros (3 in common of 4 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/export
Title: export
Flaw count: 1

  • broken_links:
    • Is currently http:// but can become https://

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/async_function
Title: async 函数
Flaw count: 1

  • broken_links:
    • Is currently http:// but can become https://

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/label
Title: label
Flaw count: 1

  • broken_links:
    • Is currently http:// but can become https://

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/import
Title: import
Flaw count: 1

  • broken_links:
    • Can't resolve /zh-CN/docs/Web/JavaScript/Reference/Statements/import.meta

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/class
Title: class
Flaw count: 1

  • sectioning:
    • Excess <h3> tag that is NOT at root-level (id='重复定义类', text='重复定义类')

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/switch
Title: switch
Flaw count: 3

  • broken_links:
    • Can use the English (en-US) link as a fallback
    • Is currently http:// but can become https://
  • translation_differences:
    • Differences in the important macros (3 in common of 5 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/function
Title: function
Flaw count: 5

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/Functions_and_function_scope redirects to /zh-CN/docs/Web/JavaScript/Reference/Functions
  • broken_links:
    • Can't resolve /zh-CN/JavaScript/Reference/Global_Objects/Function
    • Can't resolve /zh-CN/JavaScript/Reference/Operators/function
    • Can't resolve /zh-CN/JavaScript/Reference/Statements/return
  • translation_differences:
    • Differences in the important macros (3 in common of 4 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/with
Title: with
Flaw count: 2

  • broken_links:
    • Can't resolve /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype
    • Can use the English (en-US) link as a fallback

URL: /zh-CN/docs/Web/JavaScript/Reference/Statements/block
Title: block
Flaw count: 1

  • translation_differences:
    • Differences in the important macros (3 in common of 4 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Iteration_protocols
Title: 迭代协议
Flaw count: 3

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments
    • /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/WeakSet does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/WeakSet
  • translation_differences:
    • Differences in the important macros (1 in common of 2 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/function*
Title: function* 表达式
Flaw count: 3

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/Functions_and_function_scope redirects to /zh-CN/docs/Web/JavaScript/Reference/Functions
  • broken_links:
    • Can't resolve /zh-CN/docs/Web/JavaScript/Guide/The_Iterator_protocol
  • translation_differences:
    • Differences in the important macros (3 in common of 5 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/super
Title: super
Flaw count: 1

  • translation_differences:
    • Differences in the important macros (3 in common of 4 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/Property_accessors
Title: 属性访问器
Flaw count: 3

  • broken_links:
    • Can't resolve /zh-CN/docs/Mozilla/Projects/SpiderMonkey
    • Anchor not lowercase
  • translation_differences:
    • Differences in the important macros (3 in common of 5 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/this
Title: this
Flaw count: 2

  • broken_links:
    • Can't resolve /zh-CN/docs/Glossary/undefined
    • Can use the English (en-US) link as a fallback

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/Optional_chaining
Title: 可选链运算符(?.)
Flaw count: 4

  • macros:
    • wrong xref macro used (consider changing which macro you use)
    • /zh-CN/docs/Web/JavaScript/Reference/Operators/Nullish_Coalescing_Operator redirects to /zh-CN/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing
  • broken_links:
    • Can't resolve /zh-CN/docs/Glossary/nullish
    • Can't resolve /zh-CN/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/in
Title: in
Flaw count: 3

  • broken_links:
    • Can't resolve /zh-CN/docs/JavaScript/Reference/Operators/delete
    • Can't resolve /zh-CN/docs/JavaScript/Reference/Operators/delete
    • Can't resolve /zh-CN/docs/Enumerability_and_ownership_of_properties

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/instanceof
Title: instanceof
Flaw count: 1

  • broken_links:
    • Can't resolve /zh-CN/docs/JavaScript/Reference/Operators/typeof

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/yield*
Title: yield*
Flaw count: 2

  • broken_links:
    • Can't resolve /zh-CN/docs/Web/JavaScript/Guide/The_Iterator_protocol
  • translation_differences:
    • Differences in the important macros (3 in common of 4 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/new
Title: new 运算符
Flaw count: 1

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/prototype does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Global_Objects/Object

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax
Title: 展开语法
Flaw count: 2

  • broken_links:
    • Can't resolve /zh-CN/docs/Web/JavaScript/Reference/Functions/Rest_parameters
    • Can't resolve /zh-CN/docs/Web/JavaScript/Reference/Functions/Rest_parameters

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/null
Title: null
Flaw count: 2

  • broken_links:
    • Can use the English (en-US) link as a fallback
  • translation_differences:
    • Differences in the important macros (3 in common of 5 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_XOR_assignment
Title: 按位异或赋值 (^=)
Flaw count: 1

  • translation_differences:
    • Differences in the important macros (3 in common of 5 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/Exponentiation
Title: 幂(**)
Flaw count: 1

  • broken_links:
    • Can use the English (en-US) link as a fallback

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/new.target
Title: new.target
Flaw count: 1

  • translation_differences:
    • Differences in the important macros (3 in common of 4 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/function
Title: 函数表达式
Flaw count: 6

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/Functions_and_function_scope redirects to /zh-CN/docs/Web/JavaScript/Reference/Functions
  • broken_links:
    • Can't resolve /zh-CN/docs/
    • Can't resolve /zh-CN/docs/Web/JavaScript/Reference/Functions_and_function_scope
    • Can't resolve /zh-CN/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments/callee
    • Can't resolve /zh-CN/docs/Mozilla/js-ctypes/Using_js-ctypes/Declaring_and_Using_Callbacks
  • translation_differences:
    • Differences in the important macros (3 in common of 4 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/typeof
Title: typeof
Flaw count: 4

  • broken_links:
    • Can't resolve /zh-CN/docs/Glossary/undefined
    • Is currently http:// but can become https://
    • Anchor not lowercase
    • Can't resolve /zh-CN/docs/Glossary/falsy

URL: /zh-CN/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing
Title: 空值合并运算符(??)
Flaw count: 2

  • macros:
    • wrong xref macro used (consider changing which macro you use)
  • broken_links:
    • Can't resolve /zh-CN/docs/Web/JavaScript/Reference/Operators/Logical_nullish_assignment

URL: /zh-CN/docs/Web/JavaScript/Reference/Strict_mode
Title: 严格模式
Flaw count: 13

  • macros:
    • /zh-CN/docs/Web/API/WindowTimers/setTimeout does not exist but fell back to /en-US/docs/Web/API/setTimeout
  • broken_links:
    • Can't resolve /docs/Glossary/Sloppy_mode
    • Is currently http:// but can become https://
    • Can't resolve /zh-CN/docs/Web/JavaScript/Reference/Strict_mode/Transitioning_to_strict_mode
    • Can't resolve /zh-CN/JavaScript/Reference/Global_Objects/Object/preventExtensions
    • Is currently http:// but can become https://
    • and 6 more flaws omitted
  • translation_differences:
    • Differences in the important macros (1 in common of 2 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Template_literals
Title: 模板字符串
Flaw count: 2

  • broken_links:
    • Can't resolve /zh-CN/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#汇总表
    • Can't resolve /zh-CN/docs/Web/JavaScript/Reference/Operators/Property_Accessors

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array
Title: Uint8Array
Flaw count: 5

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/prototype does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
    • /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/prototype does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
    • /zh-CN/docs/Web/JavaScript/Reference/TypedArray/move does not exist
  • broken_links:
    • Anchor not lowercase
    • Can't resolve /zh-CN/docs/Web/JavaScript/Typed_arrays

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakMap
Title: WeakMap
Flaw count: 3

  • broken_links:
    • Anchor not lowercase
    • Anchor not lowercase
    • Is currently http:// but can become https://

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/has
Title: WeakMap.prototype.has()
Flaw count: 1

  • translation_differences:
    • Differences in the important macros (2 in common of 3 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/get
Title: WeakMap.prototype.get()
Flaw count: 1

  • translation_differences:
    • Differences in the important macros (2 in common of 3 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/delete
Title: WeakMap.prototype.delete()
Flaw count: 1

  • translation_differences:
    • Differences in the important macros (2 in common of 3 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/URIError
Title: URIError
Flaw count: 1

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/URIError/URIError does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError/URIError

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Error/stack
Title: Error.prototype.stack
Flaw count: 4

  • broken_links:
    • Can't resolve /zh-CN/docs/Tools/Debugger
    • Can use the English (en-US) link as a fallback
    • Is currently http:// but can become https://
    • Can't resolve /zh-CN/docs/Components.stack

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32
Title: Math.clz32()
Flaw count: 1

  • translation_differences:
    • Differences in the important macros (2 in common of 3 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray
Title: Uint8ClampedArray
Flaw count: 5

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/prototype does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
    • /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/prototype does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
    • /zh-CN/docs/Web/JavaScript/Reference/TypedArray/move does not exist
  • broken_links:
    • Anchor not lowercase
    • Can't resolve /zh-CN/docs/Web/JavaScript/Typed_arrays

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakSet
Title: WeakSet
Flaw count: 1

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/WeakSet does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/WeakSet

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/has
Title: WeakSet.prototype.has()
Flaw count: 1

  • translation_differences:
    • Differences in the important macros (2 in common of 3 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/delete
Title: WeakSet.prototype.delete()
Flaw count: 2

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/WeakSet/clear does not exist
  • translation_differences:
    • Differences in the important macros (2 in common of 3 possible)

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Number
Title: Number
Flaw count: 1

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Number/prototype does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Global_Objects/Number

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/undefined
Title: undefined
Flaw count: 1

  • macros:
    • /zh-CN/docs/Web/JavaScript/Reference/Operators/Comparison_Operators does not exist but fell back to /en-US/docs/Web/JavaScript/Reference/Operators
External URLs (2)

URL: /zh-CN/docs/Web/JavaScript/Reference/Lexical_grammar
Title: 词法文法


URL: /zh-CN/docs/Web/JavaScript/Reference/Trailing_commas
Title: 尾后逗号

(comment last updated: 2023-07-29 11:34:57)

Copy link
Member

@yin1999 yin1999 left a comment

Choose a reason for hiding this comment

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

I've run prettier format again to the javascript reference folder again and fix some format errors. Now we could merge this :)

@@ -68,7 +68,7 @@ JavaScript 的 `Number` 类型是一个[双精度 64 位二进制格式 IEEE 754
- 不允许使用[数字分隔符](/zh-CN/docs/Web/JavaScript/Reference/Lexical_grammar#numeric_separators)。
- [BigInt](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/BigInt) 抛出 {{jsxref("TypeError")}},以防止意外的强制隐式转换损失精度。
- [Symbol](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Symbol) 抛出 {{jsxref("TypeError")}}。
- 对象首先按顺序调用 [`@@toPrimitive]()`](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toPrimitive)(将 `"number"` 作为 hint)、`valueOf()` 和 `toString()` 方法将其[转换为原始值](/zh-CN/docs/Web/JavaScript/Data_structures#强制原始值转换)。然后将生成的原始值转换为数值。
- 对象首先按顺序调用 [`[@@toPrimitive]()`](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toPrimitive)(将 `"number"` 作为 hint)、`valueOf()` 和 `toString()` 方法将其[转换为原始值](/zh-CN/docs/Web/JavaScript/Data_structures#强制原始值转换)。然后将生成的原始值转换为数值。
Copy link
Member

Choose a reason for hiding this comment

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

The left square bracket is missing, so prettier removed the spaces around the word ()

@yin1999 yin1999 merged commit a4e5c12 into main Jul 29, 2023
9 checks passed
@yin1999 yin1999 deleted the zh-cn/prettier/web/javascript/5 branch July 29, 2023 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-zh Issues related to Chinese content. system Infrastructure and configuration for the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants