Skip to content

input-name rule option to specify casing #276

@lioneltay

Description

@lioneltay

At the moment, when using the input-name rule https://github.com/dotansimha/graphql-eslint/blob/master/docs/rules/input-name.md, this is an error

# eslint @graphql-eslint/input-name: ["error", [{"checkInputType":true}]]

type Mutation {
  setMessage(input: SetMessageInput): String
}

While this passes

# eslint @graphql-eslint/input-name: ["error", [{"checkInputType":true}]]

type Mutation {
  SetMessage(input: SetMessageInput): String
}

Could an option be added to allow the mutation name to still be in camel case, while the type name should be the PascalCase version appended with Input?

Maybe this will allow this rule to work better with the naming-convention rule https://github.com/dotansimha/graphql-eslint/blob/master/docs/rules/naming-convention.md.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions