1
Fork 0

Update eslint

This commit is contained in:
Jake Howard 2020-03-30 17:36:38 +01:00
parent 0eb23e82cd
commit e791298bf1
Signed by: jake
GPG key ID: 57AFB45680EDD477
5 changed files with 1570 additions and 178 deletions

View file

@ -1,7 +1,8 @@
{ {
"extends": [ "extends": [
"dabapps/commonjs", "dabapps/commonjs",
"dabapps/browser" "dabapps/browser",
"dabapps/es"
], ],
"globals": { "globals": {
"mermaid": true, "mermaid": true,

1725
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,7 @@
"author": "Jake Howard <git@theorangeone.net>", "author": "Jake Howard <git@theorangeone.net>",
"devDependencies": { "devDependencies": {
"broken-link-checker-local": "0.2.1", "broken-link-checker-local": "0.2.1",
"eslint-config-dabapps": "5.0.0", "eslint-config-dabapps": "6.0.2",
"parcel-bundler": "1.12.4", "parcel-bundler": "1.12.4",
"sass-lint": "1.13.1", "sass-lint": "1.13.1",
"yaml-lint": "1.2.4" "yaml-lint": "1.2.4"

View file

@ -1,11 +1,9 @@
'use strict'; const Clipboard = require('clipboard');
var Clipboard = require('clipboard');
function waitFor(obj, property, callback) { function waitFor(obj, property, callback) {
// Wait for a property to exist on window before running callback // Wait for a property to exist on window before running callback
var intervalId = setInterval(function() { const intervalId = setInterval(function() {
if (obj.hasOwnProperty(property)) { if (property in obj) {
clearInterval(intervalId); clearInterval(intervalId);
callback(); callback();
} }
@ -24,14 +22,14 @@ $(document).ready(function() {
}); });
new Clipboard('a').on('success', function(e) { new Clipboard('a').on('success', function(e) {
var ele = $(e.trigger); const ele = $(e.trigger);
ele.find('i').attr('class', 'fas fa-check'); ele.find('i').attr('class', 'fas fa-check');
alert('Copied "' + ele.data('clipboard-text') + '" to clipboard!'); alert('Copied "' + ele.data('clipboard-text') + '" to clipboard!');
}); });
// HACK: ToC has blank li if no initial header // HACK: ToC has blank li if no initial header
$('#TableOfContents').each(function() { $('#TableOfContents').each(function() {
var ele = $(this); let ele = $(this);
if (ele.find('a').length <= 3) { if (ele.find('a').length <= 3) {
ele.parent().remove(); ele.parent().remove();
} else if (ele.children('ul').children('li').length === 1) { } else if (ele.children('ul').children('li').length === 1) {
@ -46,7 +44,7 @@ $(document).ready(function() {
$('.image').each(function() { $('.image').each(function() {
// setup div-image hybrids // setup div-image hybrids
var ele = $(this); const ele = $(this);
if (ele.data('image')) { if (ele.data('image')) {
ele.css('background-image', 'url(' + ele.data('image') + ')'); ele.css('background-image', 'url(' + ele.data('image') + ')');
} else { } else {

View file

@ -1,6 +1,4 @@
'use strict'; let mermaid = require('mermaid');
var mermaid = require('mermaid');
$(document).ready(function() { $(document).ready(function() {
mermaid.initialize({ mermaid.initialize({