Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Rules used at in the Incubator tribe. You most probably do not need to use this package directly - use @kiwicom/eslint-config instead. This package exists basically only to workaround some Eslint limitations.


You'll first need to install ESLint. Next, install this plugin:

yarn add --dev eslint-plugin-kiwicom-incubator


Add kiwicom-incubator to the plugins section of your .eslintrc configuration file:

  "plugins": ["eslint-plugin-kiwicom-incubator"]

Then configure the rules you want to use under the rules section:

  "rules": {
    "kiwicom-incubator/only-nullable-fields": "error",
    "kiwicom-incubator/no-invalid-flow-annotations": "error"



This rule aims to remove all uses of GraphQLNonNull on GraphQL type fields. Why? It's best practice to use nullable fields and not rely on returned value. This way every frontend implementation must handle the situation when API returns null because everything will break eventually.

Examples of incorrect code for this rule:

arrival: {
  type: new GraphQLNonNull(GraphQLRouteStop),
  resolve: ({ arrival }: LegType): ArrivalType => arrival,

Examples of correct code for this rule:

arrival: {
  type: GraphQLRouteStop,
  resolve: ({ arrival }: LegType): ArrivalType => arrival,


This rule disallows @noflow and @flow weak annotations.

You can’t perform that action at this time.