eslint-config-digitalbazaar
Digital Bazaar's eslint rules
Last updated 2 months ago by davidlehn .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eslint-config-digitalbazaar 
SYNC missed versions from official npm registry.

eslint-config-digitalbazaar

This package provides eslint rules used by Digital Bazaar as a set of extendable shared configs.

There are 3 rule sets:

  1. eslint-config-digitalbazaar - Base rules for both node and the browser.
  2. eslint-config-digitalbazaar/vue - Rules for Vue projects and browser only.
  3. eslint-config-digitalbazaar/jsdoc - Rules for JSDoc for both node and the browser.

Installation

If you do not have eslint installed:

npm i -D eslint
npm i -D eslint-config-digitalbazaar

To start an eslint config file (choose .eslintrc.js):

npx eslint --init

or rename a template from the templates dir

cp node_modules/eslint-config-digitalbazaar/templates/node.js ./.eslintrc.js

Usage

All rules can be accessed via the shorthand digitalbazaar or using the full module name eslint-config-digitalbazaar.

Eslint's documentation on shareable configs can be found here.

Example .eslintrc.js root setup:

module.exports = {
  root: true,
  extends: ['eslint-config-digitalbazaar'] // using full module name
}

To use the Vue rules you will need to install the vue-eslint-plugin

npm i -D eslint-plugin-vue

Example .eslintrc.js Vue setup:

module.exports = {
  extends: ['digitalbazaar/vue'] // only the vue rules and any rules in parent dirs
}

To use the JSDoc rules you will need to install the eslint-plugin-jsdoc

npm i -D eslint-plugin-jsdoc

Example .eslintrc.js JSDoc setup:

module.exports = {
  extends: ['digitalbazaar/jsdoc'] // only the JSDoc rules and any rules in parent dirs
}

The rules do not depend on each other and are composable:

module.exports = {
  extends: [
    'digitalbazaar',
    'digitalbazaar/vue',
    'digitalbazaar/jsdoc'
  ] // all 3 rule sets in one file using shorthand.
}

The rules can also be used together via cascade configuration.

Current Tags

  • 2.5.0                                ...           latest (2 months ago)

16 Versions

  • 2.5.0                                ...           2 months ago
  • 2.4.0                                ...           2 months ago
  • 2.3.0                                ...           5 months ago
  • 2.2.0                                ...           6 months ago
  • 2.1.0                                ...           6 months ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.8.0                                ...           a year ago
  • 1.7.0                                ...           a year ago
  • 1.6.0                                ...           a year ago
  • 1.5.0                                ...           a year ago
  • 1.4.0                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
Downloads
Today 16
This Week 16
This Month 26
Last Day 0
Last Week 8
Last Month 30
Dependencies (0)
None
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |