Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add usage section about prettier-plugin-embed #327

Merged
merged 3 commits into from
Dec 9, 2023
Merged

docs: add usage section about prettier-plugin-embed #327

merged 3 commits into from
Dec 9, 2023

Conversation

karlhorky
Copy link
Contributor

@karlhorky karlhorky commented Dec 9, 2023

Closes #217

Alternative .prettierrc version of the config (downside: untyped):

{
  "plugins": ["prettier-plugin-embed", "prettier-plugin-sql"],
  "embeddedSqlIdentifiers": ["sql"],
  "language": "postgresql",
  "keywordCase": "upper",
}

Copy link

changeset-bot bot commented Dec 9, 2023

⚠️ No Changeset found

Latest commit: 4ea4c85

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codesandbox-ci bot commented Dec 9, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@karlhorky
Copy link
Contributor Author

karlhorky commented Dec 9, 2023

Seems like the CI error is related to the TOML package:

$ pnpm run-s build lint test

> @unts/prettier@0.0.0 build
> run-p build:*


> @unts/prettier@0.0.0 build:r
> r -f cjs


> @unts/prettier@0.0.0 build:ts
> tsc -b

Error [RollupError]: Could not resolve "./languages.js" from "packages/toml/src/index.ts"
    at error (file:///home/runner/work/prettier/prettier/node_modules/.pnpm/rollup@3.26.1/node_modules/rollup/dist/es/shared/node-entry.js:2245:30)
    at ModuleLoader.handleInvalidResolvedId (file:///home/runner/work/prettier/prettier/node_modules/.pnpm/rollup@3.26.1/node_modules/rollup/dist/es/shared/node-entry.js:24632:24)
    at file:///home/runner/work/prettier/prettier/node_modules/.pnpm/rollup@3.26.1/node_modules/rollup/dist/es/shared/node-entry.js:245[9](https://github.com/un-ts/prettier/actions/runs/7152253084/job/19477387552?pr=327#step:6:10)4:26 {
  code: 'UNRESOLVED_IMPORT',
  exporter: './languages.js',
  id: '/home/runner/work/prettier/prettier/packages/toml/src/index.ts',
  watchFiles: [
    '/home/runner/work/prettier/prettier/packages/toml/src/index.ts',
    '/home/runner/work/prettier/prettier/packages/toml/src/options.ts'
  ]
}
ERROR: "build:r" exited with 1.
ERROR: "build" exited with 1.
Error: Process completed with exit code 1.

@JounQin
Copy link
Member

JounQin commented Dec 9, 2023

No worry, I'll fix the CI issue.

@JounQin
Copy link
Member

JounQin commented Dec 9, 2023

@JounQin JounQin changed the title Add Usage section about prettier-plugin-embed docs: add usage section about prettier-plugin-embed Dec 9, 2023
@JounQin
Copy link
Member

JounQin commented Dec 9, 2023

@karlhorky Please fix the CI issue about formatting.

Copy link

codecov bot commented Dec 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bd624c2) 87.73% compared to head (4ea4c85) 87.73%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #327   +/-   ##
=======================================
  Coverage   87.73%   87.73%           
=======================================
  Files          10       10           
  Lines         163      163           
  Branches       43       43           
=======================================
  Hits          143      143           
  Misses         19       19           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JounQin JounQin enabled auto-merge (squash) December 9, 2023 17:49
@JounQin JounQin disabled auto-merge December 9, 2023 17:52
@JounQin JounQin merged commit 1272f18 into un-ts:master Dec 9, 2023
16 of 17 checks passed
@JounQin JounQin added the documentation Improvements or additions to documentation label Dec 9, 2023
@karlhorky karlhorky deleted the patch-1 branch December 9, 2023 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

document: integration with prettier-plugin-embed
2 participants