Tell eslint to look the other way
authorJason Boyer <JBoyer@equinoxinitiative.org>
Fri, 11 Sep 2020 21:43:22 +0000 (17:43 -0400)
committerJason Boyer <JBoyer@equinoxinitiative.org>
Fri, 11 Sep 2020 22:12:08 +0000 (18:12 -0400)
A couple minor lint issues needed repaired for search.css and
search.js. Apparently lunr.js has never been linted though. It
works as expected as-is but it's not our job to fix their 400+
errors...

Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org>
src/css/search.css
src/js/vendor/lunr.js
src/js/vendor/search.js

index d9af4ac..0309a67 100644 (file)
@@ -74,7 +74,7 @@
 .search-result-highlight {
   color: #174d8c;
   background: rgba(143, 187, 237, 0.1);
-  padding: .1em .05em;
+  padding: 0.1em 0.05em;
 }
 
 .search-result-item {
 .search-result-document-hit > a:hover {
   background-color: rgba(69, 142, 225, 0.05);
 }
-
index c353765..18093f4 100644 (file)
@@ -1,3 +1,4 @@
+/* eslint-disable */
 /**
  * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.8
  * Copyright (C) 2019 Oliver Nightingale
@@ -3473,3 +3474,4 @@ lunr.QueryParser.parseBoost = function (parser) {
     return lunr
   }))
 })();
+/* eslint-enable */
index fcf4046..98df493 100644 (file)
@@ -90,7 +90,7 @@ window.antoraLunr = (function (lunr) {
     return hits
   }
 
-  function createSearchResult(result, store, searchResultDataset) {
+  function createSearchResult (result, store, searchResultDataset) {
     result.forEach(function (item) {
       var url = item.ref
       var hash
@@ -192,7 +192,7 @@ window.antoraLunr = (function (lunr) {
   }
 
   function init (data) {
-    var index = Object.assign({index: lunr.Index.load(data.index), store: data.store})
+    var index = Object.assign({ index: lunr.Index.load(data.index), store: data.store })
     var search = debounce(function () {
       searchIndex(index.index, index.store, searchInput.value)
     }, 100)