chore: apply amnesty on existing not fixable issues (#32215)
* fix: eslint operator-linebreak issue * fix: eslint quotes issue * fix: react jsx indent and props issues * fix: eslint trailing spaces issues * fix: eslint line around directives issue * fix: eslint semi rule * fix: eslint newline per chain rule * fix: eslint space infix ops rule * fix: eslint space-in-parens issue * fix: eslint space before function paren issue * fix: eslint space before blocks issue * fix: eslint arrow body style issue * fix: eslint dot-location issue * fix: eslint quotes issue * fix: eslint quote props issue * fix: eslint operator assignment issue * fix: eslint new line after import issue * fix: indent issues * fix: operator assignment issue * fix: all autofixable eslint issues * fix: all react related fixable issues * fix: autofixable eslint issues * chore: remove all template literals * fix: remaining autofixable issues * chore: apply amnesty on all existing issues * fix: failing xss-lint issues * refactor: apply amnesty on remaining issues * refactor: apply amnesty on new issues * fix: remove file level suppressions * refactor: apply amnesty on new issues
This commit is contained in:
committed by
GitHub
parent
e94af3c2d3
commit
8480dbc228
@@ -82,6 +82,7 @@ function(ValidatingView, $, _, gettext, CodeMirror, ValidationErrorModal, HtmlUt
|
||||
var stringValue = $.trim(mirror.getValue());
|
||||
// update CodeMirror to show the trimmed value.
|
||||
mirror.setValue(stringValue);
|
||||
// eslint-disable-next-line no-undef-init
|
||||
var JSONValue = undefined;
|
||||
try {
|
||||
JSONValue = JSON.parse(stringValue);
|
||||
|
||||
@@ -229,6 +229,7 @@ function(ValidatingView, _, $, ui, GraderView, StringUtils, HtmlUtils) {
|
||||
// set min/max widths
|
||||
var cachethis = this;
|
||||
var widthPerPoint = cachethis.gradeBarWidth / 100;
|
||||
// eslint-disable-next-line no-shadow
|
||||
return function(event, ui) {
|
||||
var barIndex = ui.element.index();
|
||||
var offset = 1;
|
||||
@@ -245,6 +246,7 @@ function(ValidatingView, _, $, ui, GraderView, StringUtils, HtmlUtils) {
|
||||
moveBarClosure: function() {
|
||||
// 0th ele doesn't have a bar; so, will never invoke this
|
||||
var cachethis = this;
|
||||
// eslint-disable-next-line no-shadow
|
||||
return function(event, ui) {
|
||||
var barIndex = ui.element.index();
|
||||
var offset = 1;
|
||||
@@ -254,6 +256,7 @@ function(ValidatingView, _, $, ui, GraderView, StringUtils, HtmlUtils) {
|
||||
: offset);
|
||||
// minus 2 b/c minus 1 is the element we're effecting. It's max is just shy of the next one above it
|
||||
var max = (barIndex >= 2 ? cachethis.descendingCutoffs[barIndex - 2].cutoff - offset : 100);
|
||||
// eslint-disable-next-line no-mixed-operators
|
||||
var percentage = Math.min(Math.max(ui.size.width / cachethis.gradeBarWidth * 100, min), max);
|
||||
cachethis.descendingCutoffs[barIndex - 1].cutoff = Math.round(percentage);
|
||||
cachethis.renderGradeRanges();
|
||||
@@ -272,6 +275,7 @@ function(ValidatingView, _, $, ui, GraderView, StringUtils, HtmlUtils) {
|
||||
|
||||
stopDragClosure: function() {
|
||||
var cachethis = this;
|
||||
// eslint-disable-next-line no-shadow
|
||||
return function(event, ui) {
|
||||
// for some reason the resize is setting height to 0
|
||||
cachethis.saveCutoffs();
|
||||
@@ -388,6 +392,7 @@ function(ValidatingView, _, $, ui, GraderView, StringUtils, HtmlUtils) {
|
||||
// Instrument grading scale
|
||||
// convert cutoffs to inversely ordered list
|
||||
var modelCutoffs = this.model.get('grade_cutoffs');
|
||||
// eslint-disable-next-line guard-for-in
|
||||
for (var cutoff in modelCutoffs) {
|
||||
this.descendingCutoffs.push({designation: cutoff, cutoff: Math.round(modelCutoffs[cutoff] * 100)});
|
||||
}
|
||||
|
||||
@@ -391,8 +391,11 @@ function(ValidatingView, CodeMirror, _, $, ui, DateUtils, FileUploadModel,
|
||||
if (!this.useV2CertDisplaySettings) {
|
||||
return;
|
||||
}
|
||||
// eslint-disable-next-line prefer-const
|
||||
let showDatepicker = this.model.get('certificates_display_behavior') == 'end_with_date';
|
||||
// eslint-disable-next-line prefer-const
|
||||
let datepicker = this.$el.find('#certificate-available-date');
|
||||
// eslint-disable-next-line prefer-const
|
||||
let certificateAvailableDateField = this.$el.find('#field-certificate-available-date');
|
||||
|
||||
if (showDatepicker) {
|
||||
@@ -451,6 +454,7 @@ function(ValidatingView, CodeMirror, _, $, ui, DateUtils, FileUploadModel,
|
||||
selector = '',
|
||||
image_key = '',
|
||||
image_path_key = '';
|
||||
// eslint-disable-next-line default-case
|
||||
switch (event.currentTarget.id) {
|
||||
case 'upload-course-image':
|
||||
title = gettext('Upload your course image.');
|
||||
|
||||
Reference in New Issue
Block a user