Standardized Splunk ESLint configuration
npm install @splunk/eslint-configThis 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 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.
Add the appropriate entry to your eslint configuration:
`js`
{
extends: "@splunk/eslint-config/browser"
}`
Orjs`
{
extends: "@splunk/eslint-config/browser-prettier"
}`
Orjs`
{
extends: "@splunk/eslint-config/node"
}`
Orjs``
{
extends: "@splunk/eslint-config/node-prettier"
}