metalsmith-eslint
Metalsmith eslint plugin
Last updated a year ago by ubenzer .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install metalsmith-eslint 
SYNC missed versions from official npm registry.

metalsmith-eslint

Gitter Travis David David Codecov npm npm

An Eslint plugin for Metalsmith.

Installation

npm install --save metalsmith-eslint

Getting Started

If you haven't checked out Metalsmith before, head over to their website and check out the documentation.

Usage

var eslint = require("metalsmith-elint");

metalsmith
  .use(eslint({
    src: ["**/*.js", "!**/vendor/**/*.js"],
    formatter: "unix",
    eslintConfig: JSON.parse(fs.readFileSync(path.join(process.cwd(), ".eslintrc"), "utf8"))
  }))

Options

You can check the tests out to see some usage examples.

src

A multimatch expression that can be used to limit the files that will be eslinted. Default is ["**/*.js"]

formatter

One of the formatter name that is integrated to eslint. See the list here. Default is stylish.

eslintConfig

A valid eslint config that will be passed to eslint. You can also read an .eslintrc file and pass the contents to this key directly. Default none, a configuration is required

To read .eslintrc you can use the following: JSON.parse(fs.readFileSync(path.join(process.cwd(), ".eslintrc"), "utf8"))

Contributing

Just open an issue or prepare a pull request.

Current Tags

  • 4.0.0                                ...           latest (a year ago)

18 Versions

  • 4.0.0                                ...           a year ago
  • 3.1.5                                ...           3 years ago
  • 3.1.4                                ...           3 years ago
  • 3.1.3                                ...           4 years ago
  • 3.1.2                                ...           4 years ago
  • 3.1.1                                ...           4 years ago
  • 3.1.0                                ...           4 years ago
  • 3.0.3                                ...           4 years ago
  • 3.0.2                                ...           4 years ago
  • 3.0.1                                ...           4 years ago
  • 3.0.0                                ...           4 years ago
  • 2.5.4                                ...           4 years ago
  • 2.5.3                                ...           4 years ago
  • 0.0.5                                ...           4 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (6)
Dev Dependencies (6)

Copyright 2014 - 2016 © taobao.org |