This is our configuration file for ESLint, the pluggable JS linter. It's based on eslint-config-airbnb, and a bit of a moveable feast for now until we get settled. We use it as a reference for when we're setting up new projects and machines, but by all means feel free to use in your own projects or make suggestions!
Whilst we use ESLint for automatic hinting inside WebStorm, our IDE of choice, it can be used on the command line: have a look at their User Guide for more details. If you're using WebStorm like us, have a look at the JetBrains manpage, which explains how it all works inside WebStorm. Once you're comfortable, perform the following steps to install this .eslintrc
for your project:
- Require the base ESLint library (
npm install --save eslint
) - Install everything that Airbnb's eslint-config-airbnb requires (
npm install --save-dev eslint-config-airbnb eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y eslint
) - Create a new file called .eslintrc in the base of your project using your favourite text editor (not getting into a holy war here): (
vi .eslintrc
) - Copy & paste the contents of our
.eslintrc
into your.eslintrc.
, and watch the magic unfold.
If you have questions on ESLint, we're probably not the best people to ask, but we're more than happy to see how we can help (or put you in touch with someone who's better placed to solve your issue): send an email to [email protected]. Alternatively, if you have an issue or want to file an improvement, head over to the Issues page.