Commit 44cfbccf authored by Ade Viankakrisna Fadlil's avatar Ade Viankakrisna Fadlil Committed by Joe Haddad
Browse files

Rerun prettier and pin version (#3058)

* rerun prettier for all files

* pin prettier to 1.6.1
parent 5e300ceb
3 merge requests!12191Lim.Pisey.168:/Identified - We are currently investigating reports of missing build logs. The issue has been identified and a resolution is in progress. We will provide a further update when available.Mar 21, 09:02 UTC,!12853brikk,!5717Automatically extract project file structure from build bundle file
Showing with 54 additions and 78 deletions
+54 -78
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"lerna": "^2.0.0", "lerna": "^2.0.0",
"lerna-changelog": "^0.6.0", "lerna-changelog": "^0.6.0",
"lint-staged": "^3.3.1", "lint-staged": "^3.3.1",
"prettier": "^1.5.2" "prettier": "1.6.1"
}, },
"lint-staged": { "lint-staged": {
"*.js": [ "*.js": [
......
...@@ -455,7 +455,9 @@ function checkNpmVersion() { ...@@ -455,7 +455,9 @@ function checkNpmVersion() {
let hasMinNpm = false; let hasMinNpm = false;
let npmVersion = null; let npmVersion = null;
try { try {
npmVersion = execSync('npm --version').toString().trim(); npmVersion = execSync('npm --version')
.toString()
.trim();
hasMinNpm = semver.gte(npmVersion, '3.0.0'); hasMinNpm = semver.gte(npmVersion, '3.0.0');
} catch (err) { } catch (err) {
// ignore // ignore
......
...@@ -43,7 +43,7 @@ const COMMON_EDITORS_OSX = { ...@@ -43,7 +43,7 @@ const COMMON_EDITORS_OSX = {
'/Applications/CLion.app/Contents/MacOS/clion': '/Applications/CLion.app/Contents/MacOS/clion':
'/Applications/CLion.app/Contents/MacOS/clion', '/Applications/CLion.app/Contents/MacOS/clion',
'/Applications/IntelliJ IDEA.app/Contents/MacOS/idea': '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea':
'/Applications/IntelliJ IDEA.app/Contents/MacOS/idea', '/Applications/IntelliJ IDEA.app/Contents/MacOS/idea',
'/Applications/PhpStorm.app/Contents/MacOS/phpstorm': '/Applications/PhpStorm.app/Contents/MacOS/phpstorm':
'/Applications/PhpStorm.app/Contents/MacOS/phpstorm', '/Applications/PhpStorm.app/Contents/MacOS/phpstorm',
'/Applications/PyCharm.app/Contents/MacOS/pycharm': '/Applications/PyCharm.app/Contents/MacOS/pycharm':
...@@ -53,7 +53,7 @@ const COMMON_EDITORS_OSX = { ...@@ -53,7 +53,7 @@ const COMMON_EDITORS_OSX = {
'/Applications/RubyMine.app/Contents/MacOS/rubymine': '/Applications/RubyMine.app/Contents/MacOS/rubymine':
'/Applications/RubyMine.app/Contents/MacOS/rubymine', '/Applications/RubyMine.app/Contents/MacOS/rubymine',
'/Applications/WebStorm.app/Contents/MacOS/webstorm': '/Applications/WebStorm.app/Contents/MacOS/webstorm':
'/Applications/WebStorm.app/Contents/MacOS/webstorm', '/Applications/WebStorm.app/Contents/MacOS/webstorm',
}; };
const COMMON_EDITORS_WIN = [ const COMMON_EDITORS_WIN = [
......
...@@ -29,11 +29,7 @@ type HeaderPropType = {| ...@@ -29,11 +29,7 @@ type HeaderPropType = {|
|}; |};
function Header(props: HeaderPropType) { function Header(props: HeaderPropType) {
return ( return <div style={headerStyle}>{props.headerText}</div>;
<div style={headerStyle}>
{props.headerText}
</div>
);
} }
export default Header; export default Header;
...@@ -54,13 +54,14 @@ class RuntimeErrorContainer extends PureComponent { ...@@ -54,13 +54,14 @@ class RuntimeErrorContainer extends PureComponent {
return ( return (
<ErrorOverlay shortcutHandler={this.shortcutHandler}> <ErrorOverlay shortcutHandler={this.shortcutHandler}>
<CloseButton close={close} /> <CloseButton close={close} />
{totalErrors > 1 && {totalErrors > 1 && (
<NavigationBar <NavigationBar
currentError={this.state.currentIndex + 1} currentError={this.state.currentIndex + 1}
totalErrors={totalErrors} totalErrors={totalErrors}
previous={this.previous} previous={this.previous}
next={this.next} next={this.next}
/>} />
)}
<RuntimeError <RuntimeError
errorRecord={errorRecords[this.state.currentIndex]} errorRecord={errorRecords[this.state.currentIndex]}
launchEditorEndpoint={this.props.launchEditorEndpoint} launchEditorEndpoint={this.props.launchEditorEndpoint}
......
...@@ -155,9 +155,7 @@ class StackFrame extends Component { ...@@ -155,9 +155,7 @@ class StackFrame extends Component {
const canOpenInEditor = this.canOpenInEditor(); const canOpenInEditor = this.canOpenInEditor();
return ( return (
<div> <div>
<div> <div>{functionName}</div>
{functionName}
</div>
<div style={linkStyle}> <div style={linkStyle}>
<a <a
style={canOpenInEditor ? anchorStyle : null} style={canOpenInEditor ? anchorStyle : null}
...@@ -168,7 +166,7 @@ class StackFrame extends Component { ...@@ -168,7 +166,7 @@ class StackFrame extends Component {
{url} {url}
</a> </a>
</div> </div>
{codeBlockProps && {codeBlockProps && (
<span> <span>
<a <a
onClick={canOpenInEditor ? this.openInEditor : null} onClick={canOpenInEditor ? this.openInEditor : null}
...@@ -179,7 +177,8 @@ class StackFrame extends Component { ...@@ -179,7 +177,8 @@ class StackFrame extends Component {
<button style={toggleStyle} onClick={this.toggleCompiled}> <button style={toggleStyle} onClick={this.toggleCompiled}>
{'View ' + (compiled ? 'source' : 'compiled')} {'View ' + (compiled ? 'source' : 'compiled')}
</button> </button>
</span>} </span>
)}
</div> </div>
); );
} }
......
...@@ -84,11 +84,7 @@ class StackTrace extends Component { ...@@ -84,11 +84,7 @@ class StackTrace extends Component {
} }
render() { render() {
return ( return <div style={traceStyle}>{this.renderFrames()}</div>;
<div style={traceStyle}>
{this.renderFrames()}
</div>
);
} }
} }
......
...@@ -13,13 +13,16 @@ import StackFrame from './stack-frame'; ...@@ -13,13 +13,16 @@ import StackFrame from './stack-frame';
const regexExtractLocation = /\(?(.+?)(?::(\d+))?(?::(\d+))?\)?$/; const regexExtractLocation = /\(?(.+?)(?::(\d+))?(?::(\d+))?\)?$/;
function extractLocation(token: string): [string, number, number] { function extractLocation(token: string): [string, number, number] {
return regexExtractLocation.exec(token).slice(1).map(v => { return regexExtractLocation
const p = Number(v); .exec(token)
if (!isNaN(p)) { .slice(1)
return p; .map(v => {
} const p = Number(v);
return v; if (!isNaN(p)) {
}); return p;
}
return v;
});
} }
const regexValidFrame_Chrome = /^\s*(at|in)\s.+(:\d+)/; const regexValidFrame_Chrome = /^\s*(at|in)\s.+(:\d+)/;
...@@ -55,7 +58,10 @@ function parseStack(stack: string[]): StackFrame[] { ...@@ -55,7 +58,10 @@ function parseStack(stack: string[]): StackFrame[] {
if (e.indexOf('(at ') !== -1) { if (e.indexOf('(at ') !== -1) {
e = e.replace(/\(at /, '('); e = e.replace(/\(at /, '(');
} }
const data = e.trim().split(/\s+/g).slice(1); const data = e
.trim()
.split(/\s+/g)
.slice(1);
const last = data.pop(); const last = data.pop();
return new StackFrame(data.join(' ') || null, ...extractLocation(last)); return new StackFrame(data.join(' ') || null, ...extractLocation(last));
} }
......
...@@ -11,7 +11,10 @@ ...@@ -11,7 +11,10 @@
import type { ReactFrame } from '../effects/proxyConsole'; import type { ReactFrame } from '../effects/proxyConsole';
function stripInlineStacktrace(message: string): string { function stripInlineStacktrace(message: string): string {
return message.split('\n').filter(line => !line.match(/^\s*in/)).join('\n'); // " in Foo" return message
.split('\n')
.filter(line => !line.match(/^\s*in/))
.join('\n'); // " in Foo"
} }
function massage( function massage(
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
import React from 'react'; import React from 'react';
export default () => export default () => (
<span> <span>
<span id="feature-file-env-original-1"> <span id="feature-file-env-original-1">
{process.env.REACT_APP_ORIGINAL_1} {process.env.REACT_APP_ORIGINAL_1}
...@@ -21,7 +21,6 @@ export default () => ...@@ -21,7 +21,6 @@ export default () =>
{process.env.REACT_APP_DEVELOPMENT} {process.env.REACT_APP_DEVELOPMENT}
{process.env.REACT_APP_PRODUCTION} {process.env.REACT_APP_PRODUCTION}
</span> </span>
<span id="feature-file-env-x"> <span id="feature-file-env-x">{process.env.REACT_APP_X}</span>
{process.env.REACT_APP_X} </span>
</span> );
</span>;
...@@ -33,11 +33,7 @@ export default class extends Component { ...@@ -33,11 +33,7 @@ export default class extends Component {
render() { render() {
return ( return (
<div id="feature-node-path"> <div id="feature-node-path">
{this.state.users.map(user => {this.state.users.map(user => <div key={user.id}>{user.name}</div>)}
<div key={user.id}>
{user.name}
</div>
)}
</div> </div>
); );
} }
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
import React from 'react'; import React from 'react';
export default () => export default () => (
<span id="feature-public-url"> <span id="feature-public-url">{process.env.PUBLIC_URL}.</span>
{process.env.PUBLIC_URL}. );
</span>;
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
import React from 'react'; import React from 'react';
export default () => export default () => (
<span id="feature-shell-env-variables"> <span id="feature-shell-env-variables">
{process.env.REACT_APP_SHELL_ENV_MESSAGE}. {process.env.REACT_APP_SHELL_ENV_MESSAGE}.
</span>; </span>
);
...@@ -38,11 +38,7 @@ export default class extends Component { ...@@ -38,11 +38,7 @@ export default class extends Component {
<div id="feature-array-destructuring"> <div id="feature-array-destructuring">
{this.state.users.map(user => { {this.state.users.map(user => {
const [id, name] = user; const [id, name] = user;
return ( return <div key={id}>{name}</div>;
<div key={id}>
{name}
</div>
);
})} })}
</div> </div>
); );
......
...@@ -41,11 +41,7 @@ export default class extends Component { ...@@ -41,11 +41,7 @@ export default class extends Component {
render() { render() {
return ( return (
<div id="feature-array-spread"> <div id="feature-array-spread">
{this.state.users.map(user => {this.state.users.map(user => <div key={user.id}>{user.name}</div>)}
<div key={user.id}>
{user.name}
</div>
)}
</div> </div>
); );
} }
......
...@@ -41,11 +41,7 @@ export default class extends Component { ...@@ -41,11 +41,7 @@ export default class extends Component {
render() { render() {
return ( return (
<div id="feature-async-await"> <div id="feature-async-await">
{this.state.users.map(user => {this.state.users.map(user => <div key={user.id}>{user.name}</div>)}
<div key={user.id}>
{user.name}
</div>
)}
</div> </div>
); );
} }
......
...@@ -29,11 +29,7 @@ export default class extends Component { ...@@ -29,11 +29,7 @@ export default class extends Component {
render() { render() {
return ( return (
<div id="feature-class-properties"> <div id="feature-class-properties">
{this.users.map(user => {this.users.map(user => <div key={user.id}>{user.name}</div>)}
<div key={user.id}>
{user.name}
</div>
)}
</div> </div>
); );
} }
......
...@@ -41,11 +41,9 @@ export default class extends Component { ...@@ -41,11 +41,9 @@ export default class extends Component {
render() { render() {
return ( return (
<div id="feature-computed-properties"> <div id="feature-computed-properties">
{this.state.users.map(user => {this.state.users.map(user => (
<div key={user.id}> <div key={user.id}>{user.user_name}</div>
{user.user_name} ))}
</div>
)}
</div> </div>
); );
} }
......
...@@ -53,11 +53,11 @@ export default class extends Component { ...@@ -53,11 +53,11 @@ export default class extends Component {
return ( return (
<div id="feature-custom-interpolation"> <div id="feature-custom-interpolation">
{this.state.users.map(user => {this.state.users.map(user => (
<div key={user.id} style={veryInlineStyle}> <div key={user.id} style={veryInlineStyle}>
{user.name} {user.name}
</div> </div>
)} ))}
</div> </div>
); );
} }
......
...@@ -41,11 +41,7 @@ export default class extends Component { ...@@ -41,11 +41,7 @@ export default class extends Component {
render() { render() {
return ( return (
<div id="feature-default-parameters"> <div id="feature-default-parameters">
{this.state.users.map(user => {this.state.users.map(user => <div key={user.id}>{user.name}</div>)}
<div key={user.id}>
{user.name}
</div>
)}
</div> </div>
); );
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment