lib/component-hint.js
function ComponentHint(options) {
	// Make this an event emitter
	EventEmitter.call(this);

	// List of all components that have been checked, we keep this list so that the same components
	// are not checked twice.
	this.lintedComponents = [];

	// Object holding all external dependencies and their versions
	this.dependencyVersions = {};

	// Set linting options from given options or defaults
	options = options || {};
	this.depPaths = options.depPaths || [];
	this.lookupPaths = options.lookupPaths || [];
	this.recursive = options.recursive || false;
	this.verbose = options.verbose || false;
	this.quiet = options.quiet || false;
	this.silent = options.silent || false;
	this.ignorePaths = options.ignorePaths || [];
	this.warnPaths = options.warnPaths || [];

	// Inject default dep path if it exists
	if (!this.depPaths.length && fs.existsSync('./components')) {
		this.depPaths.push('./components');
	}

	// Keep a count of total errors and warnings
	this.totalErrors = 0;
	this.on('lint.error', function () {
		this.totalErrors += 1;
	});

	this.totalWarnings = 0;
	this.on('lint.warning', function () {
		this.totalWarnings += 1;
	});
}
function ComponentHint(options) {
	// Make this an event emitter
	EventEmitter.call(this);

	// List of all components that have been checked, we keep this list so that the same components
	// are not checked twice.
	this.lintedComponents = [];

	// Object holding all external dependencies and their versions
	this.dependencyVersions = {};

	// Set linting options from given options or defaults
	options = options || {};
	this.depPaths = options.depPaths || [];
	this.lookupPaths = options.lookupPaths || [];
	this.recursive = options.recursive || false;
	this.verbose = options.verbose || false;
	this.quiet = options.quiet || false;
	this.silent = options.silent || false;
	this.ignorePaths = options.ignorePaths || [];
	this.warnPaths = options.warnPaths || [];

	// Inject default dep path if it exists
	if (!this.depPaths.length && fs.existsSync('./components')) {
		this.depPaths.push('./components');
	}

	// Keep a count of total errors and warnings
	this.totalErrors = 0;
	this.on('lint.error', function () {
		this.totalErrors += 1;
	});

	this.totalWarnings = 0;
	this.on('lint.warning', function () {
		this.totalWarnings += 1;
	});
}
function ComponentHint ( options ) { // Make this an event emitter EventEmitter . call ( this ) ; // List of all components that have been checked, we keep this list so that the same components // are not checked twice. this . lintedComponents = [ ] ; // Object holding all external dependencies and their versions this . dependencyVersions = { } ; // Set linting options from given options or defaults options = options || { } ; this . depPaths = options . depPaths || [ ] ; this . lookupPaths = options . lookupPaths || [ ] ; this . recursive = options . recursive || false ; this . verbose = options . verbose || false ; this . quiet = options . quiet || false ; this . silent = options . silent || false ; this . ignorePaths = options . ignorePaths || [ ] ; this . warnPaths = options . warnPaths || [ ] ; // Inject default dep path if it exists if ( ! this . depPaths . length && fs . existsSync ( './components' ) ) { this . depPaths . push ( './components' ) ; } // Keep a count of total errors and warnings this . totalErrors = 0 ; this . on ( 'lint.error' , function ( ) { this . totalErrors += 1 ; } ) ; this . totalWarnings = 0 ; this . on ( 'lint.warning' , function ( ) { this . totalWarnings += 1 ; } ) ; }
Component Hint event emitter object.

@param {Object} options
@returns {ComponentHint}
Component Hint event emitter object .