eslint/browser list/accessibility test

This commit is contained in:
JFH
2020-07-26 20:11:18 +02:00
parent 630a76c1b6
commit 89e20d49e6
114 changed files with 105155 additions and 93732 deletions

View File

@@ -222,7 +222,7 @@ export default {
const attrs = $(this).children().attr(['fill', 'd']);
if (attrs.fill === color && attrs.d === curD) {
// Found another marker with this color and this path
newMarker = this; // eslint-disable-line consistent-this
newMarker = this;
}
});
@@ -241,7 +241,7 @@ export default {
// Check if last marker can be removed
let remove = true;
$(S.svgcontent).find('line, polyline, path, polygon').each(function () {
const element = this; // eslint-disable-line consistent-this
const element = this;
$.each(mtypes, function (j, mtype) {
if ($(element).attr('marker-' + mtype) === 'url(#' + marker.id + ')') {
remove = false;

View File

@@ -17,7 +17,7 @@ export default {
// This populates the category list
const {categories} = strings;
/* eslint-disable max-len */
const library = {
basic: {
data: {
@@ -54,7 +54,7 @@ export default {
buttons: []
}
};
/* eslint-enable max-len */
const modeId = 'shapelib';
const startClientPos = {};

View File

@@ -328,6 +328,7 @@ export default function jQueryPluginJGraduate ($) {
}
$this.addClass('jGraduate_Picker');
/* eslint-disable max-len */
$this.html(
'<ul class="jGraduate_tabs">' +
'<li class="jGraduate_tab_color jGraduate_tab_current" data-type="col">Solid Color</li>' +
@@ -434,7 +435,7 @@ export default function jQueryPluginJGraduate ($) {
'<input type="button" id="' + id + '_jGraduate_Cancel" class="jGraduate_Cancel" value="Cancel"/>' +
'</div>'
);
/* eslint-enable max-len */
// --------------
// Set up all the SVG elements (the gradient, stops and rectangle)
const MAX = 256,
@@ -689,7 +690,7 @@ export default function jQueryPluginJGraduate ($) {
return false;
}).data('stop', stop).data('bg', pathbg).dblclick(function () {
$('div.jGraduate_LightBox').show();
const colorhandle = this; // eslint-disable-line consistent-this
const colorhandle = this;
let stopOpacity = Number(stop.getAttribute('stop-opacity')) || 1;
let stopColor = stop.getAttribute('stop-color') || 1;
let thisAlpha = (Number.parseFloat(stopOpacity) * 255).toString(16);

View File

@@ -1,4 +1,4 @@
/* eslint-disable no-bitwise */
/* eslint-disable no-bitwise, max-len */
/**
* @file jPicker (Adapted from version 1.1.6)
*

View File

@@ -54,14 +54,14 @@
* @example
// Create group of settings to initialise spinbutton(s). (Optional)
const myOptions = {
min: 0, // Set lower limit.
max: 100, // Set upper limit.
step: 1, // Set increment size.
smallStep: 0.5, // Set shift-click increment size.
stateObj: {tool_scale: 1}, // Object to allow passing in live-updating scale
spinClass: mySpinBtnClass, // CSS class to style the spinbutton. (Class also specifies url of the up/down button image.)
upClass: mySpinUpClass, // CSS class for style when mouse over up button.
downClass: mySpinDnClass // CSS class for style when mouse over down button.
min: 0, // Set lower limit.
max: 100, // Set upper limit.
step: 1, // Set increment size.
smallStep: 0.5, // Set shift-click increment size.
stateObj: {tool_scale: 1}, // Object to allow passing in live-updating scale
spinClass: mySpinBtnClass, // CSS class to style the spinbutton. (Class also specifies url of the up/down button image.)
upClass: mySpinUpClass, // CSS class for style when mouse over up button.
downClass: mySpinDnClass // CSS class for style when mouse over down button.
};
$(function () {

View File

@@ -21,7 +21,6 @@ import {isWebkit, isChrome, isGecko, isIE, isMac, isTouch} from '../common/brows
// Until we split this into smaller files, this helps distinguish utilities
// from local methods
// eslint-disable-next-line import/no-namespace
import * as Utils from '../common/utilities.js';
import {getTypeMap, convertUnit, isValidUnit} from '../common/units.js';
import {
@@ -4124,7 +4123,7 @@ editor.init = function () {
};
$('#svg_editor').find('button, select, input:not(#text)').focus(function () {
inp = this; // eslint-disable-line consistent-this
inp = this;
uiContext = 'toolbars';
workarea.mousedown(unfocus);
}).blur(function () {

View File

@@ -35,53 +35,53 @@ This will return the icon (as jQuery object) with a given ID.
* @copyright (c) 2009 Alexis Deveria
* {@link http://a.deveria.com}
* @example
$(function () {
$.svgIcons('my_icon_set.svg'); // The SVG file that contains all icons
// No options have been set, so all icons will automatically be inserted
// into HTML elements that match the same IDs.
});
* @example
$(function () {
// The SVG file that contains all icons
$.svgIcons('my_icon_set.svg', {
callback (icons) { // Custom callback function that sets click
// events for each icon
$.each(icons, function (id, icon) {
icon.click(function () {
alert('You clicked on the icon with id ' + id);
});
});
}
$(function () {
$.svgIcons('my_icon_set.svg'); // The SVG file that contains all icons
// No options have been set, so all icons will automatically be inserted
// into HTML elements that match the same IDs.
});
});
* @example
$(function () {
// The SVGZ file that contains all icons
$.svgIcons('my_icon_set.svgz', {
w: 32, // All icons will be 32px wide
h: 32, // All icons will be 32px high
fallback_path: 'icons/', // All fallback files can be found here
fallback: {
'#open_icon': 'open.png', // The "open.png" will be appended to the
// HTML element with ID "open_icon"
'#close_icon': 'close.png',
'#save_icon': 'save.png'
},
placement: {'.open_icon': 'open'}, // The "open" icon will be added
// to all elements with class "open_icon"
resize: {
'#save_icon .svg_icon': 64 // The "save" icon will be resized to 64 x 64px
},
* @example
$(function () {
// The SVG file that contains all icons
$.svgIcons('my_icon_set.svg', {
callback (icons) { // Custom callback function that sets click
// events for each icon
$.each(icons, function (id, icon) {
icon.click(function () {
alert('You clicked on the icon with id ' + id); // eslint-disable-line no-alert
});
});
}
});
});
callback (icons) { // Sets background color for "close" icon
icons.close.css('background', 'red');
},
* @example
$(function () {
// The SVGZ file that contains all icons
$.svgIcons('my_icon_set.svgz', {
w: 32, // All icons will be 32px wide
h: 32, // All icons will be 32px high
fallback_path: 'icons/', // All fallback files can be found here
fallback: {
'#open_icon': 'open.png', // The "open.png" will be appended to the
// HTML element with ID "open_icon"
'#close_icon': 'close.png',
'#save_icon': 'save.png'
},
placement: {'.open_icon': 'open'}, // The "open" icon will be added
// to all elements with class "open_icon"
resize: {
'#save_icon .svg_icon': 64 // The "save" icon will be resized to 64 x 64px
},
svgz: true // Indicates that an SVGZ file is being used
});
});
callback (icons) { // Sets background color for "close" icon
icons.close.css('background', 'red');
},
svgz: true // Indicates that an SVGZ file is being used
});
});
*/
// Todo: Move to own module (and have it import a modular base64 encoder)

File diff suppressed because one or more lines are too long