Skip to content

Commit 45ffaa2

Browse files
committed
[#841] Remove eslint and prettier conflicts
1 parent 9ea8081 commit 45ffaa2

File tree

21 files changed

+209
-202
lines changed

21 files changed

+209
-202
lines changed

.eslintrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
"import/no-unresolved": 0,
1717
"import/no-named-as-default": 2,
1818
"comma-dangle": 0, // not sure why airbnb turned this on. gross!
19-
"indent": [2, 2, {"SwitchCase": 1}],
19+
"indent": 0,
2020
"no-console": 0,
2121
"no-alert": 0,
2222
"no-underscore-dangle": 0,
2323
"max-len": [1, 120, 2, {"ignoreComments": true, "ignoreTemplateLiterals": true}],
24-
"quote-props": [1, "consistent-as-needed"],
24+
"quote-props": [1, "as-needed"],
2525
"no-unused-vars": [1, {"vars": "local", "args": "none"}],
2626
"consistent-return": ["error", { "treatUndefinedAsUnspecified": true }],
2727
"no-param-reassign": [2, { "props": false }],

.prettierrc

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"arrowParens": "always",
3-
"bracketSpacing": true,
4-
"htmlWhitespaceSensitivity": "css",
5-
"insertPragma": false,
6-
"jsxBracketSameLine": false,
7-
"jsxSingleQuote": false,
8-
"parser": "babel",
9-
"printWidth": 80,
10-
"proseWrap": "never",
11-
"requirePragma": false,
12-
"semi": true,
13-
"singleQuote": true,
14-
"tabWidth": 2,
15-
"trailingComma": "none",
16-
"useTabs": false,
17-
"quoteProps": "as-needed"
18-
}
2+
"arrowParens": "always",
3+
"bracketSpacing": true,
4+
"htmlWhitespaceSensitivity": "css",
5+
"insertPragma": false,
6+
"jsxBracketSameLine": false,
7+
"jsxSingleQuote": false,
8+
"parser": "babel",
9+
"printWidth": 80,
10+
"proseWrap": "never",
11+
"requirePragma": false,
12+
"semi": true,
13+
"singleQuote": true,
14+
"tabWidth": 2,
15+
"trailingComma": "none",
16+
"useTabs": false,
17+
"quoteProps": "as-needed"
18+
}

