diff --git a/packages/skin-museum-client/src/Cell.js b/packages/skin-museum-client/src/Cell.js index 937a2e1f..26c5280d 100644 --- a/packages/skin-museum-client/src/Cell.js +++ b/packages/skin-museum-client/src/Cell.js @@ -74,9 +74,8 @@ const mapStateToProps = (state, ownProps) => { rowIndex, columnIndex, }); - const getPermalinkUrlFromHash = Selectors.getPermalinkUrlFromHashGetter( - state - ); + const getPermalinkUrlFromHash = + Selectors.getPermalinkUrlFromHashGetter(state); return { requestToken, skin, diff --git a/packages/skin-museum-client/src/Disposable.js b/packages/skin-museum-client/src/Disposable.js index 54d61bfb..014ae1f5 100644 --- a/packages/skin-museum-client/src/Disposable.js +++ b/packages/skin-museum-client/src/Disposable.js @@ -10,7 +10,7 @@ export default class Disposable { "Cannot dispose an observable that has already been dispsoed" ); } - this._teardowns.forEach(teardown => { + this._teardowns.forEach((teardown) => { if (typeof teardown === "function") { teardown(); } else if (typeof teardown.unsubscribe === "function") { diff --git a/packages/skin-museum-client/src/FileExplorer.js b/packages/skin-museum-client/src/FileExplorer.js index fdf62df3..23b256e0 100644 --- a/packages/skin-museum-client/src/FileExplorer.js +++ b/packages/skin-museum-client/src/FileExplorer.js @@ -20,7 +20,7 @@ class Readme extends React.Component { className={"readme"} style={{ width: "100%", - height: "300px" + height: "300px", }} >
{content}
@@ -45,7 +45,7 @@ class Readme extends React.Component { position: "fixed", backgroundColor: "white", overflow: "scroll", - ...this.props.style + ...this.props.style, }} > {this.props.focusedFile ? ( @@ -81,7 +81,7 @@ class Readme extends React.Component { function mapStateToProps(state) { return { zip: state.skinZip, - focusedFile: state.focusedSkinFile + focusedFile: state.focusedSkinFile, }; } @@ -89,10 +89,7 @@ function mapDispatchToProps(dispatch) { return { selectSkinFile(fileName) { dispatch(Actions.selectSkinFile(fileName)); - } + }, }; } -export default connect( - mapStateToProps, - mapDispatchToProps -)(Readme); +export default connect(mapStateToProps, mapDispatchToProps)(Readme); diff --git a/packages/skin-museum-client/src/WebampComponent.js b/packages/skin-museum-client/src/WebampComponent.js index 61d78c27..d7ae4492 100644 --- a/packages/skin-museum-client/src/WebampComponent.js +++ b/packages/skin-museum-client/src/WebampComponent.js @@ -36,8 +36,7 @@ class WebampComponent extends React.Component { duration: 5.322286, }, { - url: - "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Diablo_Swing_Orchestra_-_01_-_Heroines.mp3", + url: "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Diablo_Swing_Orchestra_-_01_-_Heroines.mp3", duration: 322.612245, metaData: { title: "Heroines", @@ -46,8 +45,7 @@ class WebampComponent extends React.Component { }, }, { - url: - "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Eclectek_-_02_-_We_Are_Going_To_Eclecfunk_Your_Ass.mp3", + url: "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Eclectek_-_02_-_We_Are_Going_To_Eclecfunk_Your_Ass.mp3", duration: 190.093061, metaData: { title: "We Are Going To Eclecfunk Your Ass", @@ -56,8 +54,7 @@ class WebampComponent extends React.Component { }, }, { - url: - "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Auto-Pilot_-_03_-_Seventeen.mp3", + url: "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Auto-Pilot_-_03_-_Seventeen.mp3", duration: 214.622041, metaData: { title: "Seventeen", @@ -66,8 +63,7 @@ class WebampComponent extends React.Component { }, }, { - url: - "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Muha_-_04_-_Microphone.mp3", + url: "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Muha_-_04_-_Microphone.mp3", duration: 181.838367, metaData: { title: "Microphone", @@ -76,8 +72,7 @@ class WebampComponent extends React.Component { }, }, { - url: - "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Just_Plain_Ant_-_05_-_Stumble.mp3", + url: "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Just_Plain_Ant_-_05_-_Stumble.mp3", duration: 86.047347, metaData: { title: "Stumble", @@ -86,8 +81,7 @@ class WebampComponent extends React.Component { }, }, { - url: - "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Sleaze_-_06_-_God_Damn.mp3", + url: "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Sleaze_-_06_-_God_Damn.mp3", duration: 226.795102, metaData: { title: "God Damn", @@ -96,8 +90,7 @@ class WebampComponent extends React.Component { }, }, { - url: - "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Juanitos_-_07_-_Hola_Hola_Bossa_Nova.mp3", + url: "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Juanitos_-_07_-_Hola_Hola_Bossa_Nova.mp3", duration: 207.072653, metaData: { title: "Hola Hola Bossa Nova", @@ -106,8 +99,7 @@ class WebampComponent extends React.Component { }, }, { - url: - "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Entertainment_for_the_Braindead_-_08_-_Resolutions_Chris_Summer_Remix.mp3", + url: "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Entertainment_for_the_Braindead_-_08_-_Resolutions_Chris_Summer_Remix.mp3", duration: 314.331429, metaData: { title: "Resolutions (Chris Summer Remix)", @@ -116,8 +108,7 @@ class WebampComponent extends React.Component { }, }, { - url: - "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Nobara_Hayakawa_-_09_-_Trail.mp3", + url: "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Nobara_Hayakawa_-_09_-_Trail.mp3", duration: 204.042449, metaData: { title: "Trail", @@ -126,8 +117,7 @@ class WebampComponent extends React.Component { }, }, { - url: - "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Paper_Navy_-_10_-_Tongue_Tied.mp3", + url: "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/Paper_Navy_-_10_-_Tongue_Tied.mp3", duration: 201.116735, metaData: { title: "Tongue Tied", @@ -136,8 +126,7 @@ class WebampComponent extends React.Component { }, }, { - url: - "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/60_Tigres_-_11_-_Garage.mp3", + url: "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/60_Tigres_-_11_-_Garage.mp3", duration: 245.394286, metaData: { title: "Garage", @@ -146,8 +135,7 @@ class WebampComponent extends React.Component { }, }, { - url: - "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/CM_aka_Creative_-_12_-_The_Cycle_Featuring_Mista_Mista.mp3", + url: "https://raw.githubusercontent.com/captbaritone/webamp-music/4b556fbf/CM_aka_Creative_-_12_-_The_Cycle_Featuring_Mista_Mista.mp3", duration: 221.44, metaData: { title: "The Cycle (Featuring Mista Mista)", diff --git a/packages/skin-museum-client/src/Zoom.js b/packages/skin-museum-client/src/Zoom.js index 09e65c32..1520e126 100644 --- a/packages/skin-museum-client/src/Zoom.js +++ b/packages/skin-museum-client/src/Zoom.js @@ -82,7 +82,7 @@ function Button({ ...props }) { border: "none", cursor: props.disabled ? "default" : "pointer", font: "inherit", - fontWeight: 'bold', + fontWeight: "bold", outline: "inherit", background: "none", paddingLeft: 14, diff --git a/packages/skin-museum-client/src/components/DownloadLink.js b/packages/skin-museum-client/src/components/DownloadLink.js index 3cb1070b..1b6f4481 100644 --- a/packages/skin-museum-client/src/components/DownloadLink.js +++ b/packages/skin-museum-client/src/components/DownloadLink.js @@ -24,11 +24,11 @@ export default class DownloadLink extends React.Component { this._hrefs .pipe( distinctUntilChanged(), - switchMap(href => fetch(href)), - switchMap(response => response.blob()), - map(blob => URL.createObjectURL(blob)) + switchMap((href) => fetch(href)), + switchMap((response) => response.blob()), + map((blob) => URL.createObjectURL(blob)) ) - .subscribe(url => { + .subscribe((url) => { this.setState({ href: url }); }) ); diff --git a/packages/skin-museum-client/src/components/LinkInput.js b/packages/skin-museum-client/src/components/LinkInput.js index ac609d2a..959a3374 100644 --- a/packages/skin-museum-client/src/components/LinkInput.js +++ b/packages/skin-museum-client/src/components/LinkInput.js @@ -7,9 +7,9 @@ function LinkInput({ permalink, hide }) { style={{ padding: "5px", width: "300px", - marginBottom: "10px" + marginBottom: "10px", }} - onFocus={e => e.target.setSelectionRange(0, e.target.value.length)} + onFocus={(e) => e.target.setSelectionRange(0, e.target.value.length)} className="permalink-input" value={permalink} readOnly @@ -19,7 +19,7 @@ function LinkInput({ permalink, hide }) { style={{ fontSize: "18px", marginLeft: "5px", - cursor: "pointer" + cursor: "pointer", }} onClick={hide} > diff --git a/packages/skin-museum-client/src/registerServiceWorker.js b/packages/skin-museum-client/src/registerServiceWorker.js index a3e6c0cf..00202391 100644 --- a/packages/skin-museum-client/src/registerServiceWorker.js +++ b/packages/skin-museum-client/src/registerServiceWorker.js @@ -9,9 +9,9 @@ // This link also includes instructions on opting out of this behavior. const isLocalhost = Boolean( - window.location.hostname === 'localhost' || + window.location.hostname === "localhost" || // [::1] is the IPv6 localhost address. - window.location.hostname === '[::1]' || + window.location.hostname === "[::1]" || // 127.0.0.1/8 is considered localhost for IPv4. window.location.hostname.match( /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ @@ -19,7 +19,7 @@ const isLocalhost = Boolean( ); export default function register() { - if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) { // The URL constructor is available in all browsers that support SW. const publicUrl = new URL(process.env.PUBLIC_URL, window.location); if (publicUrl.origin !== window.location.origin) { @@ -29,7 +29,7 @@ export default function register() { return; } - window.addEventListener('load', () => { + window.addEventListener("load", () => { const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; if (isLocalhost) { @@ -40,8 +40,8 @@ export default function register() { // service worker/PWA documentation. navigator.serviceWorker.ready.then(() => { console.log( - 'This web app is being served cache-first by a service ' + - 'worker. To learn more, visit https://goo.gl/SC7cgQ' + "This web app is being served cache-first by a service " + + "worker. To learn more, visit https://goo.gl/SC7cgQ" ); }); } else { @@ -55,43 +55,43 @@ export default function register() { function registerValidSW(swUrl) { navigator.serviceWorker .register(swUrl) - .then(registration => { + .then((registration) => { registration.onupdatefound = () => { const installingWorker = registration.installing; installingWorker.onstatechange = () => { - if (installingWorker.state === 'installed') { + if (installingWorker.state === "installed") { if (navigator.serviceWorker.controller) { // At this point, the old content will have been purged and // the fresh content will have been added to the cache. // It's the perfect time to display a "New content is // available; please refresh." message in your web app. - console.log('New content is available; please refresh.'); + console.log("New content is available; please refresh."); } else { // At this point, everything has been precached. // It's the perfect time to display a // "Content is cached for offline use." message. - console.log('Content is cached for offline use.'); + console.log("Content is cached for offline use."); } } }; }; }) - .catch(error => { - console.error('Error during service worker registration:', error); + .catch((error) => { + console.error("Error during service worker registration:", error); }); } function checkValidServiceWorker(swUrl) { // Check if the service worker can be found. If it can't reload the page. fetch(swUrl) - .then(response => { + .then((response) => { // Ensure service worker exists, and that we really are getting a JS file. if ( response.status === 404 || - response.headers.get('content-type').indexOf('javascript') === -1 + response.headers.get("content-type").indexOf("javascript") === -1 ) { // No service worker found. Probably a different app. Reload the page. - navigator.serviceWorker.ready.then(registration => { + navigator.serviceWorker.ready.then((registration) => { registration.unregister().then(() => { window.location.reload(); }); @@ -103,14 +103,14 @@ function checkValidServiceWorker(swUrl) { }) .catch(() => { console.log( - 'No internet connection found. App is running in offline mode.' + "No internet connection found. App is running in offline mode." ); }); } export function unregister() { - if ('serviceWorker' in navigator) { - navigator.serviceWorker.ready.then(registration => { + if ("serviceWorker" in navigator) { + navigator.serviceWorker.ready.then((registration) => { registration.unregister(); }); } diff --git a/packages/skin-museum-client/styleguide.config.js b/packages/skin-museum-client/styleguide.config.js index 48e953f6..3292f3f2 100644 --- a/packages/skin-museum-client/styleguide.config.js +++ b/packages/skin-museum-client/styleguide.config.js @@ -1,4 +1,4 @@ module.exports = { components: "src/components/**/*.js", - styleguideDir: "build/styleguide/" + styleguideDir: "build/styleguide/", };