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": [
"dabapps/commonjs",
"dabapps/browser"
"dabapps/browser",
"dabapps/es"
],
"globals": {
"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>",
"devDependencies": {
"broken-link-checker-local": "0.2.1",
"eslint-config-dabapps": "5.0.0",
"eslint-config-dabapps": "6.0.2",
"parcel-bundler": "1.12.4",
"sass-lint": "1.13.1",
"yaml-lint": "1.2.4"

View file

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

View file

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