I’m just following the 1.3 guide to get a feel for things. Any idea why it says Notes is not defined? Also SimpleSchema is not defined?
At the top of the file, you should import SimpleSchema:
import {SimpleSchema} from 'meteor/aldeed:simple-schema';
For Notes, you should declare it with var/const/let, export it and import somewhere else, i.e.:
const Notes = new Mongo.Collection('notes');
export defualt Notes;
And where you want to use it:
import Notes from '/lib/collections/notes';
I guess I have to get used to importing things manually. :’(
That’s the whole idea of the modules principle…
Doesn’t mean I have to enjoy it.
Ayy lmao
FYI default is spelled defualt in your example, in case someone copy/pastes. Further, export as default only when you have one collection to export. If you have multiple, you should export/import as:
const Notes = new Mongo.Collection(‘notes’)
export { Notes }
import { Notes }
Ran into the same thing;
You can add
/* globals SimpleSchema */
to the top of your javascript file;
documentation: http://eslint.org/docs/user-guide/configuring#specifying-globals