eslint-config-kgryte v1.0.1
ESLint Config
This ESLint config follows the style guide documented here.
Installation
$ npm install eslint-config-kgryteUsage
Config
To extend the configuration in an .eslintrc file,
{
'extends': 'kgryte'
}where kgryte is a shorthand for eslint-config-kgryte. To override configuration settings, add them directly to the .eslintrc file.
{
'extends': 'kgryte',
'rules': {
'semi': [ 2, 'never' ]
}
}Module
To use the configuration as a Node module,
var config = require( 'eslint-config-kgryte' );Any modifications can be subsequently published to NPM as a new shareable config.
config
console.dir( config );
/*
{
'env': {...},
'rules': {...},
'ecmaFeatures': {...}
}
*/Examples
var merge = require( 'utils-merge2' )(),
config = require( 'eslint-config-kgryte' );
// Override configuration settings...
merge( config.rules, {
'semi': [ 2, 'never' ]
});
console.dir( config );To run the example code from the top-level application directory,
$ node ./examples/index.jsTests
Unit
Unit tests use the Mocha test framework with Chai assertions. To run the tests, execute the following command in the top-level application directory:
$ make testAll new feature development should have corresponding unit tests to validate correct functionality.
Test Coverage
This repository uses Istanbul as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:
$ make test-covIstanbul creates a ./reports/coverage directory. To access an HTML version of the report,
$ make view-covLicense
Copyright
Copyright © 2015. Athan Reines.