Skip to content

Commit 11fbd44

Browse files
committed
Fix some minor eslint errors
1 parent cc490da commit 11fbd44

File tree

6 files changed

+29
-22
lines changed

6 files changed

+29
-22
lines changed

src/components/loader/loader.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class LoaderComponent extends React.Component {
8484
this.messageEl.textContent = this.props.intl.formatMessage(messages.projectData);
8585
} else {
8686
this.barInnerEl.style.width = `${finished / total * 100}%`;
87-
const message = this.props.isRemote ? messages.downloadingAssets : messages.loadingAssets
87+
const message = this.props.isRemote ? messages.downloadingAssets : messages.loadingAssets;
8888
this.messageEl.textContent = this.props.intl.formatMessage(message, {
8989
complete: finished,
9090
total

src/components/menu-bar/tw-theme-accent.jsx

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,25 @@ const icons = {
4141
[ACCENT_RAINBOW]: rainbowIcon
4242
};
4343

44-
const ColorIcon = props => icons[props.id] ? (
45-
<img
46-
className={styles.accentIconOuter}
47-
src={icons[props.id]}
48-
draggable={false}
49-
// Image is decorative
50-
alt=""
51-
/>
52-
) : (
53-
<div
54-
className={styles.accentIconOuter}
55-
style={{
56-
// menu-bar-background is var(...), don't want to evaluate with the current values
57-
backgroundColor: ACCENT_MAP[props.id].guiColors['looks-secondary'],
58-
backgroundImage: ACCENT_MAP[props.id].guiColors['menu-bar-background-image'],
59-
}}
60-
/>
44+
const ColorIcon = props => (
45+
icons[props.id] ? (
46+
<img
47+
className={styles.accentIconOuter}
48+
src={icons[props.id]}
49+
draggable={false}
50+
// Image is decorative
51+
alt=""
52+
/>
53+
) : (
54+
<div
55+
className={styles.accentIconOuter}
56+
style={{
57+
// menu-bar-background is var(...), don't want to evaluate with the current values
58+
backgroundColor: ACCENT_MAP[props.id].guiColors['looks-secondary'],
59+
backgroundImage: ACCENT_MAP[props.id].guiColors['menu-bar-background-image']
60+
}}
61+
/>
62+
)
6163
);
6264

6365
ColorIcon.propTypes = {

src/components/tw-fonts-modal/font-name.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ FontName.propTypes = {
163163
onChange: PropTypes.func.isRequired,
164164
fontManager: PropTypes.shape({
165165
getUnusedSystemFont: PropTypes.func.isRequired,
166-
getUnusedCustomFont: PropTypes.func.isRequired,
166+
getUnusedCustomFont: PropTypes.func.isRequired
167167
}).isRequired,
168168
isCustom: PropTypes.bool.isRequired
169169
};

src/lib/themes/accent/rainbow.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const guiColors = {
1515

1616
'drop-highlight': '#ff8c8c',
1717

18+
// eslint-disable-next-line max-len
1819
'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%)'
1920
};
2021

src/playground/render-interface.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {connect} from 'react-redux';
2121
import {compose} from 'redux';
2222
import {FormattedMessage, defineMessages, injectIntl, intlShape} from 'react-intl';
2323
import {getIsLoading} from '../reducers/project-state.js';
24-
import DOMElementRenderer from '../containers/dom-element-renderer.jsx';
2524
import AppStateHOC from '../lib/app-state-hoc.jsx';
2625
import ErrorBoundaryHOC from '../lib/error-boundary-hoc.jsx';
2726
import TWProjectMetaFetcherHOC from '../lib/tw-project-meta-fetcher-hoc.jsx';
@@ -99,6 +98,7 @@ const Footer = () => (
9998

10099
<div className={styles.footerText}>
101100
<FormattedMessage
101+
// eslint-disable-next-line max-len
102102
defaultMessage="Scratch is a project of the Scratch Foundation. It is available for free at {scratchDotOrg}."
103103
description="A disclaimer that Scratch requires when referring to Scratch. {scratchDotOrg} is a link with text 'https://scratch.org/'"
104104
id="tw.footer.scratchDisclaimer"

webpack.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,12 @@ const base = {
5050
},
5151
output: {
5252
library: 'GUI',
53-
filename: process.env.NODE_ENV === 'production' ? `js/${CACHE_EPOCH}/[name].[contenthash].js` : 'js/[name].js',
54-
chunkFilename: process.env.NODE_ENV === 'production' ? `js/${CACHE_EPOCH}/[name].[contenthash].js` : 'js/[name].js',
53+
filename: (
54+
process.env.NODE_ENV === 'production' ? `js/${CACHE_EPOCH}/[name].[contenthash].js` : 'js/[name].js'
55+
),
56+
chunkFilename: (
57+
process.env.NODE_ENV === 'production' ? `js/${CACHE_EPOCH}/[name].[contenthash].js` : 'js/[name].js'
58+
),
5559
publicPath: root
5660
},
5761
resolve: {

0 commit comments

Comments
 (0)