Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-config-wiredrive-node-config

sudhanne68ISC1.1.16

ESLINT configuration for Wiredrive nodeJS projects

eslint, eslintconfig

readme

ESLINT Shareable Configuration for Wiredrive Node.js Projects

Overview

This repo contains a shareable ESLINT linter configuration file that can be ingested by ESLINT into any Node.js project. It is a collection of rules that the Wiredrive development team has standardized on to enable consistency across all of our projects and minimize the risk of simple coding errors getting to production.

Installation

When setting up a new project, please follow the following steps carefully to add automatic linter support.

  • Install the shareable ESLINT configuration as a dev-only dependency.

    npm install eslint-config-wiredrive-node-config --save-dev

  • Install ESLINT as a a dev-only dependency.

    npm install eslint --save-dev

  • Create local ESLINT configuration and ignore files at the root of your project.

    touch .eslintrc.json

    touch .eslintignore

    Add the following code to each file:

.eslintrc.json

{
    "env": {
        "es6": true,
        "node": true
    },
    "extends": [
        "eslint:recommended",
        "eslint-config-wiredrive-node-config"
    ]
}

.eslintignore

# Ignore test files
test/*
  • Add/commit both files to your GIT branch.

  • Automatically run linting before test execution by adding the following scripts to your packages.json file:

packages.json

  "scripts": {
    "lint": "./node_modules/.bin/eslint .",
    "pretest": "npm run lint"
  }