Hi, is there any linter nodejs that would tell me ...
# general
g
Hi, is there any linter nodejs that would tell me if the resources do not have set
parent
or
provider
?
l
That would be Typescript only: maybe tslint would support custom logic that sophisticated? You don't need a linter for
provider
though, there's a Pulumi setting for that.
Copy code
pulumi:disable-default-providers:
    - aws
    - anyProviderYouChoose
Not sure about the parent one. You might be better off with code reviews and business process for that. Top level resources wouldn't have a parent (unless maybe the stack itself?). You could create a subclass of ComponentResource and put the logic in there. Then require that the ComponentResource class not be used anywhere else.
g
sadly our cobease is polluted by default providers so that won’t work 😞