eslint-plugin-iqvia

0.0.22 • Public • Published

eslint-plugin-iqvia

This package includes the shareable ESLint configuration used by IQVIA.

Usage in Projects

  1. Install this package and ESLint:

    yarn add --dev eslint-plugin-iqvia eslint@4.19.1
  2. Either add the following line to your package.json file:

    "eslintConfig": {
      "extends": [
        "eslint:recommended",
        "plugin:iqvia/recommended"
      ]
    }

    Or, add a .eslintrc.js file instead:

    module.exports = {
      extends: [
        "eslint:recommended",
        "plugin:iqvia/recommended",
      ],
    };
  3. Enable running from the command line by adding these scripts to package.json:

    "scripts": {
      ...
      "linter": "eslint --max-warnings 0",
      "lint": "yarn linter . --ignore-pattern '!.*'"
    },

    usage:

    $ yarn lint
  4. Enable linting on every commit by adding a commit hook:

    Install husky and lint-staged:

    yarn add --dev husky@0.14.3 lint-staged@6.0.0

    Then add the following to package.json:

    "scripts": {
      ...
      "precommit": "lint-staged"
    },
    "lint-staged": {
      "./*.js": "lint"
    },

That's it! Learn more about configuring ESLint on the ESLint website.

Extends:

Rules:

Package Sidebar

Install

npm i eslint-plugin-iqvia

Weekly Downloads

345

Version

0.0.22

License

MIT

Unpacked Size

72.4 kB

Total Files

8

Last publish

Collaborators

  • eslint-plugin-iqvia-ci
  • iqvia-shared-ci
  • tpeek