简体   繁体   English

我在哪里可以找到 Prettier 的默认规则列表?

[英]Where can I find the list of Prettier's default rules?

Suppose that the following code is given as input假设以下代码作为输入给出

message='Hello, '+"World";


console.log( message );

Prettier generates following code Prettier 生成以下代码

message = "Hello, " + "World";

console.log(message);

Spaces are inserted before and after + operator.+运算符之前和之后插入空格。 But I can't find a document that mentions this behavior.但我找不到提到这种行为的文件。

Is there a complete list of Prettier's default rules (especially about non-configurable ones)?是否有 Prettier 的默认规则的完整列表(尤其是关于不可配置的规则)?

The well-documented rules happen to be the configurable ones, which you can find here .有据可查的规则恰好是可配置的规则,您可以在此处找到。 However, if you're looking to explore everything prettier does, it may be worthwhile looking at the unit tests .然而,如果你想探索所有更漂亮的东西,那么看看单元测试可能是值得的。 Specifically, each folder has a __snapshots__ folder inside that contains a config, input, and output.具体来说,每个文件夹都有一个__snapshots__文件夹,其中包含配置、输入和 output。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以自动化 Prettier 的“修复所有更漂亮/更漂亮的问题”吗? - Can I automate Prettier's 'Fix all prettier/prettier problems'? 在哪里可以找到窗口API的列表? - Where can I find list of the window API? 在Windows中哪里可以找到罗盘的源文件? - Where can I find compass's source files in Windows? 在哪里可以找到JSHint数字错误代码列表? - Where can I find a list of JSHint numeric error codes? 我在哪里可以找到添加到 MicroTask 队列的项目的完整列表? - Where can I find the complete list of items added to MicroTask Queue? 在哪里可以找到plothover函数中“ item”的属性列表? - Where can I find a list of properties for 'item' in plothover function? 在哪里可以找到 PayPal Checkout Button 属性的完整列表? - Where can I find a full list of PayPal Checkout Button properties? 在哪里可以找到具有add()remove()和contains()的javascript列表类? - Where can I find a List class for javascript with add() remove() and contains()? 在哪里可以找到 HTML 元素的可能事件列表? - Where can I find a list of possible events for an HTML element? 在哪里可以找到由 MongoDB 触发的事件列表? - Where can I find a list of events triggered by MongoDB?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM