You can run ESLint configured for AirBnB and Meteor from the command line as follows:
app$ meteor npm run lint
During active development, however, a much better way to enforce ESLint guidelines is to install ESLint into your editor. The ICS 314 instructions on ESLint in IntelliJ provides detailed instructions on run ESLint in IntelliJ.
Directories are all lowercase, hyphens separate words. For example,
Meteor methods should be placed in their own file, typically in a directory containing the definition of the Collection that they operate on. They should be named with the extension
All exported functions should have a JSDoc, and the associated file should have a JSDoc module declaration.
Internal functions might also have a JSDoc if they are sufficiently complicated.
All JSDocs need to supply an
@memberOf so that they are associated with a namespace. The namespace corresponds to the directory path within the /imports directory (for example, "api/base").
All complex functions should have an associated unit test.
Complex tests may need a DB fixture to be loaded in order to set up the DB state correctly.
Methods should have integration tests to ensure that client-server communication works properly.
See the Testing section for more details.
There are two ways to specify import paths: absolute and relative.
import BaseInstanceCollection from '/imports/api/base/BaseInstanceCollection';
import BaseInstanceCollection from '../base/BaseInstanceCollection';
Please use relative paths, because IntelliJ can perform completion and refactoring on relative paths but not absolute paths.