Skip to content

Fix empty Prettier config file create command#15367

Merged
fisker merged 10 commits intomainfrom
empty-config
Sep 14, 2023
Merged

Fix empty Prettier config file create command#15367
fisker merged 10 commits intomainfrom
empty-config

Conversation

@fisker
Copy link
Copy Markdown
Member

@fisker fisker commented Sep 7, 2023

Description

Tested on cmd, powershell, work as expected.

node --eval "fs.writeFileSync('.prettierrc','{}\n')" && node -p "JSON.stringify(fs.readFileSync('.prettierrc','utf8'))"
# "{}\n"

Fixes #13926
Fixes #11751
Closes #11692

Note to myself: copy to stable version after we decide what to use.

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 7, 2023

Size Change: +1.52 kB (0%)

Total Size: 8.38 MB

Filename Size Change
./dist/plugins/babel.js 311 kB +21 B (0%)
./dist/plugins/babel.mjs 310 kB +21 B (0%)
./dist/plugins/flow.js 681 kB +547 B (0%)
./dist/plugins/flow.mjs 680 kB +547 B (0%)
./dist/plugins/html.js 138 kB +57 B (0%)
./dist/plugins/html.mjs 138 kB +57 B (0%)
./dist/plugins/postcss.js 153 kB +133 B (0%)
./dist/plugins/postcss.mjs 153 kB +133 B (0%)
ℹ️ View Unchanged
Filename Size
./dist/bin 4.1 kB
./dist/bin/prettier.cjs 2.15 kB
./dist/doc.d.ts 6.91 kB
./dist/doc.js 51 kB
./dist/doc.mjs 47.3 kB
./dist/index.cjs 33.5 kB
./dist/index.d.ts 26.5 kB
./dist/index.mjs 812 kB
./dist/internal 4.1 kB
./dist/internal/cli.mjs 230 kB
./dist/internal/internal.mjs 19.8 kB
./dist/LICENSE 239 kB
./dist/package.json 6.21 kB
./dist/plugins 4.1 kB
./dist/plugins/acorn.d.ts 109 B
./dist/plugins/acorn.js 149 kB
./dist/plugins/acorn.mjs 148 kB
./dist/plugins/angular.d.ts 177 B
./dist/plugins/angular.js 42.8 kB
./dist/plugins/angular.mjs 42.1 kB
./dist/plugins/babel.d.ts 402 B
./dist/plugins/estree.d.ts 11 B
./dist/plugins/estree.js 185 kB
./dist/plugins/estree.mjs 185 kB
./dist/plugins/flow.d.ts 90 B
./dist/plugins/glimmer.d.ts 93 B
./dist/plugins/glimmer.js 133 kB
./dist/plugins/glimmer.mjs 132 kB
./dist/plugins/graphql.d.ts 93 B
./dist/plugins/graphql.js 43.7 kB
./dist/plugins/graphql.mjs 43 kB
./dist/plugins/html.d.ts 139 B
./dist/plugins/markdown.d.ts 127 B
./dist/plugins/markdown.js 148 kB
./dist/plugins/markdown.mjs 148 kB
./dist/plugins/meriyah.d.ts 93 B
./dist/plugins/meriyah.js 120 kB
./dist/plugins/meriyah.mjs 120 kB
./dist/plugins/postcss.d.ts 121 B
./dist/plugins/typescript.d.ts 96 B
./dist/plugins/typescript.js 1.15 MB
./dist/plugins/typescript.mjs 1.15 MB
./dist/plugins/yaml.d.ts 90 B
./dist/plugins/yaml.js 122 kB
./dist/plugins/yaml.mjs 121 kB
./dist/README.md 4.03 kB
./dist/standalone.d.ts 1.42 kB
./dist/standalone.js 74.3 kB
./dist/standalone.mjs 74.1 kB

compressed-size-action

@fisker fisker marked this pull request as ready for review September 7, 2023 12:18
@fisker fisker requested a review from lydell September 7, 2023 12:18
Comment thread docs/install.md
Comment thread docs/install.md Outdated
@fisker fisker changed the title Improve empty Prettier config file create command Fix empty Prettier config file create command Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants