Browse Source

Update eslint config

pull/4/head
Jake Howard 2 years ago
parent
commit
04c4e6f0bc
Signed by: theorangeone GPG Key ID: 57AFB45680EDD477
  1. 4
      .prettierrc.json
  2. 396
      package-lock.json
  3. 2
      package.json
  4. 46
      static/src/js/index.js

4
.prettierrc.json

@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "es5"
}

396
package-lock.json

@ -150,6 +150,17 @@
"integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
"dev": true
},
"array.prototype.find": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/array.prototype.find/-/array.prototype.find-2.0.4.tgz",
"integrity": "sha1-VWpcU2LAhkgyPdrrnenRS8GGTJA=",
"dev": true,
"optional": true,
"requires": {
"define-properties": "^1.1.2",
"es-abstract": "^1.7.0"
}
},
"arrify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
@ -194,15 +205,16 @@
}
},
"babel-eslint": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-7.1.0.tgz",
"integrity": "sha1-1QalF0uiJOJaLRfhKOK6iYcTndw=",
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-7.2.3.tgz",
"integrity": "sha1-sv4tgBJkcPXBlELcdXJTqJdxCCc=",
"dev": true,
"optional": true,
"requires": {
"babel-traverse": "^6.15.0",
"babel-types": "^6.15.0",
"babylon": "^6.11.2",
"lodash.pickby": "^4.6.0"
"babel-code-frame": "^6.22.0",
"babel-traverse": "^6.23.1",
"babel-types": "^6.23.0",
"babylon": "^6.17.0"
}
},
"babel-messages": {
@ -210,6 +222,7 @@
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
"dev": true,
"optional": true,
"requires": {
"babel-runtime": "^6.22.0"
}
@ -229,6 +242,7 @@
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
"dev": true,
"optional": true,
"requires": {
"babel-code-frame": "^6.26.0",
"babel-messages": "^6.23.0",
@ -239,23 +253,6 @@
"globals": "^9.18.0",
"invariant": "^2.2.2",
"lodash": "^4.17.4"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
}
}
},
"babel-types": {
@ -564,6 +561,12 @@
"safe-buffer": "^5.0.1"
}
},
"circular-json": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz",
"integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==",
"dev": true
},
"cli-cursor": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz",
@ -667,9 +670,9 @@
"dev": true
},
"core-js": {
"version": "2.5.3",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz",
"integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=",
"version": "2.5.7",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz",
"integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==",
"dev": true
},
"core-util-is": {
@ -805,6 +808,15 @@
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
"dev": true
},
"define-properties": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
"dev": true,
"requires": {
"object-keys": "^1.0.12"
}
},
"defined": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
@ -931,6 +943,32 @@
"minimalistic-crypto-utils": "^1.0.0"
}
},
"es-abstract": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz",
"integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==",
"dev": true,
"optional": true,
"requires": {
"es-to-primitive": "^1.1.1",
"function-bind": "^1.1.1",
"has": "^1.0.1",
"is-callable": "^1.1.3",
"is-regex": "^1.0.4"
}
},
"es-to-primitive": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
"integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
"dev": true,
"optional": true,
"requires": {
"is-callable": "^1.1.4",
"is-date-object": "^1.0.1",
"is-symbol": "^1.0.2"
}
},
"es5-ext": {
"version": "0.10.39",
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.39.tgz",
@ -1020,24 +1058,25 @@
}
},
"eslint": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-3.2.1.tgz",
"integrity": "sha1-zsSf3qCeLzvi4bEgBU8Gk5DZ8rk=",
"version": "3.19.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz",
"integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=",
"dev": true,
"requires": {
"babel-code-frame": "^6.16.0",
"chalk": "^1.1.3",
"concat-stream": "^1.4.6",
"concat-stream": "^1.5.2",
"debug": "^2.1.1",
"doctrine": "^1.2.2",
"doctrine": "^2.0.0",
"escope": "^3.6.0",
"espree": "^3.1.6",
"espree": "^3.4.0",
"esquery": "^1.0.0",
"estraverse": "^4.2.0",
"esutils": "^2.0.2",
"file-entry-cache": "1.2.4",
"flat-cache": "1.0.10",
"file-entry-cache": "^2.0.0",
"glob": "^7.0.3",
"globals": "^9.2.0",
"ignore": "^3.1.2",
"globals": "^9.14.0",
"ignore": "^3.2.0",
"imurmurhash": "^0.1.4",
"inquirer": "^0.12.0",
"is-my-json-valid": "^2.10.0",
@ -1047,77 +1086,117 @@
"levn": "^0.3.0",
"lodash": "^4.0.0",
"mkdirp": "^0.5.0",
"optionator": "^0.8.1",
"natural-compare": "^1.4.0",
"optionator": "^0.8.2",
"path-is-inside": "^1.0.1",
"pluralize": "^1.2.1",
"progress": "^1.1.8",
"require-uncached": "^1.0.2",
"shelljs": "^0.6.0",
"shelljs": "^0.7.5",
"strip-bom": "^3.0.0",
"strip-json-comments": "~1.0.1",
"strip-json-comments": "~2.0.1",
"table": "^3.7.8",
"text-table": "~0.2.0",
"user-home": "^2.0.0"
},
"dependencies": {
"strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
"dev": true
"doctrine": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
"integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
"dev": true,
"requires": {
"esutils": "^2.0.2"
}
},
"strip-json-comments": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
"integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=",
"dev": true
"file-entry-cache": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz",
"integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=",
"dev": true,
"requires": {
"flat-cache": "^1.2.1",
"object-assign": "^4.0.1"
}
},
"flat-cache": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz",
"integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==",
"dev": true,
"requires": {
"circular-json": "^0.3.1",
"graceful-fs": "^4.1.2",
"rimraf": "~2.6.2",
"write": "^0.2.1"
}
},
"shelljs": {
"version": "0.7.8",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz",
"integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=",
"dev": true,
"requires": {
"glob": "^7.0.0",
"interpret": "^1.0.0",
"rechoir": "^0.6.2"
}
}
}
},
"eslint-config-dabapps": {
"version": "github:dabapps/eslint-config-dabapps#79847ca7e9300c908b21fa17b48771a84e5a322f",
"from": "github:dabapps/eslint-config-dabapps#v3.0.0",
"version": "github:dabapps/eslint-config-dabapps#79e9330b92c5e7de24370a14bbd1c04588afaacf",
"from": "github:dabapps/eslint-config-dabapps#v4.0.0",
"dev": true,
"requires": {
"babel-eslint": "7.1.0",
"eslint-plugin-react": "=6.7.1",
"eslint-plugin-react-native": "=2.0.0"
"babel-eslint": ">= 7 < 8",
"eslint": ">= 3.12 < 4",
"eslint-config-prettier": ">= 2 < 3",
"eslint-plugin-prettier": ">= 2 < 3",
"eslint-plugin-react": ">= 6 < 7",
"eslint-plugin-react-native": ">= 2 < 3",
"prettier": ">= 1 < 2"
}
},
"eslint-config-prettier": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-2.10.0.tgz",
"integrity": "sha512-Mhl90VLucfBuhmcWBgbUNtgBiK955iCDK1+aHAz7QfDQF6wuzWZ6JjihZ3ejJoGlJWIuko7xLqNm8BA5uenKhA==",
"dev": true,
"requires": {
"get-stdin": "^5.0.1"
}
},
"eslint-plugin-prettier": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.7.0.tgz",
"integrity": "sha512-CStQYJgALoQBw3FsBzH0VOVDRnJ/ZimUlpLm226U8qgqYJfPOY/CPK6wyRInMxh73HSKg5wyRwdS4BVYYHwokA==",
"dev": true,
"requires": {
"fast-diff": "^1.1.1",
"jest-docblock": "^21.0.0"
}
},
"eslint-plugin-react": {
"version": "6.7.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-6.7.1.tgz",
"integrity": "sha1-Gvlq6lRYVoJRV9l8G1DVqPtkpac=",
"version": "6.10.3",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-6.10.3.tgz",
"integrity": "sha1-xUNb6wZ3ThLH2y9qut3L+QDNP3g=",
"dev": true,
"optional": true,
"requires": {
"array.prototype.find": "^2.0.1",
"doctrine": "^1.2.2",
"jsx-ast-utils": "^1.3.3"
"has": "^1.0.1",
"jsx-ast-utils": "^1.3.4",
"object.assign": "^4.0.4"
}
},
"eslint-plugin-react-native": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-react-native/-/eslint-plugin-react-native-2.0.0.tgz",
"integrity": "sha1-4WbgicCV4mGZHxCVJisKRCs7SZc=",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-react-native/-/eslint-plugin-react-native-2.3.2.tgz",
"integrity": "sha1-4bK6LZf7RrFv4tu1vU0PR0GfKFk=",
"dev": true,
"requires": {
"babel-eslint": "6.1.2",
"eslint": "3.2.1"
},
"dependencies": {
"babel-eslint": {
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-6.1.2.tgz",
"integrity": "sha1-UpNBn+NnLWZZjTJ9qWlFZ7pqXy8=",
"dev": true,
"requires": {
"babel-traverse": "^6.0.20",
"babel-types": "^6.0.19",
"babylon": "^6.0.18",
"lodash.assign": "^4.0.0",
"lodash.pickby": "^4.0.0"
}
}
}
"optional": true
},
"espree": {
"version": "3.5.3",
@ -1143,6 +1222,15 @@
"integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=",
"dev": true
},
"esquery": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz",
"integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==",
"dev": true,
"requires": {
"estraverse": "^4.0.0"
}
},
"esrecurse": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
@ -1224,6 +1312,12 @@
}
}
},
"fast-diff": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz",
"integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==",
"dev": true
},
"fast-levenshtein": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
@ -1330,6 +1424,12 @@
"integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==",
"dev": true
},
"get-stdin": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz",
"integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=",
"dev": true
},
"glob": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
@ -1445,6 +1545,12 @@
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"has-symbols": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
"integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
"dev": true
},
"hash-base": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz",
@ -1587,11 +1693,18 @@
"xtend": "^4.0.0"
}
},
"interpret": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz",
"integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=",
"dev": true
},
"invariant": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.3.tgz",
"integrity": "sha512-7Z5PPegwDTyjbaeCnV0efcyS6vdKAU51kpEmS7QFib3P4822l8ICYyMn7qvJnc+WzLoDsuI9gPMKbJ8pCu8XtA==",
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
"dev": true,
"optional": true,
"requires": {
"loose-envify": "^1.0.0"
}
@ -1608,6 +1721,19 @@
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
"dev": true
},
"is-callable": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
"integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
"dev": true
},
"is-date-object": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
"integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
"dev": true,
"optional": true
},
"is-extendable": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
@ -1678,18 +1804,44 @@
"integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=",
"dev": true
},
"is-regex": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
"integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
"dev": true,
"optional": true,
"requires": {
"has": "^1.0.1"
}
},
"is-resolvable": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz",
"integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==",
"dev": true
},
"is-symbol": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
"integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
"dev": true,
"optional": true,
"requires": {
"has-symbols": "^1.0.0"
}
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
},
"jest-docblock": {
"version": "21.2.0",
"resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz",
"integrity": "sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==",
"dev": true
},
"jquery": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz",
@ -1751,7 +1903,8 @@
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz",
"integrity": "sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE=",
"dev": true
"dev": true,
"optional": true
},
"known-css-properties": {
"version": "0.3.0",
@ -1838,12 +1991,6 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz",
"integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw=="
},
"lodash.assign": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz",
"integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=",
"dev": true
},
"lodash.capitalize": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz",
@ -1868,12 +2015,6 @@
"integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==",
"dev": true
},
"lodash.pickby": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.pickby/-/lodash.pickby-4.6.0.tgz",
"integrity": "sha1-feoh2MGNdwOifHBMFdO4SmfjOv8=",
"dev": true
},
"lodash.snakecase": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
@ -1881,12 +2022,13 @@
"dev": true
},
"loose-envify": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
"integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=",
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dev": true,
"optional": true,
"requires": {
"js-tokens": "^3.0.0"
"js-tokens": "^3.0.0 || ^4.0.0"
}
},
"markdown-spellcheck": {
@ -2170,6 +2312,12 @@
"integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=",
"dev": true
},
"natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
"dev": true
},
"nconf": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/nconf/-/nconf-0.10.0.tgz",
@ -2228,6 +2376,25 @@
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"dev": true
},
"object-keys": {
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz",
"integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==",
"dev": true
},
"object.assign": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
"integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
"dev": true,
"optional": true,
"requires": {
"define-properties": "^1.1.2",
"function-bind": "^1.1.1",
"has-symbols": "^1.0.0",
"object-keys": "^1.0.11"
}
},
"object.omit": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
@ -2412,6 +2579,12 @@
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
"dev": true
},
"prettier": {
"version": "1.15.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.15.3.tgz",
"integrity": "sha512-gAU9AGAPMaKb3NNSUUuhhFAS7SCO4ALTN4nRIn6PJ075Qd28Yn2Ig2ahEJWdJwJmlEBTUfC7mMUSFy8MwsOCfg==",
"dev": true
},
"process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
@ -2533,6 +2706,15 @@
"mute-stream": "0.0.5"
}
},
"rechoir": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
"integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
"dev": true,
"requires": {
"resolve": "^1.1.6"
}
},
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
@ -2893,6 +3075,18 @@
"ansi-regex": "^2.0.0"
}
},
"strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
"dev": true
},
"strip-json-comments": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
"dev": true
},
"subarg": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",

2
package.json

@ -8,7 +8,7 @@
"author": "Jake Howard <git@theorangeone.net>",
"devDependencies": {
"browserify": "16.2.3",
"eslint-config-dabapps": "github:dabapps/eslint-config-dabapps#v3.0.0",
"eslint-config-dabapps": "github:dabapps/eslint-config-dabapps#v4.0.0",
"markdown-spellcheck": "1.3.1",
"sass-lint": "1.12.1",
"yaml-lint": "1.2.4"

46
static/src/js/index.js

@ -4,7 +4,7 @@ var Clipboard = require('clipboard');
function waitFor(obj, property, callback) {
// Wait for a property to exist on window before runnig callback
var intervalId = setInterval(function () {
var intervalId = setInterval(function() {
if (obj.hasOwnProperty(property)) {
clearInterval(intervalId);
callback();
@ -12,8 +12,8 @@ function waitFor(obj, property, callback) {
}, 100);
}
$('.image').each(function () { // setup div-image hybrids
$('.image').each(function() {
// setup div-image hybrids
var ele = $(this);
if (ele.data('image')) {
ele.css('background-image', 'url(' + ele.data('image') + ')');
@ -22,41 +22,49 @@ $('.image').each(function () { // setup div-image hybrids
}
});
$(document).ready(function () {
waitFor($.fn, 'lightGallery', function () {
$(document).ready(function() {
waitFor($.fn, 'lightGallery', function() {
$('#light-gallery').lightGallery({
thumbnail:true,
thumbnail: true,
animateThumb: false,
showThumbByDefault: false,
preload: 2,
download: false
download: false,
});
});
// HACK: ToC has blank li if no initial header
$('#TableOfContents').each(function () {
$('#TableOfContents').each(function() {
var ele = $(this);
if (ele.find('a').length <= 3) {
ele.parent().remove();
} else if (ele.children('ul').children('li').length === 1) {
ele.children('ul').replaceWith(ele.children('ul').children('li').children('ul'));
ele.children('ul').replaceWith(
ele
.children('ul')
.children('li')
.children('ul')
);
}
});
waitFor(window, 'mermaid', function () {
waitFor(window, 'mermaid', function() {
mermaid.initialize({
startOnLoad: true
startOnLoad: true,
});
});
});
$('.navbar-brand').on('click', function (event) {
$('.navbar-brand').on('click', function(event) {
if ($('html').scrollTop() > 100) {
$('html, body').stop().animate({
scrollTop: 0
}, 500);
$('html, body')
.stop()
.animate(
{
scrollTop: 0,
},
500
);
} else {
window.location = '/';
}
@ -64,12 +72,12 @@ $('.navbar-brand').on('click', function (event) {
});
var clipboard = new Clipboard('a');
clipboard.on('success', function (e) {
clipboard.on('success', function(e) {
var ele = $(e.trigger);
ele.find('i').attr('class', 'fas fa-check');
alert('Copied "' + ele.data('clipboard-text') + '" to clipboard!');
});
$('[data-clipboard-text]').on('click', function (event) {
$('[data-clipboard-text]').on('click', function(event) {
event.preventDefault();
});
Loading…
Cancel
Save