Replies: 2 comments 4 replies
-
Adding to this. I have found how to override my quote preference in the base project using: const eslintJson = project.tryFindObjectFile('.eslintrc.json');
eslintJson?.addOverride('rules', {
'prettier/prettier': ['error', { singleQuote: true }],
}); Can also apply this to the infrastructure project 😄 |
Beta Was this translation helpful? Give feedback.
-
Hey! Sorry I just saw this! Have now updated my notification settings so that hopefully I see new discussions appear... Glad to hear you've been playing with PDK since the name change! 😄
Glad you found a way to update the styles! I think the neater way to do it would be to use new InfrastructureTsProject({
parent: monorepo,
outdir: "packages/infra",
name: "infra",
typeSafeApi: api,
prettierOptions: {
settings: {
singleQuote: true,
},
},
}); One cool thing about using PDK and projects as code is it means you can define common settings for things like styles in a single place - something I often do in my PDK-based projects is: // Put all common typescript settings here
const commonTsProjectOptions = {
prettierOptions: {
settings: {
singleQuote: true,
},
},
} satisfies Partial<TypeScriptProjectOptions>; // <- satisfies is handy for auto-complete while keeping it a const type
new InfrastructureTsProject({
...commonTsProjectOptions, // Spread them into each typescript project
...
}); Hope that helps! It might be possible to implement something where the monorepo applies certain consistent style settings to its child projects but that might get a bit confusing! Re your other questions:
I'm not sure about this one - @agdimech might be able to speak to this!
We don't right now! It would probably make sense to have a PDK channel in the cdk.dev slack - let me see if I can get in touch with the owner :)
Yes! We definitely want to keep maintaining this long term. I work in a prototyping team where I build prototypes for AWS customers, and the majority of our prototypes are PDK based and are built with the intention of continuing to use PDK into production. Sorry again for the slow reply! Certainly keen for your help! 😄 |
Beta Was this translation helpful? Give feedback.
-
Hi there. I am new to this project (kind of). I stumbled across it before the name change, and I like the concept of what you seem to be doing here.
One thing that annoys me is the inconsistency of the typescript configuration for eslint/prettier between the project types:
is there a way to override this, or is there a standard that could be adopted across PDK generally to align the configuration of this tool?
My personal preference with typescript is imports and strings to be using ' (single quotes) :-)
Some additional Questions:
Sorry for all the questions. I am interested in helping out - just trying to work out the how :-)
Beta Was this translation helpful? Give feedback.
All reactions