eslint-config-iamturns
ESLint rules for my projects.
Combination of Airbnb JavaScript Style Guide for linting, and Prettier for automatic code formatting.
Supports modern JavaScript: es2018, modules, jsx, jest, etc.
Table of Contents
Installation
Install eslint-config-iamturns
and required peer dependencies:
npx install-peerdeps --dev eslint-config-iamturns
Within your ESLint config file:
module.exports = {
extends: ["iamturns"],
rules: {},
}
See generator-iamturns-js for example setup.
Prettier
This project assumes you are using Prettier, which automatically handles most of the style-based linting rules.
Plugins
The following ESLint plugins may also be installed. They will be automatically detected and configured for you.
FAQ
Why do I need to install ESLint plugins myself?
ESLint only loads plugins relative to your project (see eslint/eslint#10643). Unfortunately this means you must install all ESLint plugins as dependencies within your project.
I do not require all the enabled features (es2018, jest, etc)
Many ESLint features have been enabled to reduce the need for any additional configuration within projects extending this ESLint config.
This may come at a very small speed penalty. If this becomes a problem, you can disable the features within eslintrc.js
.
Why use Prettier? Why not just use ESLint alone?
- ESLint will complain your line is too long, but Prettier will format your code and fix it.
- Prettier will automatically format other files too (CSS, SCS, Markdown, JSON, YAML, etc).
Roadmap
Contributing
See CONTRIBUTING.md.
Maintaining
See MAINTAINING.md.
Author
Matt Turnbull <matt@iamturns.com>
License
Open source software licensed as MIT.