mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fix ESLint syntax issues
Explicitly disable rules on specific lines as necessary.
This commit is contained in:
+1
-1
@@ -10,6 +10,7 @@ ecmaFeatures:
|
||||
|
||||
globals:
|
||||
loot: false
|
||||
Jed: false
|
||||
|
||||
extends:
|
||||
- "eslint:recommended"
|
||||
@@ -19,4 +20,3 @@ rules:
|
||||
strict:
|
||||
- 2
|
||||
- global
|
||||
no-new: 1
|
||||
|
||||
@@ -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,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
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -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"', () => {
|
||||
|
||||
Reference in New Issue
Block a user