Run prettier on more supported files (#7456)

This commit is contained in:
fisker Cheung authored and GitHub committed 2020-01-31 13:40:30 +02:00
1 parent f5bb218417
commit 9049c166b4
13 files changed
+132 -117

No files matched your search

+2 -2
View File
@@ -7,8 +7,8 @@ steps:
displayName: "Check JSDoc types"
- script: yarn lint
displayName: "Lint code"
- script: yarn lint-docs
displayName: "Lint docs"
- script: yarn lint-prettier
displayName: "Lint prettier"
- script: yarn spellcheck
displayName: "Spellcheck"
- script: yarn && echo "Listing changed files:" && git diff --name-only --exit-code && echo "No files changed during lint."
+3
View File
@@ -28,17 +28,20 @@ Tip! Don't write this stuff manually.
**Prettier 1.19.1**
[Playground link](https://prettier.io/playground/#.....)
```sh
# Options (if any):
--single-quote
```
**Input:**
```jsx
// code snippet
```
**Output:**
```jsx
// code snippet
```
+2
View File
@@ -19,12 +19,14 @@ BEFORE SUBMITTING AN ISSUE:
-->
**Environments:**
- Prettier Version: 1.19.1
- Running Prettier via: <!-- CLI, Node.js API, Browser API, etc. -->
- Runtime: <!-- Node.js v6, Chrome v67, etc. -->
- Operating System: <!-- Windows, Linux, macOS, etc. -->
**Steps to reproduce:**
<!-- shell script, js code, or a link to the minimal reproducible repository -->
**Expected behavior:**
+2 -3
View File
@@ -29,12 +29,11 @@ jobs:
- name: Lint code
run: yarn lint
- name: Lint docs
run: yarn lint-docs
- name: Lint prettier
run: yarn lint-prettier
- name: Spellcheck
run: yarn spellcheck
- name: Check file changes
run: yarn && echo "Listing changed files:" && git diff --name-only --exit-code && echo "No files changed during lint."
+7
View File
@@ -1,2 +1,9 @@
dist/
.cache/
coverage/
/tests/
!/tests/**/jsfmt.spec.js
/tests_integration/cli/
/tests_integration/plugins/
/website/build/
cspell.json
+1 -1
View File
@@ -124,7 +124,7 @@
"check-types": "tsc",
"lint": "cross-env EFF_NO_LINK_RULES=true eslint . --format friendly",
"lint-changelog": "node ./scripts/lint-changelog.js",
"lint-docs": "prettier {.,docs,website,website/blog,changelog_unreleased,changelog_unreleased/*}/*.md --check",
"lint-prettier": "prettier \"**/*.{md,json,yml,html,css}\" --check",
"lint-dist": "eslint --no-eslintrc --no-ignore --env=es6,browser \"dist/!(bin-prettier|index|third-party).js\"",
"build": "node --max-old-space-size=3072 ./scripts/build/build.js",
"build-docs": "node ./scripts/build-docs.js",
+22 -22
View File
@@ -2,37 +2,37 @@
showName: true
image: /images/languages/tools_js.svg
variants:
- "[JSX](https://facebook.github.io/jsx/)"
- "[Flow](https://flow.org)"
- "[TypeScript](https://www.typescriptlang.org)"
- "[JSON](https://json.org)"
- "[JSX](https://facebook.github.io/jsx/)"
- "[Flow](https://flow.org)"
- "[TypeScript](https://www.typescriptlang.org)"
- "[JSON](https://json.org)"
- name: HTML
showName: true
image: /images/languages/tools_html.svg
variants:
- "[Vue](https://vuejs.org)"
- "[Angular](https://angular.io)"
- "[Vue](https://vuejs.org)"
- "[Angular](https://angular.io)"
- name: CSS
showName: true
image: /images/languages/tools_css.svg
variants:
- "[Less](http://lesscss.org)"
- "[SCSS](https://sass-lang.com)"
- "[`styled-components`](https://styled-components.com) 💅"
- "[`styled-jsx`](https://npmjs.com/styled-jsx)"
- "[Less](http://lesscss.org)"
- "[SCSS](https://sass-lang.com)"
- "[`styled-components`](https://styled-components.com) 💅"
- "[`styled-jsx`](https://npmjs.com/styled-jsx)"
- name: GraphQL
nameLink: https://graphql.org
showName: true
image: /images/languages/tools_gql.svg
variants:
- "[GraphQL Schemas](https://graphql.org/learn/schema/)"
- "[GraphQL Schemas](https://graphql.org/learn/schema/)"
- name: Markdown
showName: true
image: /images/languages/tools_md.svg
variants:
- "[CommonMark](https://commonmark.org)"
- "[GitHub-Flavored Markdown](https://github.github.com/gfm/)"
- "[MDX](https://mdxjs.com)"
- "[CommonMark](https://commonmark.org)"
- "[GitHub-Flavored Markdown](https://github.github.com/gfm/)"
- "[MDX](https://mdxjs.com)"
- name: YAML
nameLink: https://yaml.org
showName: true
@@ -42,11 +42,11 @@
showName: true
image: /images/languages/tools_wip.svg
variants:
- "[Elm](https://github.com/gicentre/prettier-plugin-elm) (via [`elm-format`](https://github.com/avh4/elm-format))"
- "[Java](https://github.com/jhipster/prettier-java)"
- "[PHP](https://github.com/prettier/plugin-php)"
- "[PostgreSQL](https://github.com/benjie/prettier-plugin-pg-sql/)"
- "[Ruby](https://github.com/prettier/plugin-ruby)"
- "[Swift](https://github.com/prettier/plugin-swift)"
- "[TOML](https://github.com/bd82/toml-tools/tree/master/packages/prettier-plugin-toml)"
- "[XML](https://github.com/prettier/plugin-xml)"
- "[Elm](https://github.com/gicentre/prettier-plugin-elm) (via [`elm-format`](https://github.com/avh4/elm-format))"
- "[Java](https://github.com/jhipster/prettier-java)"
- "[PHP](https://github.com/prettier/plugin-php)"
- "[PostgreSQL](https://github.com/benjie/prettier-plugin-pg-sql/)"
- "[Ruby](https://github.com/prettier/plugin-ruby)"
- "[Swift](https://github.com/prettier/plugin-swift)"
- "[TOML](https://github.com/bd82/toml-tools/tree/master/packages/prettier-plugin-toml)"
- "[XML](https://github.com/prettier/plugin-xml)"
+1 -1
View File
@@ -1 +1 @@
google-site-verification: googlefe164a33bda4034b.html
google-site-verification: googlefe164a33bda4034b.html
+1 -3
View File
@@ -26,9 +26,7 @@
);
} else {
const el = document.createElement("p");
el.textContent = `The referrer URL (${
document.referrer
}) was not recognized. Sorry :(`;
el.textContent = `The referrer URL (${document.referrer}) was not recognized. Sorry :(`;
document.body.appendChild(el);
}
</script>
+86 -67
View File
@@ -1,82 +1,101 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>Prettier</title>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, user-scalable=no"
/>
<title>Prettier</title>
<link rel="manifest" href="/manifest.json">
<link rel="manifest" href="/manifest.json" />
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="application-name" content="Prettier">
<meta name="apple-mobile-web-app-title" content="Prettier">
<meta name="theme-color" content="#1a2b34">
<meta name="msapplication-navbutton-color" content="#1a2b34">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="msapplication-starturl" content="/">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="application-name" content="Prettier" />
<meta name="apple-mobile-web-app-title" content="Prettier" />
<meta name="theme-color" content="#1a2b34" />
<meta name="msapplication-navbutton-color" content="#1a2b34" />
<meta
name="apple-mobile-web-app-status-bar-style"
content="black-translucent"
/>
<meta name="msapplication-starturl" content="/" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<link rel="icon" href="/icon.png">
<link rel="apple-touch-icon" href="/icon.png">
<link rel="icon" href="/icon.png" />
<link rel="apple-touch-icon" href="/icon.png" />
<link rel="stylesheet" crossorigin href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/codemirror.min.css">
<link
rel="stylesheet"
crossorigin
href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/codemirror.min.css"
/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/mode/javascript/javascript.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/mode/xml/xml.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/mode/jsx/jsx.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/mode/css/css.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/mode/markdown/markdown.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/addon/display/placeholder.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/addon/display/rulers.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/addon/search/searchcursor.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/addon/edit/matchbrackets.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/addon/edit/closebrackets.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/addon/comment/comment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/addon/wrap/hardwrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/keymap/sublime.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.4.4/lz-string.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.12.0/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.11.0/umd/react-dom.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/mode/javascript/javascript.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/mode/xml/xml.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/mode/jsx/jsx.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/mode/css/css.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/mode/markdown/markdown.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/addon/display/placeholder.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/addon/display/rulers.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/addon/search/searchcursor.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/addon/edit/matchbrackets.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/addon/edit/closebrackets.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/addon/comment/comment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/addon/wrap/hardwrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/keymap/sublime.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.4.4/lz-string.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.12.0/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.11.0/umd/react-dom.production.min.js"></script>
<link rel="stylesheet" href="/separate-css/playground.css">
<link rel="stylesheet" href="/separate-css/playground.css" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111350464-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-111350464-1');
</script>
</head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=UA-111350464-1"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "UA-111350464-1");
</script>
</head>
<body>
<header>
<a href="/" class="logo-wrapper">
<img class="logo" src="/icon.png" alt="">
<h1>Prettier <span id="version"></span></h1>
</a>
<span class="links">
<a
class="github-button"
href="https://github.com/prettier/prettier"
data-show-count="true"
aria-label="Star prettier on GitHub">
GitHub
<body>
<header>
<a href="/" class="logo-wrapper">
<img class="logo" src="/icon.png" alt="" />
<h1>Prettier <span id="version"></span></h1>
</a>
</span>
</header>
<div id="root" class="playground-container"></div>
<span class="links">
<a
class="github-button"
href="https://github.com/prettier/prettier"
data-show-count="true"
aria-label="Star prettier on GitHub"
>
GitHub
</a>
</span>
</header>
<script src="/playground.js"></script>
<div id="root" class="playground-container"></div>
<script src="/install-service-worker.js"></script>
<script src="/playground.js"></script>
<script async defer src="https://buttons.github.io/buttons.js"></script>
</body>
<script src="/install-service-worker.js"></script>
<script async defer src="https://buttons.github.io/buttons.js"></script>
</body>
</html>
+3 -14
View File
@@ -18,19 +18,8 @@
"integrating-with-linters",
"ignore"
],
"Configuring Prettier": [
"options",
"configuration"
],
"Editors": [
"editors",
"webstorm",
"vim"
],
"Misc": [
"technical-details",
"related-projects",
"for-enterprise"
]
"Configuring Prettier": ["options", "configuration"],
"Editors": ["editors", "webstorm", "vim"],
"Misc": ["technical-details", "related-projects", "for-enterprise"]
}
}
+1 -1
View File
@@ -377,7 +377,7 @@ em {
.usersSection a:hover {
color: white !important;
}
.usersSection .alignCenter{
.usersSection .alignCenter {
display: flex;
align-items: center;
}
+1 -3
View File
@@ -1,3 +1 @@
[
"stable"
]
["stable"]