Skip to content

Commit

Permalink
Upgrade ESLint, resolve errors (#3126)
Browse files Browse the repository at this point in the history
* Upgrade ESLint, resolve errors

* Update dependencies version warnings

* Linting

* Address Date Filter inputmasks

* Undo jquery.inputmask > inputmask upgrade

* Switch back to jquery.inputmask

* Removing inputmask (for now)
  • Loading branch information
rfultz authored and johnnyporkchops committed Sep 16, 2019
1 parent 66794b7 commit 67a20c3
Show file tree
Hide file tree
Showing 43 changed files with 506 additions and 426 deletions.
2 changes: 0 additions & 2 deletions fec/fec/static/js/modules/accessibility.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global module */

/**
* Utilities for setting or removing tabindex on all focusable elements
* in a parent div. Useful for hiding elements off-canvas without setting
Expand Down
4 changes: 0 additions & 4 deletions fec/fec/static/js/modules/analytics.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
'use strict';

/* global ga */

// TODO - should this all be moved into Tag Manager?

var _ = require('underscore');
var URI = require('urijs');

Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/modules/cycle-select.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global context */

var $ = require('jquery');
var _ = require('underscore');
var URI = require('urijs');
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/modules/election-search.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global window */

var $ = require('jquery');
var URI = require('urijs');
var _ = require('underscore');
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/modules/election-summary.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global require, module */

var $ = require('jquery');
var URI = require('urijs');

Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/modules/election-utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global require, module */

var $ = require('jquery');
var _ = require('underscore');
var fips = require('./fips');
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/modules/events.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global require, module, window */

var eventemitter = require('eventemitter2');
var EventEmitter2 = eventemitter.EventEmitter2 || eventemitter;
module.exports = window.events = window.events || new EventEmitter2();
2 changes: 0 additions & 2 deletions fec/fec/static/js/modules/filings.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global require, module */

var $ = require('jquery');
var _ = require('underscore');

Expand Down
2 changes: 1 addition & 1 deletion fec/fec/static/js/modules/filters/date-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var $ = require('jquery');
var moment = require('moment');

var Filter = require('./filter-base.js');
var Filter = require('./filter-base');

require('jquery.inputmask');
require('jquery.inputmask/dist/inputmask/inputmask.date.extensions');
Expand Down
5 changes: 2 additions & 3 deletions fec/fec/static/js/modules/filters/validate-date-filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
var $ = require('jquery');
var moment = require('moment');

var Filter = require('./filter-base.js');
var Filter = require('./filter-base');

require('jquery.inputmask');
require('jquery.inputmask/dist/inputmask/inputmask.date.extensions.js');
require('jquery.inputmask/dist/inputmask/inputmask.numeric.extensions.js');
require('jquery.inputmask/dist/inputmask/inputmask.date.extensions');

/**
* ValidateDateFilter
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/modules/fips.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global require, module */

var _ = require('underscore');

function byField(values, key) {
Expand Down
1 change: 1 addition & 0 deletions fec/fec/static/js/modules/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ function sanitizeQueryParams(query) {
var param;

for (param in query) {
// eslint-disable-next-line no-prototype-builtins
if (query.hasOwnProperty(param)) {
query[param] = sanitizeValue(query[param]);
}
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/modules/keyword-modal.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global ga */

var $ = require('jquery');
var URI = require('urijs');
var A11yDialog = require('a11y-dialog');
Expand Down
2 changes: 1 addition & 1 deletion fec/fec/static/js/modules/line-chart-committees.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

/* global module, DEFAULT_TIME_PERIOD */
/* global DEFAULT_TIME_PERIOD */
var $ = require('jquery');
var _ = require('underscore');
var d3 = require('d3');
Expand Down
2 changes: 1 addition & 1 deletion fec/fec/static/js/modules/line-chart.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

/* global module, DEFAULT_TIME_PERIOD */
/* global DEFAULT_TIME_PERIOD */
var $ = require('jquery');
var _ = require('underscore');
var d3 = require('d3');
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/modules/other-spending-totals.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global require, context */

var $ = require('jquery');
var _ = require('underscore');

Expand Down
2 changes: 1 addition & 1 deletion fec/fec/static/js/modules/performance.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

/* global require, module, window, perfBar */
/* global perfBar */

var _ = require('underscore');

Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/modules/skip-nav.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global require, module, document */

var $ = require('jquery');

/**
Expand Down
1 change: 0 additions & 1 deletion fec/fec/static/js/modules/toggle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

/* global require, module, document */
var $ = require('jquery');

module.exports = {
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/pages/bythenumbers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global context, ga */

var $ = require('jquery');
var analytics = require('../modules/analytics'); // TODO - move this to Tag Manager?
var TopEntities = require('../modules/top-entities').TopEntities;
Expand Down
2 changes: 1 addition & 1 deletion fec/fec/static/js/pages/candidate-single.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

/* global require, document, context, WEBMANAGER_EMAIL */
/* global WEBMANAGER_EMAIL */

var $ = require('jquery');
var URI = require('urijs');
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/pages/committee-single.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global document, context */

var $ = require('jquery');
var _ = require('underscore');
var URI = require('urijs');
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/pages/contact-form.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global window */

var $ = require('jquery');
var Typeahead = require('../modules/typeahead').Typeahead;
var URI = require('urijs');
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/pages/data-browse-data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global require */

var $ = require('jquery');

var LineChartCommittees = require('../modules/line-chart-committees')
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/pages/data-landing.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global require, ga */

var $ = require('jquery');
var lookup = require('../modules/election-lookup');
var analytics = require('../modules/analytics'); // TODO - move this to Tag Manager?
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/pages/datatable-candidates-office.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global context */

var $ = require('jquery');

var tables = require('../modules/tables');
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/pages/datatable-committees.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global document */

var $ = require('jquery');

var tables = require('../modules/tables');
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/pages/datatable-disbursements.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global document */

var $ = require('jquery');

var tables = require('../modules/tables');
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/pages/datatable-filings.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global require, document */

var $ = require('jquery');

var filings = require('../modules/filings');
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/pages/datatable-operating-expenditures.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global document */

var $ = require('jquery');

var tables = require('../modules/tables');
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/pages/datatable-reports.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global require, document, context */

var $ = require('jquery');

var tables = require('../modules/tables');
Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/pages/election-lookup.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global require, document */

var $ = require('jquery');
var lookup = require('../modules/election-search');

Expand Down
2 changes: 0 additions & 2 deletions fec/fec/static/js/pages/elections.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* global document, context */

var $ = require('jquery');
var _ = require('underscore');

Expand Down
1 change: 0 additions & 1 deletion fec/fec/static/js/pages/legal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

/* global require */
var FilterPanel = require('../modules/filters/filter-panel').FilterPanel;
var KeywordModal = require('../modules/keyword-modal').KeywordModal;

Expand Down
Loading

0 comments on commit 67a20c3

Please sign in to comment.