diff --git a/.eslintrc.json b/.eslintrc.json index 2c6b908a87..74ba739f9b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,7 +8,8 @@ "ecmaVersion": 6 }, "rules": { - "strict": [2, "global"] + "strict": [2, "global"], + "no-console": "error" }, "overrides": [ { diff --git a/examples/checkbox/checkbox-2/js/controlledCheckbox.js b/examples/checkbox/checkbox-2/js/controlledCheckbox.js index b44c95eeba..347d87ac7d 100644 --- a/examples/checkbox/checkbox-2/js/controlledCheckbox.js +++ b/examples/checkbox/checkbox-2/js/controlledCheckbox.js @@ -24,8 +24,6 @@ var ControlledCheckbox = function (domNode, controllerObj) { ControlledCheckbox.prototype.init = function () { this.lastState = this.isChecked(); - console.log(this.lastState); - this.domNode.addEventListener('change', this.handleChange.bind(this)); this.domNode.addEventListener('keydown', this.handleKeyup.bind(this), true); diff --git a/examples/disclosure/js/disclosureButton.js b/examples/disclosure/js/disclosureButton.js index 7cf26207f6..67be976a0b 100644 --- a/examples/disclosure/js/disclosureButton.js +++ b/examples/disclosure/js/disclosureButton.js @@ -66,8 +66,6 @@ ButtonExpand.prototype.toggleExpand = function () { /* EVENT HANDLERS */ ButtonExpand.prototype.handleKeydown = function (event) { - console.log('[keydown]'); - switch (event.keyCode) { case this.keyCode.RETURN: this.toggleExpand(); diff --git a/examples/js/examples.js b/examples/js/examples.js index 7b929d76d5..7f3f857c4d 100644 --- a/examples/js/examples.js +++ b/examples/js/examples.js @@ -435,6 +435,7 @@ function addOpenInCodePenForm( } totalFetchedFiles++; } else { + // eslint-disable-next-line no-console console.warn( "Not showing 'Open in Codepen' button. Could not load resource: " + href @@ -442,6 +443,7 @@ function addOpenInCodePenForm( } }; request.onerror = function () { + // eslint-disable-next-line no-console console.warn( "Not showing 'Open in Codepen' button. Could not load resource: " + fileLink.href @@ -461,6 +463,7 @@ function addOpenInCodePenForm( setTimeout(() => { clearInterval(timerId); + // eslint-disable-next-line no-console console.warn( "Not showing 'Open in Codepen' button. Timeout when loading resource." ); diff --git a/examples/slider/js/vertical-slider.js b/examples/slider/js/vertical-slider.js index e13dabdfdf..a4d337ed76 100644 --- a/examples/slider/js/vertical-slider.js +++ b/examples/slider/js/vertical-slider.js @@ -105,7 +105,6 @@ VSlider.prototype.moveVSliderTo = function (value) { if (this.valueDomNode) { this.valueDomNode.innerHTML = this.valueNow.toString(); this.valueDomNode.style.left = this.railDomNode.offsetWidth / 2 - 2 + 'px'; - console.log(this.valueDomNode.style.left); } }; diff --git a/test/tests/combobox_autocomplete-both.js b/test/tests/combobox_autocomplete-both.js index 51c3c0eecb..b505d12690 100644 --- a/test/tests/combobox_autocomplete-both.js +++ b/test/tests/combobox_autocomplete-both.js @@ -169,7 +169,6 @@ ariaTest( ); const id = await combobox.getAttribute('id'); - console.log(id); t.truthy(id, '"id" attribute should exist on combobox'); const label = await t.context.queryElements(t, `[for="${id}"]`); diff --git a/test/tests/combobox_autocomplete-list.js b/test/tests/combobox_autocomplete-list.js index 15eb62e0a0..4ab0af3d6c 100644 --- a/test/tests/combobox_autocomplete-list.js +++ b/test/tests/combobox_autocomplete-list.js @@ -168,7 +168,6 @@ ariaTest( ); const id = await combobox.getAttribute('id'); - console.log(id); t.truthy(id, '"id" attribute should exist on combobox'); const label = await t.context.queryElements(t, `[for="${id}"]`); diff --git a/test/tests/combobox_autocomplete-none.js b/test/tests/combobox_autocomplete-none.js index 80948c847a..a9a9a83077 100644 --- a/test/tests/combobox_autocomplete-none.js +++ b/test/tests/combobox_autocomplete-none.js @@ -177,7 +177,6 @@ ariaTest( ); const id = await combobox.getAttribute('id'); - console.log(id); t.truthy(id, '"id" attribute should exist on combobox'); const label = await t.context.queryElements(t, `[for="${id}"]`); diff --git a/test/util/report.js b/test/util/report.js index 87cd0a7905..ce172f8990 100644 --- a/test/util/report.js +++ b/test/util/report.js @@ -1,4 +1,5 @@ #!/usr/bin/env node +/* eslint-disable no-console */ const cheerio = require('cheerio'); const path = require('path');