@evermind/eslint-config-base
Base eslint rules that we use at Evermind Digital
Last updated 5 months ago by mulholio .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @evermind/eslint-config-base 
SYNC missed versions from official npm registry.

js

  • This is the base set of eslint rules (and, consequently, style) for JavaScript at Evermind.
  • Inspired by the many great style-guides out there, but particularly Zeit's and Airbnb's.

Principles (in priority order)

  • Safe
  • Readible
  • Consistent
  • Clean
  • Brief
  • Easy

Uses

  • eslint -> For syntax and code issues, as well as some stylistic linting
  • husky -> Manage githooks
  • lint-staged -> Use with husky for automatic linting on git commit

Notes

  • This is a work in progress and should be thought of as organic, rather than static. It is as much a tool to decide what the style should be as it is an enforcement and declaration of that style.
  • If something should never be in your code, it is an error, regardless of the severity of the issue.
  • If something probably shouldn't be in your code, but might just require extra oversight from the programmer, the rule should produce a warning. The programmer should then insert a comment to remove the error, or adjust the code accordingly. See the eslint docs for details.
  • You should add rules here where possible, not in individual projects.

Usage

Git Hooks

  • This packagage assumes you are using githooks to run linting (hence the fact that husky and elint-staged are dependencies, although they do not technically need to be implemented).
  • If you add to your package.json as specified above, you'll have automatic linting taken care of for you on each commit, for the files you are commiting only.

Flow

  • If you have flow installed, you will also need to run yarn add --dev eslint-plugin-flowtype.
  • You will then need to add the following to your .eslintrc.js:
    {
      'extends': [
        'plugin:flowtype/recommended',  
      ],
      'plugins': [
        'flowtype', 
      ],
    }
    
  • You may also want to add some githooks for extra flow checking by adding flow --write to lint-staged in your package.json.

React

  • If you are using react, you will also need to run yarn add --dev eslint-plugin-react
  • Then add the following to your .eslnitrc.js:
    {
      'extends': [
        'plugin:react/recommended',  
      ],
      'plugins': [
        'react',
      ],
    }
    

Updating

  1. Make appropriate changes in repo
  • Ensure stylistic changes (i.e. overwrites of Prettier) go in styleRules.js.
  1. npm version <update_type> (where update type is one of patch, minor, or major)
  2. npm publish

Current Tags

  • 2.4.6                                ...           latest (5 months ago)

60 Versions

  • 2.4.6                                ...           5 months ago
  • 2.4.5                                ...           5 months ago
  • 2.4.4                                ...           6 months ago
  • 2.4.3                                ...           6 months ago
  • 2.4.2                                ...           6 months ago
  • 2.4.1                                ...           6 months ago
  • 2.4.0                                ...           6 months ago
  • 2.3.2                                ...           6 months ago
  • 2.3.1                                ...           6 months ago
  • 2.3.0                                ...           6 months ago
  • 2.2.7                                ...           6 months ago
  • 2.2.6                                ...           6 months ago
  • 2.2.5                                ...           6 months ago
  • 2.2.4                                ...           6 months ago
  • 2.2.3                                ...           6 months ago
  • 2.2.2                                ...           6 months ago
  • 2.2.1                                ...           6 months ago
  • 2.2.0                                ...           6 months ago
  • 2.1.6                                ...           6 months ago
  • 2.1.5                                ...           6 months ago
  • 2.1.4                                ...           6 months ago
  • 2.1.3                                ...           6 months ago
  • 2.1.2                                ...           6 months ago
  • 2.1.1                                ...           6 months ago
  • 2.1.0                                ...           6 months ago
  • 2.0.0                                ...           7 months ago
  • 1.13.1                                ...           7 months ago
  • 1.13.0                                ...           7 months ago
  • 1.12.0                                ...           7 months ago
  • 1.11.4                                ...           9 months ago
  • 1.11.3                                ...           9 months ago
  • 1.11.2                                ...           9 months ago
  • 1.11.1                                ...           10 months ago
  • 1.11.0                                ...           10 months ago
  • 1.10.0                                ...           10 months ago
  • 1.9.0                                ...           a year ago
  • 1.7.1                                ...           a year ago
  • 1.7.0                                ...           a year ago
  • 1.6.3                                ...           a year ago
  • 1.6.2                                ...           a year ago
  • 1.6.1                                ...           a year ago
  • 1.6.0                                ...           a year ago
  • 1.5.0                                ...           a year ago
  • 1.4.6                                ...           a year ago
  • 1.4.5                                ...           a year ago
  • 1.4.4                                ...           a year ago
  • 1.4.3                                ...           a year ago
  • 1.4.2                                ...           a year ago
  • 1.4.1                                ...           a year ago
  • 1.4.0                                ...           a year ago
  • 1.3.4                                ...           a year ago
  • 1.3.3                                ...           a year ago
  • 1.3.2                                ...           a year ago
  • 1.3.1                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.2                                ...           a year ago
  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 60
Dependencies (7)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |