Fix ESLint syntax issues

Explicitly disable rules on specific lines as necessary.
This commit is contained in:
Oliver Hamlet
2016-01-06 18:26:55 +00:00
parent ce1b53d5d5
commit 05372951d0
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -10,6 +10,7 @@ ecmaFeatures:
globals:
loot: false
Jed: false
extends:
- "eslint:recommended"
@@ -19,4 +20,3 @@ rules:
strict:
- 2
- global
no-new: 1
+2 -2
View File
@@ -1,6 +1,6 @@
'use strict';
(function (root, factory) {
(function exportModule(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['bower_components/Jed/jed', 'bower_components/jed-gettext-parser/jedGettextParser'], factory);
@@ -53,7 +53,7 @@
}
return translationDataPromise.catch((error) => {
console.log('Error loading translation data: ' + error.message);
console.log('Error loading translation data: ' + error.message); // eslint-disable-line no-console
return defaultTranslationData;
}).then((result) => {
this.jed = new Jed({
+3 -3
View File
@@ -3,15 +3,15 @@
describe('Plugin', () => {
describe('#Plugin()', () => {
it('should throw if nothing is passed', () => {
(() => { new loot.Plugin(); }).should.throw();
(() => { new loot.Plugin(); }).should.throw(); // eslint-disable-line no-new
});
it('should throw if an object with no name key is passed', () => {
(() => { new loot.Plugin({}); }).should.throw();
(() => { new loot.Plugin({}); }).should.throw(); // eslint-disable-line no-new
});
it('should not throw if some members are undefined', () => {
(() => { new loot.Plugin({ name: 'test' }); }).should.not.throw();
(() => { new loot.Plugin({ name: 'test' }); }).should.not.throw(); // eslint-disable-line no-new
});
});
+1 -1
View File
@@ -17,7 +17,7 @@ describe('Translator', () => {
it('should return a Promise', () => {
const l10n = new loot.Translator();
l10n.load().should.be.a.Promise();
l10n.load().should.be.a.Promise(); // eslint-disable-line new-cap
});
it('should be fulfilled for a locale of "en"', () => {