Skip to content

Commit

Permalink
Merge pull request #923 from sasstools/greenkeeper-eslint-3.9.1
Browse files Browse the repository at this point in the history
Update eslint to version 3.9.1 🚀
  • Loading branch information
bgriffith authored Nov 6, 2016
2 parents 6c80b2c + 75f703d commit 2513612
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 22 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var slConfig = require('./lib/config'),
var getToggledRules = ruleToggler.getToggledRules,
isResultEnabled = ruleToggler.isResultEnabled;

var sassLint = function (config) {
var sassLint = function (config) { // eslint-disable-line no-unused-vars
config = require('./lib/config')(config);
return;
};
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/space-around-operator.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ var checkSpacing = function (node, i, parent, parser, result) {
}
}
}
return true;
return result;
};

module.exports = {
Expand Down
18 changes: 16 additions & 2 deletions lib/rules/zero-unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@

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

var units = ['em', 'ex', 'ch', 'rem', 'vh', 'vw', 'vmin', 'vmax',
'px', 'mm', 'cm', 'in', 'pt', 'pc'];
var units = [
'em',
'ex',
'ch',
'rem',
'vh',
'vw',
'vmin',
'vmax',
'px',
'mm',
'cm',
'in',
'pt',
'pc'
];

module.exports = {
'name': 'zero-unit',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"homepage": "https://github.com/sasstools/sass-lint",
"dependencies": {
"commander": "^2.8.1",
"eslint": "^2.7.0",
"eslint": "^3.9.1",
"front-matter": "2.1.0",
"fs-extra": "^1.0.0",
"glob": "^7.0.0",
Expand Down
36 changes: 19 additions & 17 deletions tests/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,23 +140,25 @@ describe('sass lint', function () {
// ==============================================================================
it('should not try to blindly read and lint a directory', function (done) {
var fileSpy = sinon.spy(lint, 'lintText');
lintFiles('tests/dir-test/**/*.scss', {options: {
'merge-default-rules': false
},
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();
});
lintFiles('tests/dir-test/**/*.scss', {
options: {
'merge-default-rules': false
},
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();
}
);
});

// ==============================================================================
Expand Down

0 comments on commit 2513612

Please sign in to comment.