ZEIT's ESLint configuration preset
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig add .editorconfig Nov 15, 2017
init.js use zeit-eslint wrapper in lieu of eslint Mar 21, 2018
package.json 0.3.0 Jun 18, 2018
zeit-eslint.sh add zeit-eslint command (closes #8) Mar 21, 2018



A Node.js ESLint configuration for ZEIT source code.


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

$ yarn add --dev eslint @zeit/eslint-config-zeit

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

$ yarn add --dev @zeit/git-hooks

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

$ yarn 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.

$ yarn 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.

$ yarn 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.

$ curl -LOJ editorconfig.zeit.sh