Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-config-ticketfly-base

Ticketfly4MIT2.1.0

Ticketfly's base ESLint configuration for JavaScript applications

eslint, eslintconfig, config, ticketfly, javascript, styleguide, code, quality, style, lint, linter

readme

Ticketfly's ESLint Base Configuration

NPM version

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...
    }
}

changelog

2.1.0 — March, 21 2017

  • [ENHANCEMENT] Disallow reassigning function parameters (#8)

2.0.0 — January, 16 2017

  • [BREAKING CHANGE] Turn off no-inline-comments rule (#9)

1.2.0 — December 21, 2016

  • [NEW] More-refined rules for quotes (#5)
  • [ENHANCEMENT] Allow trailing spaces on empty lines (#6)
  • [NEW] Define rules around proper comment syntax (#7)

1.1.0 — December 5, 2016

  • [NEW] Disallow Array constructors (#2)
  • [NEW] Require an empty line after variable declarations (#3)
  • [NEW] Require semicolons at the end of statements (#4)

1.0.0 — November 6, 2016

  • Release 1.0 with initial rules defined.

0.0.0 — October 28, 2016

  • Initial project structure (no rules defined yet)