Skip to content

Commit

Permalink
update all dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
DanPurdy committed Aug 28, 2017
1 parent 1cae42c commit 7a90752
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ helpers.isSnakeCase = function (str) {
* @returns {boolean} Whether str adheres to strict-BEM format
*/
helpers.isStrictBEM = function (str) {
return /^[a-z](\-?[a-z0-9]+)*(__[a-z0-9](\-?[a-z0-9]+)*)?((_[a-z0-9](\-?[a-z0-9]+)*){0,2})?$/.test(str);
return /^[a-z](-?[a-z0-9]+)*(__[a-z0-9](-?[a-z0-9]+)*)?((_[a-z0-9](-?[a-z0-9]+)*){0,2})?$/.test(str);
};

/**
Expand Down
6 changes: 3 additions & 3 deletions lib/rules/no-url-protocols.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ module.exports = {
if (item.is('string')) {
var stripped = helpers.stripQuotes(item.content),
regexSelector = !parser.options['allow-protocol-relative-urls'] ?
isUrlRegex : protocolRelativeRegex,
isUrlRegex : protocolRelativeRegex,
message = !parser.options['allow-protocol-relative-urls'] ?
'Protocols and domains in URLs are disallowed' :
'Protocols in URLS are disallowed';
'Protocols and domains in URLs are disallowed' :
'Protocols in URLS are disallowed';

if (stripped.match(regexSelector)) {
result = helpers.addUnique(result, {
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/space-around-operator.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ var checkSpacing = function (node, i, parent, parser, result) {
}
else {
if (
(previous && (previous.end.line >= previous.start.line) && (previous.end.column > previous.start.column))
(previous && (previous.end.line >= previous.start.line) && (previous.end.column > previous.start.column))
|| (next && (next.end.line >= next.start.line) && (next.end.column > next.start.column))
) {
) {
result = helpers.addUnique(result, {
'ruleId': parser.rule.name,
'line': node.start.line,
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/url-quotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var helpers = require('../helpers');

var isVarRegex = /^[\$]/;
var isVarRegex = /^[$]/;

module.exports = {
'name': 'url-quotes',
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"homepage": "https://github.com/sasstools/sass-lint",
"dependencies": {
"commander": "^2.8.1",
"eslint": "^2.7.0",
"front-matter": "2.1.2",
"fs-extra": "^3.0.1",
"eslint": "^4.5.0",
"front-matter": "^2.2.0",
"fs-extra": "^4.0.1",
"glob": "^7.0.0",
"globule": "^1.0.0",
"gonzales-pe": "^4.1.1",
Expand All @@ -48,6 +48,6 @@
"deep-equal": "^1.0.1",
"istanbul": "^0.4.0",
"mocha": "^3.0.1",
"sinon": "^2.3.2"
"sinon": "^3.2.1"
}
}
16 changes: 8 additions & 8 deletions tests/failures.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ describe('failures', function () {
it('should raise SassLintFailureError if indentation is set to error', function (done) {
assert.throws(
function () {
var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {rules: {indentation: 2}}); // 14 errors
var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {rules: {indentation: 2}}); // 14 errors
lint.failOnError(results); // Set indentation to error
},
exceptions.SassLintFailureError
);
assert.throws(
function () {
var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}, 'tests/yml/.indentation-error.yml'); // 14 errors
var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}, 'tests/yml/.indentation-error.yml'); // 14 errors
lint.failOnError(results); // Set indentation to error
},
exceptions.SassLintFailureError
Expand All @@ -37,14 +37,14 @@ describe('failures', function () {
it('should raise MaxWarningsExceededError if warnings exceed `max-warnings` setting', function (done) {
assert.throws(
function () {
var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}); // 55 warnings
var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}); // 55 warnings
lint.failOnError(results, {options: {'max-warnings': 10}});
},
exceptions.MaxWarningsExceededError
);
assert.throws(
function () {
var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}); // 55 warnings
var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}); // 55 warnings
lint.failOnError(results, {}, 'tests/yml/.max-10-warnings.yml');
},
exceptions.MaxWarningsExceededError
Expand All @@ -56,14 +56,14 @@ describe('failures', function () {
it('should raise MaxWarningsExceededError if warnings exceed `max-warnings` of zero', function (done) {
assert.throws(
function () {
var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}); // 55 warnings
var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}); // 55 warnings
lint.failOnError(results, {options: {'max-warnings': 0}});
},
exceptions.MaxWarningsExceededError
);
assert.throws(
function () {
var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}); // 55 warnings
var results = lint.lintFiles('tests/sass/indentation/indentation-spaces.scss', {}); // 55 warnings
lint.failOnError(results, {}, 'tests/yml/.max-0-warnings.yml');
},
exceptions.MaxWarningsExceededError
Expand All @@ -73,15 +73,15 @@ describe('failures', function () {
});

it('should not raise error if warnings do not exceed `max-warnings` setting', function (done) {
var results = lint.lintFiles('sass/indentation/indentation-spaces.scss', {}); // 55 warnings
var results = lint.lintFiles('sass/indentation/indentation-spaces.scss', {}); // 55 warnings
lint.failOnError(results, {'max-warnings': 100}); // should succceed
lint.failOnError(results, {}, 'yml/.max-100-warnings.yml'); // should succeed

done();
});

it('should not raise error if no warnings even if `max-warnings` is zero', function (done) {
var results = lint.lintFiles('sass/success.scss', {}); // no warnings
var results = lint.lintFiles('sass/success.scss', {}); // no warnings
lint.failOnError(results, {'max-warnings': 0}); // should still succceed
lint.failOnError(results, {}, 'yml/.max-0-warnings.yml'); // should still succeed

Expand Down
14 changes: 7 additions & 7 deletions tests/helpers/isNewLine.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ var assert = require('assert'),
gonzales = require('gonzales-pe');

var lfBlock = gonzales.createNode(
{
type: 'space',
content: '\n',
syntax: 'scss',
start: { line: 1, column: 1 },
end: { line: 2, column: 1 }
}),
{
type: 'space',
content: '\n',
syntax: 'scss',
start: { line: 1, column: 1 },
end: { line: 2, column: 1 }
}),
crlfBlock = gonzales.createNode(
{
type: 'space',
Expand Down
22 changes: 11 additions & 11 deletions tests/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,17 @@ describe('sass lint', function () {
rules: {
'no-ids': 1
}}, '', function (data) {
assert.equal(1, data[0].warningCount);
assert.equal(0, data[0].errorCount);
assert.equal(1, data[0].messages.length);

assert(fileSpy.called);
assert(fileSpy.calledOnce);
assert(fileSpy.calledWithMatch({format: 'scss', filename: 'tests/dir-test/dir.scss/test.scss'}));
assert(fileSpy.neverCalledWithMatch({filename: 'tests/dir-test/dir.scss'}));
fileSpy.reset();
done();
}
assert.equal(1, data[0].warningCount);
assert.equal(0, data[0].errorCount);
assert.equal(1, data[0].messages.length);

assert(fileSpy.called);
assert(fileSpy.calledOnce);
assert(fileSpy.calledWithMatch({format: 'scss', filename: 'tests/dir-test/dir.scss/test.scss'}));
assert(fileSpy.neverCalledWithMatch({filename: 'tests/dir-test/dir.scss'}));
fileSpy.reset();
done();
}
);
});

Expand Down
28 changes: 14 additions & 14 deletions tests/ruleToggler.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,13 @@ describe('rule toggling', function () {
globalEnable: [],
ruleEnable: {
a: [[false, 1, 3],
[false, 2, 5],
[true, 6, 1],
[false, 8, 3],
[false, 8, 5],
[true, 12, 1],
[false, 14, 6],
[false, 14, 32]]
[false, 2, 5],
[true, 6, 1],
[false, 8, 3],
[false, 8, 5],
[true, 12, 1],
[false, 14, 6],
[false, 14, 32]]
}
}) === true);
});
Expand Down Expand Up @@ -216,13 +216,13 @@ describe('rule toggling', function () {
globalEnable: [],
ruleEnable: {
a: [[false, 2, 1],
[false, 2, 5],
[true, 5, 20],
[false, 8, 1],
[false, 8, 5],
[true, 11, 20],
[false, 14, 5],
[false, 15, 5]]
[false, 2, 5],
[true, 5, 20],
[false, 8, 1],
[false, 8, 5],
[true, 11, 20],
[false, 14, 5],
[false, 15, 5]]
}
}) === true);
});
Expand Down

0 comments on commit 7a90752

Please sign in to comment.