eslint-config-ticketfly-base v2.1.0
Ticketfly's ESLint Base Configuration
Ticketfly's base ESLint configuration for JavaScript projects.
Installation
You can install ESLint using npm:
npm install eslint --save-dev
*Note that if your build process includes using a tool that runs ESLint
(for example, Ember CLI ESLint),
installing eslint
directly might not be necessary.
Next, install this configuration:
npm install eslint-config-ticketfly-base --save-dev
Usage
You'll need to configure the way that you extend from eslint-config-ticketfly-base
inside of your .eslintrc.js
file.
The most straightforward approach involves extending the root project name:
{
extends: 'ticketfly-base', // shorthand for 'eslint-config-ticketfly-base'
rules: {
// Additional, per-project rules...
}
}
This will provide the configuration files composed in lib/base.js
(which, first and foremost, extend from eslint:recommended
).
In most cases, however, you'll likely want to extend from our "recommended" setup, which is optimized for modern browser environments:
{
extends: 'ticketfly-base/lib/recommended', // shorthand for 'eslint-config-ticketfly-base'
rules: {
// Additional, per-project rules...
}
}
If you want to be more selective, however, you can always compose individual files yourself:
{
extends: [
'eslint:recommended'
'eslint-config-ticketfly-base/rules/best-practices',
'eslint-config-ticketfly-base/rules/possible-errors',
'eslint-config-ticketfly-base/rules/nodejs-and-commonjs'
].map(require.resolve),
rules: {
// Additional, per-project rules...
}
}