Skip to content

Commit

Permalink
Fix some minor eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Nov 3, 2024
1 parent cc490da commit 11fbd44
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/components/loader/loader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class LoaderComponent extends React.Component {
this.messageEl.textContent = this.props.intl.formatMessage(messages.projectData);
} else {
this.barInnerEl.style.width = `${finished / total * 100}%`;
const message = this.props.isRemote ? messages.downloadingAssets : messages.loadingAssets
const message = this.props.isRemote ? messages.downloadingAssets : messages.loadingAssets;
this.messageEl.textContent = this.props.intl.formatMessage(message, {
complete: finished,
total
Expand Down
36 changes: 19 additions & 17 deletions src/components/menu-bar/tw-theme-accent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,25 @@ const icons = {
[ACCENT_RAINBOW]: rainbowIcon
};

const ColorIcon = props => icons[props.id] ? (
<img
className={styles.accentIconOuter}
src={icons[props.id]}
draggable={false}
// Image is decorative
alt=""
/>
) : (
<div
className={styles.accentIconOuter}
style={{
// menu-bar-background is var(...), don't want to evaluate with the current values
backgroundColor: ACCENT_MAP[props.id].guiColors['looks-secondary'],
backgroundImage: ACCENT_MAP[props.id].guiColors['menu-bar-background-image'],
}}
/>
const ColorIcon = props => (
icons[props.id] ? (
<img
className={styles.accentIconOuter}
src={icons[props.id]}
draggable={false}
// Image is decorative
alt=""
/>
) : (
<div
className={styles.accentIconOuter}
style={{
// menu-bar-background is var(...), don't want to evaluate with the current values
backgroundColor: ACCENT_MAP[props.id].guiColors['looks-secondary'],
backgroundImage: ACCENT_MAP[props.id].guiColors['menu-bar-background-image']
}}
/>
)
);

ColorIcon.propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/tw-fonts-modal/font-name.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ FontName.propTypes = {
onChange: PropTypes.func.isRequired,
fontManager: PropTypes.shape({
getUnusedSystemFont: PropTypes.func.isRequired,
getUnusedCustomFont: PropTypes.func.isRequired,
getUnusedCustomFont: PropTypes.func.isRequired
}).isRequired,
isCustom: PropTypes.bool.isRequired
};
Expand Down
1 change: 1 addition & 0 deletions src/lib/themes/accent/rainbow.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const guiColors = {

'drop-highlight': '#ff8c8c',

// eslint-disable-next-line max-len
'menu-bar-background-image': 'linear-gradient(90deg, rgba(255, 0, 0, 0.75) 0%, rgba(255, 154, 0, 0.75) 10%, rgba(208, 222, 33, 0.75) 20%, rgba(79, 220, 74, 0.75) 30%, rgba(63, 218, 216, 0.75) 40%, rgba(47, 201, 226, 0.75) 50%, rgba(28, 127, 238, 0.75) 60%, rgba(95, 21, 242, 0.75) 70%, rgba(186, 12, 248, 0.75) 80%, rgba(251, 7, 217, 0.75) 90%, rgba(255, 0, 0, 0.75) 100%)'
};

Expand Down
2 changes: 1 addition & 1 deletion src/playground/render-interface.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {connect} from 'react-redux';
import {compose} from 'redux';
import {FormattedMessage, defineMessages, injectIntl, intlShape} from 'react-intl';
import {getIsLoading} from '../reducers/project-state.js';
import DOMElementRenderer from '../containers/dom-element-renderer.jsx';
import AppStateHOC from '../lib/app-state-hoc.jsx';
import ErrorBoundaryHOC from '../lib/error-boundary-hoc.jsx';
import TWProjectMetaFetcherHOC from '../lib/tw-project-meta-fetcher-hoc.jsx';
Expand Down Expand Up @@ -99,6 +98,7 @@ const Footer = () => (

<div className={styles.footerText}>
<FormattedMessage
// eslint-disable-next-line max-len
defaultMessage="Scratch is a project of the Scratch Foundation. It is available for free at {scratchDotOrg}."
description="A disclaimer that Scratch requires when referring to Scratch. {scratchDotOrg} is a link with text 'https://scratch.org/'"
id="tw.footer.scratchDisclaimer"
Expand Down
8 changes: 6 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ const base = {
},
output: {
library: 'GUI',
filename: process.env.NODE_ENV === 'production' ? `js/${CACHE_EPOCH}/[name].[contenthash].js` : 'js/[name].js',
chunkFilename: process.env.NODE_ENV === 'production' ? `js/${CACHE_EPOCH}/[name].[contenthash].js` : 'js/[name].js',
filename: (
process.env.NODE_ENV === 'production' ? `js/${CACHE_EPOCH}/[name].[contenthash].js` : 'js/[name].js'
),
chunkFilename: (
process.env.NODE_ENV === 'production' ? `js/${CACHE_EPOCH}/[name].[contenthash].js` : 'js/[name].js'
),
publicPath: root
},
resolve: {
Expand Down

0 comments on commit 11fbd44

Please sign in to comment.