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:
Syed Ali Abbas Zaidi
2023-08-07 19:13:19 +05:00
committed by GitHub
parent e94af3c2d3
commit 8480dbc228
305 changed files with 1043 additions and 202 deletions

View File

@@ -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)});
}