mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-28 17:57:48 +02:00
chore: upgrade prettier; rename prettier scripts as format (#6010)
This commit is contained in:
parent
33de0cdf99
commit
40e4ce0e68
7 changed files with 24 additions and 24 deletions
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
|
@ -23,6 +23,6 @@ jobs:
|
|||
- name: Lint
|
||||
run: yarn lint:ci
|
||||
- name: Prettier Code
|
||||
run: yarn prettier:diff
|
||||
run: yarn format:diff
|
||||
- name: Prettier Docs
|
||||
run: yarn prettier-docs:diff
|
||||
run: yarn format-docs:diff
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
"serve": "docusaurus serve",
|
||||
"write-translations": "docusaurus write-translations",
|
||||
"write-heading-ids": "docusaurus write-heading-ids",
|
||||
"ci": "yarn lint && yarn prettier:diff",
|
||||
"ci": "yarn lint && yarn format:diff",
|
||||
"lint": "eslint --cache \"**/*.js\" && stylelint \"**/*.css\"",
|
||||
"prettier": "prettier --config .prettierrc --write \"**/*.{js,jsx,ts,tsx,md,mdx}\"",
|
||||
"prettier:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,md,mdx}\"",
|
||||
"format": "prettier --config .prettierrc --write \"**/*.{js,jsx,ts,tsx,md,mdx}\"",
|
||||
"format:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,md,mdx}\"",
|
||||
"dev": "docusaurus start"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -55,4 +55,4 @@
|
|||
]
|
||||
},
|
||||
"description": "Docusaurus example project (facebook template)"
|
||||
}
|
||||
}
|
||||
|
|
10
package.json
10
package.json
|
@ -41,10 +41,10 @@
|
|||
"postinstall": "run-p postinstall:**",
|
||||
"postinstall:main": "yarn lock:update && yarn build:packages",
|
||||
"postinstall:dev": "is-ci || husky install",
|
||||
"prettier": "prettier --config .prettierrc --write \"**/*.{js,jsx,ts,tsx,json}\"",
|
||||
"prettier:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,json}\"",
|
||||
"prettier-docs": "prettier --config .prettierrc --write \"**/*.{md,mdx}\"",
|
||||
"prettier-docs:diff": "prettier --config .prettierrc --list-different \"**/*.{md,mdx}\"",
|
||||
"format": "prettier --config .prettierrc --write \"**/*.{js,jsx,ts,tsx,json}\"",
|
||||
"format:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,json}\"",
|
||||
"format-docs": "prettier --config .prettierrc --write \"**/*.{md,mdx}\"",
|
||||
"format-docs:diff": "prettier --config .prettierrc --list-different \"**/*.{md,mdx}\"",
|
||||
"lint": "yarn lint:js && yarn lint:style",
|
||||
"lint:ci": "yarn lint:js --quiet --report-unused-disable-directives && yarn lint:style",
|
||||
"lint:js": "eslint --cache \"**/*.{js,jsx,ts,tsx}\"",
|
||||
|
@ -109,7 +109,7 @@
|
|||
"netlify-cli": "^8.0.5",
|
||||
"nodemon": "^2.0.13",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.4.1",
|
||||
"prettier": "^2.5.0",
|
||||
"react": "^17.0.1",
|
||||
"react-dom": "^17.0.1",
|
||||
"react-test-renderer": "^17.0.2",
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
"serve": "docusaurus serve",
|
||||
"write-translations": "docusaurus write-translations",
|
||||
"write-heading-ids": "docusaurus write-heading-ids",
|
||||
"ci": "yarn lint && yarn prettier:diff",
|
||||
"ci": "yarn lint && yarn format:diff",
|
||||
"lint": "eslint --cache \"**/*.js\" && stylelint \"**/*.css\"",
|
||||
"prettier": "prettier --config .prettierrc --write \"**/*.{js,jsx,ts,tsx,md,mdx}\"",
|
||||
"prettier:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,md,mdx}\""
|
||||
"format": "prettier --config .prettierrc --write \"**/*.{js,jsx,ts,tsx,md,mdx}\"",
|
||||
"format:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,md,mdx}\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "2.0.0-beta.9",
|
||||
|
@ -38,7 +38,7 @@
|
|||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||
"eslint-plugin-react": "^7.27.0",
|
||||
"eslint-plugin-react-hooks": "^4.3.0",
|
||||
"prettier": "^2.4.1",
|
||||
"prettier": "^2.5.0",
|
||||
"stylelint": "^13.2.1"
|
||||
},
|
||||
"browserslist": {
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
"main": "lib/index.js",
|
||||
"types": "src/plugin-ideal-image.d.ts",
|
||||
"scripts": {
|
||||
"build": "yarn build:server && yarn build:browser && yarn build:copy && yarn build:prettier",
|
||||
"build": "yarn build:server && yarn build:browser && yarn build:copy && yarn build:format",
|
||||
"build:server": "tsc --project tsconfig.server.json",
|
||||
"build:browser": "tsc --project tsconfig.browser.json",
|
||||
"build:copy": "node copyUntypedFiles.js",
|
||||
"build:prettier": "prettier --config ../../.prettierrc --write \"lib/**/*.js\""
|
||||
"build:format": "prettier --config ../../.prettierrc --write \"lib/**/*.js\""
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "tsc --noEmit && yarn babel:lib && yarn babel:lib-next && yarn prettier:lib-next",
|
||||
"build": "tsc --noEmit && yarn babel:lib && yarn babel:lib-next && yarn format:lib-next",
|
||||
"watch": "concurrently --names \"lib,lib-next,tsc\" --kill-others \"yarn babel:lib --watch\" \"yarn babel:lib-next --watch\" \"yarn tsc --watch\"",
|
||||
"babel:lib": "cross-env BABEL_ENV=lib babel src -d lib --extensions \".tsx,.ts\" --ignore \"**/*.d.ts\" --copy-files",
|
||||
"babel:lib-next": "cross-env BABEL_ENV=lib-next babel src -d lib-next --extensions \".tsx,.ts\" --ignore \"**/*.d.ts\" --copy-files",
|
||||
"prettier": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --write \"**/*.{js,ts,jsx,tsc}\"",
|
||||
"prettier:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\"",
|
||||
"format": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --write \"**/*.{js,ts,jsx,tsc}\"",
|
||||
"format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\"",
|
||||
"update-code-translations": "node -e 'require(\"./update-code-translations.js\").run()'"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -15423,10 +15423,10 @@ prepend-http@^2.0.0:
|
|||
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
|
||||
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
|
||||
|
||||
prettier@^2.4.1:
|
||||
version "2.4.1"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c"
|
||||
integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==
|
||||
prettier@^2.5.0:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.0.tgz#a6370e2d4594e093270419d9cc47f7670488f893"
|
||||
integrity sha512-FM/zAKgWTxj40rH03VxzIPdXmj39SwSjwG0heUcNFwI+EMZJnY93yAiKXM3dObIKAM5TA88werc8T/EwhB45eg==
|
||||
|
||||
pretty-bytes@^5.3.0:
|
||||
version "5.6.0"
|
||||
|
|
Loading…
Add table
Reference in a new issue