eslint-config-wiredrive-node-config

1.1.16 • Public • Published

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"
  }

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.16
    6
    • latest

Version History

Package Sidebar

Install

npm i eslint-config-wiredrive-node-config

Weekly Downloads

6

Version

1.1.16

License

ISC

Last publish

Collaborators

  • sudhanne