@fastly/eslint-config
Installation
npm install --save-dev \
@fastly/eslint-config@^1.0.0 \
@fastly/prettier-config@^1.0.0 \
eslint-plugin-ember@^5.0.0 \
eslint-config-prettier@^2.9.0 \
eslint-plugin-prettier@^2.4.0 \
eslint@^4.12.1 \
prettier@^1.9.2
Currently, @fastly/eslint-config
declares several peerDependencies
because eslint's module-loader is incapable of finding transitive dependencies. See eslint/eslint#3458. When eslint supports transitive plugins, @fastly/eslint-config
can declare true dependencies so consuming projects can install just a single package.
eslint-plugin-ember
is optional. Ember projects should install it. Other projects should not. @fastly/eslint-config
will automatically extend eslint-plugin-ember
if it's installed.
Configuration
The simplest configuration is to accept the Fastly defaults:
extends: ['@fastly'],
This includes
If you want to extend other configurations as well, we recommend extending @fastly
last so it wins:
extends: ['airbnb-base', '@fastly'],
And of course, you can always override the Fastly defaults:
extends: ['@fastly'],
rules: {
'no-empty': 0
}
Use with Prettier
This library automatically includes @fastly/prettier-config
as eslint rules, so running eslint
will validate against that configuration. See the @fastly/prettier-config
docs for information about setting up a prettier.config.js
in your project to work with tools like editor plugins.