Detect unused lint-disable directives

pull/3474/head
Rob Pilling 2024-06-25 22:04:31 +01:00
parent 2c39e38b3f
commit ccf6c2a7e5
11 changed files with 49 additions and 48 deletions

View File

@ -245,4 +245,5 @@ module.exports = {
})), })),
], ],
ignorePatterns: findGeneratedJS(["apps/", "modules/"]), ignorePatterns: findGeneratedJS(["apps/", "modules/"]),
reportUnusedDisableDirectives: true,
} }

View File

@ -1,6 +1,6 @@
{ {
// @ts-expect-error helper // @ts-expect-error helper
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const __assign = Object.assign; const __assign = Object.assign;
const Layout = require("Layout"); const Layout = require("Layout");

View File

@ -71,7 +71,7 @@ OsGridRef.latLongToOsGrid = function(point) {
* *
*/ */
function to_map_ref(digits, easting, northing) { function to_map_ref(digits, easting, northing) {
if (![ 0,2,4,6,8,10,12,14,16 ].includes(Number(digits))) throw new RangeError(`invalid precision '${digits}'`); // eslint-disable-line comma-spacing if (![ 0,2,4,6,8,10,12,14,16 ].includes(Number(digits))) throw new RangeError(`invalid precision '${digits}'`);
let e = easting; let e = easting;
let n = northing; let n = northing;

View File

@ -1,5 +1,5 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */
/** /**
* @param {Gps} gps * @param {Gps} gps
*/ */

View File

@ -1,5 +1,5 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory; export const memory: WebAssembly.Memory;
export function __wbg_gps_free(a: number): void; export function __wbg_gps_free(a: number): void;
export function disable_elevation(a: number): void; export function disable_elevation(a: number): void;

View File

@ -71,7 +71,7 @@ OsGridRef.latLongToOsGrid = function(point) {
* *
*/ */
function to_map_ref(digits, easting, northing) { function to_map_ref(digits, easting, northing) {
if (![ 0,2,4,6,8,10,12,14,16 ].includes(Number(digits))) throw new RangeError(`invalid precision '${digits}'`); // eslint-disable-line comma-spacing if (![ 0,2,4,6,8,10,12,14,16 ].includes(Number(digits))) throw new RangeError(`invalid precision '${digits}'`);
let e = easting; let e = easting;
let n = northing; let n = northing;

View File

@ -463,7 +463,7 @@ OsGridRef.latLongToOsGrid = function(point) {
* *
*/ */
function to_map_ref(digits, easting, northing) { function to_map_ref(digits, easting, northing) {
if (![ 0,2,4,6,8,10,12,14,16 ].includes(Number(digits))) throw new RangeError(`invalid precision '${digits}'`); // eslint-disable-line comma-spacing if (![ 0,2,4,6,8,10,12,14,16 ].includes(Number(digits))) throw new RangeError(`invalid precision '${digits}'`);
let e = easting; let e = easting;
let n = northing; let n = northing;

View File

@ -926,7 +926,7 @@ module.exports = {
] ]
}, },
"apps/kitchen/kitchen.app.js": { "apps/kitchen/kitchen.app.js": {
"hash": "1ef7b31e52110e34fb952d7ba0426c8bd9574e5f18be9fbc3b8ad1cc762dda21", "hash": "cea726937a7179851091b0728d3ad1e773eac703a5bfdc28be6e2f247fdd44c9",
"rules": [ "rules": [
"no-undef" "no-undef"
] ]
@ -1004,7 +1004,7 @@ module.exports = {
] ]
}, },
"apps/gpstouch/geotools.js": { "apps/gpstouch/geotools.js": {
"hash": "5816fbb2dd630f574e5ee505e1b9ec6f80c3c53778b7a5520e5db28b91cdffc5", "hash": "7e67733286f9d7708a54814f6f27d73ddffed2f433febc9604138f2f7a832cbf",
"rules": [ "rules": [
"no-undef" "no-undef"
] ]
@ -1314,7 +1314,7 @@ module.exports = {
] ]
}, },
"apps/schoolCalendar/fullcalendar/main.js": { "apps/schoolCalendar/fullcalendar/main.js": {
"hash": "04dcd3cb3025c7aa67631d287b025a897b1cd984b8ea306abae2d722976fb7c5", "hash": "8c417deb073328655117a93f045e77e9b808e84d584e648c6d7e360271ae8d07",
"rules": [ "rules": [
"no-undef", "no-undef",
"no-unused-vars", "no-unused-vars",

View File

@ -111,7 +111,7 @@ var FullCalendar = (function (exports) {
ContextType.Provider = function () { ContextType.Provider = function () {
var _this = this; var _this = this;
var isNew = !this.getChildContext; var isNew = !this.getChildContext;
var children = origProvider.apply(this, arguments); // eslint-disable-line prefer-rest-params var children = origProvider.apply(this, arguments);
if (isNew) { if (isNew) {
var subs_1 = []; var subs_1 = [];
this.shouldComponentUpdate = function (_props) { this.shouldComponentUpdate = function (_props) {
@ -4688,14 +4688,14 @@ var FullCalendar = (function (exports) {
var wrappedSuccess = function () { var wrappedSuccess = function () {
if (!isResolved) { if (!isResolved) {
isResolved = true; isResolved = true;
success.apply(this, arguments); // eslint-disable-line prefer-rest-params success.apply(this, arguments);
} }
}; };
var wrappedFailure = function () { var wrappedFailure = function () {
if (!isResolved) { if (!isResolved) {
isResolved = true; isResolved = true;
if (failure) { if (failure) {
failure.apply(this, arguments); // eslint-disable-line prefer-rest-params failure.apply(this, arguments);
} }
} }
}; };
@ -5008,7 +5008,7 @@ var FullCalendar = (function (exports) {
var createPortal = FullCalendarVDom.createPortal; var createPortal = FullCalendarVDom.createPortal;
var flushToDom = FullCalendarVDom.flushToDom; var flushToDom = FullCalendarVDom.flushToDom;
var unmountComponentAtNode = FullCalendarVDom.unmountComponentAtNode; var unmountComponentAtNode = FullCalendarVDom.unmountComponentAtNode;
/* eslint-enable */
var ScrollResponder = /** @class */ (function () { var ScrollResponder = /** @class */ (function () {
function ScrollResponder(execFunc, emitter, scrollTime, scrollTimeReset) { function ScrollResponder(execFunc, emitter, scrollTime, scrollTimeReset) {
@ -5085,7 +5085,7 @@ var FullCalendar = (function (exports) {
} }
PureComponent.prototype.shouldComponentUpdate = function (nextProps, nextState) { PureComponent.prototype.shouldComponentUpdate = function (nextProps, nextState) {
if (this.debug) { if (this.debug) {
// eslint-disable-next-line no-console
console.log(getUnequalProps(nextProps, this.props), getUnequalProps(nextState, this.state)); console.log(getUnequalProps(nextProps, this.props), getUnequalProps(nextState, this.state));
} }
return !compareObjs(this.props, nextProps, this.propEquality) || return !compareObjs(this.props, nextProps, this.propEquality) ||
@ -11731,7 +11731,7 @@ var FullCalendar = (function (exports) {
} }
dragging.emitter.on('pointerdown', this.handlePointerDown); dragging.emitter.on('pointerdown', this.handlePointerDown);
dragging.emitter.on('dragstart', this.handleDragStart); dragging.emitter.on('dragstart', this.handleDragStart);
new ExternalElementDragging(dragging, settings.eventData); // eslint-disable-line no-new new ExternalElementDragging(dragging, settings.eventData);
} }
ExternalDraggable.prototype.destroy = function () { ExternalDraggable.prototype.destroy = function () {
this.dragging.destroy(); this.dragging.destroy();
@ -11833,7 +11833,7 @@ var FullCalendar = (function (exports) {
if (typeof settings.mirrorSelector === 'string') { if (typeof settings.mirrorSelector === 'string') {
dragging.mirrorSelector = settings.mirrorSelector; dragging.mirrorSelector = settings.mirrorSelector;
} }
new ExternalElementDragging(dragging, settings.eventData); // eslint-disable-line no-new new ExternalElementDragging(dragging, settings.eventData);
} }
ThirdPartyDraggable.prototype.destroy = function () { ThirdPartyDraggable.prototype.destroy = function () {
this.dragging.destroy(); this.dragging.destroy();

View File

@ -483,7 +483,7 @@ OsGridRef.latLongToOsGrid = function(point) {
* *
*/ */
function to_map_ref(digits, easting, northing) { function to_map_ref(digits, easting, northing) {
if (![ 0,2,4,6,8,10,12,14,16 ].includes(Number(digits))) throw new RangeError(`invalid precision '${digits}'`); // eslint-disable-line comma-spacing if (![ 0,2,4,6,8,10,12,14,16 ].includes(Number(digits))) throw new RangeError(`invalid precision '${digits}'`);
let e = easting; let e = easting;
let n = northing; let n = northing;

View File

@ -1,4 +1,4 @@
/* eslint-disable no-undef */
const Setter = { const Setter = {
NONE: "none", NONE: "none",
UPPER: 'upper', UPPER: 'upper',