eslint-config-kgryte

1.0.1 • Public • Published

ESLint Config

NPM version Build Status Coverage Status Dependencies

ESLint shareable config.

This ESLint config follows the style guide documented here.

Installation

$ npm install eslint-config-kgryte

Usage

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

ESLint shareable 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.js

Tests

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 test

All 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-cov

Istanbul creates a ./reports/coverage directory. To access an HTML version of the report,

$ make view-cov

License

MIT license.

Copyright

Copyright © 2015. Athan Reines.

Package Sidebar

Install

npm i eslint-config-kgryte

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • kgryte