diff --git a/.prettierrc b/.prettierrc
index 61793cffde..a9f52d1530 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -3,7 +3,7 @@
"jsxBracketSameLine": true,
"parser": "flow",
"printWidth": 80,
- "proseWrap": false,
+ "proseWrap": "never",
"singleQuote": true,
"trailingComma": "es5"
}
diff --git a/lib/core/Head.js b/lib/core/Head.js
index 82fa2b027e..f819784df7 100644
--- a/lib/core/Head.js
+++ b/lib/core/Head.js
@@ -60,9 +60,7 @@ class Head extends React.Component {
)}
{hasBlog && (
{
if (!metadata.original_id) {
console.error(
- `No 'original_id' field found in ${
- file
- }. Perhaps you forgot to add it when importing prior versions of your docs?`
+ `No 'original_id' field found in ${file}. Perhaps you forgot to add it when importing prior versions of your docs?`
);
throw new Error(
- `No 'original_id' field found in ${
- file
- }. Perhaps you forgot to add it when importing prior versions of your docs?`
+ `No 'original_id' field found in ${file}. Perhaps you forgot to add it when importing prior versions of your docs?`
);
}
if (!metadata.id) {
@@ -113,14 +109,10 @@ files.forEach(file => {
throw new Error(`No 'id' field found in ${file}.`);
} else if (metadata.id.indexOf('version-') === -1) {
console.error(
- `The 'id' field in ${
- file
- } is missing the expected 'version-XX-' prefix. Perhaps you forgot to add it when importing prior versions of your docs?`
+ `The 'id' field in ${file} is missing the expected 'version-XX-' prefix. Perhaps you forgot to add it when importing prior versions of your docs?`
);
throw new Error(
- `The 'id' field in ${
- file
- } is missing the expected 'version-XX-' prefix. Perhaps you forgot to add it when importing prior versions of your docs?`
+ `The 'id' field in ${file} is missing the expected 'version-XX-' prefix. Perhaps you forgot to add it when importing prior versions of your docs?`
);
}
@@ -141,9 +133,7 @@ files.forEach(file => {
function docVersion(id, req_version) {
if (!available[id]) {
throw new Error(
- `Document with id '${
- id
- }' was requested but no document with that id could be located.`
+ `Document with id '${id}' was requested but no document with that id could be located.`
);
}
// iterate through versions until a version less than or equal to the requested
@@ -286,9 +276,7 @@ function sidebarVersion(req_version) {
}
}
throw new Error(
- `No sidebar file available to use for version ${
- req_version
- }. Verify that 'version-${req_version}-sidebars.json' exists.`
+ `No sidebar file available to use for version ${req_version}. Verify that 'version-${req_version}-sidebars.json' exists.`
);
}
diff --git a/lib/write-translations.js b/lib/write-translations.js
index 6dd9a64804..578928cc40 100755
--- a/lib/write-translations.js
+++ b/lib/write-translations.js
@@ -92,9 +92,7 @@ function execute() {
if (!file.endsWith('-sidebars.json')) {
if (file.endsWith('-sidebar.json')) {
console.warn(
- `Skipping ${
- file
- }. Make sure your sidebar filenames follow this format: 'version-VERSION-sidebars.json'.`
+ `Skipping ${file}. Make sure your sidebar filenames follow this format: 'version-VERSION-sidebars.json'.`
);
}
return;
diff --git a/package-lock.json b/package-lock.json
index 0a7ee5e859..bf6bddc5b2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1600,9 +1600,10 @@
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"prettier": {
- "version": "1.8.2",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.8.2.tgz",
- "integrity": "sha512-fHWjCwoRZgjP1rvLP7OGqOznq7xH1sHMQUFLX8qLRO79hI57+6xbc5vB904LxEkCfgFgyr3vv06JkafgCSzoZg=="
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.9.1.tgz",
+ "integrity": "sha512-oYpQsZk7/0o8+YJUB0LfjkTYQa79gUIF2ESeqvG23IzcgqqvmeOE4+lMG7E/UKX3q3RIj8JHSfhrXWhon1L+zA==",
+ "dev": true
},
"private": {
"version": "0.1.8",
diff --git a/package.json b/package.json
index cba65f2267..5dfe0af327 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,6 @@
"fs-extra": "^3.0.1",
"glob": "^7.1.2",
"highlight.js": "^9.12.0",
- "prettier": "1.8.2",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"react-dom-factories": "^1.0.1",
@@ -50,5 +49,8 @@
"docusaurus-version": "./lib/version.js",
"docusaurus-rename-version": "./lib/rename-version.js",
"docusaurus-feed": "./lib/generate-feed.js"
+ },
+ "devDependencies": {
+ "prettier": "^1.9.1"
}
}
diff --git a/yarn.lock b/yarn.lock
index 494823aa28..7f6f734f79 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1298,9 +1298,9 @@ performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
-prettier@1.8.2:
- version "1.8.2"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8"
+prettier@^1.9.1:
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.1.tgz#41638a0d47c1efbd1b7d5a742aaa5548eab86d70"
private@^0.1.6, private@^0.1.7:
version "0.1.8"