eslint-config-madecomfy
ES Lint configs for MadeComfy
Last updated 2 months ago by raurir .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eslint-config-madecomfy 
SYNC missed versions from official npm registry.

ESLint config for MadeComfy

About

In the interest of DRY and Code formatting we want to define one format across all our applications

Installation

Assumes you have a working node project (ie, package.json exists) with code in ./src/

install module:

yarn add eslint-config-madecomfy --dev

create eslintrc:

touch .eslintrc

populate .eslintrc with:

{
    "extends": [
      "madecomfy"
    ]
}

add lint execution script to package.json:

  ...
  "scripts": {
    "build": "webpack",
    "lint": "eslint src"
  },
  ...

Linting

yarn lint

Lint staged files before committing

The following steps will prevent badly formatted code from being pushed to remote.

install modules:

yarn add husky lint-staged --dev

add precommit hook to package.json:

  ...
  "scripts": {
    "build": "webpack",
    "lint": "eslint src",
    "precommit": "lint-staged"
  },
  "lint-staged": {
    "src/**/*.{js,jsx}": [
      "eslint --fix",
      "git add"
    ]
  }
  ...

Current Tags

  • 1.0.7                                ...           latest (2 months ago)

8 Versions

  • 1.0.7                                ...           2 months ago
  • 1.0.6                                ...           9 months ago
  • 1.0.5                                ...           10 months ago
  • 1.0.4                                ...           10 months ago
  • 1.0.3                                ...           10 months ago
  • 1.0.2                                ...           10 months ago
  • 1.0.1                                ...           10 months ago
  • 1.0.0                                ...           10 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 8
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |