Add linter for JS files with basic recommended rules:
- Add Github Action. - Fix JS files to match rules; mostly `globals` and `exported`.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// Toggle all checkboxes.
|
||||
/* exported toggleAllCheckboxes */
|
||||
|
||||
/**
|
||||
* Toggle all descendant checkboxes of a target.
|
||||
|
@ -1,3 +1,6 @@
|
||||
/* exported updateDisplay */
|
||||
/* globals addRemoveClass */
|
||||
|
||||
// set javascript listeners
|
||||
function updateDisplay(e) {
|
||||
// used in set reading goal
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* globals setDisplay TabGroup toggleAllCheckboxes updateDisplay */
|
||||
|
||||
// set up javascript listeners
|
||||
window.onload = function() {
|
||||
// buttons that display or hide content
|
||||
@ -93,7 +95,7 @@ function toggleAction(e) {
|
||||
|
||||
// show/hide container
|
||||
var container = document.getElementById('hide-' + targetId);
|
||||
if (!!container) {
|
||||
if (container) {
|
||||
addRemoveClass(container, 'hidden', pressed);
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* exported TabGroup */
|
||||
|
||||
/*
|
||||
* The content below is licensed according to the W3C Software License at
|
||||
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
||||
|
Reference in New Issue
Block a user