# User Guide

# 💿 Installation

Via npm:

npm install --save-dev eslint eslint-plugin-d3

Via yarn:

yarn add -D eslint eslint-plugin-d3

Requirements

  • ESLint v5.4 and above
  • Node.js v10.16.3 and above

# 📖 Usage

# Configuration

Use .eslintrc.* file to configure rules. See also: https://eslint.org/docs/user-guide/configuring.

Example .eslintrc.js:

module.exports = {
  extends: [
    // add more generic rulesets here, such as:
    // 'eslint:recommended',
    'plugin:d3/recommended'
  ],
  rules: {
    // override/add rules settings here, such as:
    // 'd3/no-pie': 'error'
  }
}

# Running ESLint from command line

If you want to run eslint from command line, make sure you include the .d3 extension using the --ext option or a glob pattern because ESLint targets only .js files by default.

Examples:

eslint --ext .js,.d3 src
eslint "src/**/*.{js,d3}"