Address rule 'no-redeclare' for 'dojo' and 'dijit' (defined as globals in 'eslint.config.js').

Also take care of 2 'no-prototype-builtins' and a 'no-useless-escape'.

* https://eslint.org/docs/latest/rules/no-redeclare
* https://eslint.org/docs/latest/rules/no-prototype-builtins
* https://eslint.org/docs/latest/rules/no-useless-escape
This commit is contained in:
supahgreg 2025-10-12 21:48:10 +00:00
parent d442079a72
commit 360c552da4
No known key found for this signature in database
24 changed files with 24 additions and 24 deletions

View File

@ -423,7 +423,7 @@ const App = {
'/': '/',
};
return p.replace(/[&<>"'\/]/g, m => map[m]);
return p.replace(/[&<>"'/]/g, m => map[m]);
},
unescapeHtml: function(p) {
if (typeof p !== 'string' || p.indexOf('&') === -1)

View File

@ -1,7 +1,7 @@
'use strict'
/* eslint-disable no-new */
/* global __, ngettext, App, Headlines, xhr, dojo, dijit, PluginHost, Notify, fox */
/* global __, ngettext, App, Headlines, xhr, PluginHost, Notify, fox */
const Article = {
_scroll_reset_timeout: false,

View File

@ -3,7 +3,7 @@
/* eslint-disable new-cap */
/* eslint-disable no-new */
/* global __, dojo, dijit, Notify, App, Feeds, xhr, Tables, fox */
/* global __, Notify, App, Feeds, xhr, Tables, fox */
/* exported CommonDialogs */
const CommonDialogs = {

View File

@ -3,7 +3,7 @@
/* eslint-disable no-new */
/* global __, App, Article, Lists, fox */
/* global xhr, dojo, dijit, Notify, Feeds */
/* global xhr, Notify, Feeds */
/* exported Filters */
const Filters = {

View File

@ -1,4 +1,4 @@
/* global define, dijit */
/* global define */
define(["dojo/_base/declare", "dijit/tree/ForestStoreModel"], function (declare) {

View File

@ -1,5 +1,5 @@
/* eslint-disable prefer-rest-params */
/* global __, dojo, dijit, define, App, Feeds, CommonDialogs */
/* global __, define, App, Feeds, CommonDialogs */
define(["dojo/_base/declare", "dojo/dom-construct", "dojo/_base/array", "dojo/cookie", "dijit/Tree", "dijit/Menu"], function (declare, domConstruct, array, cookie) {

View File

@ -1,6 +1,6 @@
'use strict'
/* global __, App, Headlines, xhr, dojo, dijit, fox, PluginHost, Notify, fox */
/* global __, App, Headlines, xhr, fox, PluginHost, Notify, fox */
const Feeds = {
FEED_ARCHIVED: 0,

View File

@ -1,7 +1,7 @@
'use strict';
/* global __, ngettext, Article, App */
/* global dojo, dijit, PluginHost, Notify, xhr, Feeds */
/* global PluginHost, Notify, xhr, Feeds */
/* global CommonDialogs */
const Headlines = {

View File

@ -1,4 +1,4 @@
/* global define, dojo */
/* global define */
define(["dojo/_base/declare", "dojo/data/ItemFileWriteStore"], function (declare) {

View File

@ -1,5 +1,5 @@
/* eslint-disable prefer-rest-params */
/* global __, lib, dijit, define, dojo, CommonDialogs, Notify, Tables, xhr, fox, App */
/* global __, lib, define, CommonDialogs, Notify, Tables, xhr, fox, App */
define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dojo/_base/array", "dojo/cookie"],
function (declare, domConstruct, checkBoxTree, array, cookie) {

View File

@ -1,4 +1,4 @@
/* global define, dojo */
/* global define */
define(["dojo/_base/declare", "dojo/data/ItemFileWriteStore"], function (declare) {

View File

@ -1,5 +1,5 @@
/* eslint-disable prefer-rest-params */
/* global __, define, lib, dijit, dojo, xhr, App, Notify, Filters */
/* global __, define, lib, xhr, App, Notify, Filters */
define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], function (declare, domConstruct) {

View File

@ -1,7 +1,7 @@
'use strict';
/* eslint-disable no-new */
/* global __, dijit, dojo, Tables, Notify, xhr, App, fox */
/* global __, Tables, Notify, xhr, App, fox */
const Helpers = {
AppPasswords: {

View File

@ -1,5 +1,5 @@
/* eslint-disable prefer-rest-params */
/* global __, define, lib, dijit, dojo, xhr, Notify, fox, App */
/* global __, define, lib, xhr, Notify, fox, App */
define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree", "dijit/form/DropDownButton"], function (declare, domConstruct) {

View File

@ -1,6 +1,6 @@
'use strict'
/* global __, xhr, dijit, Notify, Tables, App, fox */
/* global __, xhr, Notify, Tables, App, fox */
const Users = {
reload: function(sort) {

View File

@ -1,5 +1,5 @@
/* eslint-disable prefer-rest-params */
/* global dijit, define */
/* global define */
define(["dojo/_base/declare", "dijit/Dialog"], function (declare) {
return declare("fox.SingleUseDialog", dijit.Dialog, {
create: function(params) {

View File

@ -1,4 +1,4 @@
/* global dijit, define */
/* global define */
define(["dojo/_base/declare", "dijit/Toolbar"], function (declare) {
return declare("fox.Toolbar", dijit.Toolbar, {

View File

@ -1,6 +1,6 @@
'use strict';
/* global dijit, App, dojo, __csrf_token */
/* global App, __csrf_token */
/* eslint-disable no-new */
/* exported __ */

View File

@ -1,5 +1,5 @@
/* eslint-disable prefer-rest-params */
/* global dijit, define */
/* global define */
define(["dojo/_base/declare", "dijit/form/ComboButton"], function (declare) {
return declare("fox.form.ComboButton", dijit.form.ComboButton, {
startup: function() {

View File

@ -1,5 +1,5 @@
/* eslint-disable prefer-rest-params */
/* global dijit, define */
/* global define */
define(["dojo/_base/declare", "dijit/form/DropDownButton"], function (declare) {
return declare("fox.form.DropDownButton", dijit.form.DropDownButton, {
startup: function() {

View File

@ -1,6 +1,6 @@
'use strict'
/* global require, App, dojo */
/* global require, App */
/* exported Plugins */
const Plugins = {};

View File

@ -1,4 +1,4 @@
/* global dijit, dojo, Plugins, xhr, __ */
/* global Plugins, xhr, __ */
Plugins.Psql_Trgm = {
showRelated: function (id) {

View File

@ -1,4 +1,4 @@
/* global dojo, Plugins, App, Notify, fox, xhr, __ */
/* global Plugins, App, Notify, fox, xhr, __ */
Plugins.Share = {
shareArticle: function(id) {

View File

@ -1,4 +1,4 @@
/* global Plugins, __, require, PluginHost, App, dojo */
/* global Plugins, __, require, PluginHost, App */
Plugins.Shorten_Expanded = {
threshold: 1.5, // of window height