Linting JS projects is complicated.
Last updated a year ago by critocrito .
GPL-3.0 · Repository · Original npm · Tarball · package.json
$ cnpm install @build-chores/eslint-config-lint 
SYNC missed versions from official npm registry.


Linting JS projects is complicated.


License: GPL v3 npm version Build Status

Lint your JavaScript code. This config is based on Airbnb's base lint configuration and includes support for Prettier, the Flow type checker and promises.


Install the @build-chores/eslint-config-lint package into your project:

yarn install --dev @build-chores/eslint-config-lint

Create a .eslintrc file containing the following snippet. See the example .eslintrc for a template.

  "extends": ["@build-chores/lint"]

To use flow as well place a .flowconfig and .flowcoverage configuration file. See the example flowconfig and the example .flowcoverage for templates.

Note that even if flow isn't use an empty .flowconfig file has to be created.

This package installs flow-typed to install flow type definitions. To make it work in this setup the flow-libdefs wrapper script is provided. It takes the same arguments as flow-typed.

The following command installs type definitions for your dependencies.

yarn flow-libdefs install

Edit your package.json to include the following scripts. See the example package.json for a template.

  "scripts": {
    "fix": "yarn lint --fix",
    "flow:coverage": "yarn flow-coverage-report --config ./.flowcoverage",
    "flow:gen": "gen-flow-files --out-dir dist src",
    "flow:libdefs": "yarn flow-libdefs update",
    "lint": "eslint src/**/*.js**"

Types are checked during the regular linting. If you want to run Flow separated, you can call the flow command directly with yarn flow.

See the rules file for details of the ESLint configuration.

You are ready to lint your JavaScript code.


Check out our contributing.md to get started.


Current Tags

  • 0.9.0                                ...           latest (a year ago)

6 Versions

  • 0.9.0                                ...           a year ago
  • 0.8.0                                ...           a year ago
  • 0.7.0                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
Maintainers (1)
Today 6
This Week 6
This Month 6
Last Day 0
Last Week 0
Last Month 6
Dev Dependencies (0)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |