eslint-config-distributed-lab

    1.3.0 • Public • Published

    Overview

    This is a shared eslint config based on JS standard code style.

    How to add it to your project

    1. Add dev dependencies

      npm i -D eslint eslint-config-distributed-lab eslint-plugin-chai-friendly eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-standard eslint-config-standard babel-eslint

      Additional plugins for Vue.js:

      npm i -D eslint-plugin-vue@next
    2. Add eslintrc.js config to root of your project

      module.exports = {
          extends: 'distributed-lab',
          parserOptions: {},
          env: {},
          plugins: [],
          rules: {}
      }

      Available configurations:

      • distributed-lab - basic config
      • distributed-lab/node - for node.js packages and servers
      • distributed-lab/vue - for Vue.js apps
    3. Add the npm script to your package.json.

      For node.js:

      {
          // ...
          "scripts": {
              //...
              "lint": "eslint src --cache --fix"
          }
      }

      For Vue.js:

          {
          // ...
          "scripts": {
              //...
              "lint": "eslint '{src,specs}/**/*.{js,vue}' --fix"
              // src and specs are directories that you want to lint
          }
      }
    4. Run the linter

      npm run lint

    Keywords

    Install

    npm i eslint-config-distributed-lab

    DownloadsWeekly Downloads

    880

    Version

    1.3.0

    License

    MIT

    Unpacked Size

    6.21 kB

    Total Files

    5

    Last publish

    Collaborators

    • ihor.diachenko