eslint-config-crowdlab
ESLint configuration used by CrowdLab
Currently based on
eslint-config-airbnb
with some additions:
Supports the following:
- Jest
- Mocha (for webdriverio E2E tests)
- webdriverio
- ES6
- CommonJS
- Browser
- Node
- JSDoc
JSDoc rules
The following rules are used for setting types for @param
and @returns
:
Wrong | Preferred |
---|
Boolean | boolean |
Number | number |
String | string |
array | Array |
function | Function |
object | Object |
promise | Promise |
Usage in CrowdLab UI
You don't need to install this separately in CrowdLab UI projects.
Usage Outside of CrowdLab UI
If you want to use this package outside of the CrowdLab UI project, you can
install and use it with the following steps.
Install
In order to install all peer dependencies, we need to run the following:
yarn add -D eslint-config-crowdlab
Usage
Create a file named .eslintrc.js
with following contents in the root folder of your project:
{
extends: 'crowdlab',
rules: {
}
}
That's it! You can override the settings from eslint-config-crowdlab
by editing the .eslintrc.js
file. Learn more about configuring ESLint on the ESLint website.