zeit/eslint-config-base

Name: eslint-config-base

Owner: ZEIT

Description: ZEIT's ESLint configuration preset

Created: 2017-11-13 23:13:57.0

Updated: 2018-05-22 14:22:15.0

Pushed: 2018-05-23 20:46:51.0

Homepage: null

Size: 57

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

@zeit/eslint-config-zeit

A Node.js ESLint configuration for ZEIT source code.

Usage

Add this package to your project as a dev-dependency:

rn add --dev eslint @zeit/eslint-config-zeit

Optionally add @zeit/git-hooks if you want to auto-lint upon committing:

rn add --dev @zeit/git-hooks

If you want to use Flow, you must install the following plugins:

rn add --dev babel-eslint eslint-plugin-flowtype

Then initialize the linter. Note that any optional stuff (git hooks, flowtype, etc.) need to be present before running this script.

rn zeit-lint-init

In the event you need to re-run the configuration (e.g. you forgot one of the optional packages), you can use --force to re-run the configuration process.

The caveats to this are that any after-the-fact manual changes to eslintConfig will be overwritten, and any optional dependency configurations (git hooks, etc.) that were removed since the first time zeit-lint-init was run will remain in package.json and need to be manually cleaned up.

rn zeit-lint-init --force

It is also recommended to add an .editorconfig file to your project to make GitHub display the code a little neater as well as help team members in correctly formatting their code to pass lint checks.

rl -LOJ editorconfig.zeit.sh

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.