eslint-config-figo

2.0.0 • Public • Published

eslint-config-figo

Shareable ESLint configuration module for figo ecosystem.

This package provides Figo teams base JS .eslintrc.js as an extensible shared config. Based on Airbnb's base config

Usage

Our default export contains all of our ESLint rules, including ECMAScript 6.

  1. add eslint-config-figo to your dev dependencies
    npm i --save-dev eslint-config-figo
  2. extend it in your .eslintrc.js file fully:
    {
       "extends": "figo",
       "root": true
    }
    
    or partially:
    {
        "extends": "figo/test"
    }
    
    Please note, .eslintrc configuration file format is deprecated.

See Airbnb's overarching ESLint config, Airbnb's Javascript styleguide, and the ESlint config docs for more information.

Running

You can simply run it with $(npm bin)/eslint {file|folder to validate}

Or add it to your package.json script section

  "scripts": {
    "lint": "$(npm bin)/eslint ./app/"
  }

and then run npm run lint

Precommit validation

In case if you need to do linting on pre-commit git hook, it possible to use provided figo-lint helper to lint staged files.

Example of npm script:

  "scripts": {
    "precommit": "$(npm bin)/figo-lint"
  }

Dependencies (5)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i eslint-config-figo

    Weekly Downloads

    1

    Version

    2.0.0

    License

    ISC

    Last publish

    Collaborators

    • itereshchenkov