5.0.0 • Published 8 months ago

@splunk/eslint-config v5.0.0

Weekly downloads
620
License
Apache-2.0
Repository
-
Last release
8 months ago

@splunk/eslint-config

This package provides extendable ESLint configuration objects. Currently, the following configs are available:

  • browser - For code that runs in the browser.
  • browser-prettier - For browser code that is formatted by prettier.
  • node - For node scripts.
  • node-prettier - For node scripts that are automatically formatted with prettier.

Install

Install the package and its dependencies.

  1. Install the peer dependencies:
    npm install --save-dev babel-eslint@^10 eslint@^8 eslint-config-airbnb@^19 eslint-plugin-import@^2 eslint-plugin-jsx-a11y@^6 eslint-plugin-react@^7 eslint-plugin-react-hooks@^4
  2. Install the package:
    ```
    npm install --save-dev @splunk/eslint-config
    ```
    ESLint requires dependencies to be installed as peer dependencies. See this issue on github for more background.

Usage

Add the appropriate entry to your eslint configuration:

{
    extends: "@splunk/eslint-config/browser"
}

Or

{
    extends: "@splunk/eslint-config/browser-prettier"
}

Or

{
    extends: "@splunk/eslint-config/node"
}

Or

{
    extends: "@splunk/eslint-config/node-prettier"
}