diff --git a/docs/babel.config.ts.js b/docs/babel.config.ts.js index 06bdacd9e14386..46f7b3a5f78b41 100644 --- a/docs/babel.config.ts.js +++ b/docs/babel.config.ts.js @@ -1,5 +1,4 @@ const path = require('path'); -const prettier = require('prettier'); const ignoredDemos = require('./ts-demo-ignore.json'); /** @@ -13,18 +12,12 @@ const ignoredDemos = require('./ts-demo-ignore.json'); */ const workspaceRoot = path.join(__dirname, '../'); -const prettierConfig = prettier.resolveConfig.sync(workspaceRoot); -if (prettierConfig == null) { - throw new Error('Could not find prettier config file from workspace root.'); -} - const ignore = ignoredDemos.map(demoPath => path.join(workspaceRoot, 'docs/src/pages/demos', `${demoPath}.tsx`), ); module.exports = { presets: ['@babel/preset-typescript'], - plugins: ['generator-prettier', 'unwrap-createStyles'], - generatorOpts: prettierConfig, + plugins: ['unwrap-createStyles'], ignore, }; diff --git a/package.json b/package.json index 4b282a365672c2..cd8e3231aae75b 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "docs:size-why": "DOCS_STATS_ENABLED=true yarn docs:build", "docs:build-sw": "babel-node ./docs/scripts/buildServiceWorker.js", "docs:deploy": "git push material-ui-docs master:latest", - "docs:typescript": "cross-env NODE_ENV=development babel docs/src --config-file ./docs/babel.config.ts.js --extensions .tsx --out-dir docs/src", + "docs:typescript": "cross-env NODE_ENV=development babel docs/src --config-file ./docs/babel.config.ts.js --extensions .tsx --out-dir docs/src && yarn prettier", "jsonlint": "yarn --silent jsonlint:files | xargs -n1 jsonlint -q -c && echo \"jsonlint: no lint errors\"", "jsonlint:files": "find . -name \"*.json\" | grep -v -f .eslintignore", "lint": "eslint . --cache && echo \"eslint: no lint errors\"", @@ -80,7 +80,6 @@ "babel-eslint": "^10.0.0", "babel-core": "^7.0.0-bridge.0", "babel-loader": "^8.0.0", - "babel-plugin-generator-prettier": "^1.1.0", "babel-plugin-istanbul": "^5.0.0", "babel-plugin-module-resolver": "^3.0.0", "babel-plugin-preval": "^2.0.0", diff --git a/yarn.lock b/yarn.lock index a615693ae4b57b..732b2fd5c02ca8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2705,15 +2705,6 @@ babel-plugin-emotion@^9.2.11: source-map "^0.5.7" touch "^2.0.1" -babel-plugin-generator-prettier@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/babel-plugin-generator-prettier/-/babel-plugin-generator-prettier-1.1.0.tgz#05ca3e28932ad5d16e523bc5c72930a8840a03e2" - integrity sha512-G+v0Lbw2pPIPeYlDeg1lttOsKoPW/0/9RO+hiAtmvWqRnrB2Hp1rMvjz3ROps94NBU/+uHHF0YIPr9s+FpihbQ== - dependencies: - has "^1.0.3" - prettier "^1.13.6" - source-map "^0.5.7" - babel-plugin-istanbul@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.0.tgz#6892f529eff65a3e2d33d87dc5888ffa2ecd4a30" @@ -10240,7 +10231,7 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= -prettier@^1.13.6, prettier@^1.8.2: +prettier@^1.8.2: version "1.15.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.2.tgz#d31abe22afa4351efa14c7f8b94b58bb7452205e" integrity sha512-YgPLFFA0CdKL4Eg2IHtUSjzj/BWgszDHiNQAe0VAIBse34148whfdzLagRL+QiKS+YfK5ftB6X4v/MBw8yCoug==