-
-
Notifications
You must be signed in to change notification settings - Fork 449
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
feat: support prettierConfigs with internal default options #592
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for melodious-froyo-4871f8 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/** | ||
* Custom configs let you have different configuration for certain file extensions and specific files. | ||
*/ | ||
prettierConfigs?: (options: PrettierConfigsOptions) => TypedFlatConfigItem[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about the return of TypedFlatConfigItem[]
convention, which supposedly to be the append
or prepend
operation of the main config. Also it feels a bit too specific here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any suggestions to optimize it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what you want - for appending the config you and use .append
etc, I guess you'd more like to read the resolved options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope to allow users to use prettier intead of stylistic to format GLOB_SRC
, but I can not get the internal runtime prettier options easily to keey the consistent format style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it will be easily to format others files by prettier if necessary.
Description
prettierConfigs
with internal runtime default options makes users customize code format easy with the consistent format style.For examples:
GLOB_SRC
with prettier rather than stylisticLinked Issues
Additional context