Write prettier JavaScript
uber-eslint is a collection of eslint configs for web JavaScript at Uber.
Install eslint either locally or globally.
npm install --save-dev eslintNow that you have eslint installed, you can extend one or multiple of the eslint configs contained.
There are three configs contained in this repo:
Let's install eslint-config-uber-es2015 as an example. If you installed eslint locally, you should install the eslint config(s) of choice locally too. Otherwise, install the eslint config(s) globally.
npm install --save-dev eslint-config-uber-es5Initialize a .eslintrc file or append to an existing one.
Note: you can also configure eslint with other types of config files
{
"rules": {},
"extends": []
}Assuming you are writing es2015 jsx, you'd enable it like so:
{
"rules": {},
"extends": [
"eslint-config-uber-es2015",
"eslint-config-uber-jsx"
]
}You can also mix these with external eslint configs.
===
See eslint docs for more information.