4.0.0 • Published 5 years ago

metalsmith-eslint v4.0.0

Weekly downloads
20
License
MIT
Repository
github
Last release
5 years ago

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.

4.0.0

5 years ago

3.1.5

7 years ago

3.1.4

7 years ago

3.1.3

7 years ago

3.1.2

8 years ago

3.1.1

8 years ago

3.1.0

8 years ago

3.0.3

8 years ago

3.0.2

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.5.4

8 years ago

2.5.3

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago