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

Can we add eslint and prettier #8

Open
Gabiras12 opened this issue Oct 14, 2024 · 6 comments
Open

Can we add eslint and prettier #8

Gabiras12 opened this issue Oct 14, 2024 · 6 comments

Comments

@Gabiras12
Copy link

It would be helpful to have this template with eslint and prettier already setup

@10thfloor
Copy link

10thfloor commented Oct 29, 2024

I think those are "developers choice" and it's better if this project is not opinionated in that way?
For example, I prefer https://biomejs.dev/ vs ESLint/Prettier, so would need to remove Prettier config ..etc.

@jayair
Copy link
Contributor

jayair commented Nov 1, 2024

Yeah I agree

@10thfloor
Copy link

10thfloor commented Nov 2, 2024

@jayair However, there does appear to be a problem when adding providers to the base template:

❯ sst add pulumi
⠸  Adding provider...error: Cannot find package "prettier" from "[project]/.sst/platform/src/ast/add.ts"

@10thfloor
Copy link

10thfloor commented Nov 2, 2024

 ❯ sst add pulumi --print-logs
 
time=2024-11-02T08:51:57.531-07:00 level=INFO msg="checking for pulumi" path="[redacted]/Library/Application Support/sst/bin/pulumi"
time=2024-11-02T08:51:57.808-07:00 level=INFO msg="checking for bun" path="[redacted]/Library/Application Support/sst/bin/bun"
⠋  Adding provider...time=2024-11-02T08:51:57.834-07:00 level=INFO msg="esbuild building" out=[redacted]/.sst/platform/sst.config.1730562717833.mjs
time=2024-11-02T08:51:57.843-07:00 level=INFO msg="esbuild built" outfile=[redacted]/.sst/platform/sst.config.1730562717833.mjs
time=2024-11-02T08:51:57.844-07:00 level=INFO msg="evaluating config"
time=2024-11-02T08:51:57.876-07:00 level=INFO msg="config evaluated"
time=2024-11-02T08:51:57.877-07:00 level=INFO msg="checking platform"
time=2024-11-02T08:51:57.877-07:00 level=INFO msg="getting package" name=@sst-provider/pulumi version=latest
⠸  Adding provider...error: Cannot find package "prettier" from "[redacted]/.sst/platform/src/ast/add.ts"

To fix I had to cd into [project]/.sst/platform and run bun install

But, that's not all. This is the output now:

❯ sst add pulumi             
✓  Added provider "supabase". You can create resources with `new supabase.SomeResource()`

Hmm.

@10thfloor
Copy link

10thfloor commented Nov 2, 2024

Actually, I realize that pulumi isn't a provider in the directory of available providers(?), which may be why the output is misleading.

However, it did add an entry to my sst.config.ts that looks like this ...

  providers: { pulumi: "0.0.2" }

@jayair
Copy link
Contributor

jayair commented Nov 8, 2024

Hmm yeah that's weird. We should handle invalid providers better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants