Lint JavaScript
This commit is contained in:
parent
dcc4a74155
commit
b503341791
|
@ -0,0 +1,24 @@
|
||||||
|
module.exports = {
|
||||||
|
"env": {
|
||||||
|
"browser": true
|
||||||
|
},
|
||||||
|
"extends": "eslint:recommended",
|
||||||
|
"rules": {
|
||||||
|
"indent": [
|
||||||
|
"error",
|
||||||
|
"tab"
|
||||||
|
],
|
||||||
|
"linebreak-style": [
|
||||||
|
"error",
|
||||||
|
"unix"
|
||||||
|
],
|
||||||
|
"quotes": [
|
||||||
|
"error",
|
||||||
|
"single"
|
||||||
|
],
|
||||||
|
"semi": [
|
||||||
|
"error",
|
||||||
|
"always"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
|
@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
- Lint JavaScript.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Accessibility enhancements for Lunr search form.
|
- Accessibility enhancements for Lunr search form.
|
||||||
|
|
||||||
|
|
|
@ -66,9 +66,9 @@ mySearchToggle.addEventListener('click', function() {
|
||||||
|
|
||||||
// Toggle search input and content visibility
|
// Toggle search input and content visibility
|
||||||
function toggleClassSearch() {
|
function toggleClassSearch() {
|
||||||
mySearchContent.classList.toggle("is--visible");
|
mySearchContent.classList.toggle('is--visible');
|
||||||
myInitialContent.classList.toggle("is--hidden");
|
myInitialContent.classList.toggle('is--hidden');
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
document.querySelector(".search-content input").focus();
|
document.querySelector('.search-content input').focus();
|
||||||
}, 400);
|
}, 400);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue