Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/enforce code style #77

Open
wants to merge 8 commits into
base: release/v0.14.0
Choose a base branch
from

Conversation

unity
Copy link
Contributor

@unity unity commented Aug 10, 2018

  • applies eslint + prettier + flow on each commit,
  • prettifies the entire codebase
  • fixes a few minor Flow type errors
  • disables flow warnings

- prettier
- lint
- flow

before commits.
and fix Flow `HullConnectorUpdateHandlerCallback` and `HullSegmentUpdateHandlerCallback` signatures to accept a second, ignored arguments
@unity unity requested a review from michaloo August 10, 2018 20:19
BEWARE: `documentation` is broken because of the `...$Exact<>` type syntax -> disabled for this commit. Must be fixed.

```
{
  "type": "ObjectTypeSpreadProperty",
  "start": 2661,
  "end": 2694,
  "loc": {
    "start": {
      "line": 101,
      "column": 2
    },
    "end": {
      "line": 101,
      "column": 35
    }
  },
  "argument": {
    "type": "GenericTypeAnnotation",
    "start": 2664,
    "end": 2693,
    "loc": {
      "start": {
        "line": 101,
        "column": 5
      },
      "end": {
        "line": 101,
        "column": 34
      }
    },
    "typeParameters": {
      "type": "TypeParameterInstantiation",
      "start": 2670,
      "end": 2693,
      "loc": {
        "start": {
          "line": 101,
          "column": 11
        },
        "end": {
          "line": 101,
          "column": 34
        }
      },
      "params": [
        {
          "type": "GenericTypeAnnotation",
          "start": 2671,
          "end": 2692,
          "loc": {
            "start": {
              "line": 101,
              "column": 12
            },
            "end": {
              "line": 101,
              "column": 33
            }
          },
          "typeParameters": null,
          "id": {
            "type": "Identifier",
            "start": 2671,
            "end": 2692,
            "loc": {
              "start": {
                "line": 101,
                "column": 12
              },
              "end": {
                "line": 101,
                "column": 33
              },
              "identifierName": "HullContextWithClient"
            },
            "name": "HullContextWithClient"
          }
        }
      ]
    },
    "id": {
      "type": "Identifier",
      "start": 2664,
      "end": 2670,
      "loc": {
        "start": {
          "line": 101,
          "column": 5
        },
        "end": {
          "line": 101,
          "column": 11
        },
        "identifierName": "$Exact"
      },
      "name": "$Exact"
    }
  }
}
TypeError: Cannot read property 'name' of undefined
    at [...]/documentation/lib/infer/properties.js:46:62
    at Array.forEach (<anonymous>)
    at inferProperties ([...]/documentation/lib/infer/properties.js:44:24)
    at Array.inferProperties ([...]/documentation/lib/infer/properties.js:61:7)
    at comment ([...]/documentation/lib/index.js:39:25)
    at Array.map (<anonymous>)
    at [...]/documentation/lib/index.js:95:48
    at arrayMap ([...]/documentation/node_modules/lodash/lodash.js:631:23)
    at map ([...]/documentation/node_modules/lodash/lodash.js:9546:14)
    at Function.flatMap ([...]/documentation/node_modules/lodash/lodash.js:9249:26)

```
Checkout instances of TODO in repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant