mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 08:19:07 +02:00
chore: finer-grain per-project Prettier commands (#1032)
* chore: reorganize prettier commands * Add back prettier:diff
This commit is contained in:
parent
101a1a74c7
commit
ff11d17625
5 changed files with 16 additions and 15 deletions
|
@ -8,7 +8,9 @@
|
|||
"lint:v1": "cd v1 && yarn lint",
|
||||
"lint:v2": "cd v2 && yarn lint",
|
||||
"precommit": "lint-staged",
|
||||
"prettier": "prettier --config .prettierrc --write \"**/*.js\"",
|
||||
"prettier:v1": "cd v1 && yarn prettier",
|
||||
"prettier:v2": "cd v2 && yarn prettier",
|
||||
"prettier": "yarn prettier:v1 && yarn prettier:v2",
|
||||
"prettier:diff": "prettier --config .prettierrc --list-different \"**/*.js\"",
|
||||
"start": "cd v1/website && yarn start"
|
||||
},
|
||||
|
@ -19,7 +21,8 @@
|
|||
},
|
||||
"lint-staged": {
|
||||
"linters": {
|
||||
"{v1,v2}/**/*.js": ["yarn lint:v1 --fix", "yarn lint:v2 --fix", "yarn prettier", "git add"]
|
||||
"v1/**/*.js": ["yarn lint:v1 --fix", "yarn prettier:v1", "git add"],
|
||||
"v2/**/*.js": ["yarn lint:v2 --fix", "yarn prettier:v2", "git add"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,27 +3,19 @@
|
|||
"description": "Easy to Maintain Open Source Documentation Websites",
|
||||
"version": "1.5.0",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"documentation",
|
||||
"websites",
|
||||
"open source",
|
||||
"docusaurus"
|
||||
],
|
||||
"keywords": ["documentation", "websites", "open source", "docusaurus"],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/facebook/Docusaurus.git"
|
||||
},
|
||||
"scripts": {
|
||||
"prettier": "prettier --config ../.prettierrc --write \"**/*.js\"",
|
||||
"lint": "eslint --cache \"lib/**/*.js\" \"examples/**/*.js\" \"website/**/*.js\"",
|
||||
"test": "jest",
|
||||
"start": "cd website && yarn start"
|
||||
},
|
||||
"jest": {
|
||||
"testPathIgnorePatterns": [
|
||||
"/node_modules/",
|
||||
"__fixtures__",
|
||||
"v2"
|
||||
],
|
||||
"testPathIgnorePatterns": ["/node_modules/", "__fixtures__", "v2"],
|
||||
"testURL": "http://localhost/",
|
||||
"transform": {
|
||||
"^.+\\.js$": "<rootDir>/jest.transform.js"
|
||||
|
@ -104,6 +96,7 @@
|
|||
"husky": "^0.14.3",
|
||||
"jest": "^23.6.0",
|
||||
"lint-staged": "^7.2.0",
|
||||
"prettier": "^1.13.7",
|
||||
"rimraf": "^2.6.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5859,6 +5859,10 @@ preserve@^0.2.0:
|
|||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
||||
|
||||
prettier@^1.13.7:
|
||||
version "1.14.3"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895"
|
||||
|
||||
pretty-format@^23.6.0:
|
||||
version "23.6.0"
|
||||
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760"
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
"build": "node bin/docusaurus build website",
|
||||
"eject": "node bin/docusaurus eject website",
|
||||
"deploy": "node bin/docusaurus deploy website",
|
||||
"prettier": "prettier --config ../.prettierrc --write \"**/*.js\"",
|
||||
"lint": "eslint --cache \"lib/**/*.js\" \"bin/**/*.js\" \"test/**/*.js\"",
|
||||
"test": "jest --config test/jest.config.js"
|
||||
},
|
||||
|
|
|
@ -846,8 +846,8 @@ posix-character-classes@^0.1.0:
|
|||
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
|
||||
|
||||
prettier@^1.13.7:
|
||||
version "1.14.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.2.tgz#0ac1c6e1a90baa22a62925f41963c841983282f9"
|
||||
version "1.14.3"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895"
|
||||
|
||||
pretty-format@^23.6.0:
|
||||
version "23.6.0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue