How to use lintspaces - 2 common examples

To help you get started, we’ve selected a few lintspaces examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github schorfES / grunt-lintspaces / tests / test_newlines.js View on Github external
var
	MESSAGES = require('lintspaces').MESSAGES,
	path = require('path'),
	exec = require('child_process').exec,
	execOptions = {
		cwd: path.join(__dirname, '..')
	}
;

exports.tests = {
	newlines_okay: function(test) {
		test.expect(1);
		exec('grunt lintspaces:newline_okay', execOptions, function(error, stdout) {
			test.equal(
				stdout.indexOf('lint free.') > -1,
				true,
				'newlines are fine.'
			);
github schorfES / grunt-lintspaces / tests / test_newlines.js View on Github external
exec('grunt lintspaces:newlines_amount_invalid', execOptions, function(error, stdout) {
			var message = MESSAGES.NEWLINE_MAXIMUM_INVALIDVALUE.message.replace('{a}', '0');
			test.equal(stdout.indexOf(message) > -1, true,
				'A failure log message should appear when maximum newlines amount is less then 1.'
			);
			test.done();
		});
	}

lintspaces

Library for checking spaces in files

MIT
Latest version published 2 months ago

Package Health Score

76 / 100
Full package analysis