Socket
Book a DemoInstallSign in
Socket

eslint-config-ticketfly-base

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-ticketfly-base

Ticketfly's base ESLint configuration for JavaScript applications

latest
Source
npmnpm
Version
2.1.0
Version published
Maintainers
1
Created
Source

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

Keywords

eslint

FAQs

Package last updated on 22 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts