Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update to latest version of eslint and babel-eslint #414

Merged
merged 4 commits into from
Jun 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,19 @@ ecmaFeatures:

rules:
no-global-strict: 0
no-shadow: 0
strict: 1
no-undef: 1
no-use-before-define: 0
consistent-return: 0
comma-dangle: "always-multiline"
comma-dangle: [2, "always-multiline"]
no-process-exit: 0

quotes: [2, "single"]
indent: [2, 2]
no-mixed-spaces-and-tabs: [1, "smart-tabs"]
no-spaced-func: 1
space-after-keywords: [1, "always"]
space-before-function-parentheses: {"anonymous": "always", "named": "never"}
space-before-function-paren: {"anonymous": "always", "named": "never"}
space-before-blocks: "always"
space-in-brackets: "always"
space-before-function-paren: [2, {"anonymous": "always", "named": "never"}]
space-before-blocks: [1, "always"]
no-underscore-dangle: 0
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@
},
"devDependencies": {
"babel": "5.5.*",
"babel-eslint": "^2.0.2",
"babel-eslint": "^3.1.15",
"coveralls": "^2.11.2",
"dateformat": "^1.0.11",
"eslint": "^0.18.0",
"eslint": "^0.23.0",
"istanbul": "^0.3.13",
"jsesc": "^0.5.0",
"jshint": "^2.6.3",
Expand Down
2 changes: 1 addition & 1 deletion src/annotation/annotations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ module.exports = [
require('./since.js'),
require('./throw.js'),
require('./todo.js'),
require('./type.js')
require('./type.js'),
];
2 changes: 1 addition & 1 deletion src/annotation/annotations/name.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export default function access() {
}
},

multiple: false
multiple: false,
};
}
2 changes: 1 addition & 1 deletion src/annotation/annotations/require.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function searchForMatches(code, regex, isAnnotatedByHandProxy, id = 1) {
let matches = [];

while ((match = regex.exec(code))) {
if (!isAnnotatedByHandProxy(match[id]) && (id <= 1 || match[id-1] === undefined)) {
if (!isAnnotatedByHandProxy(match[id]) && (id <= 1 || match[id - 1] === undefined)) {
matches.push(match[id]);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/annotation/annotations/see.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function see(env) {

let obj = {
type: match[1] || 'function',
name: match[2]
name: match[2],
};

if (obj.name.indexOf('$') === 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/sassdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ async function baseDocumentize(env) {
recurse(),
exclude(env.exclude || []),
converter({ from: 'sass', to: 'scss' }),
filter
filter,
];

let pipeline = () => {
Expand Down
2 changes: 1 addition & 1 deletion test/annotations/envMock.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ module.exports = {
warn: function () {},
log: function () {},
error: function () {},
}
},
};
4 changes: 2 additions & 2 deletions test/annotations/parameter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ describe('#parameter', function () {
warn: function (msg) {
assert.equal(msg, '@parameter must at least have a name. Location: FileID:1:2');
done();
}
}
},
},
});
assert.deepEqual(param.parse('{type} [default] - description\nmore\nthan\none\nline', { commentRange: { start: 1, end: 2 }}, 'FileID'), undefined);
});
Expand Down
14 changes: 7 additions & 7 deletions test/annotations/property.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,41 @@ describe('#property', function () {
it('should parse the prop annotation', function () {
assert.deepEqual(prop.parse('base'), {
type: 'Map',
name: 'base'
name: 'base',
});

assert.deepEqual(prop.parse('{Function} base.default'), {
type: 'Function',
name: 'base.default'
name: 'base.default',
});

assert.deepEqual(prop.parse('{Function} base.default - description'), {
type: 'Function',
name: 'base.default',
description: 'description'
description: 'description',
});

assert.deepEqual(prop.parse('{Function} base.default [default] - description'), {
type: 'Function',
name: 'base.default',
default: 'default',
description: 'description'
description: 'description',
});

assert.deepEqual(prop.parse('{Function} base.default [default] - description [with brackets]'), {
type: 'Function',
name: 'base.default',
default: 'default',
description: 'description [with brackets]'
description: 'description [with brackets]',
});
});

it('should work for multiline description', function(){
it('should work for multiline description', function () {
assert.deepEqual(prop.parse('{Function} base.default [default] - description\nmore\nthan\none\nline'), {
type: 'Function',
name: 'base.default',
default: 'default',
description: 'description\nmore\nthan\none\nline'
description: 'description\nmore\nthan\none\nline',
});
});
});
4 changes: 2 additions & 2 deletions test/annotations/return.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ describe('#return', function () {
warn: function (msg) {
assert.equal(msg, '@return must at least have a type. Location: FileID:1:2');
done();
}
}
},
},
});
assert.deepEqual(ret.parse('', { commentRange: { start: 1, end: 2 }}, 'FileID'), undefined);
});
Expand Down
2 changes: 1 addition & 1 deletion test/api/recurse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('#recurse', function () {
describe('#recurse-null', function () {
var files = [];
var nullFile = new File({
contents: null
contents: null,
});

before(function (done) {
Expand Down
4 changes: 2 additions & 2 deletions test/env/environment.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ describe('#environment', function () {
display: {
access: ['public', 'private'],
alias: true,
watermark: true
}
watermark: true,
},
};

beforeEach(function () {
Expand Down
4 changes: 2 additions & 2 deletions test/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Object.defineProperty(SassDocRc.prototype, 'contents', {
throw new Error('SassDocRc.contents can only be an Object.');
}
this._contents = config;
}
},
});

module.exports.SassDocRc = SassDocRc;
Expand All @@ -52,7 +52,7 @@ inherits(MockLogger, Logger);
Object.defineProperty(MockLogger.prototype, 'output', {
get: function () {
return this._output;
}
},
});

module.exports.Logger = MockLogger;