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

rtk query code gen: add optional prettierrc override #4041

Conversation

FabianFrank
Copy link
Contributor

@FabianFrank FabianFrank commented Jan 5, 2024

Allow users to optionally provide the explicit location of the prettier config to use. For example unblocks users that are using an incompatible/different major version of prettier as part of their project that breaks the prettier version rtk query code gen depends on.

Example:

import type { ConfigFile } from "@rtk-query/codegen-openapi"

const config: ConfigFile = {
  schemaFile: "http://localhost:8080/openapi",
  ...,
  prettierConfigFile: "./rtk-codegen.prettierrc.json",
}

export default config

see #4038

Copy link

codesandbox bot commented Jan 5, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

netlify bot commented Jan 5, 2024

Deploy Preview for redux-starter-kit-docs ready!

Name Link
🔨 Latest commit b9363e1
🔍 Latest deploy log https://app.netlify.com/sites/redux-starter-kit-docs/deploys/66d22cb7cf00090008cdfa76
😎 Deploy Preview https://deploy-preview-4041--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codesandbox-ci bot commented Jan 5, 2024

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.

Latest deployment of this branch, based on commit b9363e1:

Sandbox Source
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

@johanvaneck
Copy link

Any estimate on when this could be merged?

@EskiMojo14
Copy link
Collaborator

could some tests be added? I generally don't touch codegen PRs because I don't use/write them, but some tests would possibly increase my confidence enough to review properly.

@Reichenberg
Copy link

Still an issue, would love to see this merged @FabianFrank ❤️

Allow users to optionally provide the explicit location of the prettier
config to use. For example unblocks users that are using an
incompatible/different major version of prettier as part of their
project that breaks the prettier version rtk query code gen depends on.

see reduxjs#4038
@markerikson markerikson force-pushed the fabian/codegen-override-prettier-config branch from 0d87d5b to b9363e1 Compare August 30, 2024 20:33
@markerikson markerikson merged commit 586184e into reduxjs:master Aug 30, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants