Change external links to https (#6874)
This commit is contained in:
1 parent
b06b42ddbb
commit
304acbea01
5 files changed
+6
-6
No files matched your search
+1
-1
@@ -49,7 +49,7 @@ prettier.resolveConfig(filePath).then(options => {
|
||||
});
|
||||
```
|
||||
|
||||
If `options.editorconfig` is `true` and an [`.editorconfig` file](http://editorconfig.org/) is in your project, Prettier will parse it and convert its properties to the corresponding prettier configuration. This configuration will be overridden by `.prettierrc`, etc. Currently, the following EditorConfig properties are supported:
|
||||
If `options.editorconfig` is `true` and an [`.editorconfig` file](https://editorconfig.org/) is in your project, Prettier will parse it and convert its properties to the corresponding prettier configuration. This configuration will be overridden by `.prettierrc`, etc. Currently, the following EditorConfig properties are supported:
|
||||
|
||||
- `end_of_line`
|
||||
- `indent_style`
|
||||
|
||||
+2
-2
@@ -7,10 +7,10 @@ title: Prettier vs. Linters
|
||||
|
||||
Linters have two categories of rules:
|
||||
|
||||
**Formatting rules**: eg: [max-len](http://eslint.org/docs/rules/max-len), [no-mixed-spaces-and-tabs](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs), [keyword-spacing](http://eslint.org/docs/rules/keyword-spacing), [comma-style](http://eslint.org/docs/rules/comma-style)...
|
||||
**Formatting rules**: eg: [max-len](https://eslint.org/docs/rules/max-len), [no-mixed-spaces-and-tabs](https://eslint.org/docs/rules/no-mixed-spaces-and-tabs), [keyword-spacing](https://eslint.org/docs/rules/keyword-spacing), [comma-style](https://eslint.org/docs/rules/comma-style)...
|
||||
|
||||
Prettier alleviates the need for this whole category of rules! Prettier is going to reprint the entire program from scratch in a consistent way, so it's not possible for the programmer to make a mistake there anymore :)
|
||||
|
||||
**Code-quality rules**: eg [no-unused-vars](http://eslint.org/docs/rules/no-unused-vars), [no-extra-bind](http://eslint.org/docs/rules/no-extra-bind), [no-implicit-globals](http://eslint.org/docs/rules/no-implicit-globals), [prefer-promise-reject-errors](http://eslint.org/docs/rules/prefer-promise-reject-errors)...
|
||||
**Code-quality rules**: eg [no-unused-vars](https://eslint.org/docs/rules/no-unused-vars), [no-extra-bind](https://eslint.org/docs/rules/no-extra-bind), [no-implicit-globals](https://eslint.org/docs/rules/no-implicit-globals), [prefer-promise-reject-errors](https://eslint.org/docs/rules/prefer-promise-reject-errors)...
|
||||
|
||||
Prettier does nothing to help with those kind of rules. They are also the most important ones provided by linters as they are likely to catch real bugs with your code!
|
||||
@@ -63,7 +63,7 @@ singleQuote = true
|
||||
|
||||
Overrides let you have different configuration for certain file extensions, folders and specific files.
|
||||
|
||||
Prettier borrows ESLint’s [override format](http://eslint.org/docs/user-guide/configuring#example-configuration).
|
||||
Prettier borrows ESLint’s [override format](https://eslint.org/docs/user-guide/configuring#example-configuration).
|
||||
|
||||
JSON:
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ Prettier is an opinionated code formatter with support for:
|
||||
- [Markdown](https://commonmark.org/), including [GFM](https://github.github.com/gfm/) and [MDX](https://mdxjs.com/)
|
||||
- [YAML](https://yaml.org/)
|
||||
|
||||
It removes all original styling[\*](#footnotes) and ensures that all outputted code conforms to a consistent style. (See this [blog post](http://jlongster.com/A-Prettier-Formatter))
|
||||
It removes all original styling[\*](#footnotes) and ensures that all outputted code conforms to a consistent style. (See this [blog post](https://jlongster.com/A-Prettier-Formatter))
|
||||
|
||||
Prettier takes your code and reprints it from scratch by taking the line length into account.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ id: technical-details
|
||||
title: Technical Details
|
||||
---
|
||||
|
||||
This printer is a fork of [recast](https://github.com/benjamn/recast)'s printer with its algorithm replaced by the one described by Wadler in "[A prettier printer](http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf)". There still may be leftover code from recast that needs to be cleaned up.
|
||||
This printer is a fork of [recast](https://github.com/benjamn/recast)'s printer with its algorithm replaced by the one described by Wadler in "[A prettier printer](https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf)". There still may be leftover code from recast that needs to be cleaned up.
|
||||
|
||||
The basic idea is that the printer takes an AST and returns an intermediate representation of the output, and the printer uses that to generate a string. The advantage is that the printer can "measure" the IR and see if the output is going to fit on a line, and break if not.
|
||||
|
||||
|
||||
Reference in new issue
Block a user