Commit c7042c48 by Brian Jacobel Committed by GitHub

Merge pull request #13159 from edx/bjacobel/jshint-directives-to-eslint

JSHint directives to ESLint (WIP)
parents 46119aca a32fd27d
{ {
"extends": "eslint-config-edx" "extends": "eslint-config-edx",
"globals": { // Try to avoid adding any new globals.
// Old compatibility things and hacks
"edx": true,
"XBlock": true,
// added by Django i18n tools
"gettext": true,
"ngettext": true,
// added by jasmine-jquery
"loadFixtures": true,
"appendLoadFixtures": true,
"readFixtures": true,
"setFixtures": true,
"appendSetFixtures": true,
"spyOnEvent": true,
// used by our requirejs implementation
"RequireJS": true
}
} }
/* globals AjaxPrefix */
(function(AjaxPrefix) { (function(AjaxPrefix) {
'use strict'; 'use strict';
define(['domReady', 'jquery', 'underscore.string', 'backbone', 'gettext', define(['domReady', 'jquery', 'underscore.string', 'backbone', 'gettext',
...@@ -34,7 +36,7 @@ ...@@ -34,7 +36,7 @@
message = str.truncate(jqXHR.responseText, 300); message = str.truncate(jqXHR.responseText, 300);
} }
} else { } else {
message = gettext('This may be happening because of an error with our server or your internet connection. Try refreshing the page or making sure you are online.'); //jshint ignore:line message = gettext('This may be happening because of an error with our server or your internet connection. Try refreshing the page or making sure you are online.'); // eslint-disable-line max-len
} }
msg = new NotificationView.Error({ msg = new NotificationView.Error({
'title': gettext("Studio's having trouble saving your work"), 'title': gettext("Studio's having trouble saving your work"),
...@@ -65,5 +67,4 @@ ...@@ -65,5 +67,4 @@
main(); main();
return main; return main;
}); });
}).call(this, AjaxPrefix);
}).call(this, AjaxPrefix); //jshint ignore:line
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
// end of Annotation tool files // end of Annotation tool files
// externally hosted files // externally hosted files
'mathjax': '//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_SVG&delayStartupUntil=configured', // jshint ignore:line mathjax: '//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_SVG&delayStartupUntil=configured', // eslint-disable-line max-len
'youtube': [ 'youtube': [
// youtube URL does not end in '.js'. We add '?noext' to the path so // youtube URL does not end in '.js'. We add '?noext' to the path so
// that require.js adds the '.js' to the query component of the URL, // that require.js adds the '.js' to the query component of the URL,
......
/* globals requirejs, requireSerial */
(function(requirejs, requireSerial) { (function(requirejs, requireSerial) {
'use strict'; 'use strict';
...@@ -22,9 +24,9 @@ ...@@ -22,9 +24,9 @@
'jquery.cookie': 'xmodule_js/common_static/js/vendor/jquery.cookie', 'jquery.cookie': 'xmodule_js/common_static/js/vendor/jquery.cookie',
'jquery.qtip': 'xmodule_js/common_static/js/vendor/jquery.qtip.min', 'jquery.qtip': 'xmodule_js/common_static/js/vendor/jquery.qtip.min',
'jquery.fileupload': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload', 'jquery.fileupload': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload',
'jquery.fileupload-process': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload-process', // jshint ignore:line 'jquery.fileupload-process': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload-process', // eslint-disable-line max-len
'jquery.fileupload-validate': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload-validate', // jshint ignore:line 'jquery.fileupload-validate': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload-validate', // eslint-disable-line max-len
'jquery.iframe-transport': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.iframe-transport', // jshint ignore:line 'jquery.iframe-transport': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.iframe-transport', // eslint-disable-line max-len
'jquery.inputnumber': 'xmodule_js/common_static/js/vendor/html5-input-polyfills/number-polyfill', 'jquery.inputnumber': 'xmodule_js/common_static/js/vendor/html5-input-polyfills/number-polyfill',
'jquery.immediateDescendents': 'xmodule_js/common_static/coffee/src/jquery.immediateDescendents', 'jquery.immediateDescendents': 'xmodule_js/common_static/coffee/src/jquery.immediateDescendents',
'jquery.simulate': 'xmodule_js/common_static/js/vendor/jquery.simulate', 'jquery.simulate': 'xmodule_js/common_static/js/vendor/jquery.simulate',
...@@ -54,7 +56,7 @@ ...@@ -54,7 +56,7 @@
'domReady': 'xmodule_js/common_static/js/vendor/domReady', 'domReady': 'xmodule_js/common_static/js/vendor/domReady',
'URI': 'xmodule_js/common_static/js/vendor/URI.min', 'URI': 'xmodule_js/common_static/js/vendor/URI.min',
'mock-ajax': 'xmodule_js/common_static/js/vendor/mock-ajax', 'mock-ajax': 'xmodule_js/common_static/js/vendor/mock-ajax',
'mathjax': '//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_SVG&delayStartupUntil=configured', // jshint ignore:line mathjax: '//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_SVG&delayStartupUntil=configured', // eslint-disable-line max-len
'youtube': '//www.youtube.com/player_api?noext', 'youtube': '//www.youtube.com/player_api?noext',
'coffee/src/ajax_prefix': 'xmodule_js/common_static/coffee/src/ajax_prefix', 'coffee/src/ajax_prefix': 'xmodule_js/common_static/coffee/src/ajax_prefix',
'js/spec/test_utils': 'js/spec/test_utils' 'js/spec/test_utils': 'js/spec/test_utils'
...@@ -290,5 +292,4 @@ ...@@ -290,5 +292,4 @@
requireSerial(specHelpers.concat(testFiles), function() { requireSerial(specHelpers.concat(testFiles), function() {
return window.__karma__.start(); return window.__karma__.start();
}); });
}).call(this, requirejs, requireSerial);
}).call(this, requirejs, requireSerial); // jshint ignore:line
/* globals sandbox */
(function(sandbox) { (function(sandbox) {
'use strict'; 'use strict';
require(["jquery", "backbone", "cms/js/main", "edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers", "jquery.cookie"], require(["jquery", "backbone", "cms/js/main", "edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers", "jquery.cookie"],
...@@ -77,5 +79,4 @@ ...@@ -77,5 +79,4 @@
}); });
}); });
}); });
}).call(this, sandbox);
}).call(this, sandbox); //jshint ignore:line
/* globals requirejs, requireSerial */
(function(requirejs, requireSerial) { (function(requirejs, requireSerial) {
'use strict'; 'use strict';
...@@ -21,9 +23,9 @@ ...@@ -21,9 +23,9 @@
'jquery.cookie': 'xmodule_js/common_static/js/vendor/jquery.cookie', 'jquery.cookie': 'xmodule_js/common_static/js/vendor/jquery.cookie',
'jquery.qtip': 'xmodule_js/common_static/js/vendor/jquery.qtip.min', 'jquery.qtip': 'xmodule_js/common_static/js/vendor/jquery.qtip.min',
'jquery.fileupload': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload', 'jquery.fileupload': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload',
'jquery.fileupload-process': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload-process', // jshint ignore:line 'jquery.fileupload-process': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload-process', // eslint-disable-line max-len
'jquery.fileupload-validate': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload-validate', // jshint ignore:line 'jquery.fileupload-validate': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.fileupload-validate', // eslint-disable-line max-len
'jquery.iframe-transport': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.iframe-transport', // jshint ignore:line 'jquery.iframe-transport': 'xmodule_js/common_static/js/vendor/jQuery-File-Upload/js/jquery.iframe-transport', // eslint-disable-line max-len
'jquery.inputnumber': 'xmodule_js/common_static/js/vendor/html5-input-polyfills/number-polyfill', 'jquery.inputnumber': 'xmodule_js/common_static/js/vendor/html5-input-polyfills/number-polyfill',
'jquery.immediateDescendents': 'xmodule_js/common_static/coffee/src/jquery.immediateDescendents', 'jquery.immediateDescendents': 'xmodule_js/common_static/coffee/src/jquery.immediateDescendents',
'datepair': 'xmodule_js/common_static/js/vendor/timepicker/datepair', 'datepair': 'xmodule_js/common_static/js/vendor/timepicker/datepair',
...@@ -46,7 +48,7 @@ ...@@ -46,7 +48,7 @@
'draggabilly': 'xmodule_js/common_static/js/vendor/draggabilly', 'draggabilly': 'xmodule_js/common_static/js/vendor/draggabilly',
'domReady': 'xmodule_js/common_static/js/vendor/domReady', 'domReady': 'xmodule_js/common_static/js/vendor/domReady',
'URI': 'xmodule_js/common_static/js/vendor/URI.min', 'URI': 'xmodule_js/common_static/js/vendor/URI.min',
'mathjax': '//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_SVG&delayStartupUntil=configured', // jshint ignore:line mathjax: '//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_SVG&delayStartupUntil=configured', // eslint-disable-line max-len
'youtube': '//www.youtube.com/player_api?noext', 'youtube': '//www.youtube.com/player_api?noext',
'coffee/src/ajax_prefix': 'xmodule_js/common_static/coffee/src/ajax_prefix' 'coffee/src/ajax_prefix': 'xmodule_js/common_static/coffee/src/ajax_prefix'
}, },
...@@ -206,5 +208,4 @@ ...@@ -206,5 +208,4 @@
requireSerial(specHelpers.concat(testFiles), function() { requireSerial(specHelpers.concat(testFiles), function() {
return window.__karma__.start(); return window.__karma__.start();
}); });
}).call(this, requirejs, requireSerial);
}).call(this, requirejs, requireSerial); // jshint ignore:line
// Backbone.js Application Collection: Certificates // Backbone.js Application Collection: Certificates
define([ // jshint ignore:line define([
'backbone', 'backbone',
'gettext', 'gettext',
'js/certificates/models/certificate' 'js/certificates/models/certificate'
......
// Backbone.js Application Collection: Certificate Signatories // Backbone.js Application Collection: Certificate Signatories
define([ // jshint ignore:line define([
'backbone', 'backbone',
'js/certificates/models/signatory' 'js/certificates/models/signatory'
], ],
......
...@@ -11,7 +11,7 @@ The RequireJS Optimizer is only enabled in Studio at present, so the page factor ...@@ -11,7 +11,7 @@ The RequireJS Optimizer is only enabled in Studio at present, so the page factor
We do intend to enable page factories on the LMS too. We do intend to enable page factories on the LMS too.
*/ */
define([ // jshint ignore:line define([
'jquery', 'jquery',
'js/certificates/collections/certificates', 'js/certificates/collections/certificates',
'js/certificates/models/certificate', 'js/certificates/models/certificate',
......
// Backbone.js Application Model: Certificate Signatory // Backbone.js Application Model: Certificate Signatory
define([ // jshint ignore:line define([
'underscore', 'underscore',
'backbone', 'backbone',
'backbone-relational' 'backbone-relational'
......
// Custom matcher library for Jasmine test assertions // Custom matcher library for Jasmine test assertions
// http://tobyho.com/2012/01/30/write-a-jasmine-matcher/ // http://tobyho.com/2012/01/30/write-a-jasmine-matcher/
define(['jquery'], function($) { // jshint ignore:line define(['jquery'], function($) { // eslint-disable-line no-unused-vars
'use strict'; 'use strict';
return function () { return function () {
jasmine.addMatchers({ jasmine.addMatchers({
......
// Jasmine Test Suite: Certifiate Model // Jasmine Test Suite: Certifiate Model
define([ // jshint ignore:line define([
'js/certificates/models/certificate', 'js/certificates/models/certificate',
'js/certificates/collections/certificates' 'js/certificates/collections/certificates'
], ],
......
// Jasmine Test Suite: Certifiate Details View // Jasmine Test Suite: Certifiate Details View
define([ // jshint ignore:line define([
'underscore', 'underscore',
'js/models/course', 'js/models/course',
'js/certificates/collections/certificates', 'js/certificates/collections/certificates',
...@@ -104,7 +104,7 @@ function(_, Course, CertificatesCollection, CertificateModel, CertificateDetails ...@@ -104,7 +104,7 @@ function(_, Course, CertificatesCollection, CertificateModel, CertificateDetails
model: this.model model: this.model
}); });
appendSetFixtures(this.view.render().el); appendSetFixtures(this.view.render().el);
CustomMatchers(); // jshint ignore:line CustomMatchers();
}); });
afterEach(function() { afterEach(function() {
...@@ -141,7 +141,7 @@ function(_, Course, CertificatesCollection, CertificateModel, CertificateDetails ...@@ -141,7 +141,7 @@ function(_, Course, CertificatesCollection, CertificateModel, CertificateDetails
}); });
it('should have empty certificate collection if there is an error parsing certifcate JSON', function () { it('should have empty certificate collection if there is an error parsing certifcate JSON', function () {
var CERTIFICATE_INVALID_JSON = '[{"course_title": Test certificate course title override, "signatories":"[]"}]'; // jshint ignore:line var CERTIFICATE_INVALID_JSON = '[{"course_title": Test certificate course title override, "signatories":"[]"}]'; // eslint-disable-line max-len
var collection_length = this.collection.length; var collection_length = this.collection.length;
this.collection.parse(CERTIFICATE_INVALID_JSON); this.collection.parse(CERTIFICATE_INVALID_JSON);
//collection length should remain the same since we have error parsing JSON //collection length should remain the same since we have error parsing JSON
......
// Jasmine Test Suite: Certifiate Editor View // Jasmine Test Suite: Certifiate Editor View
define([ // jshint ignore:line define([
'underscore', 'underscore',
'js/models/course', 'js/models/course',
'js/certificates/models/certificate', 'js/certificates/models/certificate',
...@@ -119,7 +119,7 @@ function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, Ce ...@@ -119,7 +119,7 @@ function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, Ce
max_signatories_limit: MAX_SIGNATORIES_LIMIT max_signatories_limit: MAX_SIGNATORIES_LIMIT
}); });
appendSetFixtures(this.view.render().el); appendSetFixtures(this.view.render().el);
CustomMatchers(); // jshint ignore:line CustomMatchers();
}); });
afterEach(function() { afterEach(function() {
......
// Jasmine Test Suite: Certificate Web Preview // Jasmine Test Suite: Certificate Web Preview
define([ // jshint ignore:line define([
'underscore', 'underscore',
'jquery', 'jquery',
'js/models/course', 'js/models/course',
......
// Jasmine Test Suite: Certificate List View // Jasmine Test Suite: Certificate List View
define([ // jshint ignore:line define([
'underscore', 'underscore',
'js/models/course', 'js/models/course',
'js/certificates/collections/certificates', 'js/certificates/collections/certificates',
...@@ -61,7 +61,7 @@ function(_, Course, CertificatesCollection, CertificateModel, CertificateDetails ...@@ -61,7 +61,7 @@ function(_, Course, CertificatesCollection, CertificateModel, CertificateDetails
collection: this.collection collection: this.collection
}); });
appendSetFixtures(this.view.render().el); appendSetFixtures(this.view.render().el);
CustomMatchers(); // jshint ignore:line CustomMatchers();
}); });
afterEach(function() { afterEach(function() {
......
// Backbone Application View: Certificate Details // Backbone Application View: Certificate Details
define([ // jshint ignore:line define([
'jquery', 'jquery',
'underscore', 'underscore',
'underscore.string', 'underscore.string',
......
// Backbone Application View: Certificate Editor // Backbone Application View: Certificate Editor
define([ // jshint ignore:line define([
'jquery', 'jquery',
'underscore', 'underscore',
'backbone', 'backbone',
...@@ -83,7 +83,7 @@ function($, _, Backbone, gettext, ...@@ -83,7 +83,7 @@ function($, _, Backbone, gettext,
addSignatory: function() { addSignatory: function() {
// Append a new signatory to the certificate model's signatories collection // Append a new signatory to the certificate model's signatories collection
var signatory = new SignatoryModel({certificate: this.getSaveableModel()}); // jshint ignore:line var signatory = new SignatoryModel({certificate: this.getSaveableModel()}); // eslint-disable-line max-len, no-unused-vars
this.render(); this.render();
}, },
......
// Backbone Application View: Certificate Item // Backbone Application View: Certificate Item
// Renders an editor view or a details view depending on the state of the underlying model. // Renders an editor view or a details view depending on the state of the underlying model.
define([ // jshint ignore:line define([
'gettext', 'gettext',
'js/views/list_item', 'js/views/list_item',
'js/certificates/views/certificate_details', 'js/certificates/views/certificate_details',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// User can preview the certificate web layout/styles. 'Preview Certificate' button will open a new tab in LMS for // User can preview the certificate web layout/styles. 'Preview Certificate' button will open a new tab in LMS for
// the selected course mode from the drop down. // the selected course mode from the drop down.
define([ // jshint ignore:line define([
'underscore', 'underscore',
'gettext', 'gettext',
'js/views/baseview', 'js/views/baseview',
......
// Backbone Application View: Certificates List // Backbone Application View: Certificates List
define([ // jshint ignore:line define([
'gettext', 'gettext',
'js/views/list', 'js/views/list',
'js/certificates/views/certificate_item' 'js/certificates/views/certificate_item'
......
// Backbone Application View: Certificates Page // Backbone Application View: Certificates Page
define([ // jshint ignore:line define([
'jquery', 'jquery',
'underscore', 'underscore',
'gettext', 'gettext',
......
// Backbone Application View: Signatory Details // Backbone Application View: Signatory Details
define([ // jshint ignore:line define([
'jquery', 'jquery',
'underscore', 'underscore',
'underscore.string', 'underscore.string',
......
// Backbone Application View: Signatory Editor // Backbone Application View: Signatory Editor
define([ // jshint ignore:line define([
'jquery', 'jquery',
'underscore', 'underscore',
'backbone', 'backbone',
......
...@@ -37,8 +37,7 @@ define([ ...@@ -37,8 +37,7 @@ define([
return PagingCollection.prototype.parse.call(this, response, options); return PagingCollection.prototype.parse.call(this, response, options);
}, },
/* jshint unused:false */ parseState: function(response) {
parseState: function (response, queryParams, state, options) {
return { return {
totalRecords: response[0].totalCount, totalRecords: response[0].totalCount,
totalPages: Math.ceil(response[0].totalCount / response[0].pageSize) totalPages: Math.ceil(response[0].totalCount / response[0].pageSize)
......
...@@ -15,7 +15,7 @@ var FileUpload = Backbone.Model.extend({ ...@@ -15,7 +15,7 @@ var FileUpload = Backbone.Model.extend({
validate: function(attrs, options) { validate: function(attrs, options) {
if(attrs.selectedFile && !this.checkTypeValidity(attrs.selectedFile)) { if(attrs.selectedFile && !this.checkTypeValidity(attrs.selectedFile)) {
return { return {
message: _.template(gettext("Only <%= fileTypes %> files can be uploaded. Please select a file ending in <%= fileExtensions %> to upload."))( // jshint ignore:line message: _.template(gettext('Only <%= fileTypes %> files can be uploaded. Please select a file ending in <%= fileExtensions %> to upload.'))( // eslint-disable-line max-len
this.formatValidTypes() this.formatValidTypes()
), ),
attributes: {selectedFile: true} attributes: {selectedFile: true}
......
...@@ -135,7 +135,6 @@ define([ ...@@ -135,7 +135,6 @@ define([
}, },
getModalContent: function() { getModalContent: function() {
/* jshint maxlen: 300 */
return { return {
name: gettext('confirm'), name: gettext('confirm'),
title: gettext('Publish this program?'), title: gettext('Publish this program?'),
......
...@@ -7,7 +7,6 @@ function($, LoginFactory, AjaxHelpers, ViewUtils) { ...@@ -7,7 +7,6 @@ function($, LoginFactory, AjaxHelpers, ViewUtils) {
beforeEach(function() { beforeEach(function() {
loadFixtures('mock/login.underscore'); loadFixtures('mock/login.underscore');
/*jshint unused: false*/
var login_factory = new LoginFactory("/home/"); var login_factory = new LoginFactory("/home/");
submitButton = $('#submit'); submitButton = $('#submit');
}); });
......
...@@ -10,7 +10,6 @@ define([ ...@@ -10,7 +10,6 @@ define([
ProgramDetailsView, constants ) { ProgramDetailsView, constants ) {
'use strict'; 'use strict';
/* jshint maxlen: 300 */
describe('ProgramDetailsView', function () { describe('ProgramDetailsView', function () {
var view = {}, var view = {},
model = {}, model = {},
...@@ -36,7 +35,7 @@ define([ ...@@ -36,7 +35,7 @@ define([
end: null, end: null,
enrollment_start: null, enrollment_start: null,
enrollment_end: null, enrollment_end: null,
blocks_url: 'http://127.0.0.1:8000/api/courses/v1/blocks/?course_id=course-v1%3AedX%2BDemoX%2BDemo_Course' blocks_url: 'http://127.0.0.1:8000/api/courses/v1/blocks/?course_id=course-v1%3AedX%2BDemoX%2BDemo_Course' // eslint-disable-line max-len
}, },
{ {
id: 'course-v1:edx+Krampus25+2015_12_05', id: 'course-v1:edx+Krampus25+2015_12_05',
...@@ -59,7 +58,7 @@ define([ ...@@ -59,7 +58,7 @@ define([
end: null, end: null,
enrollment_start: null, enrollment_start: null,
enrollment_end: null, enrollment_end: null,
blocks_url: 'http://127.0.0.1:8000/api/courses/v1/blocks/?course_id=course-v1%3Aedx%2BKrampus25%2B2015_12_05' blocks_url: 'http://127.0.0.1:8000/api/courses/v1/blocks/?course_id=course-v1%3Aedx%2BKrampus25%2B2015_12_05' // eslint-disable-line max-len
}, },
{ {
id: 'course-v1:edx+shiaLB101+2016_01', id: 'course-v1:edx+shiaLB101+2016_01',
...@@ -82,7 +81,7 @@ define([ ...@@ -82,7 +81,7 @@ define([
end: null, end: null,
enrollment_start: null, enrollment_start: null,
enrollment_end: null, enrollment_end: null,
blocks_url: 'http://127.0.0.1:8000/api/courses/v1/blocks/?course_id=course-v1%3Aedx%2BshiaLB101%2B2016_01' blocks_url: 'http://127.0.0.1:8000/api/courses/v1/blocks/?course_id=course-v1%3Aedx%2BshiaLB101%2B2016_01' // eslint-disable-line max-len
} }
], ],
programData = { programData = {
...@@ -381,7 +380,7 @@ define([ ...@@ -381,7 +380,7 @@ define([
addCourse(); addCourse();
expect( view.$(runSelect).length ).toEqual(0); expect( view.$(runSelect).length ).toEqual(0);
view.$('.js-add-course-run').first().click(); view.$('.js-add-course-run').first().click();
$runSelect = view.$(runSelect); $runSelect = view.$(runSelect);
expect( $runSelect.length ).toEqual(1); expect( $runSelect.length ).toEqual(1);
expect( view.$('.js-remove-run').length ).toEqual(savedRunCount); expect( view.$('.js-remove-run').length ).toEqual(savedRunCount);
...@@ -402,7 +401,7 @@ define([ ...@@ -402,7 +401,7 @@ define([
$courseView = view.$('.course-container').last(); $courseView = view.$('.course-container').last();
$addRunBtn = $courseView.find('.js-add-course-run'); $addRunBtn = $courseView.find('.js-add-course-run');
$addRunBtn.click(); $addRunBtn.click();
expect( view.$(runSelect).length ).toEqual(1); expect( view.$(runSelect).length ).toEqual(1);
expect( view.$(runSelect).find('option').length ).toEqual(courseRunOptionsCount); expect( view.$(runSelect).find('option').length ).toEqual(courseRunOptionsCount);
......
...@@ -50,7 +50,7 @@ define(["domReady", "jquery", "underscore", "js/views/utils/create_course_utils" ...@@ -50,7 +50,7 @@ define(["domReady", "jquery", "underscore", "js/views/utils/create_course_utils"
// Go into creating re-run state // Go into creating re-run state
$('.rerun-course-save').addClass('is-disabled').attr('aria-disabled', true).addClass('is-processing').html( $('.rerun-course-save').addClass('is-disabled').attr('aria-disabled', true).addClass('is-processing').html(
'<span class="icon fa fa-refresh fa-spin" aria-hidden="true"></span>' + gettext('Processing Re-run Request') //jshint ignore:line '<span class="icon fa fa-refresh fa-spin" aria-hidden="true"></span>' + gettext('Processing Re-run Request') // eslint-disable-line max-len
); );
$('.action-cancel').addClass('is-hidden'); $('.action-cancel').addClass('is-hidden');
}; };
......
// Backbone Application View: Instructor Information // Backbone Application View: Instructor Information
define([ // jshint ignore:line define([
'jquery', 'jquery',
'underscore', 'underscore',
'backbone', 'backbone',
......
// Backbone Application View: Course Learning Information // Backbone Application View: Course Learning Information
define([ // jshint ignore:line define([
'jquery', 'jquery',
'underscore', 'underscore',
'backbone', 'backbone',
......
...@@ -288,7 +288,7 @@ function(BaseView, _, MetadataModel, AbstractEditor, FileUpload, UploadDialog, ...@@ -288,7 +288,7 @@ function(BaseView, _, MetadataModel, AbstractEditor, FileUpload, UploadDialog,
var template = _.template( var template = _.template(
'<li class="list-settings-item">' + '<li class="list-settings-item">' +
'<input type="text" class="input" value="<%- ele %>">' + '<input type="text" class="input" value="<%- ele %>">' +
'<a href="#" class="remove-action remove-setting" data-index="<%- index %>"><span class="icon fa fa-times-circle" aria-hidden="true"></span><span class="sr">' + gettext('Remove') + '</span></a>' + //jshint ignore:line '<a href="#" class="remove-action remove-setting" data-index="<%- index %>"><span class="icon fa fa-times-circle" aria-hidden="true"></span><span class="sr">' + gettext('Remove') + '</span></a>' + // eslint-disable-line max-len
'</li>' '</li>'
); );
list.append($(template({'ele': ele, 'index': index}))); list.append($(template({'ele': ele, 'index': index})));
...@@ -455,7 +455,7 @@ function(BaseView, _, MetadataModel, AbstractEditor, FileUpload, UploadDialog, ...@@ -455,7 +455,7 @@ function(BaseView, _, MetadataModel, AbstractEditor, FileUpload, UploadDialog,
'<li class="list-settings-item">' + '<li class="list-settings-item">' +
'<input type="text" class="input input-key" value="<%= key %>">' + '<input type="text" class="input input-key" value="<%= key %>">' +
'<input type="text" class="input input-value" value="<%= value %>">' + '<input type="text" class="input input-value" value="<%= value %>">' +
'<a href="#" class="remove-action remove-setting" data-value="<%= value %>"><span class="icon fa fa-times-circle" aria-hidden="true"></span><span class="sr">Remove</span></a>' + //jshint ignore:line '<a href="#" class="remove-action remove-setting" data-value="<%= value %>"><span class="icon fa fa-times-circle" aria-hidden="true"></span><span class="sr">Remove</span></a>' + // eslint-disable-line max-len
'</li>' '</li>'
); );
......
...@@ -7,7 +7,6 @@ define([ ...@@ -7,7 +7,6 @@ define([
'text!templates/paging-header.underscore' 'text!templates/paging-header.underscore'
], function(_, Backbone, gettext, HtmlUtils, StringUtils, pagingHeaderTemplate) { ], function(_, Backbone, gettext, HtmlUtils, StringUtils, pagingHeaderTemplate) {
'use strict'; 'use strict';
/* jshint maxlen:false */
var PagingHeader = Backbone.View.extend({ var PagingHeader = Backbone.View.extend({
events : { events : {
'click .next-page-link': 'nextPage', 'click .next-page-link': 'nextPage',
...@@ -30,7 +29,7 @@ define([ ...@@ -30,7 +29,7 @@ define([
lastPage = collection.getTotalPages(), lastPage = collection.getTotalPages(),
messageHtml = this.messageHtml(), messageHtml = this.messageHtml(),
isNextDisabled = lastPage === 0 || currentPage === lastPage; isNextDisabled = lastPage === 0 || currentPage === lastPage;
HtmlUtils.setHtml(this.$el, HtmlUtils.template(pagingHeaderTemplate)({messageHtml: messageHtml})); HtmlUtils.setHtml(this.$el, HtmlUtils.template(pagingHeaderTemplate)({messageHtml: messageHtml}));
this.$('.previous-page-link') this.$('.previous-page-link')
.toggleClass('is-disabled', currentPage === 1) .toggleClass('is-disabled', currentPage === 1)
...@@ -50,22 +49,22 @@ define([ ...@@ -50,22 +49,22 @@ define([
if (this.view.collection.sortDirection === 'asc') { if (this.view.collection.sortDirection === 'asc') {
// Translators: sample result: // Translators: sample result:
// "Showing 0-9 out of 25 total, filtered by Images, sorted by Date Added ascending" // "Showing 0-9 out of 25 total, filtered by Images, sorted by Date Added ascending"
message = gettext('Showing {currentItemRange} out of {totalItemsCount}, filtered by {assetType}, sorted by {sortName} ascending'); message = gettext('Showing {currentItemRange} out of {totalItemsCount}, filtered by {assetType}, sorted by {sortName} ascending'); // eslint-disable-line max-len
} else { } else {
// Translators: sample result: // Translators: sample result:
// "Showing 0-9 out of 25 total, filtered by Images, sorted by Date Added descending" // "Showing 0-9 out of 25 total, filtered by Images, sorted by Date Added descending"
message = gettext('Showing {currentItemRange} out of {totalItemsCount}, filtered by {assetType}, sorted by {sortName} descending'); message = gettext('Showing {currentItemRange} out of {totalItemsCount}, filtered by {assetType}, sorted by {sortName} descending'); // eslint-disable-line max-len
} }
assetType = this.filterNameLabel(); assetType = this.filterNameLabel();
} else { } else {
if (this.view.collection.sortDirection === 'asc') { if (this.view.collection.sortDirection === 'asc') {
// Translators: sample result: // Translators: sample result:
// "Showing 0-9 out of 25 total, sorted by Date Added ascending" // "Showing 0-9 out of 25 total, sorted by Date Added ascending"
message = gettext('Showing {currentItemRange} out of {totalItemsCount}, sorted by {sortName} ascending'); message = gettext('Showing {currentItemRange} out of {totalItemsCount}, sorted by {sortName} ascending'); // eslint-disable-line max-len
} else { } else {
// Translators: sample result: // Translators: sample result:
// "Showing 0-9 out of 25 total, sorted by Date Added descending" // "Showing 0-9 out of 25 total, sorted by Date Added descending"
message = gettext('Showing {currentItemRange} out of {totalItemsCount}, sorted by {sortName} descending'); message = gettext('Showing {currentItemRange} out of {totalItemsCount}, sorted by {sortName} descending'); // eslint-disable-line max-len
} }
} }
......
...@@ -115,9 +115,9 @@ var AdvancedView = ValidatingView.extend({ ...@@ -115,9 +115,9 @@ var AdvancedView = ValidatingView.extend({
var self = this; var self = this;
this.model.save({}, { this.model.save({}, {
success : function() { success : function() {
self.render();
var title = gettext("Your policy changes have been saved."); var title = gettext("Your policy changes have been saved.");
var message = gettext("No validation is performed on policy keys or value pairs. If you are having difficulties, check your formatting."); // jshint ignore:line var message = gettext('No validation is performed on policy keys or value pairs. If you are having difficulties, check your formatting.'); // eslint-disable-line max-len
self.render();
self.showSavedBar(title, message); self.showSavedBar(title, message);
analytics.track('Saved Advanced Settings', { analytics.track('Saved Advanced Settings', {
'course': course_location_analytics 'course': course_location_analytics
......
/* globals analytics, course_location_analytics */
(function(analytics, course_location_analytics) { (function(analytics, course_location_analytics) {
'use strict'; 'use strict';
...@@ -199,5 +201,4 @@ ...@@ -199,5 +201,4 @@
})(Backbone.View); })(Backbone.View);
return TabsEdit; return TabsEdit;
}); });
}).call(this, analytics, course_location_analytics);
}).call(this, analytics, course_location_analytics); //jshint ignore:line
...@@ -95,7 +95,7 @@ define(["jquery", "underscore", "gettext", "common/js/components/utils/view_util ...@@ -95,7 +95,7 @@ define(["jquery", "underscore", "gettext", "common/js/components/utils/view_util
); );
if (xblockInfo.get('is_prereq')) { if (xblockInfo.get('is_prereq')) {
messageBody += ' ' + gettext('Any content that has listed this content as a prerequisite will also have access limitations removed.'); // jshint ignore:line messageBody += ' ' + gettext('Any content that has listed this content as a prerequisite will also have access limitations removed.'); // eslint-disable-line max-len
ViewUtils.confirmThenRunOperation( ViewUtils.confirmThenRunOperation(
interpolate( interpolate(
gettext('Delete this %(xblock_type)s (and prerequisite)?'), gettext('Delete this %(xblock_type)s (and prerequisite)?'),
......
...@@ -106,7 +106,7 @@ define(["jquery", "underscore", "common/js/components/utils/view_utils", "js/vie ...@@ -106,7 +106,7 @@ define(["jquery", "underscore", "common/js/components/utils/view_utils", "js/vie
* may have thrown JavaScript errors after rendering in which case the xblock parameter * may have thrown JavaScript errors after rendering in which case the xblock parameter
* will be null. * will be null.
*/ */
xblockReady: function(xblock) { // jshint ignore:line xblockReady: function(xblock) { // eslint-disable-line no-unused-vars
// Do nothing // Do nothing
}, },
......
/* eslint-env node */
// Karma config for cms suite. // Karma config for cms suite.
// Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js // Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js
/* jshint node: true */
/*jshint -W079 */
'use strict'; 'use strict';
var path = require('path'); var path = require('path');
var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js')); var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js'));
......
/* eslint-env node */
// Karma config for cms-squire suite. // Karma config for cms-squire suite.
// Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js // Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js
/* jshint node: true */
/*jshint -W079 */
'use strict'; 'use strict';
var path = require('path'); var path = require('path');
var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js')); var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js'));
......
/* eslint-env node */
// overwrite the loaded method and manually start the karma after a delay // overwrite the loaded method and manually start the karma after a delay
// Somehow the code initialized in jQuery's onready doesn't get called before karma auto starts // Somehow the code initialized in jQuery's onready doesn't get called before karma auto starts
/* jshint node: true */
'use strict'; 'use strict';
window.__karma__.loaded = function () { window.__karma__.loaded = function () {
setTimeout(function () { setTimeout(function () {
......
/* eslint-env node */
// Karma config for xmodule suite. // Karma config for xmodule suite.
// Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js // Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js
/* jshint node: true */
/*jshint -W079 */
'use strict'; 'use strict';
var path = require('path'); var path = require('path');
var configModule = require(path.join(__dirname, 'common_static/common/js/karma.common.conf.js')); var configModule = require(path.join(__dirname, 'common_static/common/js/karma.common.conf.js'));
......
...@@ -64,7 +64,7 @@ function (HtmlUtils) { ...@@ -64,7 +64,7 @@ function (HtmlUtils) {
'</div>', '</div>',
'</div>'].join('')), '</div>'].join('')),
{ {
volumeInstructions: gettext('Click on this button to mute or unmute this video or press UP or DOWN buttons to increase or decrease volume level.'), // jshint ignore: line volumeInstructions: gettext('Click on this button to mute or unmute this video or press UP or DOWN buttons to increase or decrease volume level.'), // eslint-disable-line max-len
adjustVideoVolume: gettext('Adjust video volume'), adjustVideoVolume: gettext('Adjust video volume'),
volumeText: gettext('Volume') volumeText: gettext('Volume')
} }
...@@ -130,7 +130,7 @@ function (HtmlUtils) { ...@@ -130,7 +130,7 @@ function (HtmlUtils) {
*/ */
render: function() { render: function() {
var container = this.el.find('.volume-slider'); var container = this.el.find('.volume-slider');
HtmlUtils.append(container, HtmlUtils.HTML('<div class="ui-slider-handle volume-handle"></div>')); HtmlUtils.append(container, HtmlUtils.HTML('<div class="ui-slider-handle volume-handle"></div>'));
this.volumeSlider = container.slider({ this.volumeSlider = container.slider({
......
...@@ -32,7 +32,7 @@ define( ...@@ -32,7 +32,7 @@ define(
template: [ template: [
'<div class="speeds menu-container" role="application">', '<div class="speeds menu-container" role="application">',
'<p class="sr instructions" id="speed-instructions">', '<p class="sr instructions" id="speed-instructions">',
gettext('Press UP to enter the speed menu then use the UP and DOWN arrow keys to navigate the different speeds, then press ENTER to change to the selected speed.'), // jshint ignore: line gettext('Press UP to enter the speed menu then use the UP and DOWN arrow keys to navigate the different speeds, then press ENTER to change to the selected speed.'), // eslint-disable-line max-len, indent
'</p>', '</p>',
'<button class="control speed-button" aria-disabled="false" aria-expanded="false"', '<button class="control speed-button" aria-disabled="false" aria-expanded="false"',
'title="', 'title="',
...@@ -242,20 +242,20 @@ define( ...@@ -242,20 +242,20 @@ define(
this.resetActiveSpeed(); this.resetActiveSpeed();
this.setActiveSpeed(speed); this.setActiveSpeed(speed);
}, },
resetActiveSpeed: function() { resetActiveSpeed: function() {
var speedOptions = this.speedsContainer.find('li'); var speedOptions = this.speedsContainer.find('li');
$(speedOptions).each(function(index, el) { $(speedOptions).each(function(index, el) {
$(el).removeClass('is-active') $(el).removeClass('is-active')
.find('.speed-option') .find('.speed-option')
.attr('aria-pressed', 'false'); .attr('aria-pressed', 'false');
}); });
}, },
setActiveSpeed: function(speed) { setActiveSpeed: function(speed) {
var speedOption = this.speedsContainer.find('li[data-speed="' + speed + '"]'); var speedOption = this.speedsContainer.find('li[data-speed="' + speed + '"]');
speedOption.addClass('is-active') speedOption.addClass('is-active')
.find('.speed-option') .find('.speed-option')
.attr('aria-pressed', 'true'); .attr('aria-pressed', 'true');
...@@ -280,7 +280,7 @@ define( ...@@ -280,7 +280,7 @@ define(
clickLinkHandler: function (event) { clickLinkHandler: function (event) {
var el = $(event.currentTarget).parent(), var el = $(event.currentTarget).parent(),
speed = $(el).data('speed'); speed = $(el).data('speed');
this.resetActiveSpeed(); this.resetActiveSpeed();
this.setActiveSpeed(speed); this.setActiveSpeed(speed);
this.state.videoCommands.execute('speed', speed); this.state.videoCommands.execute('speed', speed);
......
...@@ -580,22 +580,22 @@ function (Component) { ...@@ -580,22 +580,22 @@ function (Component) {
}, },
options = { options = {
items: [{ items: [{
label: i18n['Play'], // jshint ignore:line label: i18n.Play,
callback: function () { callback: function () {
state.videoCommands.execute('togglePlayback'); state.videoCommands.execute('togglePlayback');
}, },
initialize: function (menuitem) { initialize: function (menuitem) {
state.el.on({ state.el.on({
'play': function () { 'play': function () {
menuitem.setLabel(i18n['Pause']); // jshint ignore:line menuitem.setLabel(i18n.Pause);
}, },
'pause': function () { 'pause': function () {
menuitem.setLabel(i18n['Play']); // jshint ignore:line menuitem.setLabel(i18n.Play);
} }
}); });
} }
}, { }, {
label: state.videoVolumeControl.getMuteStatus() ? i18n['Unmute'] : i18n['Mute'], // jshint ignore:line label: state.videoVolumeControl.getMuteStatus() ? i18n.Unmute : i18n.Mute,
callback: function () { callback: function () {
state.videoCommands.execute('toggleMute'); state.videoCommands.execute('toggleMute');
}, },
...@@ -603,9 +603,9 @@ function (Component) { ...@@ -603,9 +603,9 @@ function (Component) {
state.el.on({ state.el.on({
'volumechange': function () { 'volumechange': function () {
if (state.videoVolumeControl.getMuteStatus()) { if (state.videoVolumeControl.getMuteStatus()) {
menuitem.setLabel(i18n['Unmute']); // jshint ignore:line menuitem.setLabel(i18n.Unmute);
} else { } else {
menuitem.setLabel(i18n['Mute']); // jshint ignore:line menuitem.setLabel(i18n.Mute);
} }
} }
}); });
...@@ -627,7 +627,7 @@ function (Component) { ...@@ -627,7 +627,7 @@ function (Component) {
}); });
} }
}, { }, {
label: i18n['Speed'], // jshint ignore:line label: i18n.Speed,
items: _.map(state.speeds, function (speed) { items: _.map(state.speeds, function (speed) {
var isSelected = speed === state.speed; var isSelected = speed === state.speed;
return {label: speed + 'x', callback: speedCallback, speed: speed, isSelected: isSelected}; return {label: speed + 'x', callback: speedCallback, speed: speed, isSelected: isSelected};
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
langTitle: gettext('Open language menu') langTitle: gettext('Open language menu')
} }
) )
); );
var subtitlesHtml = HtmlUtils.interpolateHtml( var subtitlesHtml = HtmlUtils.interpolateHtml(
...@@ -693,7 +693,7 @@ ...@@ -693,7 +693,7 @@
$li.append($link); $li.append($link);
$menu.append($li); $menu.append($li);
}); });
HtmlUtils.append( HtmlUtils.append(
this.languageChooserEl, this.languageChooserEl,
HtmlUtils.HTML($menu) HtmlUtils.HTML($menu)
...@@ -711,15 +711,15 @@ ...@@ -711,15 +711,15 @@
.removeClass('is-active') .removeClass('is-active')
.find('.control-lang') .find('.control-lang')
.attr('aria-pressed', 'false'); .attr('aria-pressed', 'false');
$(e.currentTarget).attr('aria-pressed', 'true'); $(e.currentTarget).attr('aria-pressed', 'true');
state.el.trigger('language_menu:change', [langCode]); state.el.trigger('language_menu:change', [langCode]);
self.fetchCaption(); self.fetchCaption();
// update the closed-captions lang attribute // update the closed-captions lang attribute
self.captionDisplayEl.attr('lang', langCode); self.captionDisplayEl.attr('lang', langCode);
// update the transcript lang attribute // update the transcript lang attribute
self.subtitlesMenuEl.attr('lang', langCode); self.subtitlesMenuEl.attr('lang', langCode);
self.closeLanguageMenu(e); self.closeLanguageMenu(e);
...@@ -794,7 +794,7 @@ ...@@ -794,7 +794,7 @@
self.state.el.addClass('is-captions-rendered'); self.state.el.addClass('is-captions-rendered');
self.subtitlesEl self.subtitlesEl
.attr('aria-label', gettext('Activating a link in this group will skip to the corresponding point in the video.')); // jshint ignore:line .attr('aria-label', gettext('Activating a link in this group will skip to the corresponding point in the video.')); // eslint-disable-line max-len
self.subtitlesEl.find('.transcript-title') self.subtitlesEl.find('.transcript-title')
.text(gettext('Video transcript')); .text(gettext('Video transcript'));
...@@ -808,7 +808,7 @@ ...@@ -808,7 +808,7 @@
.attr('lang', $('html').attr('lang')); .attr('lang', $('html').attr('lang'));
self.container.find('.menu-container .instructions') self.container.find('.menu-container .instructions')
.text(gettext('Press the UP arrow key to enter the language menu then use UP and DOWN arrow keys to navigate language options. Press ENTER to change to the selected language.')); // jshint ignore:line .text(gettext('Press the UP arrow key to enter the language menu then use UP and DOWN arrow keys to navigate language options. Press ENTER to change to the selected language.')); // eslint-disable-line max-len
}; };
...@@ -827,7 +827,7 @@ ...@@ -827,7 +827,7 @@
var topSpacer = HtmlUtils.interpolateHtml( var topSpacer = HtmlUtils.interpolateHtml(
HtmlUtils.HTML([ HtmlUtils.HTML([
'<li class="spacing" style="height: {height}px">', '<li class="spacing" style="height: {height}px">',
'<a href="#transcript-end-{id}" id="transcript-start-{id}" class="transcript-start"></a>', // jshint ignore:line '<a href="#transcript-end-{id}" id="transcript-start-{id}" class="transcript-start"></a>', // eslint-disable-line max-len, indent
'</li>' '</li>'
].join('')), ].join('')),
{ {
...@@ -839,7 +839,7 @@ ...@@ -839,7 +839,7 @@
var bottomSpacer = HtmlUtils.interpolateHtml( var bottomSpacer = HtmlUtils.interpolateHtml(
HtmlUtils.HTML([ HtmlUtils.HTML([
'<li class="spacing" style="height: {height}px">', '<li class="spacing" style="height: {height}px">',
'<a href="#transcript-start-{id}" id="transcript-end-{id}" class="transcript-end"></a>', // jshint ignore:line '<a href="#transcript-start-{id}" id="transcript-end-{id}" class="transcript-end"></a>', // eslint-disable-line max-len, indent
'</li>' '</li>'
].join('')), ].join('')),
{ {
...@@ -852,7 +852,7 @@ ...@@ -852,7 +852,7 @@
this.subtitlesMenuEl, this.subtitlesMenuEl,
topSpacer topSpacer
); );
HtmlUtils.append( HtmlUtils.append(
this.subtitlesMenuEl, this.subtitlesMenuEl,
bottomSpacer bottomSpacer
...@@ -1194,7 +1194,7 @@ ...@@ -1194,7 +1194,7 @@
this.captionDisplayEl this.captionDisplayEl
.text(gettext('(Caption will be displayed when you start playing the video.)')); .text(gettext('(Caption will be displayed when you start playing the video.)'));
} }
this.state.el.trigger('captions:show'); this.state.el.trigger('captions:show');
}, },
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
renderError: function () { renderError: function () {
this.$el.text( this.$el.text(
gettext('Your request could not be completed. Reload the page and try again. If the issue persists, click the Help tab to report the problem.') // jshint ignore: line gettext('Your request could not be completed. Reload the page and try again. If the issue persists, click the Help tab to report the problem.') // eslint-disable-line max-len
); );
}, },
......
/* globals DiscussionUtil */ /* globals DiscussionUtil, Comments */
(function() { (function() {
'use strict'; 'use strict';
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
Content.prototype.resetComments = function(children) { Content.prototype.resetComments = function(children) {
var comment, _i, _len, _ref, _results; var comment, _i, _len, _ref, _results;
this.set('children', []); this.set('children', []);
this.set('comments', new Comments()); // jshint ignore:line this.set('comments', new Comments());
_ref = children || []; _ref = children || [];
_results = []; _results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
......
...@@ -27,13 +27,10 @@ ...@@ -27,13 +27,10 @@
sort: sort_preference sort: sort_preference
}); });
course_settings = new DiscussionCourseSettings(element.data("course-settings")); course_settings = new DiscussionCourseSettings(element.data("course-settings"));
// suppressing Do not use 'new' for side effects. new DiscussionRouter({ // eslint-disable-line no-new
/* jshint -W031*/
new DiscussionRouter({
discussion: discussion, discussion: discussion,
course_settings: course_settings course_settings: course_settings
}); });
/* jshint +W031*/
if (!Backbone.History.started) { if (!Backbone.History.started) {
Backbone.history.start({pushState: true, root: "/courses/" + $$course_id + "/discussion/forum/"}); Backbone.history.start({pushState: true, root: "/courses/" + $$course_id + "/discussion/forum/"});
} else { } else {
......
...@@ -378,8 +378,7 @@ ...@@ -378,8 +378,7 @@
}); });
htmlString = $div.html(); htmlString = $div.html();
htmlString = htmlString.replace(/\\\$/g, ESCAPED_DOLLAR); htmlString = htmlString.replace(/\\\$/g, ESCAPED_DOLLAR);
// suppressing Don't make functions within a loop. /* eslint-disable no-loop-func */
/* jshint -W083 */
while (true) { while (true) {
if (RE_INLINEMATH.test(htmlString)) { if (RE_INLINEMATH.test(htmlString)) {
htmlString = htmlString.replace(RE_INLINEMATH, function($0, $1, $2, $3) { htmlString = htmlString.replace(RE_INLINEMATH, function($0, $1, $2, $3) {
...@@ -400,7 +399,7 @@ ...@@ -400,7 +399,7 @@
break; break;
} }
} }
/* jshint +W083 */ /* eslint-enable no-loop-func */
htmlString = processedHtmlString; htmlString = processedHtmlString;
htmlString = htmlString.replace(new RegExp(ESCAPED_DOLLAR, 'g'), '\\$'); htmlString = htmlString.replace(new RegExp(ESCAPED_DOLLAR, 'g'), '\\$');
htmlString = htmlString.replace(/\\\\\\\\/g, ESCAPED_BACKSLASH); htmlString = htmlString.replace(/\\\\\\\\/g, ESCAPED_BACKSLASH);
......
...@@ -111,4 +111,4 @@ ...@@ -111,4 +111,4 @@
} }
}); });
} }
}).call(window); // jshint ignore:line }).call(window);
/* jshint node: true */ /* eslint-env node */
'use strict'; 'use strict';
// By default, fixtures are loaded from spec/javascripts/fixtures but in karma everything gets served from /base // By default, fixtures are loaded from spec/javascripts/fixtures but in karma everything gets served from /base
......
...@@ -33,9 +33,8 @@ ...@@ -33,9 +33,8 @@
// does not use graceful-fs and tries to read files simultaneously. // does not use graceful-fs and tries to read files simultaneously.
// //
/* eslint-env node */
/* jshint node: true */
/*jshint -W079 */
'use strict'; 'use strict';
var path = require('path'); var path = require('path');
......
...@@ -12,9 +12,7 @@ ...@@ -12,9 +12,7 @@
DiscussionSpecHelper.setUpGlobals(); DiscussionSpecHelper.setUpGlobals();
DiscussionSpecHelper.setUnderscoreFixtures(); DiscussionSpecHelper.setUnderscoreFixtures();
// suppressing Line is too long (4272 characters!) // suppressing Line is too long (4272 characters!)
/* jshint -W101 */ appendSetFixtures("<script type=\"text/template\" id=\"thread-list-template\">\n <div class=\"forum-nav-header\">\n <button type=\"button\" class=\"forum-nav-browse\" id=\"forum-nav-browse\" aria-haspopup=\"true\">\n <span class=\"icon fa fa-bars\" aria-hidden=\"true\"></span>\n <span class=\"sr\">Discussion topics; currently listing: </span>\n <span class=\"forum-nav-browse-current\">All Discussions</span>\n ▾\n </button>\n <form class=\"forum-nav-search\">\n <label>\n <span class=\"sr\">Search all posts</span>\n <input class=\"forum-nav-search-input\" id=\"forum-nav-search\" type=\"text\" placeholder=\"Search all posts\">\n <span class=\"icon fa fa-search\" aria-hidden=\"true\"></span>\n </label>\n </form>\n </div>\n <div class=\"forum-nav-browse-menu-wrapper\" style=\"display: none\">\n <form class=\"forum-nav-browse-filter\">\n <label>\n <span class=\"sr\">Filter Topics</span>\n <input type=\"text\" class=\"forum-nav-browse-filter-input\" placeholder=\"filter topics\">\n </label>\n </form>\n <ul class=\"forum-nav-browse-menu\">\n <li class=\"forum-nav-browse-menu-item forum-nav-browse-menu-all\">\n <a href=\"#\" class=\"forum-nav-browse-title\">All Discussions</a>\n </li>\n <li class=\"forum-nav-browse-menu-item forum-nav-browse-menu-following\">\n <a href=\"#\" class=\"forum-nav-browse-title\"><span class=\"icon fa fa-star\" aria-hidden=\"true\"></span>Posts I'm Following</a>\n </li>\n <li class=\"forum-nav-browse-menu-item\">\n <a href=\"#\" class=\"forum-nav-browse-title\">Parent</a>\n <ul class=\"forum-nav-browse-submenu\">\n <li class=\"forum-nav-browse-menu-item\">\n <a href=\"#\" class=\"forum-nav-browse-title\">Target</a>\n <ul class=\"forum-nav-browse-submenu\">\n <li\n class=\"forum-nav-browse-menu-item\"\n data-discussion-id=\"child\"\n data-cohorted=\"false\"\n >\n <a href=\"#\" class=\"forum-nav-browse-title\">Child</a>\n </li>\n </ul>\n <li\n class=\"forum-nav-browse-menu-item\"\n data-discussion-id=\"sibling\"\n data-cohorted=\"false\"\n >\n <a href=\"#\" class=\"forum-nav-browse-title\">Sibling</a>\n </li>\n </ul>\n </li>\n <li\n class=\"forum-nav-browse-menu-item\"\n data-discussion-id=\"other\"\n data-cohorted=\"true\"\n >\n <a href=\"#\" class=\"forum-nav-browse-title\">Other Category</a>\n </li>\n </ul>\n </div>\n <div class=\"forum-nav-thread-list-wrapper\" id=\"sort-filter-wrapper\" tabindex=\"-1\">\n <div class=\"forum-nav-refine-bar\">\n <label class=\"forum-nav-filter-main\">\n <select class=\"forum-nav-filter-main-control\">\n <option value=\"all\">Show all</option>\n <option value=\"unread\">Unread</option>\n <option value=\"unanswered\">Unanswered</option>\n <option value=\"flagged\">Flagged</option>\n </select>\n </label>\n <% if (isCohorted && isPrivilegedUser) { %>\n <label class=\"forum-nav-filter-cohort\">\n <span class=\"sr\">Cohort:</span>\n <select class=\"forum-nav-filter-cohort-control\">\n <option value=\"\">in all cohorts</option>\n <option value=\"1\">Cohort1</option>\n <option value=\"2\">Cohort2</option>\n </select>\n </label>\n <% } %>\n <label class=\"forum-nav-sort\">\n <select class=\"forum-nav-sort-control\">\n <option value=\"activity\">by recent activity</option>\n <option value=\"comments\">by most activity</option>\n <option value=\"votes\">by most votes</option>\n </select>\n </label>\n </div>\n </div>\n <div class=\"search-alerts\"></div>\n <ul class=\"forum-nav-thread-list\"></ul>\n</script>"); // eslint-disable-line max-len
appendSetFixtures("<script type=\"text/template\" id=\"thread-list-template\">\n <div class=\"forum-nav-header\">\n <button type=\"button\" class=\"forum-nav-browse\" id=\"forum-nav-browse\" aria-haspopup=\"true\">\n <span class=\"icon fa fa-bars\" aria-hidden=\"true\"></span>\n <span class=\"sr\">Discussion topics; currently listing: </span>\n <span class=\"forum-nav-browse-current\">All Discussions</span>\n ▾\n </button>\n <form class=\"forum-nav-search\">\n <label>\n <span class=\"sr\">Search all posts</span>\n <input class=\"forum-nav-search-input\" id=\"forum-nav-search\" type=\"text\" placeholder=\"Search all posts\">\n <span class=\"icon fa fa-search\" aria-hidden=\"true\"></span>\n </label>\n </form>\n </div>\n <div class=\"forum-nav-browse-menu-wrapper\" style=\"display: none\">\n <form class=\"forum-nav-browse-filter\">\n <label>\n <span class=\"sr\">Filter Topics</span>\n <input type=\"text\" class=\"forum-nav-browse-filter-input\" placeholder=\"filter topics\">\n </label>\n </form>\n <ul class=\"forum-nav-browse-menu\">\n <li class=\"forum-nav-browse-menu-item forum-nav-browse-menu-all\">\n <a href=\"#\" class=\"forum-nav-browse-title\">All Discussions</a>\n </li>\n <li class=\"forum-nav-browse-menu-item forum-nav-browse-menu-following\">\n <a href=\"#\" class=\"forum-nav-browse-title\"><span class=\"icon fa fa-star\" aria-hidden=\"true\"></span>Posts I'm Following</a>\n </li>\n <li class=\"forum-nav-browse-menu-item\">\n <a href=\"#\" class=\"forum-nav-browse-title\">Parent</a>\n <ul class=\"forum-nav-browse-submenu\">\n <li class=\"forum-nav-browse-menu-item\">\n <a href=\"#\" class=\"forum-nav-browse-title\">Target</a>\n <ul class=\"forum-nav-browse-submenu\">\n <li\n class=\"forum-nav-browse-menu-item\"\n data-discussion-id=\"child\"\n data-cohorted=\"false\"\n >\n <a href=\"#\" class=\"forum-nav-browse-title\">Child</a>\n </li>\n </ul>\n <li\n class=\"forum-nav-browse-menu-item\"\n data-discussion-id=\"sibling\"\n data-cohorted=\"false\"\n >\n <a href=\"#\" class=\"forum-nav-browse-title\">Sibling</a>\n </li>\n </ul>\n </li>\n <li\n class=\"forum-nav-browse-menu-item\"\n data-discussion-id=\"other\"\n data-cohorted=\"true\"\n >\n <a href=\"#\" class=\"forum-nav-browse-title\">Other Category</a>\n </li>\n </ul>\n </div>\n <div class=\"forum-nav-thread-list-wrapper\" id=\"sort-filter-wrapper\" tabindex=\"-1\">\n <div class=\"forum-nav-refine-bar\">\n <label class=\"forum-nav-filter-main\">\n <select class=\"forum-nav-filter-main-control\">\n <option value=\"all\">Show all</option>\n <option value=\"unread\">Unread</option>\n <option value=\"unanswered\">Unanswered</option>\n <option value=\"flagged\">Flagged</option>\n </select>\n </label>\n <% if (isCohorted && isPrivilegedUser) { %>\n <label class=\"forum-nav-filter-cohort\">\n <span class=\"sr\">Cohort:</span>\n <select class=\"forum-nav-filter-cohort-control\">\n <option value=\"\">in all cohorts</option>\n <option value=\"1\">Cohort1</option>\n <option value=\"2\">Cohort2</option>\n </select>\n </label>\n <% } %>\n <label class=\"forum-nav-sort\">\n <select class=\"forum-nav-sort-control\">\n <option value=\"activity\">by recent activity</option>\n <option value=\"comments\">by most activity</option>\n <option value=\"votes\">by most votes</option>\n </select>\n </label>\n </div>\n </div>\n <div class=\"search-alerts\"></div>\n <ul class=\"forum-nav-thread-list\"></ul>\n</script>");
/* jshint +W101 */
this.threads = [ this.threads = [
DiscussionViewSpecHelper.makeThreadWithProps({ DiscussionViewSpecHelper.makeThreadWithProps({
id: "1", id: "1",
......
...@@ -135,12 +135,11 @@ ...@@ -135,12 +135,11 @@
it( it(
"body with " + numImages + " images and " + (truncatedText ? "truncated" : "untruncated") + "body with " + numImages + " images and " + (truncatedText ? "truncated" : "untruncated") +
" text", " text",
// suppressing Don't make functions within a loop. // eslint-disable no-loop-func
/* jshint -W083 */
function() { function() {
return checkPostWithImages(numImages, truncatedText, this.threadData, this.imageTag); return checkPostWithImages(numImages, truncatedText, this.threadData, this.imageTag);
} }
/* jshint +W083 */ // eslint-enable no-loop-func
); );
} }
} }
......
/* eslint-env node */
// Extensions to Jasmine. // Extensions to Jasmine.
// //
// This file adds the following: // This file adds the following:
...@@ -9,7 +11,6 @@ ...@@ -9,7 +11,6 @@
// jQuery has been loaded, we set these matchers up again in this module. // jQuery has been loaded, we set these matchers up again in this module.
(function(root, factory) { (function(root, factory) {
/* jshint strict: false */
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
require(['jquery'], function ($) { require(['jquery'], function ($) {
factory(root, $); factory(root, $);
...@@ -18,7 +19,6 @@ ...@@ -18,7 +19,6 @@
factory(root, root.jQuery); factory(root, root.jQuery);
} }
}((function() { }((function() {
/* jshint strict: false */
return this; return this;
}()), function(window, $) { }()), function(window, $) {
'use strict'; 'use strict';
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
}); });
}); });
/* jshint ignore:start */ /* eslint-disable */
// All the code below is taken from: // All the code below is taken from:
// https://github.com/velesin/jasmine-jquery/blob/2.1.1/lib/jasmine-jquery.js // https://github.com/velesin/jasmine-jquery/blob/2.1.1/lib/jasmine-jquery.js
beforeEach(function() { beforeEach(function() {
...@@ -271,5 +271,5 @@ ...@@ -271,5 +271,5 @@
data.handlers = []; data.handlers = [];
} }
}; };
/* jshint ignore:end */ /* eslint-enable */
})); }));
/* eslint-env node */
// Custom library to replace the legacy non jasmine 2.0 compatible jasmine-stealth // Custom library to replace the legacy non jasmine 2.0 compatible jasmine-stealth
// jshint ignore: start
(function (root, factory) { (function (root, factory) {
factory(root, root.jasmine, root._); factory(root, root.jasmine, root._);
}((function () { }((function () {
...@@ -61,4 +62,4 @@ ...@@ -61,4 +62,4 @@
spyOnConstructor: spyOnConstructor, spyOnConstructor: spyOnConstructor,
clearSpies: clearSpies clearSpies: clearSpies
}; };
})); }));
\ No newline at end of file
/* eslint-env node */
// Takes a latch function and optionally timeout and error message. // Takes a latch function and optionally timeout and error message.
// Polls the latch function until the it returns true or the maximum timeout expires // Polls the latch function until the it returns true or the maximum timeout expires
// whichever comes first. // whichever comes first.
(function(root, factory) { (function(root, factory) {
/* jshint strict: false */
factory(root, root.jQuery); factory(root, root.jQuery);
}((function() { }((function() {
/* jshint strict: false */
return this; return this;
}()), function(window, $) { }()), function(window, $) {
'use strict'; 'use strict';
...@@ -30,7 +29,7 @@ ...@@ -30,7 +29,7 @@
} else { } else {
if (elapsedTimeInMs >= maxTimeout) { if (elapsedTimeInMs >= maxTimeout) {
// explicitly fail the spec with the given message // explicitly fail the spec with the given message
fail(message); // jshint ignore:line fail(message);
// clear timeout and reject the promise // clear timeout and reject the promise
realClearTimeout(timeout); realClearTimeout(timeout);
......
...@@ -107,7 +107,6 @@ describe("Formula Equation Preview", function () { ...@@ -107,7 +107,6 @@ describe("Formula Equation Preview", function () {
}); });
it('does not request again if the initial request has already been made', function (done) { it('does not request again if the initial request has already been made', function (done) {
// jshint undef:false
expect(window.Problem.inputAjax.calls.count()).toEqual(1); expect(window.Problem.inputAjax.calls.count()).toEqual(1);
// Reset the spy in order to check calls again. // Reset the spy in order to check calls again.
......
// Karma config for common suite. // Karma config for common suite.
// Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js // Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js
/* jshint node: true */ /* eslint-env node */
/*jshint -W079 */
'use strict'; 'use strict';
var path = require('path'); var path = require('path');
var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js')); var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js'));
......
// Karma config for common-requirejs suite. // Karma config for common-requirejs suite.
// Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js // Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js
/* jshint node: true */ /* eslint-env node */
/*jshint -W079 */
'use strict'; 'use strict';
var path = require('path'); var path = require('path');
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
gettext('View Teams in the %(topic_name)s Topic'), gettext('View Teams in the %(topic_name)s Topic'),
{ topic_name: this.model.get('name') }, true { topic_name: this.model.get('name') }, true
)); ));
return '<span class="sr">' + screenReaderText + '</span><span class="icon fa fa-arrow-right" aria-hidden="true"></span>'; // jshint ignore:line return '<span class="sr">' + screenReaderText + '</span><span class="icon fa fa-arrow-right" aria-hidden="true"></span>'; // eslint-disable-line max-len
} }
}); });
......
...@@ -35,16 +35,16 @@ ...@@ -35,16 +35,16 @@
// The text that appears on the dialog box when entering Images. // The text that appears on the dialog box when entering Images.
var imageDialogText = gettext("Insert Image (upload file or type URL)"), var imageDialogText = gettext("Insert Image (upload file or type URL)"),
imageUrlHelpText = gettext("Type in a URL or use the \"Choose File\" button to upload a file from your machine. (e.g. 'http://example.com/img/clouds.jpg')"), // jshint ignore:line imageUrlHelpText = gettext("Type in a URL or use the \"Choose File\" button to upload a file from your machine. (e.g. 'http://example.com/img/clouds.jpg')"), // eslint-disable-line max-len
imageDescriptionLabel = gettext("Image Description"), imageDescriptionLabel = gettext("Image Description"),
imageDefaultText = "http://", // The default text that appears in input imageDefaultText = "http://", // The default text that appears in input
imageDescError = gettext("Please describe this image or agree that it has no contextual value by checking the checkbox."), // jshint ignore:line imageDescError = gettext('Please describe this image or agree that it has no contextual value by checking the checkbox.'), // eslint-disable-line max-len
imageDescriptionHelpText = gettext("e.g. 'Sky with clouds'. The description is helpful for users who cannot see the image."), // jshint ignore:line imageDescriptionHelpText = gettext("e.g. 'Sky with clouds'. The description is helpful for users who cannot see the image."), // eslint-disable-line max-len
imageDescriptionHelpLink = { imageDescriptionHelpLink = {
href: 'http://www.w3.org/TR/html5/embedded-content-0.html#alt', href: 'http://www.w3.org/TR/html5/embedded-content-0.html#alt',
text: gettext("How to create useful text alternatives.") text: gettext("How to create useful text alternatives.")
}, },
imageIsDecorativeLabel = gettext("This image is for decorative purposes only and does not require a description."); // jshint ignore:line imageIsDecorativeLabel = gettext('This image is for decorative purposes only and does not require a description.'); // eslint-disable-line max-len
// Text that is shared between both link and image dialog boxes. // Text that is shared between both link and image dialog boxes.
var defaultHelpHoverTitle = gettext("Markdown Editing Help"), var defaultHelpHoverTitle = gettext("Markdown Editing Help"),
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
!function ($) { !function ($) {
"use strict"; // jshint ;_; "use strict";
/* ALERT CLASS DEFINITION /* ALERT CLASS DEFINITION
...@@ -87,4 +87,4 @@ ...@@ -87,4 +87,4 @@
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close) $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
}) })
}(window.jQuery); }(window.jQuery);
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
!function ($) { !function ($) {
"use strict"; // jshint ;_; "use strict";
/* COLLAPSE PUBLIC CLASS DEFINITION /* COLLAPSE PUBLIC CLASS DEFINITION
...@@ -154,4 +154,4 @@ ...@@ -154,4 +154,4 @@
}) })
}) })
}(window.jQuery); }(window.jQuery);
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
!function ($) { !function ($) {
"use strict"; // jshint ;_; 'use strict';
/* MODAL CLASS DEFINITION /* MODAL CLASS DEFINITION
...@@ -215,4 +215,4 @@ ...@@ -215,4 +215,4 @@
}) })
}) })
}(window.jQuery); }(window.jQuery);
\ No newline at end of file
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
$(function () { $(function () {
"use strict"; // jshint ;_; 'use strict';
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/) /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
...@@ -58,4 +58,4 @@ ...@@ -58,4 +58,4 @@
}) })
}(window.jQuery); }(window.jQuery);
\ No newline at end of file
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
); );
if (this.collection.findWhere({user: user})) { if (this.collection.findWhere({user: user})) {
message = gettext("Certificate of <%= user %> has already been invalidated. Please check your spelling and retry."); // jshint ignore:line message = gettext('Certificate of <%= user %> has already been invalidated. Please check your spelling and retry.'); // eslint-disable-line max-len
this.escapeAndShowMessage(_.template(message)({user: user})); this.escapeAndShowMessage(_.template(message)({user: user}));
} }
else if (certificate_invalidation.isValid()) { else if (certificate_invalidation.isValid()) {
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
model.destroy({ model.destroy({
success: function() { success: function() {
self.escapeAndShowMessage( self.escapeAndShowMessage(
gettext('The certificate for this learner has been re-validated and the system is re-running the grade for this learner.') // jshint ignore:line gettext('The certificate for this learner has been re-validated and the system is re-running the grade for this learner.') // eslint-disable-line max-len
); );
}, },
error: function(model, response) { error: function(model, response) {
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
} }
else { else {
self.escapeAndShowMessage( self.escapeAndShowMessage(
gettext('Could not find Certificate Invalidation in the list. Please refresh the page and try again') // jshint ignore:line gettext('Could not find Certificate Invalidation in the list. Please refresh the page and try again') // eslint-disable-line max-len
); );
} }
}, },
...@@ -126,4 +126,4 @@ ...@@ -126,4 +126,4 @@
}); });
} }
); );
}).call(this, define || RequireJS.define); }).call(this, define || RequireJS.define);
\ No newline at end of file
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
} }
else{ else{
this.escapeAndShowMessage( this.escapeAndShowMessage(
gettext('Could not find Certificate Exception in white list. Please refresh the page and try again') // jshint ignore:line gettext('Could not find Certificate Exception in white list. Please refresh the page and try again') // eslint-disable-line max-len
); );
} }
}, },
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
); );
} }
else if(certificate_exception.isValid()){ else if(certificate_exception.isValid()){
message = gettext("<%= user %> has been successfully added to the exception list. Click Generate Exception Certificate below to send the certificate."); // jshint ignore:line message = gettext('<%= user %> has been successfully added to the exception list. Click Generate Exception Certificate below to send the certificate.'); // eslint-disable-line max-len
certificate_exception.save( certificate_exception.save(
null, null,
{ {
...@@ -118,4 +118,4 @@ ...@@ -118,4 +118,4 @@
}); });
} }
); );
}).call(this, define || RequireJS.define); }).call(this, define || RequireJS.define);
\ No newline at end of file
/** /**
* View for the receipt page. * View for the receipt page.
*/ */
/* globals _, Backbone */
var edx = edx || {}; var edx = edx || {};
(function ($, _, Backbone) { (function ($, _, Backbone) {
...@@ -319,10 +321,10 @@ var edx = edx || {}; ...@@ -319,10 +321,10 @@ var edx = edx || {};
new edx.commerce.ReceiptView({ new edx.commerce.ReceiptView({
el: $('#receipt-container') el: $('#receipt-container')
}); });
})(jQuery, _, Backbone);
})(jQuery, _, Backbone); // jshint ignore:line function completeOrder(event) {
'use strict';
function completeOrder(event) { // jshint ignore:line
var courseKey = $(event).data("course-key"), var courseKey = $(event).data("course-key"),
username = $(event).data("username"), username = $(event).data("username"),
providerId = $(event).data("provider"), providerId = $(event).data("provider"),
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
}); });
// 2. instantiating this button attaches events to all buttons in the courseware. // 2. instantiating this button attaches events to all buttons in the courseware.
new BookmarksListButton(); // jshint ignore:line new BookmarksListButton(); // eslint-disable-line no-new
}; };
} }
); );
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
* for the dashboard should be implemented as self-contained * for the dashboard should be implemented as self-contained
* modules with unit tests. * modules with unit tests.
*/ */
/* globals Logger, accessible_modal, interpolate */
var edx = edx || {}; var edx = edx || {};
(function($, gettext, Logger, accessibleModal, interpolate) { (function($, gettext, Logger, accessibleModal, interpolate) {
...@@ -180,5 +183,4 @@ ...@@ -180,5 +183,4 @@
$("#unenroll_course_name").text($(event.target).data("course-name")); $("#unenroll_course_name").text($(event.target).data("course-name"));
}); });
}; };
})(jQuery, gettext, Logger, accessible_modal, interpolate);
})(jQuery, gettext, Logger, accessible_modal, interpolate); // jshint undef:false
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
this.showNotification({ this.showNotification({
type: 'confirmation', type: 'confirmation',
title: StringUtils.interpolate( title: StringUtils.interpolate(
gettext("This course uses automatic cohorting for verified track learners. You cannot disable cohorts, and you cannot rename the manual cohort named '{verifiedCohortName}'. To change the configuration for verified track cohorts, contact your edX partner manager."), // jshint ignore:line gettext("This course uses automatic cohorting for verified track learners. You cannot disable cohorts, and you cannot rename the manual cohort named '{verifiedCohortName}'. To change the configuration for verified track cohorts, contact your edX partner manager."), // eslint-disable-line max-len
{verifiedCohortName: verifiedCohortName} {verifiedCohortName: verifiedCohortName}
) )
}); });
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
this.showNotification({ this.showNotification({
type: 'error', type: 'error',
title: StringUtils.interpolate( title: StringUtils.interpolate(
gettext("This course has automatic cohorting enabled for verified track learners, but the required cohort does not exist. You must create a manually-assigned cohort named '{verifiedCohortName}' for the feature to work."), // jshint ignore:line gettext("This course has automatic cohorting enabled for verified track learners, but the required cohort does not exist. You must create a manually-assigned cohort named '{verifiedCohortName}' for the feature to work."), // eslint-disable-line max-len
{verifiedCohortName: verifiedCohortName} {verifiedCohortName: verifiedCohortName}
) )
}); });
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
else { else {
this.showNotification({ this.showNotification({
type: 'error', type: 'error',
title: gettext('This course has automatic cohorting enabled for verified track learners, but cohorts are disabled. You must enable cohorts for the feature to work.') // jshint ignore:line title: gettext('This course has automatic cohorting enabled for verified track learners, but cohorts are disabled. You must enable cohorts for the feature to work.') // eslint-disable-line max-len
}); });
enableCohortsCheckbox.prop('disabled', false); enableCohortsCheckbox.prop('disabled', false);
} }
......
...@@ -6,9 +6,7 @@ define(['jquery', 'logger', 'js/courseware/toggle_element_visibility', 'moment'] ...@@ -6,9 +6,7 @@ define(['jquery', 'logger', 'js/courseware/toggle_element_visibility', 'moment']
beforeEach(function() { beforeEach(function() {
loadFixtures('js/fixtures/courseware/course_updates.html'); loadFixtures('js/fixtures/courseware/course_updates.html');
/*jshint newcap: false */
ToggleElementVisibility(); ToggleElementVisibility();
/*jshint newcap: true */
spyOn(Logger, 'log'); spyOn(Logger, 'log');
}); });
......
...@@ -7,7 +7,7 @@ define(['edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers', 'js/shoppingcart/sh ...@@ -7,7 +7,7 @@ define(['edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers', 'js/shoppingcart/sh
var requests = null; var requests = null;
beforeEach(function() { beforeEach(function() {
setFixtures('<section class="wrapper confirm-enrollment shopping-cart cart-view"><form action="" method="post"><input type="hidden" name="" value="" /><span class="icon fa fa-caret-right"></span><input type="submit" value="Payment"/></form></section>'); // jshint ignore:line setFixtures('<section class="wrapper confirm-enrollment shopping-cart cart-view"><form action="" method="post"><input type="hidden" name="" value="" /><span class="icon fa fa-caret-right"></span><input type="submit" value="Payment"/></form></section>'); // eslint-disable-line max-len
view = new edx.shoppingcart.showcart.CartView({ view = new edx.shoppingcart.showcart.CartView({
el: $('.confirm-enrollment.cart-view form') el: $('.confirm-enrollment.cart-view form')
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
var fields = html || ''; var fields = html || '';
this.successMessage = HtmlUtils.interpolateHtml( this.successMessage = HtmlUtils.interpolateHtml(
// eslint-disable-next-line // eslint-disable-next-line
gettext('We have sent an email message with password reset instructions to the email address you provided. If you do not receive this message, {anchorStart}contact technical support{anchorEnd}.'), { // jshint ignore:line gettext('We have sent an email message with password reset instructions to the email address you provided. If you do not receive this message, {anchorStart}contact technical support{anchorEnd}.'), { // eslint-disable-line max-len
anchorStart: HtmlUtils.HTML('<a href="' + this.supportURL + '">'), anchorStart: HtmlUtils.HTML('<a href="' + this.supportURL + '">'),
anchorEnd: HtmlUtils.HTML('</a>') anchorEnd: HtmlUtils.HTML('</a>')
} }
...@@ -151,4 +151,3 @@ ...@@ -151,4 +151,3 @@
}); });
}); });
}).call(this, define || RequireJS.define); }).call(this, define || RequireJS.define);
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
aboutSectionsData = [ aboutSectionsData = [
{ {
title: gettext('Basic Account Information'), title: gettext('Basic Account Information'),
subtitle: gettext('These settings include basic information about your account. You can also specify additional information and see your linked social accounts on this page.'), /* jshint ignore:line */ subtitle: gettext('These settings include basic information about your account. You can also specify additional information and see your linked social accounts on this page.'), // eslint-disable-line max-len
fields: [ fields: [
{ {
view: new AccountSettingsFieldViews.ReadonlyFieldView({ view: new AccountSettingsFieldViews.ReadonlyFieldView({
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
title: gettext('Username'), title: gettext('Username'),
valueAttribute: 'username', valueAttribute: 'username',
helpMessage: StringUtils.interpolate( helpMessage: StringUtils.interpolate(
gettext('The name that identifies you throughout {platform_name}. You cannot change your username.'), /* jshint ignore:line */ gettext('The name that identifies you throughout {platform_name}. You cannot change your username.'), // eslint-disable-line max-len
{platform_name: platformName} {platform_name: platformName}
) )
}) })
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
title: gettext('Full Name'), title: gettext('Full Name'),
valueAttribute: 'name', valueAttribute: 'name',
helpMessage: gettext( helpMessage: gettext(
'The name that is used for ID verification and appears on your certificates. Other learners never see your full name. Make sure to enter your name exactly as it appears on your government-issued photo ID, including any non-Roman characters.' /* jshint ignore:line */ 'The name that is used for ID verification and appears on your certificates. Other learners never see your full name. Make sure to enter your name exactly as it appears on your government-issued photo ID, including any non-Roman characters.' // eslint-disable-line max-len
), ),
persistChanges: true persistChanges: true
}) })
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
title: gettext('Email Address'), title: gettext('Email Address'),
valueAttribute: 'email', valueAttribute: 'email',
helpMessage: StringUtils.interpolate( helpMessage: StringUtils.interpolate(
gettext('The email address you use to sign in. Communications from {platform_name} and your courses are sent to this address.'), /* jshint ignore:line */ gettext('The email address you use to sign in. Communications from {platform_name} and your courses are sent to this address.'), // eslint-disable-line max-len
{platform_name: platformName} {platform_name: platformName}
), ),
persistChanges: true persistChanges: true
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
linkTitle: gettext('Reset Your Password'), linkTitle: gettext('Reset Your Password'),
linkHref: fieldsData.password.url, linkHref: fieldsData.password.url,
helpMessage: StringUtils.interpolate( helpMessage: StringUtils.interpolate(
gettext('When you select "Reset Your Password", a message will be sent to the email address for your {platform_name} account. Click the link in the message to reset your password.'), /* jshint ignore:line */ gettext('When you select "Reset Your Password", a message will be sent to the email address for your {platform_name} account. Click the link in the message to reset your password.'), // eslint-disable-line max-len
{platform_name: platformName} {platform_name: platformName}
) )
}) })
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
required: true, required: true,
refreshPageOnSave: true, refreshPageOnSave: true,
helpMessage: StringUtils.interpolate( helpMessage: StringUtils.interpolate(
gettext('The language used throughout this site. This site is currently available in a limited number of languages.'), /* jshint ignore:line */ gettext('The language used throughout this site. This site is currently available in a limited number of languages.'), // eslint-disable-line max-len
{platform_name: platformName} {platform_name: platformName}
), ),
options: fieldsData.language.options, options: fieldsData.language.options,
...@@ -207,7 +207,7 @@ ...@@ -207,7 +207,7 @@
{ {
title: gettext('My Orders'), title: gettext('My Orders'),
subtitle: StringUtils.interpolate( subtitle: StringUtils.interpolate(
gettext('This page contains information about orders that you have placed with {platform_name}.'), /* jshint ignore:line */ gettext('This page contains information about orders that you have placed with {platform_name}.'), // eslint-disable-line max-len
{platform_name: platformName} {platform_name: platformName}
), ),
fields: _.map(ordersHistoryData, function(order) { fields: _.map(ordersHistoryData, function(order) {
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
return HtmlUtils.joinHtml( return HtmlUtils.joinHtml(
this.indicators.success, this.indicators.success,
StringUtils.interpolate( StringUtils.interpolate(
gettext('We\'ve sent a confirmation message to {new_email_address}. Click the link in the message to update your email address.'), /* jshint ignore:line */ gettext('We\'ve sent a confirmation message to {new_email_address}. Click the link in the message to update your email address.'), // eslint-disable-line max-len
{'new_email_address': this.fieldValue()} {'new_email_address': this.fieldValue()}
) )
); );
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
view.showNotificationMessage( view.showNotificationMessage(
HtmlUtils.joinHtml( HtmlUtils.joinHtml(
view.indicators.error, view.indicators.error,
gettext('You must sign out and sign back in before your language changes take effect.') // jshint ignore:line gettext('You must sign out and sign back in before your language changes take effect.') // eslint-disable-line max-len
) )
); );
} }
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
return HtmlUtils.joinHtml( return HtmlUtils.joinHtml(
this.indicators.success, this.indicators.success,
StringUtils.interpolate( StringUtils.interpolate(
gettext('We\'ve sent a message to {email_address}. Click the link in the message to reset your password.'), /* jshint ignore:line */ gettext('We\'ve sent a message to {email_address}. Click the link in the message to reset your password.'), // eslint-disable-line max-len
{'email_address': this.model.get(this.options.emailAttribute)} {'email_address': this.model.get(this.options.emailAttribute)}
) )
); );
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
linkTitle = gettext('Unlink This Account'); linkTitle = gettext('Unlink This Account');
linkClass = 'social-field-linked'; linkClass = 'social-field-linked';
subTitle = StringUtils.interpolate( subTitle = StringUtils.interpolate(
gettext('You can use your {accountName} account to sign in to your {platformName} account.'), /* jshint ignore:line */ gettext('You can use your {accountName} account to sign in to your {platformName} account.'), // eslint-disable-line max-len
{accountName: this.options.title, platformName: this.options.platformName} {accountName: this.options.title, platformName: this.options.platformName}
); );
screenReaderTitle = StringUtils.interpolate( screenReaderTitle = StringUtils.interpolate(
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
linkTitle = gettext('Link Your Account'); linkTitle = gettext('Link Your Account');
linkClass = 'social-field-unlinked'; linkClass = 'social-field-unlinked';
subTitle = StringUtils.interpolate( subTitle = StringUtils.interpolate(
gettext('Link your {accountName} account to your {platformName} account and use {accountName} to sign in to {platformName}.'), /* jshint ignore:line */ gettext('Link your {accountName} account to your {platformName} account and use {accountName} to sign in to {platformName}.'), // eslint-disable-line max-len
{accountName: this.options.title, platformName: this.options.platformName} {accountName: this.options.title, platformName: this.options.platformName}
); );
} }
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
return HtmlUtils.joinHtml(this.indicators.success, gettext('Successfully unlinked.')); return HtmlUtils.joinHtml(this.indicators.success, gettext('Successfully unlinked.'));
} }
}), }),
OrderHistoryFieldView: FieldViews.ReadonlyFieldView.extend({ OrderHistoryFieldView: FieldViews.ReadonlyFieldView.extend({
fieldType: 'orderHistory', fieldType: 'orderHistory',
fieldTemplate: field_order_history_template, fieldTemplate: field_order_history_template,
......
...@@ -27,21 +27,21 @@ ...@@ -27,21 +27,21 @@
if (this.profileIsPrivate) { if (this.profileIsPrivate) {
this._super( this._super(
HtmlUtils.interpolateHtml( HtmlUtils.interpolateHtml(
gettext("You must specify your birth year before you can share your full profile. To specify your birth year, go to the {account_settings_page_link}"), // jshint ignore:line gettext('You must specify your birth year before you can share your full profile. To specify your birth year, go to the {account_settings_page_link}'), // eslint-disable-line max-len
{'account_settings_page_link':accountSettingsLink} {'account_settings_page_link':accountSettingsLink}
) )
); );
} else if (this.requiresParentalConsent) { } else if (this.requiresParentalConsent) {
this._super( this._super(
HtmlUtils.interpolateHtml( HtmlUtils.interpolateHtml(
gettext('You must be over 13 to share a full profile. If you are over 13, make sure that you have specified a birth year on the {account_settings_page_link}'), // jshint ignore:line gettext('You must be over 13 to share a full profile. If you are over 13, make sure that you have specified a birth year on the {account_settings_page_link}'), // eslint-disable-line max-len
{'account_settings_page_link': accountSettingsLink} {'account_settings_page_link': accountSettingsLink}
) )
); );
} }
else { else {
this._super(''); this._super('');
} }
}, },
updateFieldValue: function() { updateFieldValue: function() {
......
;(function (define, undefined) { ;(function (define, undefined) {
'use strict'; 'use strict';
define([ define([
'gettext', 'jquery', 'underscore', 'backbone', 'gettext', 'jquery', 'underscore', 'backbone',
'edx-ui-toolkit/js/utils/html-utils', 'edx-ui-toolkit/js/utils/html-utils',
'text!templates/fields/field_readonly.underscore', 'text!templates/fields/field_readonly.underscore',
'text!templates/fields/field_dropdown.underscore', 'text!templates/fields/field_dropdown.underscore',
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
var FieldViews = {}; var FieldViews = {};
FieldViews.FieldView = Backbone.View.extend({ FieldViews.FieldView = Backbone.View.extend({
fieldType: 'generic', fieldType: 'generic',
className: function () { className: function () {
...@@ -32,27 +32,27 @@ ...@@ -32,27 +32,27 @@
indicators: { indicators: {
'canEdit': HtmlUtils.joinHtml( 'canEdit': HtmlUtils.joinHtml(
HtmlUtils.HTML('<span class="icon fa fa-pencil message-can-edit" aria-hidden="true"></span><span class="sr">'), // jshint ignore:line HtmlUtils.HTML('<span class="icon fa fa-pencil message-can-edit" aria-hidden="true"></span><span class="sr">'), // eslint-disable-line max-len
gettext("Editable"), gettext("Editable"),
HtmlUtils.HTML('</span>') HtmlUtils.HTML('</span>')
), ),
'error': HtmlUtils.joinHtml( 'error': HtmlUtils.joinHtml(
HtmlUtils.HTML('<span class="fa fa-exclamation-triangle message-error" aria-hidden="true"></span><span class="sr">'), // jshint ignore:line HtmlUtils.HTML('<span class="fa fa-exclamation-triangle message-error" aria-hidden="true"></span><span class="sr">'), // eslint-disable-line max-len
gettext("Error"), gettext("Error"),
HtmlUtils.HTML('</span>') HtmlUtils.HTML('</span>')
), ),
'validationError': HtmlUtils.joinHtml( 'validationError': HtmlUtils.joinHtml(
HtmlUtils.HTML('<span class="fa fa-exclamation-triangle message-validation-error" aria-hidden="true"></span><span class="sr">'), // jshint ignore:line HtmlUtils.HTML('<span class="fa fa-exclamation-triangle message-validation-error" aria-hidden="true"></span><span class="sr">'), // eslint-disable-line max-len
gettext("Validation Error"), gettext("Validation Error"),
HtmlUtils.HTML('</span>') HtmlUtils.HTML('</span>')
), ),
'inProgress': HtmlUtils.joinHtml( 'inProgress': HtmlUtils.joinHtml(
HtmlUtils.HTML('<span class="fa fa-spinner fa-pulse message-in-progress" aria-hidden="true"></span><span class="sr">'), // jshint ignore:line HtmlUtils.HTML('<span class="fa fa-spinner fa-pulse message-in-progress" aria-hidden="true"></span><span class="sr">'), // eslint-disable-line max-len
gettext("In Progress"), gettext("In Progress"),
HtmlUtils.HTML('</span>') HtmlUtils.HTML('</span>')
), ),
'success': HtmlUtils.joinHtml( 'success': HtmlUtils.joinHtml(
HtmlUtils.HTML('<span class="fa fa-check message-success" aria-hidden="true"></span><span class="sr">'), // jshint ignore:line HtmlUtils.HTML('<span class="fa fa-check message-success" aria-hidden="true"></span><span class="sr">'), // eslint-disable-line max-len
gettext("Success"), gettext("Success"),
HtmlUtils.HTML('</span>') HtmlUtils.HTML('</span>')
), ),
......
// Karma config for lms suite. // Karma config for lms suite.
// Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js // Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js
/* jshint node: true */ /* eslint-env node */
/*jshint -W079 */
'use strict'; 'use strict';
var path = require('path'); var path = require('path');
var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js')); var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js'));
......
// Karma config for lms-coffee suite. // Karma config for lms-coffee suite.
// Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js // Docs and troubleshooting tips in common/static/common/js/karma.common.conf.js
/* jshint node: true */ /* eslint-env node */
/*jshint -W079 */
'use strict'; 'use strict';
var path = require('path'); var path = require('path');
var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js')); var configModule = require(path.join(__dirname, '../../common/static/common/js/karma.common.conf.js'));
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
$selectElement.change(function() { $selectElement.change(function() {
var selectedOption; var selectedOption;
if ($selectElement.attr('disabled')) { if ($selectElement.attr('disabled')) {
return alert(gettext('You cannot view the course as a student or beta tester before the course release date.')); // jshint ignore:line return alert(gettext('You cannot view the course as a student or beta tester before the course release date.')); // eslint-disable-line max-len, no-alert
} }
selectedOption = $selectElement.find('option:selected'); selectedOption = $selectElement.find('option:selected');
if (selectedOption.val() === 'specific student') { if (selectedOption.val() === 'specific student') {
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
'squire': 'xmodule_js/common_static/js/vendor/Squire', 'squire': 'xmodule_js/common_static/js/vendor/Squire',
'jasmine-imagediff': 'xmodule_js/common_static/js/vendor/jasmine-imagediff', 'jasmine-imagediff': 'xmodule_js/common_static/js/vendor/jasmine-imagediff',
'domReady': 'xmodule_js/common_static/js/vendor/domReady', 'domReady': 'xmodule_js/common_static/js/vendor/domReady',
'mathjax': '//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_SVG&delayStartupUntil=configured', // jshint ignore:line mathjax: '//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-MML-AM_SVG&delayStartupUntil=configured', // eslint-disable-line max-len
'youtube': '//www.youtube.com/player_api?noext', 'youtube': '//www.youtube.com/player_api?noext',
'coffee/src/ajax_prefix': 'xmodule_js/common_static/coffee/src/ajax_prefix', 'coffee/src/ajax_prefix': 'xmodule_js/common_static/coffee/src/ajax_prefix',
'coffee/src/instructor_dashboard/student_admin': 'coffee/src/instructor_dashboard/student_admin', 'coffee/src/instructor_dashboard/student_admin': 'coffee/src/instructor_dashboard/student_admin',
......
/* globals URI */
(function(URI) { (function(URI) {
'use strict'; 'use strict';
...@@ -51,5 +53,4 @@ ...@@ -51,5 +53,4 @@
return v1; return v1;
})(XBlock.Runtime.v1); })(XBlock.Runtime.v1);
}).call(this, URI);
}).call(this, URI); // jshint ignore:line
...@@ -22,7 +22,6 @@ var $$course_id = "${course_id | n, js_escaped_string}"; ...@@ -22,7 +22,6 @@ var $$course_id = "${course_id | n, js_escaped_string}";
function DiscussionInlineBlock(runtime, element) { function DiscussionInlineBlock(runtime, element) {
'use strict'; 'use strict';
var el = $(element).find('.discussion-module'); var el = $(element).find('.discussion-module');
/* jshint nonew:false */
new DiscussionModuleView({ el: el }); new DiscussionModuleView({ el: el });
} }
</script> </script>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"devDependencies": { "devDependencies": {
"edx-custom-a11y-rules": "0.1.2", "edx-custom-a11y-rules": "0.1.2",
"eslint": "^2.13.1", "eslint": "^2.13.1",
"eslint-config-edx": "^1.2.0", "eslint-config-edx": "^1.2.1",
"jasmine-core": "^2.4.1", "jasmine-core": "^2.4.1",
"jasmine-jquery": "^2.1.1", "jasmine-jquery": "^2.1.1",
"jquery": "^2.1.4", "jquery": "^2.1.4",
......
...@@ -12,7 +12,7 @@ set -e ...@@ -12,7 +12,7 @@ set -e
# Violations thresholds for failing the build # Violations thresholds for failing the build
export PYLINT_THRESHOLD=3750 export PYLINT_THRESHOLD=3750
export ESLINT_THRESHOLD=49019 export ESLINT_THRESHOLD=48129
SAFELINT_THRESHOLDS=`cat scripts/safelint_thresholds.json` SAFELINT_THRESHOLDS=`cat scripts/safelint_thresholds.json`
export SAFELINT_THRESHOLDS=${SAFELINT_THRESHOLDS//[[:space:]]/} export SAFELINT_THRESHOLDS=${SAFELINT_THRESHOLDS//[[:space:]]/}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment