Browse Source

Update eslint

pull/72/head
Jake Howard 1 year ago
parent
commit
e791298bf1
Signed by: theorangeone GPG Key ID: 57AFB45680EDD477
  1. 3
      .eslintrc
  2. 2045
      package-lock.json
  3. 2
      package.json
  4. 14
      static/src/js/app.js
  5. 4
      static/src/js/mermaid.js

3
.eslintrc

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

2045
package-lock.json
File diff suppressed because it is too large
View File

2
package.json

@ -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"

14
static/src/js/app.js

@ -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 {

4
static/src/js/mermaid.js

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

Loading…
Cancel
Save