client/common/Button.jsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,15 @@ const Button = ({
212212
};
213213

214214
Button.defaultProps = {
215-
"children": null,
216-
"disabled": false,
217-
"iconAfter": null,
218-
"iconBefore": null,
219-
"kind": kinds.block,
220-
"href": null,
215+
children: null,
216+
disabled: false,
217+
iconAfter: null,
218+
iconBefore: null,
219+
kind: kinds.block,
220+
href: null,
221221
'aria-label': null,
222-
"to": null,
223-
"type": 'button'
222+
to: null,
223+
type: 'button'
224224
};
225225

226226
Button.kinds = kinds;
@@ -230,39 +230,39 @@ Button.propTypes = {
230230
* The visible part of the button, telling the user what
231231
* the action is
232232
*/
233-
"children": PropTypes.element,
233+
children: PropTypes.element,
234234
/**
235235
If the button can be activated or not
236236
*/
237-
"disabled": PropTypes.bool,
237+
disabled: PropTypes.bool,
238238
/**
239239
* SVG icon to place after child content
240240
*/
241-
"iconAfter": PropTypes.element,
241+
iconAfter: PropTypes.element,
242242
/**
243243
* SVG icon to place before child content
244244
*/
245-
"iconBefore": PropTypes.element,
245+
iconBefore: PropTypes.element,
246246
/**
247247
* The kind of button - determines how it appears visually
248248
*/
249-
"kind": PropTypes.oneOf(Object.values(kinds)),
249+
kind: PropTypes.oneOf(Object.values(kinds)),
250250
/**
251251
* Specifying an href will use an <a> to link to the URL
252252
*/
253-
"href": PropTypes.string,
253+
href: PropTypes.string,
254254
/*
255255
* An ARIA Label used for accessibility
256256
*/
257257
'aria-label': PropTypes.string,
258258
/**
259259
* Specifying a to URL will use a react-router Link
260260
*/
261-
"to": PropTypes.string,
261+
to: PropTypes.string,
262262
/**
263263
* If using a button, then type is defines the type of button
264264
*/
265-
"type": PropTypes.oneOf(['button', 'submit'])
265+
type: PropTypes.oneOf(['button', 'submit'])
266266
};
267267

268268
export default Button;

client/components/Nav.jsx

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -317,19 +317,19 @@ class Nav extends React.PureComponent {
317317
</li>
318318
{getConfig('LOGIN_ENABLED') &&
319319
(!this.props.project.owner || this.props.isUserOwner) && (
320-
<li className="nav__dropdown-item">
321-
<button
322-
onClick={this.handleSave}
323-
onFocus={this.handleFocusForFile}
324-
onBlur={this.handleBlur}
325-
>
326-
{this.props.t('Common.Save')}
327-
<span className="nav__keyboard-shortcut">
328-
{metaKeyName}+S
329-
</span>
330-
</button>
331-
</li>
332-
)}
320+
<li className="nav__dropdown-item">
321+
<button
322+
onClick={this.handleSave}
323+
onFocus={this.handleFocusForFile}
324+
onBlur={this.handleBlur}
325+
>
326+
{this.props.t('Common.Save')}
327+
<span className="nav__keyboard-shortcut">
328+
{metaKeyName}+S
329+
</span>
330+
</button>
331+
</li>
332+
)}
333333
{this.props.project.id && this.props.user.authenticated && (
334334
<li className="nav__dropdown-item">
335335
<button
@@ -378,17 +378,17 @@ class Nav extends React.PureComponent {
378378
{getConfig('UI_COLLECTIONS_ENABLED') &&
379379
this.props.user.authenticated &&
380380
this.props.project.id && (
381-
<li className="nav__dropdown-item">
382-
<Link
383-
to={`/${this.props.user.username}/sketches/${this.props.project.id}/add-to-collection`}
384-
onFocus={this.handleFocusForFile}
385-
onBlur={this.handleBlur}
386-
onClick={this.setDropdownForNone}
387-
>
388-
{this.props.t('Nav.File.AddToCollection')}
389-
</Link>
390-
</li>
391-
)}
381+
<li className="nav__dropdown-item">
382+
<Link
383+
to={`/${this.props.user.username}/sketches/${this.props.project.id}/add-to-collection`}
384+
onFocus={this.handleFocusForFile}
385+
onBlur={this.handleBlur}
386+
onClick={this.setDropdownForNone}
387+
>
388+
{this.props.t('Nav.File.AddToCollection')}
389+
</Link>
390+
</li>
391+
)}
392392
{getConfig('EXAMPLES_ENABLED') && (
393393
<li className="nav__dropdown-item">
394394
<Link
@@ -819,27 +819,27 @@ class Nav extends React.PureComponent {
819819
render() {
820820
const navDropdownState = {
821821
file: classNames({
822-
"nav__item": true,
822+
nav__item: true,
823823
'nav__item--open': this.state.dropdownOpen === 'file'
824824
}),
825825
edit: classNames({
826-
"nav__item": true,
826+
nav__item: true,
827827
'nav__item--open': this.state.dropdownOpen === 'edit'
828828
}),
829829
sketch: classNames({
830-
"nav__item": true,
830+
nav__item: true,
831831
'nav__item--open': this.state.dropdownOpen === 'sketch'
832832
}),
833833
help: classNames({
834-
"nav__item": true,
834+
nav__item: true,
835835
'nav__item--open': this.state.dropdownOpen === 'help'
836836
}),
837837
account: classNames({
838-
"nav__item": true,
838+
nav__item: true,
839839
'nav__item--open': this.state.dropdownOpen === 'account'
840840
}),
841841
lang: classNames({
842-
"nav__item": true,
842+
nav__item: true,
843843
'nav__item--open': this.state.dropdownOpen === 'lang'
844844
})
845845
};

client/components/mobile/Tab.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ export default styled(Link)`
88
99
background: transparent;
1010
/* border-top: ${remSize(4)} solid ${(props) =>
11-
prop(
12-
props.selected ? 'colors.p5jsPink' : 'MobilePanel.default.background'
13-
)}; */
11+
prop(
12+
props.selected ? 'colors.p5jsPink' : 'MobilePanel.default.background'
13+
)}; */
1414
border-top: ${remSize(4)} solid
1515
${(props) => (props.selected ? prop('TabHighlight') : 'transparent')};
1616

client/i18n.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function languageKeyToLabel(lang) {
1111
const languageMap = {
1212
'en-US': 'English',
1313
'es-419': 'Español',
14-
"ja": '日本語'
14+
ja: '日本語'
1515
};
1616
return languageMap[lang];
1717
}
@@ -20,7 +20,7 @@ export function languageKeyToDateLocale(lang) {
2020
const languageMap = {
2121
'en-US': enUS,
2222
'es-419': es,
23-
"ja": ja
23+
ja
2424
};
2525
return languageMap[lang];
2626
}

client/modules/IDE/components/CollectionList/CollectionList.jsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -134,24 +134,24 @@ class CollectionList extends React.Component {
134134
<span className={headerClass}>{displayName}</span>
135135
{field === fieldName &&
136136
direction === SortingActions.DIRECTION.ASC && (
137-
<ArrowUpIcon
138-
role="img"
139-
aria-label={this.props.t(
140-
'CollectionList.DirectionAscendingARIA'
141-
)}
142-
focusable="false"
143-
/>
144-
)}
137+
<ArrowUpIcon
138+
role="img"
139+
aria-label={this.props.t(
140+
'CollectionList.DirectionAscendingARIA'
141+
)}
142+
focusable="false"
143+
/>
144+
)}
145145
{field === fieldName &&
146146
direction === SortingActions.DIRECTION.DESC && (
147-
<ArrowDownIcon
148-
role="img"
149-
aria-label={this.props.t(
150-
'CollectionList.DirectionDescendingARIA'
151-
)}
152-
focusable="false"
153-
/>
154-
)}
147+
<ArrowDownIcon
148+
role="img"
149+
aria-label={this.props.t(
150+
'CollectionList.DirectionDescendingARIA'
151+
)}
152+
focusable="false"
153+
/>
154+
)}
155155
</button>
156156
</th>
157157
);

client/modules/IDE/components/Editor.jsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ class Editor extends React.Component {
114114
this.updateLintingMessageAccessibility(annotations);
115115
},
116116
options: {
117-
"asi": true,
118-
"eqeqeq": false,
117+
asi: true,
118+
eqeqeq: false,
119119
'-W041': false,
120-
"esversion": 7
120+
esversion: 7
121121
}
122122
}
123123
});
@@ -365,7 +365,7 @@ class Editor extends React.Component {
365365

366366
render() {
367367
const editorSectionClass = classNames({
368-
"editor": true,
368+
editor: true,
369369
'sidebar--contracted': !this.props.isExpanded,
370370
'editor--options': this.props.editorOptionsVisible
371371
});
@@ -417,8 +417,7 @@ class Editor extends React.Component {
417417
this.codemirrorContainer = element;
418418
}}
419419
className={editorHolderClass}
420-
>
421-
</article>
420+
/>
422421
<EditorAccessibility lintMessages={this.props.lintMessages} />
423422
</section>
424423
);

client/modules/IDE/components/Feedback.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ function Feedback(props) {
1212
<div className="feedback__content-pane">
1313
<h2 className="feedback__content-pane-header">Via Github Issues</h2>
1414
<p className="feedback__content-pane-copy">
15-
If you're familiar with Github, this is our preferred method for
16-
receiving bug reports and feedback.
15+
{`If you're familiar with Github, this is our preferred method for
16+
receiving bug reports and feedback.`}
1717
</p>
1818
<p className="feedback__content-pane-copy">
1919
<a

client/modules/IDE/components/Sidebar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class Sidebar extends React.Component {
6565
render() {
6666
const canEditProject = this.userCanEditProject();
6767
const sidebarClass = classNames({
68-
"sidebar": true,
68+
sidebar: true,
6969
'sidebar--contracted': !this.props.isExpanded,
7070
'sidebar--project-options': this.props.projectOptionsVisible,
7171
'sidebar--cant-edit': !canEditProject

client/modules/IDE/components/SketchList.jsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -453,20 +453,20 @@ class SketchList extends React.Component {
453453
<span className={headerClass}>{displayName}</span>
454454
{field === fieldName &&
455455
direction === SortingActions.DIRECTION.ASC && (
456-
<ArrowUpIcon
457-
role="img"
458-
aria-label={this.props.t('SketchList.DirectionAscendingARIA')}
459-
focusable="false"
460-
/>
461-
)}
456+
<ArrowUpIcon
457+
role="img"
458+
aria-label={this.props.t('SketchList.DirectionAscendingARIA')}
459+
focusable="false"
460+
/>
461+
)}
462462
{field === fieldName &&
463463
direction === SortingActions.DIRECTION.DESC && (
464-
<ArrowDownIcon
465-
role="img"
466-
aria-label={this.props.t('SketchList.DirectionDescendingARIA')}
467-
focusable="false"
468-
/>
469-
)}
464+
<ArrowDownIcon
465+
role="img"
466+
aria-label={this.props.t('SketchList.DirectionDescendingARIA')}
467+
focusable="false"
468+
/>
469+
)}
470470
</button>
471471
</th>
472472
);

client/modules/IDE/pages/IDEView.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,7 @@ class IDEView extends React.Component {
362362
ref={(element) => {
363363
this.overlay = element;
364364
}}
365-
>
366-
</div>
365+
/>
367366
<div>
368367
{((this.props.preferences.textOutput ||
369368
this.props.preferences.gridOutput ||

0 commit comments

Comments
 (0)