mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
chore(site): enable eslint-plugin-eslint-comments (#4799)
* chore(site): enable eslint-plugin-eslint-comments * chore: add descriptions to eslint-disable comments * chore: update eslint-disable comments in main.go
This commit is contained in:
@ -624,7 +624,7 @@ func (g *Generator) typescriptType(ty types.Type) (TypescriptType, error) {
|
||||
ValueType: "any",
|
||||
AboveTypeLine: fmt.Sprintf("%s\n%s",
|
||||
indentedComment("Embedded anonymous struct, please fix by naming it"),
|
||||
indentedComment("eslint-disable-next-line @typescript-eslint/no-explicit-any"),
|
||||
indentedComment("eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO explain why this is needed"),
|
||||
),
|
||||
}, nil
|
||||
case *types.Map:
|
||||
@ -736,7 +736,7 @@ func (g *Generator) typescriptType(ty types.Type) (TypescriptType, error) {
|
||||
if _, ok := n.Underlying().(*types.Struct); ok {
|
||||
return TypescriptType{ValueType: "any", AboveTypeLine: fmt.Sprintf("%s\n%s",
|
||||
indentedComment(fmt.Sprintf("Named type %q unknown, using \"any\"", n.String())),
|
||||
indentedComment("eslint-disable-next-line @typescript-eslint/no-explicit-any"),
|
||||
indentedComment("eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO explain why this is needed"),
|
||||
)}, nil
|
||||
}
|
||||
|
||||
@ -761,7 +761,7 @@ func (g *Generator) typescriptType(ty types.Type) (TypescriptType, error) {
|
||||
intf := ty
|
||||
if intf.Empty() {
|
||||
return TypescriptType{ValueType: "any",
|
||||
AboveTypeLine: indentedComment("eslint-disable-next-line")}, nil
|
||||
AboveTypeLine: indentedComment("eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO explain why this is needed")}, nil
|
||||
}
|
||||
return TypescriptType{}, xerrors.New("only empty interface types are supported")
|
||||
case *types.TypeParam:
|
||||
|
Reference in New Issue
Block a user