Skip to content
This repository has been archived by the owner. It is now read-only.

blainsmith/metalsmith-xo

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 

metalsmith-xo

An XO plugin for Metalsmith that uses metalsmith-elint and eslint-config-xo underneath for a minimal config linter.

Installation

npm install --save metalsmith-xo

Getting Started

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

Usage

var xo = require('metalsmith-xo');

metalsmith
  .use(xo());

Configuration

Enable ES2015+ features

metalsmith.use(xo('esnext'));

Enable browser features

metalsmith.use(xo('browser'));

Custom metalsmith-eslint config

By default it will lint all .js files except for files in vendor, bower_components, and node_modules. If you wish to override these paths you can by specifying them below.

var config = {
	src: ['**/*.js','!ignore-this-folder/**/*.js']
}
metalsmith.use(xo('browser', config));

You can pass esnext or browser to the function to turn on the rules you need. However, esnext requires some extra modules that you can read over there.

About

Metalsmith XO plugin

Resources

Stars

Watchers

Forks

Packages

No packages published