Skip to content

Commit

Permalink
[core] Add global prettier config (mui#8624)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored and the-noob committed Oct 17, 2017
1 parent 80a7821 commit f924580
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
9 changes: 1 addition & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,6 @@ module.exports = {
'flowtype/type-id-match': 'off',
'flowtype/use-flow-type': 'error',

'prettier/prettier': [
'error',
{
singleQuote: true,
printWidth: 100,
trailingComma: 'all',
},
],
'prettier/prettier': ['error'],
},
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"build:umd:dev": "webpack --config scripts/umd.webpack.config.js",
"build:umd:prod": "cross-env NODE_ENV=production webpack --config scripts/umd.webpack.config.js",
"build": "yarn build:es2015 && yarn build:es2015modules && yarn build:copy-files && yarn build:umd:dev && yarn build:umd:prod",
"prettier": "find . -name \"*.js\" | grep -v -f .eslintignore | xargs prettier --write --single-quote --trailing-comma all --print-width 100",
"prettier": "find . -name \"*.js\" | grep -v -f .eslintignore | xargs prettier --write",
"lint": "eslint . --cache && echo \"eslint: no lint errors\"",
"size": "size-limit",
"size:why": "size-limit --why build/index.js",
Expand Down
11 changes: 11 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// @flow

module.exports = {
printWidth: 100,
singleQuote: true,
trailingComma: 'all',
bracketSpacing: true,
jsxBracketSameLine: false,
parser: 'babylon',
semi: true,
};

0 comments on commit f924580

Please sign in to comment.