2.1.0 • Published 6 years ago

@fastly/eslint-config v2.1.0

Weekly downloads
30
License
MIT
Repository
github
Last release
6 years ago

@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:

// my-app/.eslintrc.js
extends: ['@fastly'],

This includes

If you want to extend other configurations as well, we recommend extending @fastly last so it wins:

// my-app/.eslintrc.js
extends: ['airbnb-base', '@fastly'],

And of course, you can always override the Fastly defaults:

// my-app/.eslintrc.js
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.

2.1.0

6 years ago

2.0.0

6 years ago

1.4.3

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago