realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.67k stars 561 forks source link

Play nicely with flow/eslint? #448

Open kushal opened 8 years ago

kushal commented 8 years ago

By default, tools don't understand that the properties of realm objects are properties. There are ways to work around this, but I wonder if you have any ideas about how to do this automatically?

appden commented 8 years ago

@kushal I'd like to better understand the issues you're seeing with ESLint. I do understand the issues you're probably seeing with using Flow. I don't have any great ideas on automatically annotating Realm objects, though I believe you can do that manually. We may be able to provide interface info for our APIs. I'm not super familiar with Flow yet.

alazier commented 8 years ago

Is this just a problem with flow? What is the issue with eslint?

kushal commented 8 years ago

Great question. I thought I saw a eslint error related to a unknown property, but I might be losing my mind. :) Lets's just focus on Flow for now.

TBH, I'm considering programmatically generating model files and then type definitions could just be part of that....