Development - slaymance/client-service GitHub Wiki

Table of Contents

  1. Usage
  2. NPM Package Manager
  3. Airbnb Style Guide

Usage

For development:

  • npm start: start node server using nodemon
  • npm test: run mocha tests for server, database, and GraphQL endpoints

NPM Package Manager (Package Manager Package Manager Package Manager...)

The repository is configured to work with the node_modules directory created by NPM package manager. If using another package manager, you will need to refer to official documentation for packages for proper configuration.

Airbnb Style Guide

This project adheres to the Airbnb style guide, and uses the official NPM package for managing linting rules.

Ensure that the .eslintrc.js file in the root directory contains the following rule exceptions:

"import/no-extraneous-dependencies": ["error", {
  "devDependencies": [
    "spec/**",
  ]
}],
"comma-dangle": ["error", "never"]

The no-extraneous-dependencies rule is specifically ignored for unit test files so that particular Chai expect tests can be used. The comma-dangle rule is ignored as it annoys me.

Note that the configuration in the repository runs for the Atom text editor. Sublime Text users may need to edit the "extends" line in .eslintrc.js to the below snippet in order to properly utilize the linting rules:

"extends": "./node_modules/eslint-config-airbnb-base/index.js"