Skip to content

Commit

Permalink
Add Prettier NPM dependency to packages/scripts and top-level
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Jan 28, 2020
1 parent ba2495f commit d20fa45
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Import the default config file and expose it in the project root.
// Useful for editor integrations.
module.exports = require( '@wordpress/scripts/config/.prettierrc.js' );
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
"node-watch": "0.6.0",
"postcss": "7.0.13",
"postcss-loader": "3.0.0",
"prettier": "npm:[email protected]",
"progress": "2.0.3",
"react": "16.9.0",
"react-dom": "16.9.0",
Expand Down Expand Up @@ -186,6 +187,7 @@
"fixtures:server-registered": "packages/env/bin/wp-env run wordpress ./wp-content/plugins/gutenberg/bin/get-server-blocks.php > test/integration/full-content/server-registered.json",
"fixtures:generate": "npm run fixtures:server-registered && cross-env GENERATE_MISSING_FIXTURES=y npm run test-unit",
"fixtures:regenerate": "npm run fixtures:clean && npm run fixtures:generate",
"format-js": "wp-scripts format-js",
"lint": "concurrently \"npm run lint-js\" \"npm run lint-pkg-json\" \"npm run lint-css\" \"npm run lint-types\"",
"lint-js": "wp-scripts lint-js",
"lint-js:fix": "npm run lint-js -- --fix",
Expand Down
12 changes: 12 additions & 0 deletions packages/scripts/config/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
useTabs: true,
tabWidth: 2,
printWidth: 100,
singleQuote: true,
trailingComma: 'es5',
bracketSpacing: true,
parenSpacing: true,
jsxBracketSameLine: false,
semi: true,
arrowParens: 'always',
};
1 change: 1 addition & 0 deletions packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"command-exists": "^1.2.8",
"cross-spawn": "^5.1.0",
"decompress-zip": "^0.2.2",
"dir-glob": "^3.0.1",
"eslint": "^6.1.0",
"eslint-plugin-markdown": "1.0.1",
"jest": "^24.9.0",
Expand Down

0 comments on commit d20fa45

Please sign in to comment.