pulumi / eslint-plugin-pulumi

Apache License 2.0
9 stars 4 forks source link

Add rules from TFLint Ruleset #10

Open leggomuhgreggo opened 2 years ago

leggomuhgreggo commented 2 years ago

Hello!

Issue details

I watched the oss contributor meeting for September and at around 21 minutes Simon mentioned the need for a backlog.

I think a good starting place might be to see what rules from tflint would be useful to port to this plugin.

I think some of those rules are standard ESLint rules so it might be cool to add an optional preset with some of those.

Thanks!

Zaid-Ajaj commented 2 years ago

Hi there @leggomuhgreggo thanks for filing the issue! Do you have a specific rule from tflint that you would like to have implemented here? I took a quick glance over the list of rules and wasn't exactly sure which one would be useful here.

leggomuhgreggo commented 2 years ago

Hi @Zaid-Ajaj -- yeah, legit question. The rules that might be applicable are kinda things that you'd setup using TypeScript or standard ESLint rules.

I'm not sure how applicable they'd be in a Pulumi context, but I want to say there might be some possibilities around these:

I've only used Pulumi a little bit for personal projects and so I don't have enough experience using Pulumi at scale to really offer much by way of informed suggestions.

One thing I'll note -- in trying to lobby my colleagues to switch from TF, I've encountered some concern around possible "imperative" usages. While I think these concerns aren't particularly well founded (TF having essentially the same imperative features etc) I've been trying to think of ways to enforce declarative style, in particular via linting.

I'm not sure that really advances the question of possible eslint rules very much, but I figured I'd at least share that context.

Anyway I will definitely give it some more thought. Thanks for your consideration!