Created
January 17, 2017 17:04
-
-
Save vjeux/9bc3481bd06c9fc40273db9bdf4b8455 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pkg/commons-atom/AutocompleteCacher.js b/pkg/commons-atom/AutocompleteCacher.js | |
index dfc28eb..f6dd99a 100644 | |
--- a/pkg/commons-atom/AutocompleteCacher.js | |
+++ b/pkg/commons-atom/AutocompleteCacher.js | |
@@ -68,8 +68,9 @@ export default class AutocompleteCacher<T> { | |
: defaultShouldFilter; | |
return lastRequest.bufferPosition.row === | |
currentRequest.bufferPosition.row && | |
- lastRequest.bufferPosition.column + 1 === | |
- currentRequest.bufferPosition.column && | |
+ lastRequest.bufferPosition.column + | |
+ 1 === | |
+ currentRequest.bufferPosition.column && | |
shouldFilter(lastRequest, currentRequest); | |
} | |
} | |
diff --git a/pkg/commons-atom/debounced.js b/pkg/commons-atom/debounced.js | |
index 13bdf09..9519c31 100644 | |
--- a/pkg/commons-atom/debounced.js | |
+++ b/pkg/commons-atom/debounced.js | |
@@ -52,7 +52,8 @@ export function editorChangesDebounced( | |
editor: atom$TextEditor, | |
debounceInterval: number = DEFAULT_EDITOR_DEBOUNCE_INTERVAL_MS, | |
): Observable<void> { | |
- return // Debounce manually rather than using editor.onDidStopChanging so that the debounce time is | |
+ return; | |
+ // Debounce manually rather than using editor.onDidStopChanging so that the debounce time is | |
// configurable. | |
observableFromSubscribeFunction( | |
callback => editor.onDidChange(callback), | |
diff --git a/pkg/commons-atom/projects.js b/pkg/commons-atom/projects.js | |
index 0ceb856..8c48f98 100644 | |
--- a/pkg/commons-atom/projects.js | |
+++ b/pkg/commons-atom/projects.js | |
@@ -26,7 +26,8 @@ function getValidProjectPaths(): Array<string> { | |
// isn't yet ready for consumption. | |
if ( | |
nuclideUri.isRemote(directory.getPath()) && | |
- directory instanceof Directory | |
+ directory instanceof | |
+ Directory | |
) { | |
return false; | |
} | |
diff --git a/pkg/commons-atom/testHelpers.js b/pkg/commons-atom/testHelpers.js | |
index ca18369..867bcfa 100644 | |
--- a/pkg/commons-atom/testHelpers.js | |
+++ b/pkg/commons-atom/testHelpers.js | |
@@ -138,8 +138,12 @@ export function waitsForFilePosition( | |
return false; | |
} | |
const pos = editor.getCursorBufferPosition(); | |
- return nuclideUri.basename(editorPath) === filename && pos.row === row && | |
- pos.column === column; | |
+ return nuclideUri.basename(editorPath) === | |
+ filename && | |
+ pos.row === | |
+ row && | |
+ pos.column === | |
+ column; | |
}, | |
); | |
} | |
diff --git a/pkg/commons-atom/vcs.js b/pkg/commons-atom/vcs.js | |
index 6fc9329..91f3425 100644 | |
--- a/pkg/commons-atom/vcs.js | |
+++ b/pkg/commons-atom/vcs.js | |
@@ -224,8 +224,8 @@ async function hgActionToPath( | |
export function getHgRepositories(): Set<HgRepositoryClient> { | |
return new Set( | |
- (// Flow doesn't understand that this filters to hg repositories only, so cast through `any` | |
- arrayCompact(atom.project.getRepositories()).filter( | |
+ // Flow doesn't understand that this filters to hg repositories only, so cast through `any` | |
+ (arrayCompact(atom.project.getRepositories()).filter( | |
repository => repository.getType() === 'hg', | |
): Array<any>), | |
); | |
diff --git a/pkg/commons-node/nuclideUri.js b/pkg/commons-node/nuclideUri.js | |
index d936bec..5324606 100644 | |
--- a/pkg/commons-node/nuclideUri.js | |
+++ b/pkg/commons-node/nuclideUri.js | |
@@ -182,8 +182,11 @@ function relative(uri: NuclideUri, other: NuclideUri): string { | |
const uriPathModule = _pathModuleFor(uri); | |
const remote = isRemote(uri); | |
if ( | |
- remote !== isRemote(other) || | |
- remote && getHostname(uri) !== getHostname(other) | |
+ remote !== | |
+ isRemote(other) || | |
+ remote && | |
+ getHostname(uri) !== | |
+ getHostname(other) | |
) { | |
throw new Error( | |
`Cannot relative urls on different hosts: ${uri} and ${other}`, | |
diff --git a/pkg/commons-node/process.js b/pkg/commons-node/process.js | |
index 3e3227a..635e914 100644 | |
--- a/pkg/commons-node/process.js | |
+++ b/pkg/commons-node/process.js | |
@@ -492,7 +492,7 @@ try { | |
FB_INCLUDE_PATHS = []; | |
} | |
-let DEFAULT_PATH_INCLUDE = [...FB_INCLUDE_PATHS, , '/usr/local/bin']; | |
+let DEFAULT_PATH_INCLUDE = [...FB_INCLUDE_PATHS, , , '/usr/local/bin']; | |
function prepareProcessOptions(options: Object): Object { | |
return {...options, env: preparePathEnvironment(options.env)}; | |
diff --git a/pkg/commons-node/promise.js b/pkg/commons-node/promise.js | |
index 2b520e4..ada54a7 100644 | |
--- a/pkg/commons-node/promise.js | |
+++ b/pkg/commons-node/promise.js | |
@@ -501,8 +501,11 @@ export async function asyncSome<T>( | |
* Check if an object is Promise by testing if it has a `then` function property. | |
*/ | |
export function isPromise(object: any): boolean { | |
- return Boolean(object) && typeof object === 'object' && | |
- typeof object.then === 'function'; | |
+ return Boolean(object) && | |
+ typeof object === | |
+ 'object' && | |
+ typeof object.then === | |
+ 'function'; | |
} | |
/** | |
diff --git a/pkg/commons-node/scheduleIdleCallback.js b/pkg/commons-node/scheduleIdleCallback.js | |
index 11ff7db..21ca02c 100644 | |
--- a/pkg/commons-node/scheduleIdleCallback.js | |
+++ b/pkg/commons-node/scheduleIdleCallback.js | |
@@ -35,8 +35,11 @@ export default global.requestIdleCallback ? // Using Browser API | |
const startTime = Date.now(); | |
function fn(deadline) { | |
if ( | |
- deadline.timeRemaining() >= afterRemainingTime || | |
- Date.now() - startTime >= timeout | |
+ deadline.timeRemaining() >= | |
+ afterRemainingTime || | |
+ Date.now() - | |
+ startTime >= | |
+ timeout | |
) { | |
invariant(callback != null); | |
callback(deadline); | |
diff --git a/pkg/commons-node/spec/humanizeKeystroke-spec.js b/pkg/commons-node/spec/humanizeKeystroke-spec.js | |
index 22b58d5..6d55a47 100644 | |
--- a/pkg/commons-node/spec/humanizeKeystroke-spec.js | |
+++ b/pkg/commons-node/spec/humanizeKeystroke-spec.js | |
@@ -83,9 +83,8 @@ describe('nuclide-keystroke-label', () => { | |
}); | |
it('handles junk input', () => { | |
// $FlowFixMe: Deliberately testing invalid input. | |
- expect( | |
- humanizeKeystroke(), | |
- ).toEqual(undefined); // $FlowFixMe: Deliberately testing invalid input. | |
+ expect(humanizeKeystroke()).toEqual(undefined); | |
+ // $FlowFixMe: Deliberately testing invalid input. | |
expect(humanizeKeystroke(null)).toEqual(null); | |
expect(humanizeKeystroke('')).toEqual(''); | |
diff --git a/pkg/commons-node/spec/nice-spec.js b/pkg/commons-node/spec/nice-spec.js | |
index 40d1dcc..48d25e2 100644 | |
--- a/pkg/commons-node/spec/nice-spec.js | |
+++ b/pkg/commons-node/spec/nice-spec.js | |
@@ -40,8 +40,12 @@ describe('nice', () => { | |
shouldFindIoniceCommand = true; | |
whichSpy = spyOn(require('../which'), 'default').andCallFake(command => { | |
if ( | |
- shouldFindNiceCommand && command === 'nice' || | |
- shouldFindIoniceCommand && command === 'ionice' | |
+ shouldFindNiceCommand && | |
+ command === | |
+ 'nice' || | |
+ shouldFindIoniceCommand && | |
+ command === | |
+ 'ionice' | |
) { | |
return command; | |
} else { | |
diff --git a/pkg/commons-node/spec/process-spec.js b/pkg/commons-node/spec/process-spec.js | |
index fa3f9a0..af4dbbf 100644 | |
--- a/pkg/commons-node/spec/process-spec.js | |
+++ b/pkg/commons-node/spec/process-spec.js | |
@@ -201,7 +201,8 @@ describe('commons-node/process', () => { | |
describe('process.parsePsOutput', () => { | |
it('parse `ps` unix output', () => { | |
- const unixPsOut = ' PPID PID COMM\n' + ' 0 1 /sbin/launchd\n' + | |
+ const unixPsOut = ' PPID PID COMM\n' + | |
+ ' 0 1 /sbin/launchd\n' + | |
' 1 42 command with spaces'; | |
const processList = parsePsOutput(unixPsOut); | |
expect( | |
diff --git a/pkg/commons-node/string.js b/pkg/commons-node/string.js | |
index ce926b7..893a037 100644 | |
--- a/pkg/commons-node/string.js | |
+++ b/pkg/commons-node/string.js | |
@@ -90,7 +90,8 @@ export function relativeDate( | |
for (const [limit, relativeFormat, remainder] of formats) { | |
if (delta < limit) { | |
if (typeof remainder === 'number') { | |
- return Math.round(delta / remainder) + (useShortVariant ? '' : ' ') + | |
+ return Math.round(delta / remainder) + | |
+ (useShortVariant ? '' : ' ') + | |
relativeFormat; | |
} else { | |
return relativeFormat; | |
@@ -144,8 +145,12 @@ export function removeCommonPrefix(a: string, b: string): [string, string] { | |
export function removeCommonSuffix(a: string, b: string): [string, string] { | |
let i = 0; | |
- while (a[a.length - 1 - i] === b[b.length - 1 - i] && i < a.length && | |
- i < b.length) { | |
+ while (a[a.length - 1 - i] === | |
+ b[b.length - 1 - i] && | |
+ i < | |
+ a.length && | |
+ i < | |
+ b.length) { | |
i++; | |
} | |
return [a.substring(0, a.length - i), b.substring(0, b.length - i)]; | |
diff --git a/pkg/commons-node/userInfo.js b/pkg/commons-node/userInfo.js | |
index 4fb1e3e..5ada68a 100644 | |
--- a/pkg/commons-node/userInfo.js | |
+++ b/pkg/commons-node/userInfo.js | |
@@ -36,7 +36,9 @@ export default function(): UserInfo { | |
// https://github.com/sindresorhus/username/blob/21344db/index.js | |
function getUsername() { | |
- return process.env.SUDO_USER || process.env.LOGNAME || process.env.USER || | |
+ return process.env.SUDO_USER || | |
+ process.env.LOGNAME || | |
+ process.env.USER || | |
process.env.LNAME || | |
process.env.USERNAME || | |
''; | |
diff --git a/pkg/commons-node/wootr.js b/pkg/commons-node/wootr.js | |
index 9b00a22..7091def 100644 | |
--- a/pkg/commons-node/wootr.js | |
+++ b/pkg/commons-node/wootr.js | |
@@ -40,8 +40,12 @@ export type WChange = { | |
}; | |
function idLess(idLeft: WId, idRight: WId): boolean { | |
- return idLeft.site < idRight.site || | |
- idLeft.site === idRight.site && idLeft.h < idRight.h; | |
+ return idLeft.site < | |
+ idRight.site || | |
+ idLeft.site === | |
+ idRight.site && | |
+ idLeft.h < | |
+ idRight.h; | |
} | |
export class WString { | |
@@ -109,10 +113,15 @@ export class WString { | |
// => | |
// [begin][id:1,1; len: 2, vis: 1;][id:1,4; len: 1, vis: 1;][id:1,3; len: 2, vis: 1;][end] | |
if ( | |
- leftHalf.startId.site === c.startId.site && | |
- leftHalf.startId.h === c.startId.h - leftHalf.length && | |
- offset === leftHalf.length && | |
- c.visible === leftHalf.visible | |
+ leftHalf.startId.site === | |
+ c.startId.site && | |
+ leftHalf.startId.h === | |
+ c.startId.h - | |
+ leftHalf.length && | |
+ offset === | |
+ leftHalf.length && | |
+ c.visible === | |
+ leftHalf.visible | |
) { | |
leftHalf.length += c.length; | |
} else if (offset === leftHalf.length) { | |
@@ -132,10 +141,13 @@ export class WString { | |
canMergeRight(i: number): boolean { | |
invariant(i < this._string.length - 1); | |
- return this._string[i].startId.site === this._string[i + 1].startId.site && | |
+ return this._string[i].startId.site === | |
+ this._string[i + 1].startId.site && | |
this._string[i].startId.h === | |
- this._string[i + 1].startId.h - this._string[i].length && | |
- this._string[i].visible === this._string[i + 1].visible; | |
+ this._string[i + 1].startId.h - | |
+ this._string[i].length && | |
+ this._string[i].visible === | |
+ this._string[i + 1].visible; | |
} | |
mergeRuns() { | |
@@ -162,7 +174,8 @@ export class WString { | |
originalIndex++ | |
) { | |
if ( | |
- this._string[originalIndex].length > offset && | |
+ this._string[originalIndex].length > | |
+ offset && | |
this._string[originalIndex].visible | |
) { | |
break; | |
@@ -215,9 +228,13 @@ export class WString { | |
for (let i = 0; i < this._string.length; i++) { | |
const currentRun = this._string[i]; | |
if ( | |
- currentRun.startId.site === c.id.site && | |
- currentRun.startId.h <= c.id.h && | |
- currentRun.startId.h + currentRun.length > c.id.h && | |
+ currentRun.startId.site === | |
+ c.id.site && | |
+ currentRun.startId.h <= | |
+ c.id.h && | |
+ currentRun.startId.h + | |
+ currentRun.length > | |
+ c.id.h && | |
(!visibleOnly || this._string[i].visible) | |
) { | |
return currentOffset + (c.id.h - currentRun.startId.h); | |
@@ -243,7 +260,8 @@ export class WString { | |
for (i = 0; i < this._string.length; i++) { | |
if ( | |
- this._string[i].length > offset && | |
+ this._string[i].length > | |
+ offset && | |
(!visibleOnly || this._string[i].visible) | |
) { | |
break; | |
@@ -314,6 +332,7 @@ export class WString { | |
cp, | |
...sub.filter(c2 => c2.degree === minDegree), | |
, | |
+ , | |
cn, | |
]; | |
@@ -336,9 +355,14 @@ export class WString { | |
} | |
canExtendRun(run: WCharRun, char: WChar): boolean { | |
- return run.startId.site === char.id.site && | |
- run.startId.h + run.length === char.id.h && | |
- run.startDegree + run.length === char.degree; | |
+ return run.startId.site === | |
+ char.id.site && | |
+ run.startId.h + | |
+ run.length === | |
+ char.id.h && | |
+ run.startDegree + | |
+ run.length === | |
+ char.degree; | |
} | |
charsToRuns(chars: Array<WChar>): Array<WCharRun> { | |
diff --git a/pkg/hyperclick/lib/HyperclickForTextEditor.js b/pkg/hyperclick/lib/HyperclickForTextEditor.js | |
index c99773f..90a28fb 100644 | |
--- a/pkg/hyperclick/lib/HyperclickForTextEditor.js | |
+++ b/pkg/hyperclick/lib/HyperclickForTextEditor.js | |
@@ -389,10 +389,14 @@ export default class HyperclickForTextEditor { | |
* Returns whether an event should be handled by hyperclick or not. | |
*/ | |
_isHyperclickEvent(event: SyntheticKeyboardEvent | MouseEvent): boolean { | |
- return event.shiftKey === this._triggerKeys.has('shiftKey') && | |
- event.ctrlKey === this._triggerKeys.has('ctrlKey') && | |
- event.altKey === this._triggerKeys.has('altKey') && | |
- event.metaKey === this._triggerKeys.has('metaKey'); | |
+ return event.shiftKey === | |
+ this._triggerKeys.has('shiftKey') && | |
+ event.ctrlKey === | |
+ this._triggerKeys.has('ctrlKey') && | |
+ event.altKey === | |
+ this._triggerKeys.has('altKey') && | |
+ event.metaKey === | |
+ this._triggerKeys.has('metaKey'); | |
} | |
_doneLoading(): void { | |
diff --git a/pkg/hyperclick/spec/Hyperclick-spec.js b/pkg/hyperclick/spec/Hyperclick-spec.js | |
index 3d9f8db..f65ddb5 100644 | |
--- a/pkg/hyperclick/spec/Hyperclick-spec.js | |
+++ b/pkg/hyperclick/spec/Hyperclick-spec.js | |
@@ -54,9 +54,11 @@ describe('Hyperclick', () => { | |
const scrollViewElement = component.domNode.querySelector('.scroll-view'); | |
invariant(scrollViewElement != null); | |
const scrollViewClientRect = scrollViewElement.getBoundingClientRect(); | |
- const clientX = scrollViewClientRect.left + positionOffset.left - | |
+ const clientX = scrollViewClientRect.left + | |
+ positionOffset.left - | |
textEditorView.getScrollLeft(); | |
- const clientY = scrollViewClientRect.top + positionOffset.top - | |
+ const clientY = scrollViewClientRect.top + | |
+ positionOffset.top - | |
textEditorView.getScrollTop(); | |
return {clientX, clientY}; | |
} | |
diff --git a/pkg/nuclide-adb-logcat/lib/createProcessStream.js b/pkg/nuclide-adb-logcat/lib/createProcessStream.js | |
index 35dfcf1..b678ab2 100644 | |
--- a/pkg/nuclide-adb-logcat/lib/createProcessStream.js | |
+++ b/pkg/nuclide-adb-logcat/lib/createProcessStream.js | |
@@ -20,7 +20,8 @@ export function createProcessStream(): Observable<string> { | |
.skipUntil(Observable.interval(1000).take(1)); | |
const otherEvents = processEvents.filter(event => event.kind !== 'stdout'); | |
- return // Only get the text from stdout. | |
+ return; | |
+ // Only get the text from stdout. | |
compact( | |
Observable | |
.merge(stdoutEvents, otherEvents) | |
diff --git a/pkg/nuclide-analytics/spec/track-spec.js b/pkg/nuclide-analytics/spec/track-spec.js | |
index dd2e11e..db232f0 100644 | |
--- a/pkg/nuclide-analytics/spec/track-spec.js | |
+++ b/pkg/nuclide-analytics/spec/track-spec.js | |
@@ -24,7 +24,7 @@ describe('startTracking', () => { | |
} | |
const milliseconds = Date.now() - startTime; | |
const seconds = Math.floor(milliseconds / 1000); | |
- const nanoseconds = (milliseconds - seconds * 1000) * 1000000; | |
+ const nanoseconds = milliseconds - seconds * 1000 * 1000000; | |
return [seconds, nanoseconds]; | |
}); | |
diff --git a/pkg/nuclide-arcanist-rpc/lib/ArcanistService.js b/pkg/nuclide-arcanist-rpc/lib/ArcanistService.js | |
index 9f13dad..f8b686c 100644 | |
--- a/pkg/nuclide-arcanist-rpc/lib/ArcanistService.js | |
+++ b/pkg/nuclide-arcanist-rpc/lib/ArcanistService.js | |
@@ -232,7 +232,10 @@ export function updatePhabricatorRevision( | |
const args = [ | |
...(verbatimModeEnabled ? ['--verbatim'] : []), | |
, | |
+ , | |
...baseArgs, | |
+ , | |
+ , | |
,, | |
]; | |
diff --git a/pkg/nuclide-arcanist/lib/ArcanistDiagnosticsProvider.js b/pkg/nuclide-arcanist/lib/ArcanistDiagnosticsProvider.js | |
index f6deefc..e65939d 100644 | |
--- a/pkg/nuclide-arcanist/lib/ArcanistDiagnosticsProvider.js | |
+++ b/pkg/nuclide-arcanist/lib/ArcanistDiagnosticsProvider.js | |
@@ -116,10 +116,12 @@ export class ArcanistDiagnosticsProvider { | |
} | |
const maybeProperties = {}; | |
if ( | |
- diagnostic.original != null && diagnostic.replacement != null && | |
- // Sometimes linters set original and replacement to the same value. Obviously that won't | |
- // fix anything. | |
- diagnostic.original !== diagnostic.replacement | |
+ diagnostic.original != | |
+ null && | |
+ diagnostic.replacement != | |
+ null && | |
+ diagnostic.original !== | |
+ diagnostic.replacement | |
) { | |
// Copy the object so the type refinements hold... | |
maybeProperties.fix = this._getFix({...diagnostic}); | |
diff --git a/pkg/nuclide-blame/lib/BlameGutter.js b/pkg/nuclide-blame/lib/BlameGutter.js | |
index b69c57e..224c5df 100644 | |
--- a/pkg/nuclide-blame/lib/BlameGutter.js | |
+++ b/pkg/nuclide-blame/lib/BlameGutter.js | |
@@ -320,13 +320,15 @@ class GutterElement extends React.Component { | |
const {oldest, newest, revision, isLastLine, isFirstLine} = this.props; | |
const date = Number(revision.date); | |
- const alpha = 1 - (date - newest) / (oldest - newest); | |
+ const alpha = 1 - date - newest / (oldest - newest); | |
const opacity = 0.2 + 0.8 * alpha; | |
if (isFirstLine) { | |
const unixname = shortNameForAuthor(revision.author); | |
const tooltip = { | |
- title: escapeHTML(revision.title) + '<br />' + escapeHTML(unixname) + | |
+ title: escapeHTML(revision.title) + | |
+ '<br />' + | |
+ escapeHTML(unixname) + | |
' · ' + | |
escapeHTML(revision.date.toDateString()), | |
delay: 0, | |
diff --git a/pkg/nuclide-bookshelf/lib/utils.js b/pkg/nuclide-bookshelf/lib/utils.js | |
index a26aee8..0963ce0 100644 | |
--- a/pkg/nuclide-bookshelf/lib/utils.js | |
+++ b/pkg/nuclide-bookshelf/lib/utils.js | |
@@ -56,8 +56,10 @@ export function deserializeBookShelfState( | |
serializedBookShelfState: ?SerializedBookShelfState, | |
): BookShelfState { | |
if ( | |
- serializedBookShelfState == null || | |
- serializedBookShelfState.repositoryPathToState == null | |
+ serializedBookShelfState == | |
+ null || | |
+ serializedBookShelfState.repositoryPathToState == | |
+ null | |
) { | |
return getEmptBookShelfState(); | |
} | |
@@ -182,9 +184,10 @@ export function getShortHeadChangesFromStateStream( | |
const oldRepositoryState = oldRepositoryPathToState.get( | |
repositoryPath, | |
); | |
- return oldRepositoryState != null && | |
+ return oldRepositoryState != | |
+ null && | |
oldRepositoryState.activeShortHead !== | |
- newRepositoryState.activeShortHead; | |
+ newRepositoryState.activeShortHead; | |
}) | |
.map(([repositoryPath, newRepositoryState]) => { | |
const {activeShortHead} = newRepositoryState; | |
diff --git a/pkg/nuclide-buck-rpc/lib/BuckService.js b/pkg/nuclide-buck-rpc/lib/BuckService.js | |
index 2cf5bf8..b6f46db 100644 | |
--- a/pkg/nuclide-buck-rpc/lib/BuckService.js | |
+++ b/pkg/nuclide-buck-rpc/lib/BuckService.js | |
@@ -495,7 +495,10 @@ export async function buildRuleTypeFor( | |
// The leading "//" can be omitted for build/test/etc, but not for query. | |
// Don't prepend this for aliases though (aliases will not have colons or .) | |
if ( | |
- (canonicalName.indexOf(':') !== -1 || canonicalName.indexOf('.') !== -1) && | |
+ canonicalName.indexOf(':') !== | |
+ -1 || | |
+ canonicalName.indexOf('.') !== | |
+ -1 && | |
!canonicalName.startsWith('//') | |
) { | |
canonicalName = '//' + canonicalName; | |
diff --git a/pkg/nuclide-buck/lib/BuckBuildSystem.js b/pkg/nuclide-buck/lib/BuckBuildSystem.js | |
index b893abb..e81bdd4 100644 | |
--- a/pkg/nuclide-buck/lib/BuckBuildSystem.js | |
+++ b/pkg/nuclide-buck/lib/BuckBuildSystem.js | |
@@ -74,6 +74,7 @@ const DEBUGGABLE_RULES = new Set([ | |
// $FlowFixMe: spreadable sets | |
...INSTALLABLE_RULES, | |
, | |
+ , | |
'cxx_binary', | |
'cxx_test', | |
'rust_binary', | |
@@ -145,7 +146,9 @@ export class BuckBuildSystem { | |
return TASKS.map(task => ({ | |
...task, | |
disabled: buckRoot == null, | |
- runnable: buckRoot != null && Boolean(buildTarget) && | |
+ runnable: buckRoot != | |
+ null && | |
+ Boolean(buildTarget) && | |
shouldEnableTask(task.type, buildRuleType), | |
})); | |
} | |
@@ -248,8 +251,14 @@ export class BuckBuildSystem { | |
runTask(taskType: string): Task { | |
invariant( | |
- taskType === 'build' || taskType === 'test' || taskType === 'run' || | |
- taskType === 'debug', | |
+ taskType === | |
+ 'build' || | |
+ taskType === | |
+ 'test' || | |
+ taskType === | |
+ 'run' || | |
+ taskType === | |
+ 'debug', | |
'Invalid task type', | |
); | |
@@ -308,9 +317,14 @@ export class BuckBuildSystem { | |
.do(output => { | |
let outputPath; | |
if ( | |
- output == null || output[0] == null || | |
- output[0]['buck.outputPath'] == null || | |
- (outputPath = output[0]['buck.outputPath'].trim()) === '' | |
+ output == | |
+ null || | |
+ output[0] == | |
+ null || | |
+ output[0]['buck.outputPath'] == | |
+ null || | |
+ (outputPath = output[0]['buck.outputPath'].trim()) === | |
+ '' | |
) { | |
throw new Error( | |
"Couldn't determine binary path from Buck output!", | |
diff --git a/pkg/nuclide-buck/lib/BuckEventStream.js b/pkg/nuclide-buck/lib/BuckEventStream.js | |
index 869190f..6522087 100644 | |
--- a/pkg/nuclide-buck/lib/BuckEventStream.js | |
+++ b/pkg/nuclide-buck/lib/BuckEventStream.js | |
@@ -86,9 +86,14 @@ export function getEventsFromSocket( | |
// Periodically emit log events for progress updates. | |
const progressEvents = eventStream.switchMap(event => { | |
if ( | |
- event.type === 'progress' && event.progress != null && | |
- event.progress > 0 && | |
- event.progress < 1 | |
+ event.type === | |
+ 'progress' && | |
+ event.progress != | |
+ null && | |
+ event.progress > | |
+ 0 && | |
+ event.progress < | |
+ 1 | |
) { | |
return log(`Building... [${Math.round(event.progress * 100)}%]`); | |
} | |
diff --git a/pkg/nuclide-buck/lib/observeBuildCommands.js b/pkg/nuclide-buck/lib/observeBuildCommands.js | |
index 8c2115b..38f38e6 100644 | |
--- a/pkg/nuclide-buck/lib/observeBuildCommands.js | |
+++ b/pkg/nuclide-buck/lib/observeBuildCommands.js | |
@@ -45,9 +45,13 @@ export default function observeBuildCommands(store: Store): IDisposable { | |
const {timestamp, command, args} = commandInfo; | |
// Only report simple single-target build commands for now. | |
if ( | |
- Date.now() - timestamp > CHECK_INTERVAL || | |
- command !== 'build' || | |
- args.length !== 1 || | |
+ Date.now() - | |
+ timestamp > | |
+ CHECK_INTERVAL || | |
+ command !== | |
+ 'build' || | |
+ args.length !== | |
+ 1 || | |
args[0].startsWith('-') | |
) { | |
return Observable.empty(); | |
diff --git a/pkg/nuclide-busy-signal/lib/BusySignalProviderBase.js b/pkg/nuclide-busy-signal/lib/BusySignalProviderBase.js | |
index bcbcce8..c0297e5 100644 | |
--- a/pkg/nuclide-busy-signal/lib/BusySignalProviderBase.js | |
+++ b/pkg/nuclide-busy-signal/lib/BusySignalProviderBase.js | |
@@ -55,8 +55,12 @@ export class BusySignalProviderBase { | |
return new CompositeDisposable( | |
atom.workspace.observeActivePaneItem(item => { | |
if ( | |
- item != null && typeof item.getPath === 'function' && | |
- item.getPath() === options.onlyForFile | |
+ item != | |
+ null && | |
+ typeof item.getPath === | |
+ 'function' && | |
+ item.getPath() === | |
+ options.onlyForFile | |
) { | |
if (displayedDisposable == null) { | |
displayedDisposable = this._displayMessage(message); | |
diff --git a/pkg/nuclide-clang-rpc/lib/ClangFlagsManager.js b/pkg/nuclide-clang-rpc/lib/ClangFlagsManager.js | |
index a882413..52ee4a9 100644 | |
--- a/pkg/nuclide-clang-rpc/lib/ClangFlagsManager.js | |
+++ b/pkg/nuclide-clang-rpc/lib/ClangFlagsManager.js | |
@@ -340,8 +340,10 @@ export default class ClangFlagsManager { | |
const normalizedSourceFile = nuclideUri.normalize(sourceFile); | |
args = args.filter( | |
arg => | |
- normalizedSourceFile !== arg && | |
- normalizedSourceFile !== nuclideUri.resolve(basePath, arg), | |
+ normalizedSourceFile !== | |
+ arg && | |
+ normalizedSourceFile !== | |
+ nuclideUri.resolve(basePath, arg), | |
); | |
// Resolve relative path arguments against the Buck project root. | |
@@ -385,7 +387,8 @@ export default class ClangFlagsManager { | |
for (const file of files) { | |
if ( | |
isSourceFile(file) && | |
- ClangFlagsManager._getFileBasename(file) === basename | |
+ ClangFlagsManager._getFileBasename(file) === | |
+ basename | |
) { | |
return nuclideUri.join(dir, file); | |
} | |
diff --git a/pkg/nuclide-clang-rpc/spec/ClangServerManager-spec.js b/pkg/nuclide-clang-rpc/spec/ClangServerManager-spec.js | |
index 9f71a3c..6a1961d 100644 | |
--- a/pkg/nuclide-clang-rpc/spec/ClangServerManager-spec.js | |
+++ b/pkg/nuclide-clang-rpc/spec/ClangServerManager-spec.js | |
@@ -89,12 +89,12 @@ describe('ClangServerManager', () => { | |
waitsForPromise(async () => { | |
const server = await serverManager.getClangServer('test.cpp', '', []); | |
invariant(server); | |
- spyOn(server, 'getMemoryUsage').andReturn(Promise.resolve(1e99)); | |
+ spyOn(server, 'getMemoryUsage').andReturn(Promise.resolve(1e+99)); | |
// We're still over the limit, but keep the last one alive. | |
const server2 = await serverManager.getClangServer('test2.cpp', '', []); | |
invariant(server2); | |
- spyOn(server2, 'getMemoryUsage').andReturn(Promise.resolve(1e99)); | |
+ spyOn(server2, 'getMemoryUsage').andReturn(Promise.resolve(1e+99)); | |
await serverManager._checkMemoryUsage(); | |
expect(server._disposed).toBe(true); | |
diff --git a/pkg/nuclide-clang/lib/OutlineViewHelpers.js b/pkg/nuclide-clang/lib/OutlineViewHelpers.js | |
index f093a18..f1a365f 100644 | |
--- a/pkg/nuclide-clang/lib/OutlineViewHelpers.js | |
+++ b/pkg/nuclide-clang/lib/OutlineViewHelpers.js | |
@@ -98,9 +98,11 @@ function tokenizeCursor(cursor: ClangOutlineTree): TokenizedText { | |
method(cursor.name), | |
...tparamTokens, | |
, | |
+ , | |
plain('('), | |
...paramTokens, | |
, | |
+ , | |
plain(')'), | |
]; | |
} | |
@@ -108,6 +110,7 @@ function tokenizeCursor(cursor: ClangOutlineTree): TokenizedText { | |
return [ | |
...tokenizeType(cursor.cursor_type), | |
, | |
+ , | |
whitespace(' '), | |
className(cursor.name), | |
]; | |
diff --git a/pkg/nuclide-clang/lib/Refactoring.js b/pkg/nuclide-clang/lib/Refactoring.js | |
index 685b3d4..1b102fb 100644 | |
--- a/pkg/nuclide-clang/lib/Refactoring.js | |
+++ b/pkg/nuclide-clang/lib/Refactoring.js | |
@@ -23,8 +23,12 @@ const SUPPORTED_CURSORS = new Set(['VAR_DECL', 'PARM_DECL']); | |
async function checkDiagnostics(editor: atom$TextEditor): Promise<boolean> { | |
// Don't allow refactoring if there are any warnings or errors. | |
const diagnostics = await getDiagnostics(editor); | |
- return diagnostics != null && diagnostics.accurateFlags === true && | |
- diagnostics.diagnostics.length === 0; | |
+ return diagnostics != | |
+ null && | |
+ diagnostics.accurateFlags === | |
+ true && | |
+ diagnostics.diagnostics.length === | |
+ 0; | |
} | |
export default class RefactoringHelpers { | |
diff --git a/pkg/nuclide-code-format/lib/CodeFormatManager.js b/pkg/nuclide-code-format/lib/CodeFormatManager.js | |
index b34e7ea..c437ed5 100644 | |
--- a/pkg/nuclide-code-format/lib/CodeFormatManager.js | |
+++ b/pkg/nuclide-code-format/lib/CodeFormatManager.js | |
@@ -126,7 +126,8 @@ export default class CodeFormatManager { | |
try { | |
const provider = matchingProviders[0]; | |
if ( | |
- provider.formatCode != null && | |
+ provider.formatCode != | |
+ null && | |
(!selectionRangeEmpty || provider.formatEntireFile == null) | |
) { | |
const formatted = await provider.formatCode(editor, formatRange); | |
@@ -175,8 +176,10 @@ export default class CodeFormatManager { | |
): Array<CodeFormatProvider> { | |
const matchingProviders = this._codeFormatProviders.filter(provider => { | |
const providerGrammars = provider.selector.split(/, ?/); | |
- return provider.inclusionPriority > 0 && | |
- providerGrammars.indexOf(scopeName) !== -1; | |
+ return provider.inclusionPriority > | |
+ 0 && | |
+ providerGrammars.indexOf(scopeName) !== | |
+ -1; | |
}); | |
return matchingProviders.sort((providerA, providerB) => { | |
// $FlowFixMe a comparator function should return a number | |
diff --git a/pkg/nuclide-code-highlight/lib/CodeHighlightManager.js b/pkg/nuclide-code-highlight/lib/CodeHighlightManager.js | |
index a8ca07e..3048e69 100644 | |
--- a/pkg/nuclide-code-highlight/lib/CodeHighlightManager.js | |
+++ b/pkg/nuclide-code-highlight/lib/CodeHighlightManager.js | |
@@ -107,7 +107,8 @@ export default class CodeHighlightManager { | |
originalChangeCount: number, | |
): boolean { | |
return !editor.getCursorBufferPosition().isEqual(position) || | |
- editor.getBuffer().changeCount !== originalChangeCount; | |
+ editor.getBuffer().changeCount !== | |
+ originalChangeCount; | |
} | |
_isPositionInHighlightedRanges(position: atom$Point): boolean { | |
@@ -121,8 +122,10 @@ export default class CodeHighlightManager { | |
): Array<CodeHighlightProvider> { | |
const matchingProviders = this._providers.filter(provider => { | |
const providerGrammars = provider.selector.split(/, ?/); | |
- return provider.inclusionPriority > 0 && | |
- providerGrammars.indexOf(scopeName) !== -1; | |
+ return provider.inclusionPriority > | |
+ 0 && | |
+ providerGrammars.indexOf(scopeName) !== | |
+ -1; | |
}); | |
return matchingProviders.sort((providerA, providerB) => { | |
return providerB.inclusionPriority - providerA.inclusionPriority; | |
diff --git a/pkg/nuclide-console/lib/LogTailer.js b/pkg/nuclide-console/lib/LogTailer.js | |
index bc8fc21..2f5d23c 100644 | |
--- a/pkg/nuclide-console/lib/LogTailer.js | |
+++ b/pkg/nuclide-console/lib/LogTailer.js | |
@@ -184,8 +184,10 @@ export class LogTailer { | |
}); | |
} | |
- const unhandledError = err != null && | |
- this._startCount !== this._runningCallbacks.length; | |
+ const unhandledError = err != | |
+ null && | |
+ this._startCount !== | |
+ this._runningCallbacks.length; | |
this._runningCallbacks = []; | |
this._startCount = 0; | |
return unhandledError; | |
diff --git a/pkg/nuclide-datatip/lib/DatatipManager.js b/pkg/nuclide-datatip/lib/DatatipManager.js | |
index 25a8aef..bbf708e 100644 | |
--- a/pkg/nuclide-datatip/lib/DatatipManager.js | |
+++ b/pkg/nuclide-datatip/lib/DatatipManager.js | |
@@ -48,7 +48,8 @@ function filterProvidersByScopeName( | |
): Array<DatatipProvider> { | |
return providers | |
.filter((provider: DatatipProvider) => { | |
- return provider.inclusionPriority > 0 && | |
+ return provider.inclusionPriority > | |
+ 0 && | |
provider.validForScope(scopeName); | |
}) | |
.sort((providerA: DatatipProvider, providerB: DatatipProvider) => { | |
@@ -411,7 +412,8 @@ class DatatipManagerForEditor { | |
} | |
if ( | |
- this._blacklistedPosition && data.range && | |
+ this._blacklistedPosition && | |
+ data.range && | |
data.range.containsPoint(this._blacklistedPosition) | |
) { | |
this._setState(DatatipState.HIDDEN); | |
@@ -420,7 +422,8 @@ class DatatipManagerForEditor { | |
const currentPosition = getPosition(); | |
if ( | |
- !currentPosition || !data.range || | |
+ !currentPosition || | |
+ !data.range || | |
!data.range.containsPoint(currentPosition) | |
) { | |
this._setState(DatatipState.HIDDEN); | |
@@ -447,8 +450,10 @@ class DatatipManagerForEditor { | |
_hideOrCancel(): void { | |
if ( | |
- this._datatipState === DatatipState.HIDDEN || | |
- this._datatipState === DatatipState.FETCHING | |
+ this._datatipState === | |
+ DatatipState.HIDDEN || | |
+ this._datatipState === | |
+ DatatipState.FETCHING | |
) { | |
this._blacklistedPosition = getBufferPosition( | |
this._editor, | |
@@ -486,7 +491,8 @@ class DatatipManagerForEditor { | |
this._lastMoveEvent, | |
); | |
if ( | |
- currentPosition && this._range && | |
+ currentPosition && | |
+ this._range && | |
this._range.containsPoint(currentPosition) | |
) { | |
return; | |
@@ -533,12 +539,11 @@ class DatatipManagerForEditor { | |
// keydown, which is going to be triggered before the key binding which is | |
// evaluated on keyup. | |
if ( | |
- this._datatipState === DatatipState.HIDDEN && | |
- // Unfortunately, when you do keydown of the shortcut, it's going to | |
- // hide it, we need to make sure that when we do keyup, it doesn't show | |
- // it up right away. We assume that a keypress is done within 100ms | |
- // and don't show it again if it was hidden so soon. | |
- performance.now() - this._lastHiddenTime > 100 | |
+ this._datatipState === | |
+ DatatipState.HIDDEN && | |
+ performance.now() - | |
+ this._lastHiddenTime > | |
+ 100 | |
) { | |
this._startFetching(() => this._editor.getCursorScreenPosition()); | |
return; | |
diff --git a/pkg/nuclide-datatip/lib/PinnedDatatip.js b/pkg/nuclide-datatip/lib/PinnedDatatip.js | |
index c0fe21f..89512f8 100644 | |
--- a/pkg/nuclide-datatip/lib/PinnedDatatip.js | |
+++ b/pkg/nuclide-datatip/lib/PinnedDatatip.js | |
@@ -182,9 +182,12 @@ export class PinnedDatatip { | |
const charWidth = _editor.getDefaultCharWidth(); | |
const lineLength = _editor.getBuffer().getLines()[_range.start.row].length; | |
_hostElement.style.display = 'block'; | |
- _hostElement.style.top = -_editor.getLineHeightInPixels() + _offset.y + | |
+ _hostElement.style.top = -_editor.getLineHeightInPixels() + | |
+ _offset.y + | |
'px'; | |
- _hostElement.style.left = (lineLength - _range.end.column) * charWidth + | |
+ _hostElement.style.left = lineLength - | |
+ _range.end.column * | |
+ charWidth + | |
LINE_END_MARGIN + | |
_offset.x + | |
'px'; | |
diff --git a/pkg/nuclide-debugger-iwdp-rpc/lib/BreakpointManager.js b/pkg/nuclide-debugger-iwdp-rpc/lib/BreakpointManager.js | |
index 36b0815..107ff2e 100644 | |
--- a/pkg/nuclide-debugger-iwdp-rpc/lib/BreakpointManager.js | |
+++ b/pkg/nuclide-debugger-iwdp-rpc/lib/BreakpointManager.js | |
@@ -138,8 +138,12 @@ export class BreakpointManager { | |
for (const response of responses) { | |
// We will receive multiple responses, so just send the first non-error one. | |
if ( | |
- response.result != null && response.error == null && | |
- response.result.breakpointId != null | |
+ response.result != | |
+ null && | |
+ response.error == | |
+ null && | |
+ response.result.breakpointId != | |
+ null | |
) { | |
breakpoint.jscId = response.result.breakpointId; | |
response.result.breakpointId = nuclideId; | |
diff --git a/pkg/nuclide-debugger-native/lib/AttachUIComponent.js b/pkg/nuclide-debugger-native/lib/AttachUIComponent.js | |
index bcc2e25..76c9072 100644 | |
--- a/pkg/nuclide-debugger-native/lib/AttachUIComponent.js | |
+++ b/pkg/nuclide-debugger-native/lib/AttachUIComponent.js | |
@@ -42,7 +42,7 @@ type StateType = { | |
function getColumns(): Array<Column> { | |
return [ | |
{title: 'Process Name', key: 'process', width: 0.25}, | |
- {title: 'PID', key: 'pid', width: 0.10}, | |
+ {title: 'PID', key: 'pid', width: 0.1}, | |
{title: 'Command Name', key: 'command', width: 0.65}, | |
]; | |
} | |
@@ -182,8 +182,10 @@ export class AttachUIComponent extends React.Component<void, PropsType, StateTyp | |
data: {process: item.name, pid: item.pid, command: item.commandName}, | |
}; | |
if ( | |
- selectedAttachTarget != null && | |
- row.data.pid === selectedAttachTarget.pid | |
+ selectedAttachTarget != | |
+ null && | |
+ row.data.pid === | |
+ selectedAttachTarget.pid | |
) { | |
selectedIndex = index; | |
} | |
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/DebuggerAgent.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/DebuggerAgent.js | |
index 066085a..5acc641 100644 | |
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/DebuggerAgent.js | |
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/DebuggerAgent.js | |
@@ -459,7 +459,8 @@ DebuggerAgent.prototype = { | |
var version = this._debuggerClient.target.nodeVersion; | |
if (!DebuggerAgent.nodeVersionHasSetVariableValue(version)) { | |
done( | |
- 'V8 engine in node version ' + version + | |
+ 'V8 engine in node version ' + | |
+ version + | |
' does not support setting variable value from debugger.\n' + | |
' Please upgrade to version v0.10.12 (stable) or v0.11.2 (unstable)' + | |
' or newer.', | |
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/HeapProfilerAgent.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/HeapProfilerAgent.js | |
index 3353df4..7fc9570 100644 | |
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/HeapProfilerAgent.js | |
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/HeapProfilerAgent.js | |
@@ -11,8 +11,10 @@ var injection = require.resolve('./Injections/HeapProfilerAgent'); | |
*/ | |
function HeapProfilerAgent(config, session) { | |
try { | |
- this._noInject = config.inject === false || | |
- config.inject.profiles === false; | |
+ this._noInject = config.inject === | |
+ false || | |
+ config.inject.profiles === | |
+ false; | |
} catch (e) { | |
this._noInject = false; | |
} | |
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/Injections/NetworkAgent.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/Injections/NetworkAgent.js | |
index 15eb292..dab77c3 100644 | |
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/Injections/NetworkAgent.js | |
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/Injections/NetworkAgent.js | |
@@ -53,7 +53,7 @@ module.exports = function injection(require, debug, options) { | |
].forEach(function(method) { | |
Timing.prototype[method] = function() { | |
var diff = process.hrtime(this._hrtime); | |
- this.json[method] = diff[0] * 1e3 + diff[1] / 1e6; | |
+ this.json[method] = diff[0] * 1000 + diff[1] / 1000000; | |
return this; | |
}; | |
}); | |
@@ -135,7 +135,8 @@ module.exports = function injection(require, debug, options) { | |
} | |
function getStatusText(response) { | |
- return response.statusMessage || http.STATUS_CODES[response.statusCode] || | |
+ return response.statusMessage || | |
+ http.STATUS_CODES[response.statusCode] || | |
'?'; | |
} | |
@@ -277,7 +278,8 @@ module.exports = function injection(require, debug, options) { | |
function handleSocket(requestInfo, socket) { | |
socket.__inspector_ID__ = socket.__inspector_ID__ || | |
- '' + lastConnectionId++; | |
+ '' + | |
+ lastConnectionId++; | |
this.__inspector_timing__.dnsEnd().connectStart(); | |
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/InjectorClient.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/InjectorClient.js | |
index 7c2aae7..470e944 100644 | |
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/InjectorClient.js | |
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/InjectorClient.js | |
@@ -131,7 +131,8 @@ InjectorClient.prototype._inject = function(NM, cb) { | |
'v8-debug': require.resolve('v8-debug'), | |
convert: require.resolve('./convert'), | |
}; | |
- var injection = '(function (NM) {' + 'NM.require("module")._load(' + | |
+ var injection = '(function (NM) {' + | |
+ 'NM.require("module")._load(' + | |
injectorServerPath + | |
')' + | |
'(' + | |
@@ -170,7 +171,9 @@ InjectorClient.prototype.injection = function(injection, options, callback) { | |
this._debuggerClient.request( | |
'evaluate', | |
{ | |
- expression: '(' + injection.toString() + ')' + | |
+ expression: '(' + | |
+ injection.toString() + | |
+ ')' + | |
'(process._require, process._debugObject, ' + | |
JSON.stringify(options) + | |
')', | |
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/InjectorServer.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/InjectorServer.js | |
index 517c208..4cc9912 100644 | |
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/InjectorServer.js | |
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/InjectorServer.js | |
@@ -51,7 +51,9 @@ function injectorServer(options) { | |
// Special check for NaN as NaN == NaN is false. | |
if ( | |
- mirror.isNumber() && isNaN(mirror.value()) && cached.isNumber() && | |
+ mirror.isNumber() && | |
+ isNaN(mirror.value()) && | |
+ cached.isNumber() && | |
isNaN(cached.value()) | |
) { | |
return true; | |
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ProfilerAgent.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ProfilerAgent.js | |
index ff6265a..b1b71c2 100644 | |
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ProfilerAgent.js | |
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ProfilerAgent.js | |
@@ -9,8 +9,10 @@ var injection = require.resolve('./Injections/ProfilerAgent'); | |
*/ | |
function ProfilerAgent(config, session) { | |
try { | |
- this._noInject = config.inject === false || | |
- config.inject.profiles === false; | |
+ this._noInject = config.inject === | |
+ false || | |
+ config.inject.profiles === | |
+ false; | |
} catch (e) { | |
this._noInject = false; | |
} | |
@@ -99,7 +101,8 @@ ProfilerAgent.prototype._checkCompatibility = function() { | |
if (!isCompatible) { | |
this._frontendClient.sendLogToConsole( | |
'warning', | |
- 'Your Node version (' + version + | |
+ 'Your Node version (' + | |
+ version + | |
') has a partial support of profiler.\n' + | |
"The stack frames tree doesn't show all stack frames due to low sampling rate.\n" + | |
'The profiling data is incomplete and may show misleading results.\n' + | |
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptFileStorage.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptFileStorage.js | |
index 67002cb..e118357 100644 | |
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptFileStorage.js | |
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptFileStorage.js | |
@@ -6,7 +6,9 @@ var debug = require('debug')('node-inspector:ScriptFileStorage'); | |
var MODULE_HEADER = '(function (exports, require, module, __filename, __dirname) { '; | |
var MODULE_TRAILER = '\n});'; | |
var MODULE_WRAP_REGEX = new RegExp( | |
- '^' + escapeRegex(MODULE_HEADER) + '([\\s\\S]*)' + | |
+ '^' + | |
+ escapeRegex(MODULE_HEADER) + | |
+ '([\\s\\S]*)' + | |
escapeRegex(MODULE_TRAILER) + | |
'$', | |
); | |
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptManager.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptManager.js | |
index 063ecdd..550c967 100644 | |
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptManager.js | |
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/ScriptManager.js | |
@@ -162,7 +162,8 @@ ScriptManager.prototype = Object.create(events.EventEmitter.prototype, { | |
} | |
var hidden = this.isScriptHidden(localPath) && | |
- localPath != this.mainAppScript; | |
+ localPath != | |
+ this.mainAppScript; | |
var inspectorScriptData = this._doAddScript(v8data, hidden); | |
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/plugins.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/plugins.js | |
index f5b4495..42292a7 100644 | |
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/plugins.js | |
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node-inspector/lib/plugins.js | |
@@ -265,7 +265,9 @@ ProtocolJson.prototype._onItemConflict = function( | |
) { | |
if (state.throwConflicts) { | |
throw new PluginError( | |
- 'Unresolved conflict in ' + state.section + ' section of `' + | |
+ 'Unresolved conflict in ' + | |
+ state.section + | |
+ ' section of `' + | |
state.plugin + | |
'` plugin: ' + | |
'item with ' + | |
@@ -276,7 +278,11 @@ ProtocolJson.prototype._onItemConflict = function( | |
); | |
} else { | |
console.warn( | |
- 'Item with ' + state.uname + ' `' + toMergeItem[state.uname] + '`' + | |
+ 'Item with ' + | |
+ state.uname + | |
+ ' `' + | |
+ toMergeItem[state.uname] + | |
+ '`' + | |
' in ' + | |
state.section + | |
' section' + | |
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/debug/node.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/debug/node.js | |
index 1507a31..41c7cc0 100644 | |
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/debug/node.js | |
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/debug/node.js | |
@@ -41,9 +41,14 @@ function useColors() { | |
if (0 === debugColors.length) { | |
return tty.isatty(fd); | |
} else { | |
- return '0' !== debugColors && 'no' !== debugColors && | |
- 'false' !== debugColors && | |
- 'disabled' !== debugColors; | |
+ return '0' !== | |
+ debugColors && | |
+ 'no' !== | |
+ debugColors && | |
+ 'false' !== | |
+ debugColors && | |
+ 'disabled' !== | |
+ debugColors; | |
} | |
} | |
@@ -75,7 +80,13 @@ function formatArgs() { | |
if (useColors) { | |
var c = this.color; | |
- args[0] = ' \x1B[3' + c + ';1m' + name + ' ' + '\x1B[0m' + args[0] + | |
+ args[0] = ' \x1B[3' + | |
+ c + | |
+ ';1m' + | |
+ name + | |
+ ' ' + | |
+ '\x1B[0m' + | |
+ args[0] + | |
'\x1B[3' + | |
c + | |
'm' + | |
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/ms/index.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/ms/index.js | |
index 4b7e03a..dba0452 100644 | |
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/ms/index.js | |
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/ms/index.js | |
@@ -103,10 +103,12 @@ function short(ms) { | |
* @api private | |
*/ | |
function long(ms) { | |
- return plural(ms, d, 'day') || plural(ms, h, 'hour') || | |
+ return plural(ms, d, 'day') || | |
+ plural(ms, h, 'hour') || | |
plural(ms, m, 'minute') || | |
plural(ms, s, 'second') || | |
- ms + ' ms'; | |
+ ms + | |
+ ' ms'; | |
} | |
/** | |
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/InjectedScript/DebuggerScript.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/InjectedScript/DebuggerScript.js | |
index 8c52a0c..123336f 100644 | |
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/InjectedScript/DebuggerScript.js | |
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/InjectedScript/DebuggerScript.js | |
@@ -181,7 +181,8 @@ | |
endLine: endLine, | |
endColumn: endColumn, | |
isContentScript: !!script.context_data && | |
- script.context_data.indexOf('injected') == 0, | |
+ script.context_data.indexOf('injected') == | |
+ 0, | |
}; | |
}; | |
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/v8-debug.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/v8-debug.js | |
index 32f35ba..a7491a6 100644 | |
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/v8-debug.js | |
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-debug/v8-debug.js | |
@@ -101,7 +101,11 @@ var overrides = { | |
return JSON.stringify(response); | |
} catch (e) { | |
// Failed to generate response - return generic error. | |
- return '{"seq":' + response.seq + ',' + '"request_seq":' + request.seq + | |
+ return '{"seq":' + | |
+ response.seq + | |
+ ',' + | |
+ '"request_seq":' + | |
+ request.seq + | |
',' + | |
'"type":"response",' + | |
'"success":false,' + | |
diff --git a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-profiler/v8-profiler.js b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-profiler/v8-profiler.js | |
index 84d277b..939be46 100644 | |
--- a/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-profiler/v8-profiler.js | |
+++ b/pkg/nuclide-debugger-node-rpc/VendorLib/node_modules/v8-profiler/v8-profiler.js | |
@@ -191,8 +191,10 @@ var profiler = { | |
}, | |
startProfiling: function(name, recsamples) { | |
if ( | |
- activeProfiles.length == 0 && | |
- typeof process._startProfilerIdleNotifier == 'function' | |
+ activeProfiles.length == | |
+ 0 && | |
+ typeof process._startProfilerIdleNotifier == | |
+ 'function' | |
) | |
process._startProfilerIdleNotifier(); | |
@@ -223,8 +225,10 @@ var profiler = { | |
else activeProfiles.length = activeProfiles.length - 1; | |
if ( | |
- activeProfiles.length == 0 && | |
- typeof process._stopProfilerIdleNotifier == 'function' | |
+ activeProfiles.length == | |
+ 0 && | |
+ typeof process._stopProfilerIdleNotifier == | |
+ 'function' | |
) | |
process._stopProfilerIdleNotifier(); | |
diff --git a/pkg/nuclide-debugger-node/lib/AttachUIComponent.js b/pkg/nuclide-debugger-node/lib/AttachUIComponent.js | |
index ebeda86..b096034 100644 | |
--- a/pkg/nuclide-debugger-node/lib/AttachUIComponent.js | |
+++ b/pkg/nuclide-debugger-node/lib/AttachUIComponent.js | |
@@ -42,7 +42,7 @@ type StateType = { | |
function getColumns(): Array<Column> { | |
return [ | |
{title: 'Process Name', key: 'process', width: 0.25}, | |
- {title: 'PID', key: 'pid', width: 0.10}, | |
+ {title: 'PID', key: 'pid', width: 0.1}, | |
{title: 'Command Name', key: 'command', width: 0.65}, | |
]; | |
} | |
@@ -186,8 +186,10 @@ export class AttachUIComponent extends React.Component<void, PropsType, StateTyp | |
data: {process: item.name, pid: item.pid, command: item.commandName}, | |
}; | |
if ( | |
- selectedAttachTarget != null && | |
- row.data.pid === selectedAttachTarget.pid | |
+ selectedAttachTarget != | |
+ null && | |
+ row.data.pid === | |
+ selectedAttachTarget.pid | |
) { | |
selectedIndex = index; | |
} | |
diff --git a/pkg/nuclide-debugger-php-rpc/lib/ConnectionUtils.js b/pkg/nuclide-debugger-php-rpc/lib/ConnectionUtils.js | |
index 51c9875..5c4ea39 100644 | |
--- a/pkg/nuclide-debugger-php-rpc/lib/ConnectionUtils.js | |
+++ b/pkg/nuclide-debugger-php-rpc/lib/ConnectionUtils.js | |
@@ -69,8 +69,11 @@ export function isCorrectConnection( | |
const init = message.init; | |
if ( | |
- !init.engine || !init.engine || !init.engine[0] || | |
- init.engine[0]._ !== 'xdebug' | |
+ !init.engine || | |
+ !init.engine || | |
+ !init.engine[0] || | |
+ init.engine[0]._ !== | |
+ 'xdebug' | |
) { | |
logger.logError('Incorrect engine'); | |
return false; | |
@@ -78,9 +81,12 @@ export function isCorrectConnection( | |
const attributes = init.$; | |
if ( | |
- attributes.xmlns !== 'urn:debugger_protocol_v1' || | |
- attributes['xmlns:xdebug'] !== 'http://xdebug.org/dbgp/xdebug' || | |
- attributes.language !== 'PHP' | |
+ attributes.xmlns !== | |
+ 'urn:debugger_protocol_v1' || | |
+ attributes['xmlns:xdebug'] !== | |
+ 'http://xdebug.org/dbgp/xdebug' || | |
+ attributes.language !== | |
+ 'PHP' | |
) { | |
logger.logError('Incorrect attributes'); | |
return false; | |
@@ -104,7 +110,9 @@ export function isCorrectConnection( | |
// The regex is only applied to connections coming in during attach mode. We do not use the | |
// regex for launching. | |
- return (!pid || attributes.appid === String(pid)) && | |
+ return !pid || | |
+ attributes.appid === | |
+ String(pid) && | |
(!idekeyRegex || new RegExp(idekeyRegex).test(attributes.idekey)) && | |
(!attachScriptRegex || | |
new RegExp(attachScriptRegex).test(requestScriptPath)); | |
diff --git a/pkg/nuclide-debugger-php-rpc/lib/DbgpConnector.js b/pkg/nuclide-debugger-php-rpc/lib/DbgpConnector.js | |
index abb5ac6..223e0c1 100644 | |
--- a/pkg/nuclide-debugger-php-rpc/lib/DbgpConnector.js | |
+++ b/pkg/nuclide-debugger-php-rpc/lib/DbgpConnector.js | |
@@ -129,7 +129,8 @@ export class DbgpConnector { | |
} catch (error) { | |
this._failConnection( | |
socket, | |
- 'Non XML connection string: ' + data.toString() + | |
+ 'Non XML connection string: ' + | |
+ data.toString() + | |
'. Discarding connection.', | |
'PHP sent a malformed request, please file a bug to the Nuclide developers.<br />' + | |
'Restarting the Nuclide Server may fix the issue.<br />' + | |
@@ -167,7 +168,10 @@ export class DbgpConnector { | |
_checkListening(socket: Socket, message: string): boolean { | |
if (!this.isListening()) { | |
logger.log( | |
- 'Ignoring ' + message + ' on port ' + this._port + | |
+ 'Ignoring ' + | |
+ message + | |
+ ' on port ' + | |
+ this._port + | |
' after stopped connection.', | |
); | |
return false; | |
diff --git a/pkg/nuclide-debugger-php-rpc/lib/DbgpSocket.js b/pkg/nuclide-debugger-php-rpc/lib/DbgpSocket.js | |
index 320dfaa..8f101dc 100644 | |
--- a/pkg/nuclide-debugger-php-rpc/lib/DbgpSocket.js | |
+++ b/pkg/nuclide-debugger-php-rpc/lib/DbgpSocket.js | |
@@ -301,7 +301,9 @@ export class DbgpSocket { | |
this._calls.delete(transactionId); | |
if (call.command !== command) { | |
logger.logError( | |
- 'Bad command in response. Found ' + command + '. expected ' + | |
+ 'Bad command in response. Found ' + | |
+ command + | |
+ '. expected ' + | |
call.command, | |
); | |
return; | |
@@ -516,9 +518,14 @@ export class DbgpSocket { | |
`-d ${breakpointId}`, | |
); | |
if ( | |
- response.error != null || response.breakpoint == null || | |
- response.breakpoint[0] == null || | |
- response.breakpoint[0].$ == null | |
+ response.error != | |
+ null || | |
+ response.breakpoint == | |
+ null || | |
+ response.breakpoint[0] == | |
+ null || | |
+ response.breakpoint[0].$ == | |
+ null | |
) { | |
throw new Error('Error getting breakpoint: ' + JSON.stringify(response)); | |
} | |
diff --git a/pkg/nuclide-debugger-php-rpc/lib/Handler.js b/pkg/nuclide-debugger-php-rpc/lib/Handler.js | |
index 3c95946..5934aaf 100644 | |
--- a/pkg/nuclide-debugger-php-rpc/lib/Handler.js | |
+++ b/pkg/nuclide-debugger-php-rpc/lib/Handler.js | |
@@ -30,7 +30,8 @@ export default class Handler { | |
} | |
unknownMethod(id: number, method: string, params: ?Object): void { | |
- const message = 'Unknown chrome dev tools method: ' + this.getDomain() + | |
+ const message = 'Unknown chrome dev tools method: ' + | |
+ this.getDomain() + | |
'.' + | |
method; | |
logger.log(message); | |
diff --git a/pkg/nuclide-debugger-php-rpc/lib/helpers.js b/pkg/nuclide-debugger-php-rpc/lib/helpers.js | |
index 6dcbaec..e0ab64d 100644 | |
--- a/pkg/nuclide-debugger-php-rpc/lib/helpers.js | |
+++ b/pkg/nuclide-debugger-php-rpc/lib/helpers.js | |
@@ -42,9 +42,12 @@ export function base64Encode(value: string): string { | |
export async function hphpdMightBeAttached(): Promise<boolean> { | |
const processes = await checkOutput('ps', ['aux'], {}); | |
return processes.stdout.toString().split('\n').slice(1).some(line => { | |
- return // hhvm -m debug | |
+ return; | |
+ // hhvm -m debug | |
line.indexOf('m debug') >= | |
- 0 || line.indexOf('mode debug') >= 0; // hhvm --mode debug | |
+ 0 || | |
+ line.indexOf('mode debug') >= | |
+ 0; // hhvm --mode debug | |
}); | |
} | |
@@ -123,7 +126,9 @@ export function launchPhpScriptWithXDebugEnabled( | |
const proc = child_process.spawn(phpRuntimePath, [ | |
...runtimeArgs, | |
, | |
+ , | |
...scriptArgs, | |
+ ,, | |
]); | |
logger.log( | |
`child_process(${proc.pid}) spawned with xdebug enabled for: ${scriptPath}`, | |
diff --git a/pkg/nuclide-debugger-php-rpc/lib/values.js b/pkg/nuclide-debugger-php-rpc/lib/values.js | |
index 273bb34..e49abe4 100644 | |
--- a/pkg/nuclide-debugger-php-rpc/lib/values.js | |
+++ b/pkg/nuclide-debugger-php-rpc/lib/values.js | |
@@ -132,7 +132,7 @@ function getAggregateRemoteObjectId( | |
const pagesize = Number(dbgpProperty.$.pagesize) || 0; | |
let pageCount = 0; | |
if (pagesize !== 0) { | |
- pageCount = Math.trunc((numchildren + pagesize - 1) / pagesize) || 0; | |
+ pageCount = Math.trunc(numchildren + pagesize - 1 / pagesize) || 0; | |
} | |
logger.log( | |
`numchildren: ${numchildren} pagesize: ${pagesize} pageCount ${pageCount}`, | |
diff --git a/pkg/nuclide-debugger-php-rpc/spec/DbgpMessageHandler-spec.js b/pkg/nuclide-debugger-php-rpc/spec/DbgpMessageHandler-spec.js | |
index d8d54c0..1063ecb 100644 | |
--- a/pkg/nuclide-debugger-php-rpc/spec/DbgpMessageHandler-spec.js | |
+++ b/pkg/nuclide-debugger-php-rpc/spec/DbgpMessageHandler-spec.js | |
@@ -37,7 +37,8 @@ describe('debugger-php-rpc DbgpMessageHandler', () => { | |
it('single completed message', () => { | |
const message = makeMessage( | |
{command: 'context_names', transaction_id: '1'}, | |
- '<context name="Local" id="0"/>' + '<context name="Global" id="1"/>' + | |
+ '<context name="Local" id="0"/>' + | |
+ '<context name="Global" id="1"/>' + | |
'<context name="Class" id="2"/>', | |
); | |
const results = messageHandler.parseMessages(message); | |
@@ -47,12 +48,14 @@ describe('debugger-php-rpc DbgpMessageHandler', () => { | |
it('two completed messages', () => { | |
const message1 = makeMessage( | |
{command: 'context_names', transaction_id: '1'}, | |
- '<context name="Local" id="0"/>' + '<context name="Global" id="1"/>' + | |
+ '<context name="Local" id="0"/>' + | |
+ '<context name="Global" id="1"/>' + | |
'<context name="Class" id="2"/>', | |
); | |
const message2 = makeMessage( | |
{command: 'context_names', transaction_id: '2'}, | |
- '<context name="Local2" id="0"/>' + '<context name="Global2" id="1"/>' + | |
+ '<context name="Local2" id="0"/>' + | |
+ '<context name="Global2" id="1"/>' + | |
'<context name="Class2" id="2"/>', | |
); | |
const results = messageHandler.parseMessages(message1 + message2); | |
@@ -74,7 +77,8 @@ describe('debugger-php-rpc DbgpMessageHandler', () => { | |
it('one completed message with one incompleted message ending', () => { | |
const completedMessage1 = makeMessage( | |
{command: 'context_names', transaction_id: '1'}, | |
- '<context name="Local" id="0"/>' + '<context name="Global" id="1"/>' + | |
+ '<context name="Local" id="0"/>' + | |
+ '<context name="Global" id="1"/>' + | |
'<context name="Class" id="2"/>', | |
); | |
@@ -130,7 +134,8 @@ describe('debugger-php-rpc DbgpMessageHandler', () => { | |
const completedMessage2 = makeMessage( | |
{command: 'context_names', transaction_id: '1'}, | |
- '<context name="Local" id="0"/>' + '<context name="Global" id="1"/>' + | |
+ '<context name="Local" id="0"/>' + | |
+ '<context name="Global" id="1"/>' + | |
'<context name="Class" id="2"/>', | |
); | |
diff --git a/pkg/nuclide-debugger-php-rpc/spec/DbgpSocket-spec.js b/pkg/nuclide-debugger-php-rpc/spec/DbgpSocket-spec.js | |
index cb4d41e..a876aee 100644 | |
--- a/pkg/nuclide-debugger-php-rpc/spec/DbgpSocket-spec.js | |
+++ b/pkg/nuclide-debugger-php-rpc/spec/DbgpSocket-spec.js | |
@@ -312,7 +312,8 @@ describe('debugger-php-rpc DbgpSocket', () => { | |
testCallResult( | |
'context_names -i 1 -d 42', | |
{command: 'context_names', transaction_id: '1'}, | |
- '<context name="Local" id="0"/>' + '<context name="Global" id="1"/>' + | |
+ '<context name="Local" id="0"/>' + | |
+ '<context name="Global" id="1"/>' + | |
'<context name="Class" id="2"/>', | |
); | |
const result = await call; | |
@@ -363,12 +364,14 @@ describe('debugger-php-rpc DbgpSocket', () => { | |
const message1 = makeMessage( | |
{command: 'context_names', transaction_id: '1'}, | |
- '<context name="Local" id="0"/>' + '<context name="Global" id="1"/>' + | |
+ '<context name="Local" id="0"/>' + | |
+ '<context name="Global" id="1"/>' + | |
'<context name="Class" id="2"/>', | |
); | |
const message2 = makeMessage( | |
{command: 'context_names', transaction_id: '2'}, | |
- '<context name="Local2" id="0"/>' + '<context name="Global2" id="1"/>' + | |
+ '<context name="Local2" id="0"/>' + | |
+ '<context name="Global2" id="1"/>' + | |
'<context name="Class2" id="2"/>', | |
); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/Runtime.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/Runtime.js | |
index 8f58a8f..38cb9aa 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/Runtime.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/Runtime.js | |
@@ -63,7 +63,8 @@ function loadResourcePromise(url) { | |
if ([0, 200, 304].indexOf(xhr.status) === -1) | |
// Testing harness file:/// results in 0. | |
reject(new Error( | |
- 'While loading from url ' + url + | |
+ 'While loading from url ' + | |
+ url + | |
' server responded with a status of ' + | |
xhr.status, | |
)); | |
@@ -94,8 +95,12 @@ function normalizePath(path) { | |
if (normalizedPath[normalizedPath.length - 1] === '/') return normalizedPath; | |
if (path[0] === '/' && normalizedPath) normalizedPath = '/' + normalizedPath; | |
if ( | |
- path[path.length - 1] === '/' || segments[segments.length - 1] === '.' || | |
- segments[segments.length - 1] === '..' | |
+ path[path.length - 1] === | |
+ '/' || | |
+ segments[segments.length - 1] === | |
+ '.' || | |
+ segments[segments.length - 1] === | |
+ '..' | |
) | |
normalizedPath = normalizedPath + '/'; | |
@@ -116,7 +121,7 @@ function loadScriptsPromise(scriptNames, base) { | |
var scriptToEval = 0; | |
for (var i = 0; i < scriptNames.length; ++i) { | |
var scriptName = scriptNames[i]; | |
- var sourceURL = (base || self._importScriptPathPrefix) + scriptName; | |
+ var sourceURL = base || self._importScriptPathPrefix + scriptName; | |
var schemaIndex = sourceURL.indexOf('://') + 3; | |
sourceURL = sourceURL.substring(0, schemaIndex) + | |
normalizePath(sourceURL.substring(schemaIndex)); | |
@@ -306,7 +311,8 @@ Runtime.constructQueryParams = function(banned) { | |
*/ | |
Runtime._experimentsSetting = function() { | |
try { | |
- return /** @type {!Object} */ | |
+ return; | |
+ /** @type {!Object} */ | |
JSON.parse( | |
self.localStorage && self.localStorage['experiments'] | |
? self.localStorage['experiments'] | |
@@ -695,7 +701,9 @@ Runtime.Module.prototype = { | |
if (window.location.search) | |
sourceURL = sourceURL.replace(window.location.search, ''); | |
sourceURL = sourceURL.substring(0, sourceURL.lastIndexOf('/') + 1) + path; | |
- Runtime.cachedResources[path] = content + '\n/*# sourceURL=' + sourceURL + | |
+ Runtime.cachedResources[path] = content + | |
+ '\n/*# sourceURL=' + | |
+ sourceURL + | |
' */'; | |
} | |
}, | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/BreakpointManager.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/BreakpointManager.js | |
index 8917c23..be04f5d 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/BreakpointManager.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/BreakpointManager.js | |
@@ -189,8 +189,10 @@ WebInspector.BreakpointManager.prototype = { | |
var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data; | |
this._restoreBreakpoints(uiSourceCode); | |
if ( | |
- uiSourceCode.contentType() === WebInspector.resourceTypes.Script || | |
- uiSourceCode.contentType() === WebInspector.resourceTypes.Document | |
+ uiSourceCode.contentType() === | |
+ WebInspector.resourceTypes.Script || | |
+ uiSourceCode.contentType() === | |
+ WebInspector.resourceTypes.Document | |
) | |
uiSourceCode.addEventListener( | |
WebInspector.UISourceCode.Events.SourceMappingChanged, | |
@@ -679,7 +681,8 @@ WebInspector.BreakpointManager.Breakpoint.prototype = { | |
_removeUILocation: function(uiLocation, muteCreationFakeBreakpoint) { | |
if ( | |
!uiLocation || | |
- --this._numberOfDebuggerLocationForUILocation[uiLocation.id()] !== 0 | |
+ --this._numberOfDebuggerLocationForUILocation[uiLocation.id()] !== | |
+ 0 | |
) | |
return; | |
@@ -923,7 +926,8 @@ WebInspector.BreakpointManager.TargetBreakpoint.prototype = { | |
: null; | |
var newState; | |
if ( | |
- this._breakpoint._isRemoved || !this._breakpoint.enabled() || | |
+ this._breakpoint._isRemoved || | |
+ !this._breakpoint.enabled() || | |
this._scriptDiverged() | |
) | |
newState = null; | |
@@ -1173,9 +1177,14 @@ WebInspector.BreakpointManager.Breakpoint.State.equals = function( | |
if (stateA.scriptId || stateB.scriptId) return false; | |
- return stateA.url === stateB.url && stateA.lineNumber === stateB.lineNumber && | |
- stateA.columnNumber === stateB.columnNumber && | |
- stateA.condition === stateB.condition; | |
+ return stateA.url === | |
+ stateB.url && | |
+ stateA.lineNumber === | |
+ stateB.lineNumber && | |
+ stateA.columnNumber === | |
+ stateB.columnNumber && | |
+ stateA.condition === | |
+ stateB.condition; | |
}; | |
/** | |
@@ -1192,7 +1201,9 @@ WebInspector.BreakpointManager.Storage = function(breakpointManager, setting) { | |
for (var i = 0; i < breakpoints.length; ++i) { | |
var breakpoint /** @type {!WebInspector.BreakpointManager.Storage.Item} */ = breakpoints[i]; | |
breakpoint.columnNumber = breakpoint.columnNumber || 0; | |
- this._breakpoints[breakpoint.sourceFileId + ':' + breakpoint.lineNumber + | |
+ this._breakpoints[breakpoint.sourceFileId + | |
+ ':' + | |
+ breakpoint.lineNumber + | |
':' + | |
breakpoint.columnNumber] = breakpoint; | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ContentScriptProjectDecorator.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ContentScriptProjectDecorator.js | |
index bca1a08..688a9b9 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ContentScriptProjectDecorator.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ContentScriptProjectDecorator.js | |
@@ -54,7 +54,8 @@ WebInspector.ContentScriptProjectDecorator.prototype = { | |
*/ | |
function contentProjectWithName(project) { | |
return !!project.url() && | |
- project.type() === WebInspector.projectTypes.ContentScripts; | |
+ project.type() === | |
+ WebInspector.projectTypes.ContentScripts; | |
} | |
}, | |
/** | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/DebuggerWorkspaceBinding.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/DebuggerWorkspaceBinding.js | |
index d799c21..83bf9bd 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/DebuggerWorkspaceBinding.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/DebuggerWorkspaceBinding.js | |
@@ -504,7 +504,8 @@ WebInspector.DebuggerWorkspaceBinding.ScriptInfo.prototype = { | |
uiLocation, | |
'Script raw location cannot be mapped to any UI location.', | |
); | |
- return /** @type {!WebInspector.UILocation} */ | |
+ return; | |
+ /** @type {!WebInspector.UILocation} */ | |
uiLocation; | |
}, | |
}; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/Linkifier.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/Linkifier.js | |
index 4251a77..8fa1d75 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/Linkifier.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/Linkifier.js | |
@@ -93,7 +93,7 @@ WebInspector.Linkifier.linkifyUsingRevealer = function( | |
classes, | |
) { | |
var a = createElement('a'); | |
- a.className = (classes || '') + ' webkit-html-resource-link'; | |
+ a.className = classes || '' + ' webkit-html-resource-link'; | |
a.textContent = text.trimMiddle( | |
WebInspector.Linkifier.MaxLengthForDisplayedURLs, | |
); | |
@@ -299,7 +299,7 @@ WebInspector.Linkifier.prototype = { | |
*/ | |
_createAnchor: function(classes) { | |
var anchor = createElement('a'); | |
- anchor.className = (classes || '') + ' webkit-html-resource-link'; | |
+ anchor.className = classes || '' + ' webkit-html-resource-link'; | |
/** | |
* @param {!Event} event | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/NetworkProject.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/NetworkProject.js | |
index 492ffa4..491c5eb 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/NetworkProject.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/NetworkProject.js | |
@@ -86,7 +86,7 @@ WebInspector.NetworkProjectDelegate.prototype = { | |
var prettyURL = parsedURL.isValid | |
? parsedURL.host + (parsedURL.port ? ':' + parsedURL.port : '') | |
: ''; | |
- this._displayName = (prettyURL || this._url) + targetSuffix; | |
+ this._displayName = prettyURL || this._url + targetSuffix; | |
return this._displayName; | |
}, | |
/** | |
@@ -210,7 +210,9 @@ WebInspector.NetworkProject.projectId = function( | |
projectURL, | |
isContentScripts, | |
) { | |
- return target.id() + ':' + (isContentScripts ? 'contentscripts:' : '') + | |
+ return target.id() + | |
+ ':' + | |
+ (isContentScripts ? 'contentscripts:' : '') + | |
projectURL; | |
}; | |
@@ -386,9 +388,12 @@ WebInspector.NetworkProject.prototype = { | |
var type = contentProvider.contentType(); | |
if ( | |
- type !== WebInspector.resourceTypes.Stylesheet && | |
- type !== WebInspector.resourceTypes.Document && | |
- type !== WebInspector.resourceTypes.Script | |
+ type !== | |
+ WebInspector.resourceTypes.Stylesheet && | |
+ type !== | |
+ WebInspector.resourceTypes.Document && | |
+ type !== | |
+ WebInspector.resourceTypes.Script | |
) | |
return; | |
if (this._processedURLs[url]) return; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/PresentationConsoleMessageHelper.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/PresentationConsoleMessageHelper.js | |
index 5acfdcb..4cb4e69 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/PresentationConsoleMessageHelper.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/PresentationConsoleMessageHelper.js | |
@@ -244,8 +244,10 @@ WebInspector.PresentationConsoleMessageHelper.prototype = { | |
var message = messages[i]; | |
var rawLocation = this._rawLocation(message); | |
if ( | |
- script.target() === message.target() && | |
- script.scriptId === rawLocation.scriptId | |
+ script.target() === | |
+ message.target() && | |
+ script.scriptId === | |
+ rawLocation.scriptId | |
) | |
this._addConsoleMessageToScript(message, rawLocation); | |
else | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceScriptMapping.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceScriptMapping.js | |
index 24d3267..209397b 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceScriptMapping.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceScriptMapping.js | |
@@ -84,7 +84,8 @@ WebInspector.ResourceScriptMapping.prototype = { | |
var scriptFile = this.scriptFile(uiSourceCode); | |
if ( | |
scriptFile && | |
- (scriptFile.hasDivergedFromVM() && !scriptFile.isMergingToVM() || | |
+ (scriptFile.hasDivergedFromVM() && | |
+ !scriptFile.isMergingToVM() || | |
scriptFile.isDivergingFromVM()) | |
) | |
return null; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceUtils.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceUtils.js | |
index 92e2917..2fa5b6b 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceUtils.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/ResourceUtils.js | |
@@ -76,9 +76,11 @@ WebInspector.displayNameForURL = function(url) { | |
.inspectedPageURL() | |
.indexOf(lastPathComponent); | |
if ( | |
- index !== -1 && | |
- index + lastPathComponent.length === | |
- WebInspector.targetManager.inspectedPageURL().length | |
+ index !== | |
+ -1 && | |
+ index + | |
+ lastPathComponent.length === | |
+ WebInspector.targetManager.inspectedPageURL().length | |
) { | |
var baseURL = WebInspector.targetManager | |
.inspectedPageURL() | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/SASSSourceMapping.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/SASSSourceMapping.js | |
index 5a7896f..cdec388 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/SASSSourceMapping.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/SASSSourceMapping.js | |
@@ -193,7 +193,9 @@ WebInspector.SASSSourceMapping.prototype = { | |
function sassLoadedViaNetwork(statusCode, headers, content) { | |
if (statusCode >= 400) { | |
console.error( | |
- 'Could not load content for ' + sassURL + ' : ' + | |
+ 'Could not load content for ' + | |
+ sassURL + | |
+ ' : ' + | |
'HTTP status code: ' + | |
statusCode, | |
); | |
@@ -338,7 +340,9 @@ WebInspector.SASSSourceMapping.prototype = { | |
function contentLoaded(statusCode, headers, content) { | |
if (statusCode >= 400) { | |
console.error( | |
- 'Could not load content for ' + cssURL + ' : ' + | |
+ 'Could not load content for ' + | |
+ cssURL + | |
+ ' : ' + | |
'HTTP status code: ' + | |
statusCode, | |
); | |
@@ -446,7 +450,8 @@ WebInspector.SASSSourceMapping.prototype = { | |
*/ | |
addHeader: function(header) { | |
if ( | |
- !header.sourceMapURL || !header.sourceURL || | |
+ !header.sourceMapURL || | |
+ !header.sourceURL || | |
!WebInspector.settings.cssSourceMapsEnabled.get() | |
) | |
return; | |
@@ -468,7 +473,8 @@ WebInspector.SASSSourceMapping.prototype = { | |
removeHeader: function(header) { | |
var sourceURL = header.sourceURL; | |
if ( | |
- !sourceURL || !header.sourceMapURL || | |
+ !sourceURL || | |
+ !header.sourceMapURL || | |
!this._completeSourceMapURLForCSSURL[sourceURL] | |
) | |
return; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/TempFile.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/TempFile.js | |
index 68dec19..3471241 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/TempFile.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/bindings/TempFile.js | |
@@ -454,8 +454,9 @@ WebInspector.TempFileBackingStorage.prototype = { | |
* @return {!Promise.<?string>} | |
*/ | |
function readString(chunk, file) { | |
- if (chunk.string) return /** @type {!Promise.<?string>} */ | |
- Promise.resolve(chunk.string); | |
+ if (chunk.string) return; | |
+ /** @type {!Promise.<?string>} */ | |
+ Promise.resolve(chunk.string); | |
console.assert(chunk.endOffset); | |
if (!chunk.endOffset) | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/clike.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/clike.js | |
index df16d2e..477f643 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/clike.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/clike.js | |
@@ -129,7 +129,7 @@ | |
startState: function(basecolumn) { | |
return { | |
tokenize: null, | |
- context: new Context((basecolumn || 0) - indentUnit, 0, 'top', false), | |
+ context: new Context(basecolumn || 0 - indentUnit, 0, 'top', false), | |
indented: 0, | |
startOfLine: true, | |
}; | |
@@ -148,8 +148,14 @@ | |
if (ctx.align == null) ctx.align = true; | |
if ( | |
- (curPunc == ';' || curPunc == ':' || curPunc == ',') && | |
- ctx.type == 'statement' | |
+ curPunc == | |
+ ';' || | |
+ curPunc == | |
+ ':' || | |
+ curPunc == | |
+ ',' && | |
+ ctx.type == | |
+ 'statement' | |
) | |
popContext(state); | |
else if (curPunc == '{') pushContext(state, stream.column(), '}'); | |
@@ -161,8 +167,16 @@ | |
while (ctx.type == 'statement') ctx = popContext(state); | |
} else if (curPunc == ctx.type) popContext(state); | |
else if ( | |
- (ctx.type == '}' || ctx.type == 'top') && curPunc != ';' || | |
- ctx.type == 'statement' && curPunc == 'newstatement' | |
+ ctx.type == | |
+ '}' || | |
+ ctx.type == | |
+ 'top' && | |
+ curPunc != | |
+ ';' || | |
+ ctx.type == | |
+ 'statement' && | |
+ curPunc == | |
+ 'newstatement' | |
) | |
pushContext(state, stream.column(), 'statement'); | |
state.startOfLine = false; | |
@@ -440,7 +454,8 @@ | |
'noise1 noise2 noise3 noise4', | |
), | |
atoms: words( | |
- 'true false ' + 'gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex ' + | |
+ 'true false ' + | |
+ 'gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex ' + | |
'gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 ' + | |
'gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 ' + | |
'gl_FogCoord ' + | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/closebrackets.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/closebrackets.js | |
index 57e805a..6feb18c 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/closebrackets.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/closebrackets.js | |
@@ -70,27 +70,37 @@ | |
else if (left == right && next == right) { | |
if ( | |
cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == | |
- left + left + left | |
+ left + | |
+ left + | |
+ left | |
) | |
curType = 'skipThree'; | |
else | |
curType = 'skip'; | |
} else if ( | |
- left == right && cur.ch > 1 && | |
- cm.getRange(Pos(cur.line, cur.ch - 2), cur) == left + left && | |
- (cur.ch <= 2 || | |
+ left == | |
+ right && | |
+ cur.ch > | |
+ 1 && | |
+ cm.getRange(Pos(cur.line, cur.ch - 2), cur) == | |
+ left + | |
+ left && | |
+ (cur.ch <= | |
+ 2 || | |
cm.getRange( | |
Pos(cur.line, cur.ch - 3), | |
Pos(cur.line, cur.ch - 2), | |
) != | |
- left) | |
+ left) | |
) | |
curType = 'addFour'; | |
else if (left == right && CodeMirror.isWordChar(next)) | |
return CodeMirror.Pass; | |
else if ( | |
- cm.getLine(cur.line).length == cur.ch || | |
- closingBrackets.indexOf(next) >= 0 || | |
+ cm.getLine(cur.line).length == | |
+ cur.ch || | |
+ closingBrackets.indexOf(next) >= | |
+ 0 || | |
SPACE_CHAR_REGEX.test(next) | |
) | |
curType = 'both'; | |
@@ -132,7 +142,7 @@ | |
range.head, | |
Pos(range.head.line, range.head.ch + 1), | |
) != | |
- right | |
+ right | |
) | |
return CodeMirror.Pass; | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/codemirror.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/codemirror.js | |
index b5cb1e8..2638062 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/codemirror.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/codemirror.js | |
@@ -132,8 +132,10 @@ | |
// Suppress optimizelegibility in Webkit, since it breaks text | |
// measuring on line wrapping boundaries. | |
if ( | |
- webkit && options.lineWrapping && | |
- getComputedStyle(display.lineDiv).textRendering == 'optimizelegibility' | |
+ webkit && | |
+ options.lineWrapping && | |
+ getComputedStyle(display.lineDiv).textRendering == | |
+ 'optimizelegibility' | |
) | |
display.lineDiv.style.textRendering = 'auto'; | |
} | |
@@ -360,8 +362,7 @@ | |
} | |
if (wrapping) | |
- return widgetsHeight + | |
- (Math.ceil(line.text.length / perLine) || 1) * th; | |
+ return widgetsHeight + Math.ceil(line.text.length / perLine) || 1 * th; | |
else | |
return widgetsHeight + th; | |
}; | |
@@ -407,7 +408,7 @@ | |
); | |
if (gutterClass == 'CodeMirror-linenumbers') { | |
cm.display.lineGutter = gElt; | |
- gElt.style.width = (cm.display.lineNumWidth || 1) + 'px'; | |
+ gElt.style.width = cm.display.lineNumWidth || 1 + 'px'; | |
} | |
} | |
gutters.style.display = i ? '' : 'none'; | |
@@ -541,7 +542,8 @@ | |
this.horiz.style.display = 'block'; | |
this.horiz.style.right = needsV ? sWidth + 'px' : '0'; | |
this.horiz.style.left = measure.barLeft + 'px'; | |
- var totalWidth = measure.viewWidth - measure.barLeft - | |
+ var totalWidth = measure.viewWidth - | |
+ measure.barLeft - | |
(needsV ? sWidth : 0); | |
this.horiz.firstChild.style.width = measure.scrollWidth - | |
measure.clientWidth + | |
@@ -636,8 +638,12 @@ | |
updateScrollbarsInner(cm, measure); | |
for ( | |
var i = 0; | |
- i < 4 && startWidth != cm.display.barWidth || | |
- startHeight != cm.display.barHeight; | |
+ i < | |
+ 4 && | |
+ startWidth != | |
+ cm.display.barWidth || | |
+ startHeight != | |
+ cm.display.barHeight; | |
i++ | |
) { | |
if (startWidth != cm.display.barWidth && cm.options.lineWrapping) | |
@@ -663,7 +669,8 @@ | |
d.scrollbarFiller.style.width = sizes.right + 'px'; | |
} else d.scrollbarFiller.style.display = ''; | |
if ( | |
- sizes.bottom && cm.options.coverGutterNextToScrollbar && | |
+ sizes.bottom && | |
+ cm.options.coverGutterNextToScrollbar && | |
cm.options.fixedGutter | |
) { | |
d.gutterFiller.style.display = 'block'; | |
@@ -718,7 +725,8 @@ | |
(!display.gutters.firstChild || !cm.options.fixedGutter) | |
) | |
return; | |
- var comp = compensateForHScroll(display) - display.scroller.scrollLeft + | |
+ var comp = compensateForHScroll(display) - | |
+ display.scroller.scrollLeft + | |
cm.doc.scrollLeft; | |
var gutterW = display.gutters.offsetWidth, left = comp + 'px'; | |
for (var i = 0; i < view.length; i++) if (!view[i].hidden) { | |
@@ -817,12 +825,19 @@ | |
// Bail out if the visible area is already rendered and nothing changed. | |
if ( | |
- !update.force && update.visible.from >= display.viewFrom && | |
- update.visible.to <= display.viewTo && | |
- (display.updateLineNumbers == null || | |
- display.updateLineNumbers >= display.viewTo) && | |
- display.renderedView == display.view && | |
- countDirtyView(cm) == 0 | |
+ !update.force && | |
+ update.visible.from >= | |
+ display.viewFrom && | |
+ update.visible.to <= | |
+ display.viewTo && | |
+ (display.updateLineNumbers == | |
+ null || | |
+ display.updateLineNumbers >= | |
+ display.viewTo) && | |
+ display.renderedView == | |
+ display.view && | |
+ countDirtyView(cm) == | |
+ 0 | |
) | |
return false; | |
@@ -847,9 +862,14 @@ | |
to = visualLineEndNo(cm.doc, to); | |
} | |
- var different = from != display.viewFrom || to != display.viewTo || | |
- display.lastWrapHeight != update.wrapperHeight || | |
- display.lastWrapWidth != update.wrapperWidth; | |
+ var different = from != | |
+ display.viewFrom || | |
+ to != | |
+ display.viewTo || | |
+ display.lastWrapHeight != | |
+ update.wrapperHeight || | |
+ display.lastWrapWidth != | |
+ update.wrapperWidth; | |
adjustView(cm, from, to); | |
display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom)); | |
@@ -858,10 +878,16 @@ | |
var toUpdate = countDirtyView(cm); | |
if ( | |
- !different && toUpdate == 0 && !update.force && | |
- display.renderedView == display.view && | |
- (display.updateLineNumbers == null || | |
- display.updateLineNumbers >= display.viewTo) | |
+ !different && | |
+ toUpdate == | |
+ 0 && | |
+ !update.force && | |
+ display.renderedView == | |
+ display.view && | |
+ (display.updateLineNumbers == | |
+ null || | |
+ display.updateLineNumbers >= | |
+ display.viewTo) | |
) | |
return false; | |
@@ -898,8 +924,10 @@ | |
var force = update.force, viewport = update.viewport; | |
for (var first = true; ; first = false) { | |
if ( | |
- first && cm.options.lineWrapping && | |
- update.oldDisplayWidth != displayWidth(cm) | |
+ first && | |
+ cm.options.lineWrapping && | |
+ update.oldDisplayWidth != | |
+ displayWidth(cm) | |
) { | |
force = true; | |
} else { | |
@@ -916,8 +944,10 @@ | |
// actually covering the viewport. Keep looping until it does. | |
update.visible = visibleLines(cm.display, cm.doc, viewport); | |
if ( | |
- update.visible.from >= cm.display.viewFrom && | |
- update.visible.to <= cm.display.viewTo | |
+ update.visible.from >= | |
+ cm.display.viewFrom && | |
+ update.visible.to <= | |
+ cm.display.viewTo | |
) | |
break; | |
} | |
@@ -931,8 +961,10 @@ | |
signalLater(cm, 'update', cm); | |
if ( | |
- cm.display.viewFrom != cm.display.reportedViewFrom || | |
- cm.display.viewTo != cm.display.reportedViewTo | |
+ cm.display.viewFrom != | |
+ cm.display.reportedViewFrom || | |
+ cm.display.viewTo != | |
+ cm.display.reportedViewTo | |
) { | |
signalLater( | |
cm, | |
@@ -987,7 +1019,7 @@ | |
} | |
var diff = cur.line.height - height; | |
if (height < 2) height = textHeight(display); | |
- if (diff > .001 || diff < -.001) { | |
+ if (diff > 0.001 || diff < -0.001) { | |
updateLineHeight(cur.line, height); | |
updateWidgetHeight(cur.line); | |
if (cur.rest) | |
@@ -1054,8 +1086,11 @@ | |
} else { | |
// Already drawn | |
while (cur != lineView.node) cur = rm(cur); | |
- var updateNumber = lineNumbers && updateNumbersFrom != null && | |
- updateNumbersFrom <= lineN && | |
+ var updateNumber = lineNumbers && | |
+ updateNumbersFrom != | |
+ null && | |
+ updateNumbersFrom <= | |
+ lineN && | |
lineView.lineNumber; | |
if (lineView.changes) { | |
if (indexOf(lineView.changes, 'gutter') > -1) updateNumber = false; | |
@@ -1196,7 +1231,8 @@ | |
'div', | |
lineNumberFor(cm.options, lineN), | |
'CodeMirror-linenumber CodeMirror-gutter-elt', | |
- 'left: ' + dims.gutterLeft['CodeMirror-linenumbers'] + | |
+ 'left: ' + | |
+ dims.gutterLeft['CodeMirror-linenumbers'] + | |
'px; width: ' + | |
cm.display.lineNumInnerWidth + | |
'px', | |
@@ -1211,7 +1247,9 @@ | |
'div', | |
[found], | |
'CodeMirror-gutter-elt', | |
- 'left: ' + dims.gutterLeft[id] + 'px; width: ' + | |
+ 'left: ' + | |
+ dims.gutterLeft[id] + | |
+ 'px; width: ' + | |
dims.gutterWidth[id] + | |
'px', | |
), | |
@@ -1330,8 +1368,10 @@ | |
equals: function(other) { | |
if (other == this) return true; | |
if ( | |
- other.primIndex != this.primIndex || | |
- other.ranges.length != this.ranges.length | |
+ other.primIndex != | |
+ this.primIndex || | |
+ other.ranges.length != | |
+ this.ranges.length | |
) | |
return false; | |
for (var i = 0; i < this.ranges.length; i++) { | |
@@ -1382,8 +1422,10 @@ | |
return maxPos(this.anchor, this.head); | |
}, | |
empty: function() { | |
- return this.head.line == this.anchor.line && | |
- this.head.ch == this.anchor.ch; | |
+ return this.head.line == | |
+ this.anchor.line && | |
+ this.head.ch == | |
+ this.anchor.ch; | |
}, | |
}; | |
@@ -1549,11 +1591,13 @@ | |
function setSelectionNoUndo(doc, sel, options) { | |
if ( | |
hasHandler(doc, 'beforeSelectionChange') || | |
- doc.cm && hasHandler(doc.cm, 'beforeSelectionChange') | |
+ doc.cm && | |
+ hasHandler(doc.cm, 'beforeSelectionChange') | |
) | |
sel = filterSelectionChange(doc, sel); | |
- var bias = options && options.bias || | |
+ var bias = options && | |
+ options.bias || | |
(cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1); | |
setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true)); | |
@@ -1611,9 +1655,11 @@ | |
for (var i = 0; i < line.markedSpans.length; ++i) { | |
var sp = line.markedSpans[i], m = sp.marker; | |
if ( | |
- (sp.from == null || | |
- (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) && | |
- (sp.to == null || | |
+ sp.from == | |
+ null || | |
+ (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch) && | |
+ (sp.to == | |
+ null || | |
(m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch)) | |
) { | |
if (mayClear) { | |
@@ -1742,8 +1788,7 @@ | |
otherCursor.style.display = ''; | |
otherCursor.style.left = pos.other.left + 'px'; | |
otherCursor.style.top = pos.other.top + 'px'; | |
- otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + | |
- 'px'; | |
+ otherCursor.style.height = pos.other.bottom - pos.other.top * 0.85 + 'px'; | |
} | |
} | |
@@ -1767,7 +1812,10 @@ | |
'div', | |
null, | |
'CodeMirror-selected', | |
- 'position: absolute; left: ' + left + 'px; top: ' + top + | |
+ 'position: absolute; left: ' + | |
+ left + | |
+ 'px; top: ' + | |
+ top + | |
'px; width: ' + | |
(width == null ? rightSide - left : width) + | |
'px; height: ' + | |
@@ -1814,13 +1862,23 @@ | |
} | |
if (toArg == null && to == lineLen) right = rightSide; | |
if ( | |
- !start || leftPos.top < start.top || | |
- leftPos.top == start.top && leftPos.left < start.left | |
+ !start || | |
+ leftPos.top < | |
+ start.top || | |
+ leftPos.top == | |
+ start.top && | |
+ leftPos.left < | |
+ start.left | |
) | |
start = leftPos; | |
if ( | |
- !end || rightPos.bottom > end.bottom || | |
- rightPos.bottom == end.bottom && rightPos.right > end.right | |
+ !end || | |
+ rightPos.bottom > | |
+ end.bottom || | |
+ rightPos.bottom == | |
+ end.bottom && | |
+ rightPos.right > | |
+ end.right | |
) | |
end = rightPos; | |
if (left < leftSide + 1) left = leftSide; | |
@@ -1909,10 +1967,17 @@ | |
var oldCls = line.styleClasses, newCls = highlighted.classes; | |
if (newCls) line.styleClasses = newCls; | |
else if (oldCls) line.styleClasses = null; | |
- var ischange = !oldStyles || oldStyles.length != line.styles.length || | |
- oldCls != newCls && | |
- (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || | |
- oldCls.textClass != newCls.textClass); | |
+ var ischange = !oldStyles || | |
+ oldStyles.length != | |
+ line.styles.length || | |
+ oldCls != | |
+ newCls && | |
+ (!oldCls || | |
+ !newCls || | |
+ oldCls.bgClass != | |
+ newCls.bgClass || | |
+ oldCls.textClass != | |
+ newCls.textClass); | |
for ( | |
var i = 0; | |
!ischange && i < oldStyles.length; | |
@@ -1973,8 +2038,16 @@ | |
else state = copyState(doc.mode, state); | |
doc.iter(pos, n, function(line) { | |
processLine(cm, line.text, state); | |
- var save = pos == n - 1 || pos % 5 == 0 || | |
- pos >= display.viewFrom && pos < display.viewTo; | |
+ var save = pos == | |
+ n - | |
+ 1 || | |
+ pos % | |
+ 5 == | |
+ 0 || | |
+ pos >= | |
+ display.viewFrom && | |
+ pos < | |
+ display.viewTo; | |
line.stateAfter = save ? copyState(doc.mode, state) : null; | |
++pos; | |
}); | |
@@ -2007,11 +2080,13 @@ | |
return scrollerGap - cm.display.nativeBarWidth; | |
} | |
function displayWidth(cm) { | |
- return cm.display.scroller.clientWidth - scrollGap(cm) - | |
+ return cm.display.scroller.clientWidth - | |
+ scrollGap(cm) - | |
cm.display.barWidth; | |
} | |
function displayHeight(cm) { | |
- return cm.display.scroller.clientHeight - scrollGap(cm) - | |
+ return cm.display.scroller.clientHeight - | |
+ scrollGap(cm) - | |
cm.display.barHeight; | |
} | |
@@ -2024,7 +2099,9 @@ | |
var curWidth = wrapping && displayWidth(cm); | |
if ( | |
!lineView.measure.heights || | |
- wrapping && lineView.measure.width != curWidth | |
+ wrapping && | |
+ lineView.measure.width != | |
+ curWidth | |
) { | |
var heights = lineView.measure.heights = []; | |
if (wrapping) { | |
@@ -2033,7 +2110,7 @@ | |
for (var i = 0; i < rects.length - 1; i++) { | |
var cur = rects[i], next = rects[i + 1]; | |
if (Math.abs(cur.bottom - next.bottom) > 2) | |
- heights.push((cur.bottom + next.top) / 2 - rect.top); | |
+ heights.push(cur.bottom + next.top / 2 - rect.top); | |
} | |
} | |
heights.push(rect.bottom - rect.top); | |
@@ -2167,7 +2244,11 @@ | |
collapse = 'left'; | |
} | |
if (bias == 'right' && start == mEnd - mStart) | |
- while (i < map.length - 3 && map[i + 3] == map[i + 4] && | |
+ while (i < | |
+ map.length - | |
+ 3 && | |
+ map[i + 3] == | |
+ map[i + 4] && | |
!map[i + 5].insertLeft) { | |
node = map[(i += 3) + 2]; | |
collapse = 'right'; | |
@@ -2183,7 +2264,9 @@ | |
// Retry a maximum of 4 times when nonsense rectangles are returned | |
while (start && | |
isExtendingChar(prepared.line.text.charAt(mStart + start))) --start; | |
- while (mStart + end < mEnd && | |
+ while (mStart + | |
+ end < | |
+ mEnd && | |
isExtendingChar(prepared.line.text.charAt(mStart + end))) ++end; | |
if (ie && ie_version < 9 && start == 0 && end == mEnd - mStart) { | |
rect = node.parentNode.getBoundingClientRect(); | |
@@ -2229,7 +2312,7 @@ | |
var rtop = rect.top - prepared.rect.top, | |
rbot = rect.bottom - prepared.rect.top; | |
- var mid = (rtop + rbot) / 2; | |
+ var mid = rtop + rbot / 2; | |
var heights = prepared.view.measure.heights; | |
for (var i = 0; i < heights.length - 1; i++) if (mid < heights[i]) break; | |
var top = i ? heights[i - 1] : 0, bot = heights[i]; | |
@@ -2252,8 +2335,11 @@ | |
// returned incorrectly when zoomed on IE10 and below. | |
function maybeUpdateRectForZooming(measure, rect) { | |
if ( | |
- !window.screen || screen.logicalXDPI == null || | |
- screen.logicalXDPI == screen.deviceXDPI || | |
+ !window.screen || | |
+ screen.logicalXDPI == | |
+ null || | |
+ screen.logicalXDPI == | |
+ screen.deviceXDPI || | |
!hasBadZoomedRects(measure) | |
) | |
return rect; | |
@@ -2388,8 +2474,13 @@ | |
ch = bidiRight(part) - (part.level % 2 ? 0 : 1); | |
right = true; | |
} else if ( | |
- ch == bidiRight(part) && partPos < order.length - 1 && | |
- part.level < order[partPos + 1].level | |
+ ch == | |
+ bidiRight(part) && | |
+ partPos < | |
+ order.length - | |
+ 1 && | |
+ part.level < | |
+ order[partPos + 1].level | |
) { | |
part = order[++partPos]; | |
ch = bidiLeft(part) - part.level % 2; | |
@@ -2452,8 +2543,12 @@ | |
var mergedPos = merged && merged.find(0, true); | |
if ( | |
merged && | |
- (found.ch > mergedPos.from.ch || | |
- found.ch == mergedPos.from.ch && found.xRel > 0) | |
+ (found.ch > | |
+ mergedPos.from.ch || | |
+ found.ch == | |
+ mergedPos.from.ch && | |
+ found.xRel > | |
+ 0) | |
) | |
lineN = lineNo(lineObj = mergedPos.to.line); | |
else | |
@@ -2560,7 +2655,7 @@ | |
var pre = elt('pre', [anchor]); | |
removeChildrenAndAdd(display.measure, pre); | |
var rect = anchor.getBoundingClientRect(), | |
- width = (rect.right - rect.left) / 10; | |
+ width = rect.right - rect.left / 10; | |
if (width > 2) display.cachedCharWidth = width; | |
return width || 10; | |
} | |
@@ -2666,11 +2761,17 @@ | |
maybeClipScrollbars(cm); | |
if (op.updateMaxLine) findMaxLine(cm); | |
- op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null || | |
+ op.mustUpdate = op.viewChanged || | |
+ op.forceUpdate || | |
+ op.scrollTop != | |
+ null || | |
op.scrollToPos && | |
- (op.scrollToPos.from.line < display.viewFrom || | |
- op.scrollToPos.to.line >= display.viewTo) || | |
- display.maxLineChanged && cm.options.lineWrapping; | |
+ (op.scrollToPos.from.line < | |
+ display.viewFrom || | |
+ op.scrollToPos.to.line >= | |
+ display.viewTo) || | |
+ display.maxLineChanged && | |
+ cm.options.lineWrapping; | |
op.update = op.mustUpdate && | |
new DisplayUpdate( | |
cm, | |
@@ -2703,7 +2804,9 @@ | |
cm.display.sizerWidth = op.adjustWidthTo; | |
op.barMeasure.scrollWidth = Math.max( | |
display.scroller.clientWidth, | |
- display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + | |
+ display.sizer.offsetLeft + | |
+ op.adjustWidthTo + | |
+ scrollGap(cm) + | |
cm.display.barWidth, | |
); | |
op.maxScrollLeft = Math.max( | |
@@ -2747,14 +2850,16 @@ | |
// Abort mouse wheel delta measurement, when scrolling explicitly | |
if ( | |
- display.wheelStartX != null && | |
+ display.wheelStartX != | |
+ null && | |
(op.scrollTop != null || op.scrollLeft != null || op.scrollToPos) | |
) | |
display.wheelStartX = display.wheelStartY = null; | |
// Propagate the scroll position to the actual DOM scroller | |
if ( | |
- op.scrollTop != null && | |
+ op.scrollTop != | |
+ null && | |
(display.scroller.scrollTop != op.scrollTop || op.forceScroll) | |
) { | |
doc.scrollTop = Math.max( | |
@@ -2768,7 +2873,8 @@ | |
display.scroller.scrollTop = doc.scrollTop; | |
} | |
if ( | |
- op.scrollLeft != null && | |
+ op.scrollLeft != | |
+ null && | |
(display.scroller.scrollLeft != op.scrollLeft || op.forceScroll) | |
) { | |
doc.scrollLeft = Math.max( | |
@@ -2898,7 +3004,9 @@ | |
var display = cm.display; | |
if ( | |
- lendiff && to < display.viewTo && | |
+ lendiff && | |
+ to < | |
+ display.viewTo && | |
(display.updateLineNumbers == null || display.updateLineNumbers > from) | |
) | |
display.updateLineNumbers = from; | |
@@ -2913,7 +3021,8 @@ | |
// Change before | |
if ( | |
sawCollapsedSpans && | |
- visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom | |
+ visualLineEndNo(cm.doc, to + lendiff) > | |
+ display.viewFrom | |
) { | |
resetView(cm); | |
} else { | |
@@ -3109,7 +3218,9 @@ | |
// will be the case when there is a lot of text in the textarea, | |
// in which case reading its value would be expensive. | |
if ( | |
- !cm.state.focused || hasSelection(input) && !prevInput || | |
+ !cm.state.focused || | |
+ hasSelection(input) && | |
+ !prevInput || | |
isReadOnly(cm) || | |
cm.options.disableInput || | |
cm.state.keySeq | |
@@ -3127,8 +3238,13 @@ | |
// inexplicable appearance of private area unicode characters on | |
// some key combos in Mac (#2689). | |
if ( | |
- ie && ie_version >= 9 && cm.display.inputHasSelection === text || | |
- mac && /[\uf700-\uf7ff]/.test(text) | |
+ ie && | |
+ ie_version >= | |
+ 9 && | |
+ cm.display.inputHasSelection === | |
+ text || | |
+ mac && | |
+ /[\uf700-\uf7ff]/.test(text) | |
) { | |
resetInput(cm); | |
return false; | |
@@ -3139,21 +3255,28 @@ | |
cm.display.shift = false; | |
if ( | |
- text.charCodeAt(0) == 0x200b && doc.sel == cm.display.selForContextMenu && | |
+ text.charCodeAt(0) == | |
+ 8203 && | |
+ doc.sel == | |
+ cm.display.selForContextMenu && | |
!prevInput | |
) | |
prevInput = '\u200B'; | |
// Find the part of the input that is actually new | |
var same = 0, l = Math.min(prevInput.length, text.length); | |
- while (same < l && | |
- prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same; | |
+ while (same < | |
+ l && | |
+ prevInput.charCodeAt(same) == | |
+ text.charCodeAt(same)) ++same; | |
var inserted = text.slice(same), textLines = splitLines(inserted); | |
// When pasing N lines into N selections, insert one line per selection | |
var multiPaste = null; | |
if (cm.state.pasteIncoming && doc.sel.ranges.length > 1) { | |
if (lastCopied && lastCopied.join('\n') == inserted) | |
- multiPaste = doc.sel.ranges.length % lastCopied.length == 0 && | |
+ multiPaste = doc.sel.ranges.length % | |
+ lastCopied.length == | |
+ 0 && | |
map(lastCopied, splitLines); | |
else if (textLines.length == doc.sel.ranges.length) | |
multiPaste = map(textLines, function(l) { | |
@@ -3190,9 +3313,12 @@ | |
signalLater(cm, 'inputRead', cm, changeEvent); | |
// When an 'electric' character is inserted, immediately trigger a reindent | |
if ( | |
- inserted && !cm.state.pasteIncoming && cm.options.electricChars && | |
+ inserted && | |
+ !cm.state.pasteIncoming && | |
+ cm.options.electricChars && | |
cm.options.smartIndent && | |
- range.head.ch < 100 && | |
+ range.head.ch < | |
+ 100 && | |
(!i || doc.sel.ranges[i - 1].head.line != range.head.line) | |
) { | |
var mode = cm.getModeAt(range.head); | |
@@ -3239,8 +3365,11 @@ | |
cm.display.prevInput = ''; | |
var range = doc.sel.primary(); | |
minimal = hasCopyEvent && | |
- (range.to().line - range.from().line > 100 || | |
- (selected = cm.getSelection()).length > 1000); | |
+ (range.to().line - | |
+ range.from().line > | |
+ 100 || | |
+ (selected = cm.getSelection()).length > | |
+ 1000); | |
var content = minimal ? '-' : selected || cm.getSelection(); | |
cm.display.input.value = content; | |
if (cm.state.focused) selectInput(cm.display.input); | |
@@ -3254,7 +3383,8 @@ | |
function focusInput(cm) { | |
if ( | |
- cm.options.readOnly != 'nocursor' && | |
+ cm.options.readOnly != | |
+ 'nocursor' && | |
(!mobile || activeElt() != cm.display.input) | |
) | |
cm.display.input.focus(); | |
@@ -3362,7 +3492,8 @@ | |
// Add a char to the end of textarea before paste occur so that | |
// selection doesn't span to the end of textarea. | |
if ( | |
- webkit && !cm.state.fakedLastChar && | |
+ webkit && | |
+ !cm.state.fakedLastChar && | |
!(new Date() - cm.state.lastMiddleDown < 200) | |
) { | |
var start = d.input.selectionStart, end = d.input.selectionEnd; | |
@@ -3421,8 +3552,10 @@ | |
function onResize(cm) { | |
var d = cm.display; | |
if ( | |
- d.lastWrapHeight == d.wrapper.clientHeight && | |
- d.lastWrapWidth == d.wrapper.clientWidth | |
+ d.lastWrapHeight == | |
+ d.wrapper.clientHeight && | |
+ d.lastWrapWidth == | |
+ d.wrapper.clientWidth | |
) | |
return; | |
// Might be a text scaling operation, clear size caches. | |
@@ -3436,8 +3569,15 @@ | |
function eventInWidget(display, e) { | |
for (var n = e_target(e); n != display.wrapper; n = n.parentNode) { | |
if ( | |
- !n || n.nodeType == 1 && n.getAttribute('cm-ignore-events') == 'true' || | |
- n.parentNode == display.sizer && n != display.mover | |
+ !n || | |
+ n.nodeType == | |
+ 1 && | |
+ n.getAttribute('cm-ignore-events') == | |
+ 'true' || | |
+ n.parentNode == | |
+ display.sizer && | |
+ n != | |
+ display.mover | |
) | |
return true; | |
} | |
@@ -3463,8 +3603,11 @@ | |
} | |
var coords = coordsChar(cm, x, y), line; | |
if ( | |
- forRect && coords.xRel == 1 && | |
- (line = getLine(cm.doc, coords.line).text).length == coords.ch | |
+ forRect && | |
+ coords.xRel == | |
+ 1 && | |
+ (line = getLine(cm.doc, coords.line).text).length == | |
+ coords.ch | |
) { | |
var colDiff = countColumn(line, line.length, cm.options.tabSize) - | |
line.length; | |
@@ -3472,7 +3615,7 @@ | |
coords.line, | |
Math.max( | |
0, | |
- Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - | |
+ Math.round(x - paddingH(cm.display).left / charWidth(cm.display)) - | |
colDiff, | |
), | |
); | |
@@ -3531,8 +3674,12 @@ | |
var now = +new Date(), type; | |
if ( | |
- lastDoubleClick && lastDoubleClick.time > now - 400 && | |
- cmp(lastDoubleClick.pos, start) == 0 | |
+ lastDoubleClick && | |
+ lastDoubleClick.time > | |
+ now - | |
+ 400 && | |
+ cmp(lastDoubleClick.pos, start) == | |
+ 0 | |
) { | |
type = 'triple'; | |
} else if ( | |
@@ -3547,9 +3694,13 @@ | |
var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey, contained; | |
if ( | |
- cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) && | |
- type == 'single' && | |
- (contained = sel.contains(start)) > -1 && | |
+ cm.options.dragDrop && | |
+ dragAndDrop && | |
+ !isReadOnly(cm) && | |
+ type == | |
+ 'single' && | |
+ (contained = sel.contains(start)) > | |
+ -1 && | |
!sel.ranges[contained].empty() | |
) | |
leftButtonStartDrag(cm, e, start, modifier); | |
@@ -3949,9 +4100,9 @@ | |
// know one. These don't have to be accurate -- the result of them | |
// being wrong would just be a slight flicker on the first wheel | |
// scroll (if it is large enough). | |
- if (ie) wheelPixelsPerUnit = -.53; | |
+ if (ie) wheelPixelsPerUnit = -0.53; | |
else if (gecko) wheelPixelsPerUnit = 15; | |
- else if (chrome) wheelPixelsPerUnit = -.7; | |
+ else if (chrome) wheelPixelsPerUnit = -0.7; | |
else if (safari) wheelPixelsPerUnit = (-1) / 3; | |
var wheelEventDelta = function(e) { | |
@@ -3974,8 +4125,12 @@ | |
var display = cm.display, scroll = display.scroller; | |
// Quit if there's nothing to scroll here | |
if ( | |
- !(dx && scroll.scrollWidth > scroll.clientWidth || | |
- dy && scroll.scrollHeight > scroll.clientHeight) | |
+ !(dx && | |
+ scroll.scrollWidth > | |
+ scroll.clientWidth || | |
+ dy && | |
+ scroll.scrollHeight > | |
+ scroll.clientHeight) | |
) | |
return; | |
@@ -4054,12 +4209,19 @@ | |
if (display.wheelStartX == null) return; | |
var movedX = scroll.scrollLeft - display.wheelStartX; | |
var movedY = scroll.scrollTop - display.wheelStartY; | |
- var sample = movedY && display.wheelDY && | |
- movedY / display.wheelDY || | |
- movedX && display.wheelDX && movedX / display.wheelDX; | |
+ var sample = movedY && | |
+ display.wheelDY && | |
+ movedY / | |
+ display.wheelDY || | |
+ movedX && | |
+ display.wheelDX && | |
+ movedX / | |
+ display.wheelDX; | |
display.wheelStartX = display.wheelStartY = null; | |
if (!sample) return; | |
- wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / | |
+ wheelPixelsPerUnit = wheelPixelsPerUnit * | |
+ wheelSamples + | |
+ sample / | |
(wheelSamples + 1); | |
++wheelSamples; | |
}, | |
@@ -4184,7 +4346,8 @@ | |
// Turn mouse into crosshair when Alt is held on Mac. | |
if ( | |
- code == 18 && | |
+ code == | |
+ 18 && | |
!/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className) | |
) | |
showCrossHair(cm); | |
@@ -4221,7 +4384,7 @@ | |
return; | |
} | |
if ( | |
- (presto && (!e.which || e.which < 10) || khtml) && handleKeyBinding(cm, e) | |
+ presto && (!e.which || e.which < 10) || khtml && handleKeyBinding(cm, e) | |
) | |
return; | |
var ch = String.fromCharCode(charCode == null ? keyCode : charCode); | |
@@ -4331,8 +4494,10 @@ | |
var i = 0, | |
poll = function() { | |
if ( | |
- display.selForContextMenu == cm.doc.sel && | |
- display.input.selectionStart == 0 | |
+ display.selForContextMenu == | |
+ cm.doc.sel && | |
+ display.input.selectionStart == | |
+ 0 | |
) | |
operation(cm, commands.selectAll)(cm); | |
else if (i++ < 10) | |
@@ -4379,7 +4544,8 @@ | |
if (cmp(pos, change.from) < 0) return pos; | |
if (cmp(pos, change.to) <= 0) return changeEnd(change); | |
- var line = pos.line + change.text.length - | |
+ var line = pos.line + | |
+ change.text.length - | |
(change.to.line - change.from.line) - | |
1, | |
ch = pos.ch; | |
@@ -4461,7 +4627,8 @@ | |
if ( | |
hasHandler(doc, 'beforeChange') || | |
- doc.cm && hasHandler(doc.cm, 'beforeChange') | |
+ doc.cm && | |
+ hasHandler(doc.cm, 'beforeChange') | |
) { | |
change = filterChange(doc, change, true); | |
if (!change) return; | |
@@ -4469,7 +4636,8 @@ | |
// Possibly split or suppress the update based on the presence | |
// of read-only spans in its range. | |
- var split = sawReadOnlySpans && !ignoreReadOnly && | |
+ var split = sawReadOnlySpans && | |
+ !ignoreReadOnly && | |
removeReadOnlyRanges(doc, change.from, change.to); | |
if (split) { | |
for ( | |
@@ -4484,8 +4652,12 @@ | |
function makeChangeInner(doc, change) { | |
if ( | |
- change.text.length == 1 && change.text[0] == '' && | |
- cmp(change.from, change.to) == 0 | |
+ change.text.length == | |
+ 1 && | |
+ change.text[0] == | |
+ '' && | |
+ cmp(change.from, change.to) == | |
+ 0 | |
) | |
return; | |
var selAfter = computeSelAfterChange(doc, change); | |
@@ -4555,7 +4727,8 @@ | |
hist.generation = event.generation || ++hist.maxGeneration; | |
var filter = hasHandler(doc, 'beforeChange') || | |
- doc.cm && hasHandler(doc.cm, 'beforeChange'); | |
+ doc.cm && | |
+ hasHandler(doc.cm, 'beforeChange'); | |
for (var i = event.changes.length - 1; i >= 0; --i) { | |
var change = event.changes[i]; | |
@@ -4698,7 +4871,10 @@ | |
// Remember that these lines changed, for updating the display | |
if (change.full) regChange(cm); | |
else if ( | |
- from.line == to.line && change.text.length == 1 && | |
+ from.line == | |
+ to.line && | |
+ change.text.length == | |
+ 1 && | |
!isWholeLineUpdate(cm.doc, change) | |
) | |
regLineChange(cm, from.line, 'text'); | |
@@ -4744,7 +4920,8 @@ | |
doScroll = null; | |
if (coords.top + box.top < 0) doScroll = true; | |
else if ( | |
- coords.bottom + box.top > | |
+ coords.bottom + | |
+ box.top > | |
(window.innerHeight || document.documentElement.clientHeight) | |
) | |
doScroll = false; | |
@@ -5088,7 +5265,8 @@ | |
window.innerHeight || document.documentElement.clientHeight, | |
); | |
y = pos.top + | |
- dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display)); | |
+ dir * | |
+ (pageSize - (dir < 0 ? 1.5 : 0.5) * textHeight(cm.display)); | |
} else if (unit == 'line') { | |
y = dir > 0 ? pos.bottom + 3 : pos.top - 3; | |
} | |
@@ -5186,8 +5364,12 @@ | |
for (var j = start; j < end; ++j) indentLine(this, j, how); | |
var newRanges = this.doc.sel.ranges; | |
if ( | |
- from.ch == 0 && ranges.length == newRanges.length && | |
- newRanges[i].from().ch > 0 | |
+ from.ch == | |
+ 0 && | |
+ ranges.length == | |
+ newRanges.length && | |
+ newRanges[i].from().ch > | |
+ 0 | |
) | |
replaceOneSelection( | |
this.doc, | |
@@ -5213,7 +5395,7 @@ | |
getTokenTypeAt: function(pos) { | |
pos = clipPos(this.doc, pos); | |
var styles = getLineStyles(this, getLine(this.doc, pos.line)); | |
- var before = 0, after = (styles.length - 1) / 2, ch = pos.ch; | |
+ var before = 0, after = styles.length - 1 / 2, ch = pos.ch; | |
var type; | |
if (ch == 0) type = styles[2]; | |
else for (;;) { | |
@@ -5374,8 +5556,13 @@ | |
); | |
// Default to positioning above (if specified and possible); otherwise default to positioning below | |
if ( | |
- (vert == 'above' || pos.bottom + node.offsetHeight > vspace) && | |
- pos.top > node.offsetHeight | |
+ vert == | |
+ 'above' || | |
+ pos.bottom + | |
+ node.offsetHeight > | |
+ vspace && | |
+ pos.top > | |
+ node.offsetHeight | |
) | |
top = pos.top - node.offsetHeight; | |
else if (pos.bottom + node.offsetHeight <= vspace) top = pos.bottom; | |
@@ -5389,7 +5576,7 @@ | |
} else { | |
if (horiz == 'left') left = 0; | |
else if (horiz == 'middle') | |
- left = (display.sizer.clientWidth - node.offsetWidth) / 2; | |
+ left = display.sizer.clientWidth - node.offsetWidth / 2; | |
node.style.left = left + 'px'; | |
} | |
if (scroll) | |
@@ -5464,7 +5651,8 @@ | |
}, | |
moveV: methodOp(function(dir, unit) { | |
var cm = this, doc = this.doc, goals = []; | |
- var collapse = !cm.display.shift && !doc.extend && | |
+ var collapse = !cm.display.shift && | |
+ !doc.extend && | |
doc.sel.somethingSelected(); | |
doc.extendSelectionsBy( | |
function(range) { | |
@@ -5493,7 +5681,7 @@ | |
var start = pos.ch, end = pos.ch; | |
if (line) { | |
var helper = this.getHelper(pos, 'wordChars'); | |
- if ((pos.xRel < 0 || end == line.length) && start) --start; | |
+ if (pos.xRel < 0 || end == line.length && start) --start; | |
else ++end; | |
var startChar = line.charAt(start); | |
var check = isWordChar(startChar, helper) ? function(ch) { | |
@@ -5530,7 +5718,8 @@ | |
return { | |
left: scroller.scrollLeft, | |
top: scroller.scrollTop, | |
- height: scroller.scrollHeight - scrollGap(this) - | |
+ height: scroller.scrollHeight - | |
+ scrollGap(this) - | |
this.display.barHeight, | |
width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth, | |
clientHeight: displayHeight(this), | |
@@ -5597,7 +5786,10 @@ | |
this.scrollTo(this.doc.scrollLeft, this.doc.scrollTop); | |
updateGutterSpace(this); | |
if ( | |
- oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 | |
+ oldHeight == | |
+ null || | |
+ Math.abs(oldHeight - textHeight(this.display)) > | |
+ 0.5 | |
) | |
estimateLineHeights(this); | |
signal(this, 'refresh', this); | |
@@ -5861,7 +6053,9 @@ | |
if (typeof spec == 'string' && mimeModes.hasOwnProperty(spec)) { | |
spec = mimeModes[spec]; | |
} else if ( | |
- spec && typeof spec.name == 'string' && | |
+ spec && | |
+ typeof spec.name == | |
+ 'string' && | |
mimeModes.hasOwnProperty(spec.name) | |
) { | |
var found = mimeModes[spec.name]; | |
@@ -6457,8 +6651,12 @@ | |
// autofocus and no other element is focused. | |
if (options.autofocus == null) { | |
var hasFocus = activeElt(); | |
- options.autofocus = hasFocus == textarea || | |
- textarea.getAttribute('autofocus') != null && hasFocus == document.body; | |
+ options.autofocus = hasFocus == | |
+ textarea || | |
+ textarea.getAttribute('autofocus') != | |
+ null && | |
+ hasFocus == | |
+ document.body; | |
} | |
function save() { | |
@@ -6653,7 +6851,10 @@ | |
} | |
line.markedSpans = removeMarkedSpan(line.markedSpans, span); | |
if ( | |
- span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && | |
+ span.from == | |
+ null && | |
+ this.collapsed && | |
+ !lineIsHidden(this.doc, line) && | |
cm | |
) | |
updateLineHeight(line, textHeight(cm.display)); | |
@@ -6776,8 +6977,9 @@ | |
if (marker.collapsed) { | |
if ( | |
conflictingCollapsedRange(doc, from.line, from, to, marker) || | |
- from.line != to.line && | |
- conflictingCollapsedRange(doc, to.line, from, to, marker) | |
+ from.line != | |
+ to.line && | |
+ conflictingCollapsedRange(doc, to.line, from, to, marker) | |
) | |
throw new Error( | |
'Inserting collapsed marker partially overlapping an existing one', | |
@@ -6796,8 +6998,11 @@ | |
var curLine = from.line, cm = doc.cm, updateMaxLine; | |
doc.iter(curLine, to.line + 1, function(line) { | |
if ( | |
- cm && marker.collapsed && !cm.options.lineWrapping && | |
- visualLine(line) == cm.display.maxLine | |
+ cm && | |
+ marker.collapsed && | |
+ !cm.options.lineWrapping && | |
+ visualLine(line) == | |
+ cm.display.maxLine | |
) | |
updateMaxLine = true; | |
if (marker.collapsed && curLine != from.line) updateLineHeight(line, 0); | |
@@ -6831,7 +7036,9 @@ | |
if (updateMaxLine) cm.curOp.updateMaxLine = true; | |
if (marker.collapsed) regChange(cm, from.line, to.line + 1); | |
else if ( | |
- marker.className || marker.title || marker.startStyle || | |
+ marker.className || | |
+ marker.title || | |
+ marker.startStyle || | |
marker.endStyle || | |
marker.css | |
) | |
@@ -6973,14 +7180,19 @@ | |
function markedSpansBefore(old, startCh, isInsert) { | |
if (old) for (var i = 0, nw; i < old.length; ++i) { | |
var span = old[i], marker = span.marker; | |
- var startsBefore = span.from == null || | |
+ var startsBefore = span.from == | |
+ null || | |
(marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); | |
if ( | |
startsBefore || | |
- span.from == startCh && marker.type == 'bookmark' && | |
- (!isInsert || !span.marker.insertLeft) | |
+ span.from == | |
+ startCh && | |
+ marker.type == | |
+ 'bookmark' && | |
+ (!isInsert || !span.marker.insertLeft) | |
) { | |
- var endsAfter = span.to == null || | |
+ var endsAfter = span.to == | |
+ null || | |
(marker.inclusiveRight ? span.to >= startCh : span.to > startCh); | |
(nw || (nw = [])).push(new MarkedSpan( | |
marker, | |
@@ -6994,14 +7206,19 @@ | |
function markedSpansAfter(old, endCh, isInsert) { | |
if (old) for (var i = 0, nw; i < old.length; ++i) { | |
var span = old[i], marker = span.marker; | |
- var endsAfter = span.to == null || | |
+ var endsAfter = span.to == | |
+ null || | |
(marker.inclusiveRight ? span.to >= endCh : span.to > endCh); | |
if ( | |
endsAfter || | |
- span.from == endCh && marker.type == 'bookmark' && | |
- (!isInsert || span.marker.insertLeft) | |
+ span.from == | |
+ endCh && | |
+ marker.type == | |
+ 'bookmark' && | |
+ (!isInsert || span.marker.insertLeft) | |
) { | |
- var startsBefore = span.from == null || | |
+ var startsBefore = span.from == | |
+ null || | |
(marker.inclusiveLeft ? span.from <= endCh : span.from < endCh); | |
(nw || (nw = [])).push(new MarkedSpan( | |
marker, | |
@@ -7094,8 +7311,12 @@ | |
for (var i = 0; i < spans.length; ++i) { | |
var span = spans[i]; | |
if ( | |
- span.from != null && span.from == span.to && | |
- span.marker.clearWhenEmpty !== false | |
+ span.from != | |
+ null && | |
+ span.from == | |
+ span.to && | |
+ span.marker.clearWhenEmpty !== | |
+ false | |
) | |
spans.splice(i--, 1); | |
} | |
@@ -7207,7 +7428,9 @@ | |
if (sps) for (var sp, i = 0; i < sps.length; ++i) { | |
sp = sps[i]; | |
if ( | |
- sp.marker.collapsed && (start ? sp.from : sp.to) == null && | |
+ sp.marker.collapsed && | |
+ (start ? sp.from : sp.to) == | |
+ null && | |
(!found || compareCollapsedMarkers(found, sp.marker) < 0) | |
) | |
found = sp.marker; | |
@@ -7232,17 +7455,25 @@ | |
if (!sp.marker.collapsed) continue; | |
var found = sp.marker.find(0); | |
var fromCmp = cmp(found.from, from) || | |
- extraLeft(sp.marker) - extraLeft(marker); | |
+ extraLeft(sp.marker) - | |
+ extraLeft(marker); | |
var toCmp = cmp(found.to, to) || | |
- extraRight(sp.marker) - extraRight(marker); | |
+ extraRight(sp.marker) - | |
+ extraRight(marker); | |
if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue; | |
if ( | |
- fromCmp <= 0 && | |
- (cmp(found.to, from) > 0 || | |
- sp.marker.inclusiveRight && marker.inclusiveLeft) || | |
- fromCmp >= 0 && | |
- (cmp(found.from, to) < 0 || | |
- sp.marker.inclusiveLeft && marker.inclusiveRight) | |
+ fromCmp <= | |
+ 0 && | |
+ (cmp(found.to, from) > | |
+ 0 || | |
+ sp.marker.inclusiveRight && | |
+ marker.inclusiveLeft) || | |
+ fromCmp >= | |
+ 0 && | |
+ (cmp(found.from, to) < | |
+ 0 || | |
+ sp.marker.inclusiveLeft && | |
+ marker.inclusiveRight) | |
) | |
return true; | |
} | |
@@ -7299,7 +7530,9 @@ | |
if (sp.from == null) return true; | |
if (sp.marker.widgetNode) continue; | |
if ( | |
- sp.from == 0 && sp.marker.inclusiveLeft && | |
+ sp.from == | |
+ 0 && | |
+ sp.marker.inclusiveLeft && | |
lineIsHiddenInner(doc, line, sp) | |
) | |
return true; | |
@@ -7318,7 +7551,10 @@ | |
for (var sp, i = 0; i < line.markedSpans.length; ++i) { | |
sp = line.markedSpans[i]; | |
if ( | |
- sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to && | |
+ sp.marker.collapsed && | |
+ !sp.marker.widgetNode && | |
+ sp.from == | |
+ span.to && | |
(sp.to == null || sp.to != span.from) && | |
(sp.marker.inclusiveLeft || span.marker.inclusiveRight) && | |
lineIsHiddenInner(doc, line, sp) | |
@@ -7381,7 +7617,8 @@ | |
widget.cm.display.gutters.offsetWidth + | |
'px;'; | |
if (widget.noHScroll) | |
- parentStyle += 'width: ' + widget.cm.display.wrapper.clientWidth + | |
+ parentStyle += 'width: ' + | |
+ widget.cm.display.wrapper.clientWidth + | |
'px;'; | |
removeChildrenAndAdd( | |
widget.cm.display.measure, | |
@@ -7497,7 +7734,7 @@ | |
state = getStateBefore(cm, pos.line, precise); | |
var stream = new StringStream(line.text, cm.options.tabSize), tokens; | |
if (asArray) tokens = []; | |
- while ((asArray || stream.pos < pos.ch) && !stream.eol()) { | |
+ while (asArray || stream.pos < pos.ch && !stream.eol()) { | |
stream.start = stream.pos; | |
style = readToken(mode, stream, state); | |
if (asArray) tokens.push(getObj(true)); | |
@@ -7679,12 +7916,13 @@ | |
builder.addToken = buildToken; | |
// Optionally wire in some hacks into the token-rendering | |
// algorithm, to deal with browser quirks. | |
- if ((ie || webkit) && cm.getOption('lineWrapping')) | |
+ if (ie || webkit && cm.getOption('lineWrapping')) | |
builder.addToken = buildTokenSplitSpaces(builder.addToken); | |
if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line))) | |
builder.addToken = buildTokenBadBidi(builder.addToken, order); | |
builder.map = []; | |
- var allowFrontierUpdate = lineView != cm.display.externalMeasured && | |
+ var allowFrontierUpdate = lineView != | |
+ cm.display.externalMeasured && | |
lineNo(line); | |
insertLineContent( | |
line, | |
@@ -7907,7 +8145,7 @@ | |
if (m.type == 'bookmark' && sp.from == pos && m.widgetNode) | |
foundBookmarks.push(m); | |
} | |
- if (collapsed && (collapsed.from || 0) == pos) { | |
+ if (collapsed && collapsed.from || 0 == pos) { | |
buildCollapsedSpan( | |
builder, | |
(collapsed.to == null ? len + 1 : collapsed.to) - pos, | |
@@ -7957,7 +8195,12 @@ | |
// are treated specially, in order to make the association of line | |
// widgets and marker elements with the text behave more intuitive. | |
function isWholeLineUpdate(doc, change) { | |
- return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == '' && | |
+ return change.from.ch == | |
+ 0 && | |
+ change.to.ch == | |
+ 0 && | |
+ lst(change.text) == | |
+ '' && | |
(!doc.cm || doc.cm.options.wholeLineUpdateBefore); | |
} | |
@@ -8000,7 +8243,8 @@ | |
if (text.length == 1) { | |
update( | |
firstLine, | |
- firstLine.text.slice(0, from.ch) + lastText + | |
+ firstLine.text.slice(0, from.ch) + | |
+ lastText + | |
firstLine.text.slice(to.ch), | |
lastSpans, | |
); | |
@@ -8133,7 +8377,9 @@ | |
// If the result is smaller than 25 lines, ensure that it is a | |
// single leaf node. | |
if ( | |
- this.size - n < 25 && | |
+ this.size - | |
+ n < | |
+ 25 && | |
(this.children.length > 1 || !(this.children[0] instanceof LeafChunk)) | |
) { | |
var lines = []; | |
@@ -8409,7 +8655,9 @@ | |
origin: origin, | |
}; | |
} | |
- var newSel = collapse && collapse != 'end' && | |
+ var newSel = collapse && | |
+ collapse != | |
+ 'end' && | |
computeReplacedSel(this, changes, collapse); | |
for ( | |
var i = changes.length - 1; | |
@@ -8547,7 +8795,10 @@ | |
if (spans) for (var i = 0; i < spans.length; ++i) { | |
var span = spans[i]; | |
if ( | |
- (span.from == null || span.from <= pos.ch) && | |
+ span.from == | |
+ null || | |
+ span.from <= | |
+ pos.ch && | |
(span.to == null || span.to >= pos.ch) | |
) | |
markers.push(span.marker.parent || span.marker); | |
@@ -8563,9 +8814,18 @@ | |
if (spans) for (var i = 0; i < spans.length; i++) { | |
var span = spans[i]; | |
if ( | |
- !(lineNo == from.line && from.ch > span.to || | |
- span.from == null && lineNo != from.line || | |
- lineNo == to.line && span.from > to.ch) && | |
+ !(lineNo == | |
+ from.line && | |
+ from.ch > | |
+ span.to || | |
+ span.from == | |
+ null && | |
+ lineNo != | |
+ from.line || | |
+ lineNo == | |
+ to.line && | |
+ span.from > | |
+ to.ch) && | |
(!filter || filter(span.marker)) | |
) | |
found.push(span.marker.parent || span.marker); | |
@@ -8906,11 +9166,19 @@ | |
var time = +new Date(), cur; | |
if ( | |
- (hist.lastOp == opId || | |
- hist.lastOrigin == change.origin && change.origin && | |
- (change.origin.charAt(0) == '+' && doc.cm && | |
- hist.lastModTime > time - doc.cm.options.historyEventDelay || | |
- change.origin.charAt(0) == '*')) && | |
+ hist.lastOp == | |
+ opId || | |
+ hist.lastOrigin == | |
+ change.origin && | |
+ change.origin && | |
+ (change.origin.charAt(0) == | |
+ '+' && | |
+ doc.cm && | |
+ hist.lastModTime > | |
+ time - | |
+ doc.cm.options.historyEventDelay || | |
+ change.origin.charAt(0) == | |
+ '*') && | |
(cur = lastChangeEvent(hist, hist.lastOp == opId)) | |
) { | |
// Merge this change into the last event | |
@@ -8948,11 +9216,17 @@ | |
function selectionEventCanBeMerged(doc, origin, prev, sel) { | |
var ch = origin.charAt(0); | |
- return ch == '*' || | |
- ch == '+' && prev.ranges.length == sel.ranges.length && | |
- prev.somethingSelected() == sel.somethingSelected() && | |
- new Date() - doc.history.lastSelTime <= | |
- (doc.cm ? doc.cm.options.historyEventDelay : 500); | |
+ return ch == | |
+ '*' || | |
+ ch == | |
+ '+' && | |
+ prev.ranges.length == | |
+ sel.ranges.length && | |
+ prev.somethingSelected() == | |
+ sel.somethingSelected() && | |
+ new Date() - | |
+ doc.history.lastSelTime <= | |
+ (doc.cm ? doc.cm.options.historyEventDelay : 500); | |
} | |
// Called whenever the selection changes, sets the new selection as | |
@@ -8967,10 +9241,16 @@ | |
// starting with * are always merged, those starting with + are | |
// merged when similar and close together in time. | |
if ( | |
- opId == hist.lastSelOp || | |
- origin && hist.lastSelOrigin == origin && | |
- (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin || | |
- selectionEventCanBeMerged(doc, origin, lst(hist.done), sel)) | |
+ opId == | |
+ hist.lastSelOp || | |
+ origin && | |
+ hist.lastSelOrigin == | |
+ origin && | |
+ (hist.lastModTime == | |
+ hist.lastSelTime && | |
+ hist.lastOrigin == | |
+ origin || | |
+ selectionEventCanBeMerged(doc, origin, lst(hist.done), sel)) | |
) | |
hist.done[hist.done.length - 1] = sel; | |
else | |
@@ -9388,9 +9668,11 @@ | |
var nonASCIISingleCaseWordChar = /[\u00df\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; | |
var isWordCharBasic = CodeMirror.isWordChar = function(ch) { | |
return /\w/.test(ch) || | |
- ch > '\x80' && | |
- (ch.toUpperCase() != ch.toLowerCase() || | |
- nonASCIISingleCaseWordChar.test(ch)); | |
+ ch > | |
+ '\x80' && | |
+ (ch.toUpperCase() != | |
+ ch.toLowerCase() || | |
+ nonASCIISingleCaseWordChar.test(ch)); | |
}; | |
function isWordChar(ch, helper) { | |
if (!helper) return isWordCharBasic(ch); | |
@@ -9560,7 +9842,10 @@ | |
elt('span', [test, document.createTextNode('x')]), | |
); | |
if (measure.firstChild.offsetHeight != 0) | |
- zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && | |
+ zwspSupported = test.offsetWidth <= | |
+ 1 && | |
+ test.offsetHeight > | |
+ 2 && | |
!(ie && ie_version < 8); | |
} | |
if (zwspSupported) return elt('span', '\u200B'); | |
@@ -9883,13 +10168,13 @@ | |
// Character types for codepoints 0x600 to 0x6ff | |
var arabicTypes = 'rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm'; | |
function charType(code) { | |
- if (code <= 0xf7) return lowTypes.charAt(code); | |
- else if (0x590 <= code && code <= 0x5f4) return 'R'; | |
- else if (0x600 <= code && code <= 0x6ed) | |
- return arabicTypes.charAt(code - 0x600); | |
- else if (0x6ee <= code && code <= 0x8ac) return 'r'; | |
- else if (0x2000 <= code && code <= 0x200b) return 'w'; | |
- else if (code == 0x200c) return 'b'; | |
+ if (code <= 247) return lowTypes.charAt(code); | |
+ else if (1424 <= code && code <= 1524) return 'R'; | |
+ else if (1536 <= code && code <= 1773) | |
+ return arabicTypes.charAt(code - 1536); | |
+ else if (1774 <= code && code <= 2220) return 'r'; | |
+ else if (8192 <= code && code <= 8203) return 'w'; | |
+ else if (code == 8204) return 'b'; | |
else return 'L'; | |
} | |
@@ -9960,8 +10245,13 @@ | |
else if (type == '%') { | |
for (var end = i + 1; end < len && types[end] == '%'; ++end) { | |
} | |
- var replace = i && types[i - 1] == '!' || | |
- end < len && types[end] == '1' | |
+ var replace = i && | |
+ types[i - 1] == | |
+ '!' || | |
+ end < | |
+ len && | |
+ types[end] == | |
+ '1' | |
? '1' | |
: 'N'; | |
for (var j = i; j < end; ++j) types[j] = replace; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/coffeescript.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/coffeescript.js | |
index 58765bc..3e368b2 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/coffeescript.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/coffeescript.js | |
@@ -324,9 +324,14 @@ | |
state.dedent += 1; | |
} | |
if ( | |
- (current === '->' || current === '=>') && !state.lambda && | |
+ current === | |
+ '->' || | |
+ current === | |
+ '=>' && | |
+ !state.lambda && | |
!stream.peek() || | |
- style === 'indent' | |
+ style === | |
+ 'indent' | |
) { | |
indent(stream, state); | |
} | |
@@ -352,7 +357,8 @@ | |
} | |
delimiter_index = '])}'.indexOf(current); | |
if (delimiter_index !== -1) { | |
- while (state.scope.type == 'coffee' && | |
+ while (state.scope.type == | |
+ 'coffee' && | |
state.scope.prev) state.scope = state.scope.prev; | |
if (state.scope.type == current) state.scope = state.scope.prev; | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/comment.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/comment.js | |
index d846ac0..e695a68 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/comment.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/comment.js | |
@@ -89,9 +89,7 @@ | |
var startString = options.blockCommentStart || mode.blockCommentStart; | |
var endString = options.blockCommentEnd || mode.blockCommentEnd; | |
if (!startString || !endString) { | |
- if ( | |
- (options.lineComment || mode.lineComment) && options.fullLines != false | |
- ) | |
+ if (options.lineComment || mode.lineComment && options.fullLines != false) | |
self.lineComment(from, to, options); | |
return; | |
} | |
@@ -174,7 +172,10 @@ | |
close = endLine.lastIndexOf(endString); | |
} | |
if ( | |
- open == -1 || close == -1 || | |
+ open == | |
+ -1 || | |
+ close == | |
+ -1 || | |
!/comment/.test(self.getTokenTypeAt(Pos(start, open + 1))) || | |
!/comment/.test(self.getTokenTypeAt(Pos(end, close + 1))) | |
) | |
@@ -189,8 +190,13 @@ | |
.slice(0, from.ch) | |
.indexOf(endString, lastStart + startString.length); | |
if ( | |
- lastStart != -1 && firstEnd != -1 && | |
- firstEnd + endString.length != from.ch | |
+ lastStart != | |
+ -1 && | |
+ firstEnd != | |
+ -1 && | |
+ firstEnd + | |
+ endString.length != | |
+ from.ch | |
) | |
return false; | |
// Positions of the first endString after the end of the selection, and the last startString before it. | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/css.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/css.js | |
index 2709e0a..621b541 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/css.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/css.js | |
@@ -43,7 +43,7 @@ | |
if (ch == '@') { | |
stream.eatWhile(/[\w\\\-]/); | |
return ret('def', stream.current()); | |
- } else if (ch == '=' || (ch == '~' || ch == '|') && stream.eat('=')) { | |
+ } else if (ch == '=' || ch == '~' || ch == '|' && stream.eat('=')) { | |
return ret(null, 'compare'); | |
} else if (ch == '"' || ch == "'") { | |
state.tokenize = tokenString(ch); | |
@@ -212,7 +212,8 @@ | |
if (type == '(') return pushContext(state, stream, 'parens'); | |
if ( | |
- type == 'hash' && | |
+ type == | |
+ 'hash' && | |
!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(stream.current()) | |
) { | |
override += ' error'; | |
@@ -339,12 +340,22 @@ | |
if (cx.type == 'prop' && (ch == '}' || ch == ')')) cx = cx.prev; | |
if ( | |
cx.prev && | |
- (ch == '}' && | |
- (cx.type == 'block' || cx.type == 'top' || | |
- cx.type == 'interpolation' || | |
- cx.type == 'font_face') || | |
- ch == ')' && (cx.type == 'parens' || cx.type == 'media_parens') || | |
- ch == '{' && (cx.type == 'at' || cx.type == 'media')) | |
+ (ch == | |
+ '}' && | |
+ (cx.type == | |
+ 'block' || | |
+ cx.type == | |
+ 'top' || | |
+ cx.type == | |
+ 'interpolation' || | |
+ cx.type == | |
+ 'font_face') || | |
+ ch == | |
+ ')' && | |
+ (cx.type == 'parens' || cx.type == 'media_parens') || | |
+ ch == | |
+ '{' && | |
+ (cx.type == 'at' || cx.type == 'media')) | |
) { | |
indent = cx.indent - indentUnit; | |
cx = cx.prev; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/headlesscodemirror.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/headlesscodemirror.js | |
index 619dda3..d1700b5 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/headlesscodemirror.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/headlesscodemirror.js | |
@@ -118,7 +118,9 @@ | |
if (typeof spec == 'string' && mimeModes.hasOwnProperty(spec)) { | |
spec = mimeModes[spec]; | |
} else if ( | |
- spec && typeof spec.name == 'string' && | |
+ spec && | |
+ typeof spec.name == | |
+ 'string' && | |
mimeModes.hasOwnProperty(spec.name) | |
) { | |
spec = mimeModes[spec.name]; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/htmlmixed.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/htmlmixed.js | |
index f95f1ec..695b538 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/htmlmixed.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/htmlmixed.js | |
@@ -58,8 +58,11 @@ | |
if (tagName) tagName = tagName.toLowerCase(); | |
var style = htmlMode.token(stream, state.htmlState); | |
if ( | |
- tagName == 'script' && /\btag\b/.test(style) && | |
- stream.current() == '>' | |
+ tagName == | |
+ 'script' && | |
+ /\btag\b/.test(style) && | |
+ stream.current() == | |
+ '>' | |
) { | |
// Script block: mode to change to depends on type attribute | |
var scriptType = stream.string | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/javascript.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/javascript.js | |
index 497e342..285e4f1 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/javascript.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/javascript.js | |
@@ -149,8 +149,12 @@ | |
stream.skipToEnd(); | |
return ret('comment', 'comment'); | |
} else if ( | |
- state.lastType == 'operator' || state.lastType == 'keyword c' || | |
- state.lastType == 'sof' || | |
+ state.lastType == | |
+ 'operator' || | |
+ state.lastType == | |
+ 'keyword c' || | |
+ state.lastType == | |
+ 'sof' || | |
/^[\[{}\(,;:]$/.test(state.lastType) | |
) { | |
readRegexp(stream); | |
@@ -399,8 +403,10 @@ | |
if (type == ';') return cont(); | |
if (type == 'if') { | |
if ( | |
- cx.state.lexical.info == 'else' && | |
- cx.state.cc[cx.state.cc.length - 1] == poplex | |
+ cx.state.lexical.info == | |
+ 'else' && | |
+ cx.state.cc[cx.state.cc.length - 1] == | |
+ poplex | |
) | |
cx.state.cc.pop()(); | |
return cont(pushlex('form'), expression, statement, poplex, maybeelse); | |
@@ -586,7 +592,7 @@ | |
function proceed(type) { | |
if (type == ',') { | |
var lex = cx.state.lexical; | |
- if (lex.info == 'call') lex.pos = (lex.pos || 0) + 1; | |
+ if (lex.info == 'call') lex.pos = lex.pos || 0 + 1; | |
return cont(what, proceed); | |
} | |
if (type == end) return cont(); | |
@@ -777,7 +783,7 @@ | |
lastType: 'sof', | |
cc: [], | |
lexical: new JSLexical( | |
- (basecolumn || 0) - indentUnit, | |
+ basecolumn || 0 - indentUnit, | |
0, | |
'block', | |
false, | |
@@ -802,7 +808,8 @@ | |
if (state.tokenize != tokenComment && stream.eatSpace()) return null; | |
var style = state.tokenize(stream, state); | |
if (type == 'comment') return style; | |
- state.lastType = type == 'operator' && | |
+ state.lastType = type == | |
+ 'operator' && | |
(content == '++' || content == '--') | |
? 'incdec' | |
: type; | |
@@ -840,8 +847,11 @@ | |
? statementIndent || indentUnit | |
: 0); | |
else if ( | |
- lexical.info == 'switch' && !closing && | |
- parserConfig.doubleIndentSwitch != false | |
+ lexical.info == | |
+ 'switch' && | |
+ !closing && | |
+ parserConfig.doubleIndentSwitch != | |
+ false | |
) | |
return lexical.indented + | |
(/^(?:case|default)\b/.test(textAfter) | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/markselection.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/markselection.js | |
index 8b59bfb..865614e 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/markselection.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/markselection.js | |
@@ -94,9 +94,15 @@ | |
var coverStart = array[0].find(), coverEnd = array[array.length - 1].find(); | |
if ( | |
- !coverStart || !coverEnd || to.line - from.line < CHUNK_SIZE || | |
- cmp(from, coverEnd.to) >= 0 || | |
- cmp(to, coverStart.from) <= 0 | |
+ !coverStart || | |
+ !coverEnd || | |
+ to.line - | |
+ from.line < | |
+ CHUNK_SIZE || | |
+ cmp(from, coverEnd.to) >= | |
+ 0 || | |
+ cmp(to, coverStart.from) <= | |
+ 0 | |
) | |
return reset(cm); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/matchbrackets.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/matchbrackets.js | |
index 87276d1..291b93b 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/matchbrackets.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/matchbrackets.js | |
@@ -25,7 +25,9 @@ | |
function findMatchingBracket(cm, where, strict, config) { | |
var line = cm.getLineHandle(where.line), pos = where.ch - 1; | |
- var match = pos >= 0 && matching[line.text.charAt(pos)] || | |
+ var match = pos >= | |
+ 0 && | |
+ matching[line.text.charAt(pos)] || | |
matching[line.text.charAt(++pos)]; | |
if (!match) return null; | |
var dir = match.charAt(1) == '>' ? 1 : -1; | |
@@ -74,8 +76,10 @@ | |
var ch = line.charAt(pos); | |
if ( | |
re.test(ch) && | |
- (style === undefined || | |
- cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style) | |
+ (style === | |
+ undefined || | |
+ cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == | |
+ style) | |
) { | |
var match = matching[ch]; | |
if (match.charAt(1) == '>' == dir > 0) stack.push(ch); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/overlay.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/overlay.js | |
index 8011f83..44cb683 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/overlay.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/overlay.js | |
@@ -45,8 +45,11 @@ | |
}, | |
token: function(stream, state) { | |
if ( | |
- stream.sol() || stream.string != state.lineSeen || | |
- Math.min(state.basePos, state.overlayPos) < stream.start | |
+ stream.sol() || | |
+ stream.string != | |
+ state.lineSeen || | |
+ Math.min(state.basePos, state.overlayPos) < | |
+ stream.start | |
) { | |
state.lineSeen = stream.string; | |
state.basePos = state.overlayPos = stream.start; | |
@@ -67,8 +70,12 @@ | |
// unless set to null | |
if (state.overlayCur == null) return state.baseCur; | |
else if ( | |
- state.baseCur != null && state.overlay.combineTokens || | |
- combine && state.overlay.combineTokens == null | |
+ state.baseCur != | |
+ null && | |
+ state.overlay.combineTokens || | |
+ combine && | |
+ state.overlay.combineTokens == | |
+ null | |
) | |
return state.baseCur + ' ' + state.overlayCur; | |
else | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/php.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/php.js | |
index 433abd1..fe6fb98 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/php.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/php.js | |
@@ -85,7 +85,8 @@ | |
} | |
// Normal string | |
- while (!stream.eol() && !stream.match('{$', false) && | |
+ while (!stream.eol() && | |
+ !stream.match('{$', false) && | |
(!stream.match(/(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/, false) || escaped)) { | |
next = stream.next(); | |
if (!escaped && next == '"') { | |
@@ -179,8 +180,12 @@ | |
function dispatch(stream, state) { | |
var isPHP = state.curMode == phpMode; | |
if ( | |
- stream.sol() && state.pending && state.pending != '"' && | |
- state.pending != "'" | |
+ stream.sol() && | |
+ state.pending && | |
+ state.pending != | |
+ '"' && | |
+ state.pending != | |
+ "'" | |
) | |
state.pending = null; | |
if (!isPHP) { | |
@@ -203,7 +208,9 @@ | |
var cur = stream.current(), openPHP = cur.search(/<\?/), m; | |
if (openPHP != -1) { | |
if ( | |
- style == 'string' && (m = cur.match(/[\'\"]$/)) && | |
+ style == | |
+ 'string' && | |
+ (m = cur.match(/[\'\"]$/)) && | |
!/\?>/.test(cur) | |
) | |
state.pending = m[0]; | |
@@ -252,8 +259,12 @@ | |
token: dispatch, | |
indent: function(state, textAfter) { | |
if ( | |
- state.curMode != phpMode && /^\s*<\//.test(textAfter) || | |
- state.curMode == phpMode && /^\?>/.test(textAfter) | |
+ state.curMode != | |
+ phpMode && | |
+ /^\s*<\//.test(textAfter) || | |
+ state.curMode == | |
+ phpMode && | |
+ /^\?>/.test(textAfter) | |
) | |
return htmlMode.indent(state.html, textAfter); | |
return state.curMode.indent(state.curState, textAfter); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/python.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/python.js | |
index bcfcdf9..f979fc6 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/python.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/python.js | |
@@ -273,7 +273,8 @@ | |
return null; | |
if ( | |
- stream.match(doubleOperators) || stream.match(singleOperators) || | |
+ stream.match(doubleOperators) || | |
+ stream.match(singleOperators) || | |
stream.match(wordOperators) | |
) | |
return 'operator'; | |
@@ -368,7 +369,7 @@ | |
return stream.match(identifiers, false) ? 'meta' : ERRORCLASS; | |
if ( | |
- (style == 'variable' || style == 'builtin') && state.lastStyle == 'meta' | |
+ style == 'variable' || style == 'builtin' && state.lastStyle == 'meta' | |
) | |
style = 'meta'; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/xml.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/xml.js | |
index 166e26e..7aa1c46 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/xml.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/cm/xml.js | |
@@ -241,7 +241,8 @@ | |
this.startOfLine = startOfLine; | |
if ( | |
Kludges.doNotIndent.hasOwnProperty(tagName) || | |
- state.context && state.context.noIndent | |
+ state.context && | |
+ state.context.noIndent | |
) | |
this.noIndent = true; | |
} | |
@@ -289,7 +290,9 @@ | |
if (type == 'word') { | |
var tagName = stream.current(); | |
if ( | |
- state.context && state.context.tagName != tagName && | |
+ state.context && | |
+ state.context.tagName != | |
+ tagName && | |
Kludges.implicitlyClosed.hasOwnProperty(state.context.tagName) | |
) | |
popContext(state); | |
@@ -327,7 +330,8 @@ | |
var tagName = state.tagName, tagStart = state.tagStart; | |
state.tagName = state.tagStart = null; | |
if ( | |
- type == 'selfcloseTag' || | |
+ type == | |
+ 'selfcloseTag' || | |
Kludges.autoSelfClosers.hasOwnProperty(tagName) | |
) { | |
maybePopContext(state, tagName); | |
@@ -381,7 +385,7 @@ | |
if (stream.eatSpace()) return null; | |
type = null; | |
var style = state.tokenize(stream, state); | |
- if ((style || type) && style != 'comment') { | |
+ if (style || type && style != 'comment') { | |
setStyle = null; | |
state.state = state.state(type || style, stream, state); | |
if (setStyle) | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Color.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Color.js | |
index 945712d..5df7f81 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Color.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Color.js | |
@@ -74,7 +74,10 @@ WebInspector.Color.parse = function(text) { | |
var format; | |
if (hex.length === 3) { | |
format = WebInspector.Color.Format.ShortHEX; | |
- hex = hex.charAt(0) + hex.charAt(0) + hex.charAt(1) + hex.charAt(1) + | |
+ hex = hex.charAt(0) + | |
+ hex.charAt(0) + | |
+ hex.charAt(1) + | |
+ hex.charAt(1) + | |
hex.charAt(2) + | |
hex.charAt(2); | |
} else format = WebInspector.Color.Format.HEX; | |
@@ -182,7 +185,7 @@ WebInspector.Color.fromHSVA = function(hsva) { | |
var s = hsva[1]; | |
var v = hsva[2]; | |
- var t = (2 - s) * v; | |
+ var t = 2 - s * v; | |
if (v === 0 || s === 0) s = 0; | |
else s *= v / (t < 1 ? t : 2 - t); | |
var hsla = [h, s, t / 2, hsva[3]]; | |
@@ -214,7 +217,7 @@ WebInspector.Color.prototype = { | |
var add = max + min; | |
if (min === max) var h = 0; | |
- else if (r === max) var h = (1 / 6 * (g - b) / diff + 1) % 1; | |
+ else if (r === max) var h = 1 / 6 * (g - b) / diff + 1 % 1; | |
else if (g === max) var h = 1 / 6 * (b - r) / diff + 1 / 3; | |
else var h = 1 / 6 * (r - g) / diff + 2 / 3; | |
@@ -453,9 +456,9 @@ WebInspector.Color._hsl2rgb = function(hsl) { | |
if (h < 0) h += 1; | |
else if (h > 1) h -= 1; | |
- if (h * 6 < 1) return p + (q - p) * h * 6; | |
+ if (h * 6 < 1) return p + q - p * h * 6; | |
else if (h * 2 < 1) return q; | |
- else if (h * 3 < 2) return p + (q - p) * (2 / 3 - h) * 6; | |
+ else if (h * 3 < 2) return p + q - p * (2 / 3 - h) * 6; | |
else return p; | |
} | |
@@ -629,16 +632,16 @@ WebInspector.Color.Nicknames = { | |
}; | |
WebInspector.Color.PageHighlight = { | |
- Content: WebInspector.Color.fromRGBA([111, 168, 220, .66]), | |
- ContentLight: WebInspector.Color.fromRGBA([111, 168, 220, .5]), | |
+ Content: WebInspector.Color.fromRGBA([111, 168, 220, 0.66]), | |
+ ContentLight: WebInspector.Color.fromRGBA([111, 168, 220, 0.5]), | |
ContentOutline: WebInspector.Color.fromRGBA([9, 83, 148]), | |
- Padding: WebInspector.Color.fromRGBA([147, 196, 125, .55]), | |
- PaddingLight: WebInspector.Color.fromRGBA([147, 196, 125, .4]), | |
- Border: WebInspector.Color.fromRGBA([255, 229, 153, .66]), | |
- BorderLight: WebInspector.Color.fromRGBA([255, 229, 153, .5]), | |
- Margin: WebInspector.Color.fromRGBA([246, 178, 107, .66]), | |
- MarginLight: WebInspector.Color.fromRGBA([246, 178, 107, .5]), | |
- EventTarget: WebInspector.Color.fromRGBA([255, 196, 196, .66]), | |
+ Padding: WebInspector.Color.fromRGBA([147, 196, 125, 0.55]), | |
+ PaddingLight: WebInspector.Color.fromRGBA([147, 196, 125, 0.4]), | |
+ Border: WebInspector.Color.fromRGBA([255, 229, 153, 0.66]), | |
+ BorderLight: WebInspector.Color.fromRGBA([255, 229, 153, 0.5]), | |
+ Margin: WebInspector.Color.fromRGBA([246, 178, 107, 0.66]), | |
+ MarginLight: WebInspector.Color.fromRGBA([246, 178, 107, 0.5]), | |
+ EventTarget: WebInspector.Color.fromRGBA([255, 196, 196, 0.66]), | |
Shape: WebInspector.Color.fromRGBA([96, 82, 177, 0.8]), | |
- ShapeMargin: WebInspector.Color.fromRGBA([96, 82, 127, .6]), | |
+ ShapeMargin: WebInspector.Color.fromRGBA([96, 82, 127, 0.6]), | |
}; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Geometry.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Geometry.js | |
index b4d53b5..704b07c 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Geometry.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Geometry.js | |
@@ -39,7 +39,7 @@ WebInspector.Geometry.Insets; | |
/** | |
* @type {number} | |
*/ | |
-WebInspector.Geometry._Eps = 1e-5; | |
+WebInspector.Geometry._Eps = 0.00001; | |
/** | |
* @constructor | |
@@ -93,8 +93,11 @@ WebInspector.Geometry.Point.prototype = { | |
* @return {string} | |
*/ | |
toString: function() { | |
- return Math.round(this.x * 100) / 100 + ', ' + | |
- Math.round(this.y * 100) / 100; | |
+ return Math.round(this.x * 100) / | |
+ 100 + | |
+ ', ' + | |
+ Math.round(this.y * 100) / | |
+ 100; | |
}, | |
}; | |
@@ -152,7 +155,16 @@ WebInspector.Geometry.CubicBezier.prototype = { | |
* @param {number} t | |
*/ | |
function evaluate(v1, v2, t) { | |
- return 3 * (1 - t) * (1 - t) * t * v1 + 3 * (1 - t) * t * t * v2 + | |
+ return 3 * | |
+ (1 - t) * | |
+ (1 - t) * | |
+ t * | |
+ v1 + | |
+ 3 * | |
+ (1 - t) * | |
+ t * | |
+ t * | |
+ v2 + | |
Math.pow(t, 3); | |
} | |
@@ -196,8 +208,10 @@ WebInspector.Geometry.EulerAngles.fromRotationMatrix = function( | |
var gamma = Math.atan2( | |
-rotationMatrix.m13, | |
Math.sqrt( | |
- rotationMatrix.m11 * rotationMatrix.m11 + | |
- rotationMatrix.m12 * rotationMatrix.m12, | |
+ rotationMatrix.m11 * | |
+ rotationMatrix.m11 + | |
+ rotationMatrix.m12 * | |
+ rotationMatrix.m12, | |
), | |
); | |
var alpha = Math.atan2(rotationMatrix.m12, rotationMatrix.m11); | |
@@ -248,9 +262,9 @@ WebInspector.Geometry.subtract = function(u, v) { | |
*/ | |
WebInspector.Geometry.multiplyVectorByMatrixAndNormalize = function(v, m) { | |
var t = v.x * m.m14 + v.y * m.m24 + v.z * m.m34 + m.m44; | |
- var x = (v.x * m.m11 + v.y * m.m21 + v.z * m.m31 + m.m41) / t; | |
- var y = (v.x * m.m12 + v.y * m.m22 + v.z * m.m32 + m.m42) / t; | |
- var z = (v.x * m.m13 + v.y * m.m23 + v.z * m.m33 + m.m43) / t; | |
+ var x = v.x * m.m11 + v.y * m.m21 + v.z * m.m31 + m.m41 / t; | |
+ var y = v.x * m.m12 + v.y * m.m22 + v.z * m.m32 + m.m42 / t; | |
+ var z = v.x * m.m13 + v.y * m.m23 + v.z * m.m33 + m.m43 / t; | |
return new WebInspector.Geometry.Vector(x, y, z); | |
}; | |
@@ -263,8 +277,10 @@ WebInspector.Geometry.calculateAngle = function(u, v) { | |
var uLength = u.length(); | |
var vLength = v.length(); | |
if ( | |
- uLength <= WebInspector.Geometry._Eps || | |
- vLength <= WebInspector.Geometry._Eps | |
+ uLength <= | |
+ WebInspector.Geometry._Eps || | |
+ vLength <= | |
+ WebInspector.Geometry._Eps | |
) | |
return 0; | |
var cos = WebInspector.Geometry.scalarProduct(u, v) / uLength / vLength; | |
@@ -396,8 +412,10 @@ function Constraints(minimum, preferred) { | |
this.preferred = preferred || this.minimum; | |
if ( | |
- this.minimum.width > this.preferred.width || | |
- this.minimum.height > this.preferred.height | |
+ this.minimum.width > | |
+ this.preferred.width || | |
+ this.minimum.height > | |
+ this.preferred.height | |
) | |
throw new Error('Minimum size is greater than preferred.'); | |
} | |
@@ -407,7 +425,8 @@ function Constraints(minimum, preferred) { | |
* @return {boolean} | |
*/ | |
Constraints.prototype.isEqual = function(constraints) { | |
- return !!constraints && this.minimum.isEqual(constraints.minimum) && | |
+ return !!constraints && | |
+ this.minimum.isEqual(constraints.minimum) && | |
this.preferred.isEqual(constraints.preferred); | |
}; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Object.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Object.js | |
index ca49015..4d41fab 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Object.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Object.js | |
@@ -59,8 +59,10 @@ WebInspector.Object.prototype = { | |
var listeners = this._listeners.get(eventType); | |
for (var i = 0; i < listeners.length; ++i) { | |
if ( | |
- listeners[i].listener === listener && | |
- listeners[i].thisObject === thisObject | |
+ listeners[i].listener === | |
+ listener && | |
+ listeners[i].thisObject === | |
+ thisObject | |
) | |
listeners.splice(i--, 1); | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/ParsedURL.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/ParsedURL.js | |
index ad2a4b4..501018d 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/ParsedURL.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/ParsedURL.js | |
@@ -140,7 +140,8 @@ WebInspector.ParsedURL.completeURL = function(baseURL, href) { | |
// Return special URLs as-is. | |
var trimmedHref = href.trim(); | |
if ( | |
- trimmedHref.startsWith('data:') || trimmedHref.startsWith('blob:') || | |
+ trimmedHref.startsWith('data:') || | |
+ trimmedHref.startsWith('blob:') || | |
trimmedHref.startsWith('javascript:') | |
) | |
return href; | |
@@ -180,7 +181,9 @@ WebInspector.ParsedURL.completeURL = function(baseURL, href) { | |
if (baseQuery !== -1) basePath = basePath.substring(0, baseQuery); | |
} | |
// else it must be a fragment | |
- return parsedURL.scheme + '://' + parsedURL.host + | |
+ return parsedURL.scheme + | |
+ '://' + | |
+ parsedURL.host + | |
(parsedURL.port ? ':' + parsedURL.port : '') + | |
basePath + | |
postfix; | |
@@ -196,7 +199,9 @@ WebInspector.ParsedURL.completeURL = function(baseURL, href) { | |
return parsedURL.scheme + ':' + path + postfix; | |
} | |
// else absolute path | |
- return parsedURL.scheme + '://' + parsedURL.host + | |
+ return parsedURL.scheme + | |
+ '://' + | |
+ parsedURL.host + | |
(parsedURL.port ? ':' + parsedURL.port : '') + | |
normalizePath(path) + | |
postfix; | |
@@ -212,7 +217,7 @@ WebInspector.ParsedURL.prototype = { | |
if (this.isAboutBlank()) return this.url; | |
this._displayName = this.lastPathComponent; | |
- if (!this._displayName) this._displayName = (this.host || '') + '/'; | |
+ if (!this._displayName) this._displayName = this.host || '' + '/'; | |
if (this._displayName === '/') this._displayName = this.url; | |
return this._displayName; | |
}, | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Settings.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Settings.js | |
index 9bbad11..b4b90aa 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Settings.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/Settings.js | |
@@ -282,7 +282,9 @@ WebInspector.Setting.prototype = { | |
} | |
} catch (e) { | |
WebInspector.console.error( | |
- 'Cannot stringify setting with name: ' + this._name + ', error: ' + | |
+ 'Cannot stringify setting with name: ' + | |
+ this._name + | |
+ ', error: ' + | |
e.message, | |
); | |
} | |
@@ -295,7 +297,8 @@ WebInspector.Setting.prototype = { | |
* @param {string} value | |
*/ | |
_printSettingsSavingError: function(message, name, value) { | |
- var errorMessage = 'Error saving setting with name: ' + this._name + | |
+ var errorMessage = 'Error saving setting with name: ' + | |
+ this._name + | |
', value length: ' + | |
value.length + | |
'. Error: ' + | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/TextRange.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/TextRange.js | |
index 8f97d13..b4758d7 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/TextRange.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/TextRange.js | |
@@ -78,8 +78,10 @@ WebInspector.TextRange.prototype = { | |
* @return {boolean} | |
*/ | |
isEmpty: function() { | |
- return this.startLine === this.endLine && | |
- this.startColumn === this.endColumn; | |
+ return this.startLine === | |
+ this.endLine && | |
+ this.startColumn === | |
+ this.endColumn; | |
}, | |
/** | |
* @param {!WebInspector.TextRange} range | |
@@ -87,8 +89,10 @@ WebInspector.TextRange.prototype = { | |
*/ | |
immediatelyPrecedes: function(range) { | |
if (!range) return false; | |
- return this.endLine === range.startLine && | |
- this.endColumn === range.startColumn; | |
+ return this.endLine === | |
+ range.startLine && | |
+ this.endColumn === | |
+ range.startColumn; | |
}, | |
/** | |
* @param {!WebInspector.TextRange} range | |
@@ -103,9 +107,12 @@ WebInspector.TextRange.prototype = { | |
* @return {boolean} | |
*/ | |
follows: function(range) { | |
- return range.endLine === this.startLine && | |
- range.endColumn <= this.startColumn || | |
- range.endLine < this.startLine; | |
+ return range.endLine === | |
+ this.startLine && | |
+ range.endColumn <= | |
+ this.startColumn || | |
+ range.endLine < | |
+ this.startLine; | |
}, | |
/** | |
* @return {number} | |
@@ -140,8 +147,12 @@ WebInspector.TextRange.prototype = { | |
*/ | |
normalize: function() { | |
if ( | |
- this.startLine > this.endLine || | |
- this.startLine === this.endLine && this.startColumn > this.endColumn | |
+ this.startLine > | |
+ this.endLine || | |
+ this.startLine === | |
+ this.endLine && | |
+ this.startColumn > | |
+ this.endColumn | |
) | |
return new WebInspector.TextRange( | |
this.endLine, | |
@@ -190,10 +201,14 @@ WebInspector.TextRange.prototype = { | |
* @return {boolean} | |
*/ | |
equal: function(other) { | |
- return this.startLine === other.startLine && | |
- this.endLine === other.endLine && | |
- this.startColumn === other.startColumn && | |
- this.endColumn === other.endColumn; | |
+ return this.startLine === | |
+ other.startLine && | |
+ this.endLine === | |
+ other.endLine && | |
+ this.startColumn === | |
+ other.startColumn && | |
+ this.endColumn === | |
+ other.endColumn; | |
}, | |
/** | |
* @param {number} lineOffset | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/TextUtils.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/TextUtils.js | |
index c005f82..dad5c3a 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/TextUtils.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/common/TextUtils.js | |
@@ -34,10 +34,26 @@ WebInspector.TextUtils = { | |
* @return {boolean} | |
*/ | |
isStopChar: function(char) { | |
- return char > ' ' && char < '0' || char > '9' && char < 'A' || | |
- char > 'Z' && char < '_' || | |
- char > '_' && char < 'a' || | |
- char > 'z' && char <= '~'; | |
+ return char > | |
+ ' ' && | |
+ char < | |
+ '0' || | |
+ char > | |
+ '9' && | |
+ char < | |
+ 'A' || | |
+ char > | |
+ 'Z' && | |
+ char < | |
+ '_' || | |
+ char > | |
+ '_' && | |
+ char < | |
+ 'a' || | |
+ char > | |
+ 'z' && | |
+ char <= | |
+ '~'; | |
}, | |
/** | |
* @param {string} char | |
@@ -107,7 +123,8 @@ WebInspector.TextUtils = { | |
*/ | |
lineIndent: function(line) { | |
var indentation = 0; | |
- while (indentation < line.length && | |
+ while (indentation < | |
+ line.length && | |
WebInspector.TextUtils.isSpaceChar( | |
line.charAt(indentation), | |
)) ++indentation; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DOMPresentationUtils.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DOMPresentationUtils.js | |
index 6462426..b33ee98 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DOMPresentationUtils.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/DOMPresentationUtils.js | |
@@ -183,7 +183,8 @@ WebInspector.DOMPresentationUtils.buildImagePreviewContents = function( | |
var resource = target.resourceTreeModel.resourceForURL(originalImageURL); | |
var imageURL = originalImageURL; | |
if ( | |
- !isImageResource(resource) && precomputedFeatures && | |
+ !isImageResource(resource) && | |
+ precomputedFeatures && | |
precomputedFeatures.currentSrc | |
) { | |
imageURL = precomputedFeatures.currentSrc; | |
@@ -210,7 +211,8 @@ WebInspector.DOMPresentationUtils.buildImagePreviewContents = function( | |
*/ | |
function isImageResource(resource) { | |
return !!resource && | |
- resource.resourceType() === WebInspector.resourceTypes.Image; | |
+ resource.resourceType() === | |
+ WebInspector.resourceTypes.Image; | |
} | |
function buildContent() { | |
@@ -342,7 +344,9 @@ WebInspector.DOMPresentationUtils.simpleSelector = function(node) { | |
var lowerCaseName = node.localName() || node.nodeName().toLowerCase(); | |
if (node.nodeType() !== Node.ELEMENT_NODE) return lowerCaseName; | |
if ( | |
- lowerCaseName === 'input' && node.getAttribute('type') && | |
+ lowerCaseName === | |
+ 'input' && | |
+ node.getAttribute('type') && | |
!node.getAttribute('id') && | |
!node.getAttribute('class') | |
) | |
@@ -350,7 +354,8 @@ WebInspector.DOMPresentationUtils.simpleSelector = function(node) { | |
if (node.getAttribute('id')) | |
return lowerCaseName + '#' + node.getAttribute('id'); | |
if (node.getAttribute('class')) | |
- return (lowerCaseName === 'div' ? '' : lowerCaseName) + '.' + | |
+ return (lowerCaseName === 'div' ? '' : lowerCaseName) + | |
+ '.' + | |
node.getAttribute('class').trim().replace(/\s+/g, '.'); | |
return lowerCaseName; | |
}; | |
@@ -400,8 +405,12 @@ WebInspector.DOMPresentationUtils._cssPathStep = function( | |
if (id) return new WebInspector.DOMNodePathStep(idSelector(id), true); | |
var nodeNameLower = node.nodeName().toLowerCase(); | |
if ( | |
- nodeNameLower === 'body' || nodeNameLower === 'head' || | |
- nodeNameLower === 'html' | |
+ nodeNameLower === | |
+ 'body' || | |
+ nodeNameLower === | |
+ 'head' || | |
+ nodeNameLower === | |
+ 'html' | |
) | |
return new WebInspector.DOMNodePathStep( | |
node.nodeNameInCorrectCase(), | |
@@ -477,7 +486,7 @@ WebInspector.DOMPresentationUtils._cssPathStep = function( | |
*/ | |
function isCSSIdentChar(c) { | |
if (/[a-zA-Z0-9_-]/.test(c)) return true; | |
- return c.charCodeAt(0) >= 0xA0; | |
+ return c.charCodeAt(0) >= 160; | |
} | |
/** | |
@@ -496,7 +505,7 @@ WebInspector.DOMPresentationUtils._cssPathStep = function( | |
var siblings = parent.children(); | |
for ( | |
var i = 0; | |
- (ownIndex === -1 || !needsNthChild) && i < siblings.length; | |
+ ownIndex === -1 || !needsNthChild && i < siblings.length; | |
++i | |
) { | |
var sibling = siblings[i]; | |
@@ -532,7 +541,9 @@ WebInspector.DOMPresentationUtils._cssPathStep = function( | |
var result = nodeName; | |
if ( | |
- isTargetNode && nodeName.toLowerCase() === 'input' && | |
+ isTargetNode && | |
+ nodeName.toLowerCase() === | |
+ 'input' && | |
node.getAttribute('type') && | |
!node.getAttribute('id') && | |
!node.getAttribute('class') | |
@@ -631,8 +642,10 @@ WebInspector.DOMPresentationUtils._xPathIndex = function(node) { | |
if (left === right) return true; | |
if ( | |
- left.nodeType() === Node.ELEMENT_NODE && | |
- right.nodeType() === Node.ELEMENT_NODE | |
+ left.nodeType() === | |
+ Node.ELEMENT_NODE && | |
+ right.nodeType() === | |
+ Node.ELEMENT_NODE | |
) | |
return left.localName() === right.localName(); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/Drawer.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/Drawer.js | |
index d722499..b42f56c 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/Drawer.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/Drawer.js | |
@@ -150,7 +150,8 @@ WebInspector.Drawer.prototype = { | |
_tabSelected: function(event) { | |
var tabId = this._tabbedPane.selectedTabId; | |
if ( | |
- tabId && event.data['isUserGesture'] && | |
+ tabId && | |
+ event.data['isUserGesture'] && | |
!this._tabbedPane.isTabCloseable(tabId) | |
) | |
this._lastSelectedViewSetting.set(tabId); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ExecutionContextSelector.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ExecutionContextSelector.js | |
index 30f21a1..4562858 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ExecutionContextSelector.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ExecutionContextSelector.js | |
@@ -62,7 +62,8 @@ WebInspector.ExecutionContextSelector.prototype = { | |
var targets = WebInspector.targetManager.targetsWithJSContext(); | |
if ( | |
- WebInspector.context.flavor(WebInspector.Target) === target && | |
+ WebInspector.context.flavor(WebInspector.Target) === | |
+ target && | |
targets.length | |
) | |
WebInspector.context.setFlavor(WebInspector.Target, targets[0]); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/HandlerRegistry.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/HandlerRegistry.js | |
index 8c853cf..820833a 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/HandlerRegistry.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/HandlerRegistry.js | |
@@ -91,9 +91,12 @@ WebInspector.HandlerRegistry.prototype = { | |
*/ | |
_appendContentProviderItems: function(contextMenu, target) { | |
if ( | |
- !(target instanceof WebInspector.UISourceCode || | |
- target instanceof WebInspector.Resource || | |
- target instanceof WebInspector.NetworkRequest) | |
+ !(target instanceof | |
+ WebInspector.UISourceCode || | |
+ target instanceof | |
+ WebInspector.Resource || | |
+ target instanceof | |
+ WebInspector.NetworkRequest) | |
) | |
return; | |
var contentProvider /** @type {!WebInspector.ContentProvider} */ = target; | |
@@ -125,9 +128,12 @@ WebInspector.HandlerRegistry.prototype = { | |
var contentType = contentProvider.contentType(); | |
if ( | |
- contentType !== WebInspector.resourceTypes.Document && | |
- contentType !== WebInspector.resourceTypes.Stylesheet && | |
- contentType !== WebInspector.resourceTypes.Script | |
+ contentType !== | |
+ WebInspector.resourceTypes.Document && | |
+ contentType !== | |
+ WebInspector.resourceTypes.Stylesheet && | |
+ contentType !== | |
+ WebInspector.resourceTypes.Script | |
) | |
return; | |
@@ -168,7 +174,8 @@ WebInspector.HandlerRegistry.prototype = { | |
if ( | |
uiSourceCode.project().type() !== | |
WebInspector.projectTypes.FileSystem && | |
- uiSourceCode.project().type() !== WebInspector.projectTypes.Snippets | |
+ uiSourceCode.project().type() !== | |
+ WebInspector.projectTypes.Snippets | |
) | |
contextMenu.appendItem( | |
WebInspector.UIString.capitalize('Save ^as...'), | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/InspectorView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/InspectorView.js | |
index c6d8369..ca7c4bb 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/InspectorView.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/InspectorView.js | |
@@ -405,13 +405,17 @@ WebInspector.InspectorView.prototype = { | |
var panelShortcutEnabled = WebInspector.settings.shortcutPanelSwitch.get(); | |
if (panelShortcutEnabled && !event.shiftKey && !event.altKey) { | |
var panelIndex = -1; | |
- if (event.keyCode > 0x30 && event.keyCode < 0x3A) | |
- panelIndex = event.keyCode - 0x31; | |
+ if (event.keyCode > 48 && event.keyCode < 58) | |
+ panelIndex = event.keyCode - 49; | |
else if ( | |
- event.keyCode > 0x60 && event.keyCode < 0x6A && | |
- keyboardEvent.location === KeyboardEvent.DOM_KEY_LOCATION_NUMPAD | |
+ event.keyCode > | |
+ 96 && | |
+ event.keyCode < | |
+ 106 && | |
+ keyboardEvent.location === | |
+ KeyboardEvent.DOM_KEY_LOCATION_NUMPAD | |
) | |
- panelIndex = event.keyCode - 0x61; | |
+ panelIndex = event.keyCode - 97; | |
if (panelIndex !== -1) { | |
var panelName = this._tabbedPane.allTabs()[panelIndex]; | |
if (panelName) { | |
@@ -431,7 +435,7 @@ WebInspector.InspectorView.prototype = { | |
if ( | |
!WebInspector.isWin() || | |
!this._openBracketIdentifiers[event.keyIdentifier] && | |
- !this._closeBracketIdentifiers[event.keyIdentifier] | |
+ !this._closeBracketIdentifiers[event.keyIdentifier] | |
) { | |
this._keyDownInternal(event); | |
return; | |
@@ -465,7 +469,7 @@ WebInspector.InspectorView.prototype = { | |
_changePanelInDirection: function(direction) { | |
var panelOrder = this._tabbedPane.allTabs(); | |
var index = panelOrder.indexOf(this.currentPanel().name); | |
- index = (index + panelOrder.length + direction) % panelOrder.length; | |
+ index = index + panelOrder.length + direction % panelOrder.length; | |
this.showPanel(panelOrder[index]); | |
}, | |
/** | |
@@ -492,7 +496,8 @@ WebInspector.InspectorView.prototype = { | |
); | |
if ( | |
!this._history.length || | |
- this._history[this._history.length - 1] !== panelName | |
+ this._history[this._history.length - 1] !== | |
+ panelName | |
) | |
this._history.push(panelName); | |
this._historyIterator = this._history.length - 1; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ObjectPropertiesSection.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ObjectPropertiesSection.js | |
index 33b621c..a4843f9 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ObjectPropertiesSection.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/components/ObjectPropertiesSection.js | |
@@ -181,7 +181,8 @@ WebInspector.ObjectPropertyTreeElement.prototype = { | |
ondblclick: function(event) { | |
var editableElement = this.valueElement; | |
if ( | |
- (this.property.writable || this.property.setter) && | |
+ this.property.writable || | |
+ this.property.setter && | |
event.target.isSelfOrDescendant(editableElement) | |
) | |
this._startEditing(); | |
@@ -373,7 +374,6 @@ WebInspector.ObjectPropertyTreeElement.prototype = { | |
this.updateSiblings(); | |
} | |
} | |
- | |
}, | |
/** | |
* @return {string|undefined} | |
@@ -541,9 +541,15 @@ WebInspector.ObjectPropertyTreeElement.populateWithProperties = function( | |
)); | |
} | |
if ( | |
- value && value.type === 'object' && | |
- (value.subtype === 'map' || value.subtype === 'set' || | |
- value.subtype === 'iterator') | |
+ value && | |
+ value.type === | |
+ 'object' && | |
+ (value.subtype === | |
+ 'map' || | |
+ value.subtype === | |
+ 'set' || | |
+ value.subtype === | |
+ 'iterator') | |
) | |
treeNode.appendChild(new WebInspector.CollectionEntriesMainTreeElement( | |
value, | |
@@ -871,10 +877,14 @@ WebInspector.ArrayGroupingTreeElement._populateRanges = function( | |
getOwnPropertyNamesThreshold, | |
) { | |
var ownPropertyNames = null; | |
- var consecutiveRange = toIndex - fromIndex >= sparseIterationThreshold && | |
+ var consecutiveRange = toIndex - | |
+ fromIndex >= | |
+ sparseIterationThreshold && | |
ArrayBuffer.isView(this); | |
var skipGetOwnPropertyNames = consecutiveRange && | |
- toIndex - fromIndex >= getOwnPropertyNamesThreshold; | |
+ toIndex - | |
+ fromIndex >= | |
+ getOwnPropertyNamesThreshold; | |
function* arrayIndexes(object) { | |
if (toIndex - fromIndex < sparseIterationThreshold) { | |
@@ -1077,7 +1087,7 @@ WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties = function( | |
for (var i = 0; i < names.length; ++i) { | |
var name = names[i]; | |
// Array index check according to the ES5-15.4. | |
- if (String(name >>> 0) === name && name >>> 0 !== 0xffffffff) continue; | |
+ if (String(name >>> 0) === name && name >>> 0 !== 4294967295) continue; | |
var descriptor = Object.getOwnPropertyDescriptor(this, name); | |
if (descriptor) Object.defineProperty(result, name, descriptor); | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsolePanel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsolePanel.js | |
index 94b57e6..cc18949 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsolePanel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsolePanel.js | |
@@ -95,7 +95,8 @@ WebInspector.ConsolePanel.WrapperView.prototype = { | |
wasShown: function() { | |
if ( | |
!WebInspector.inspectorView.currentPanel() || | |
- WebInspector.inspectorView.currentPanel().name !== 'console' | |
+ WebInspector.inspectorView.currentPanel().name !== | |
+ 'console' | |
) | |
this._showViewInWrapper(); | |
}, | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleView.js | |
index 163bf0c..a1659dc 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleView.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleView.js | |
@@ -355,7 +355,8 @@ WebInspector.ConsoleView.prototype = { | |
.executionContexts() | |
.forEach(this._executionContextCreated, this); | |
if ( | |
- WebInspector.targetManager.targets().length > 1 && | |
+ WebInspector.targetManager.targets().length > | |
+ 1 && | |
WebInspector.targetManager.mainTarget().isPage() | |
) | |
this._showAllMessagesCheckbox.element.classList.toggle('hidden', false); | |
@@ -640,8 +641,10 @@ WebInspector.ConsoleView.prototype = { | |
} | |
if ( | |
- message.type === WebInspector.ConsoleMessage.MessageType.Command || | |
- message.type === WebInspector.ConsoleMessage.MessageType.Result | |
+ message.type === | |
+ WebInspector.ConsoleMessage.MessageType.Command || | |
+ message.type === | |
+ WebInspector.ConsoleMessage.MessageType.Result | |
) | |
message.timestamp = this._consoleMessages.length | |
? this._consoleMessages.peekLast().consoleMessage().timestamp | |
@@ -708,8 +711,10 @@ WebInspector.ConsoleView.prototype = { | |
.consoleMessage() | |
.originatingMessage(); | |
if ( | |
- lastMessage && originatingMessage && | |
- lastMessage.consoleMessage() === originatingMessage | |
+ lastMessage && | |
+ originatingMessage && | |
+ lastMessage.consoleMessage() === | |
+ originatingMessage | |
) | |
lastMessage.toMessageElement().classList.add( | |
'console-adjacent-user-command-result', | |
@@ -876,13 +881,12 @@ WebInspector.ConsoleView.prototype = { | |
var progressIndicator = new WebInspector.ProgressIndicator(); | |
progressIndicator.setTitle(WebInspector.UIString('Writing file\u2026')); | |
- progressIndicator.setTotalWork(this.itemCount()); /** @const */ | |
+ progressIndicator.setTotalWork(this.itemCount()); | |
+ /** @const */ | |
var chunkSize = 350; | |
var messageIndex = 0; | |
- stream.open( | |
- filename, | |
- openCallback.bind(this), | |
- ); /** | |
+ stream.open(filename, openCallback.bind(this)); | |
+ /** | |
* @param {boolean} accepted | |
* @this {WebInspector.ConsoleView} | |
*/ | |
@@ -892,7 +896,8 @@ WebInspector.ConsoleView.prototype = { | |
progressIndicator.element, | |
); | |
writeNextChunk.call(this, stream); | |
- } /** | |
+ } | |
+ /** | |
* @param {!WebInspector.OutputStream} stream | |
* @param {string=} error | |
* @this {WebInspector.ConsoleView} | |
@@ -909,9 +914,8 @@ WebInspector.ConsoleView.prototype = { | |
i < chunkSize && i + messageIndex < this.itemCount(); | |
++i | |
) { | |
- var message = this.itemElement( | |
- messageIndex + i, | |
- ); // Ensure DOM element for console message. | |
+ var message = this.itemElement(messageIndex + i); | |
+ // Ensure DOM element for console message. | |
message.element(); | |
lines.push(message.renderedText()); | |
} | |
@@ -926,7 +930,8 @@ WebInspector.ConsoleView.prototype = { | |
*/, | |
_tryToCollapseMessages: function(lastMessage, viewMessage) { | |
if ( | |
- !WebInspector.settings.consoleTimestampsEnabled.get() && viewMessage && | |
+ !WebInspector.settings.consoleTimestampsEnabled.get() && | |
+ viewMessage && | |
!lastMessage.consoleMessage().isGroupMessage() && | |
lastMessage.consoleMessage().isEqual(viewMessage.consoleMessage()) | |
) { | |
@@ -1261,7 +1266,8 @@ WebInspector.ConsoleView.prototype = { | |
matchRange.highlightNode.scrollIntoViewIfNeeded(); | |
}, | |
__proto__: WebInspector.VBox.prototype, | |
-}; /** | |
+}; | |
+/** | |
* @constructor | |
* @extends {WebInspector.Object} | |
* @param {!WebInspector.ConsoleView} view | |
@@ -1351,7 +1357,8 @@ WebInspector.ConsoleViewFilter.prototype = { | |
if (message.target() !== executionContext.target()) return false; | |
if ( | |
message.executionContextId && | |
- message.executionContextId !== executionContext.id | |
+ message.executionContextId !== | |
+ executionContext.id | |
) { | |
return false; | |
} | |
@@ -1359,13 +1366,15 @@ WebInspector.ConsoleViewFilter.prototype = { | |
if ( | |
WebInspector.settings.hideNetworkMessages.get() && | |
viewMessage.consoleMessage().source === | |
- WebInspector.ConsoleMessage.MessageSource.Network | |
+ WebInspector.ConsoleMessage.MessageSource.Network | |
) | |
return false; | |
if (viewMessage.consoleMessage().isGroupMessage()) return true; | |
if ( | |
- message.type === WebInspector.ConsoleMessage.MessageType.Result || | |
- message.type === WebInspector.ConsoleMessage.MessageType.Command | |
+ message.type === | |
+ WebInspector.ConsoleMessage.MessageType.Result || | |
+ message.type === | |
+ WebInspector.ConsoleMessage.MessageType.Command | |
) | |
return true; | |
if (message.url && this._messageURLFilters[message.url]) return false; | |
@@ -1387,7 +1396,8 @@ WebInspector.ConsoleViewFilter.prototype = { | |
this._filterChanged(); | |
}, | |
__proto__: WebInspector.Object.prototype, | |
-}; /** | |
+}; | |
+/** | |
* @constructor | |
* @extends {WebInspector.ConsoleViewMessage} | |
* @param {!WebInspector.ConsoleMessage} message | |
@@ -1456,7 +1466,8 @@ WebInspector.ConsoleCommand.prototype = { | |
return highlightNodes; | |
}, | |
__proto__: WebInspector.ConsoleViewMessage.prototype, | |
-}; /** | |
+}; | |
+/** | |
* @constructor | |
* @extends {WebInspector.ConsoleViewMessage} | |
* @param {!WebInspector.ConsoleMessage} message | |
@@ -1487,7 +1498,8 @@ WebInspector.ConsoleCommandResult.prototype = { | |
return element; | |
}, | |
__proto__: WebInspector.ConsoleViewMessage.prototype, | |
-}; /** | |
+}; | |
+/** | |
* @constructor | |
* @param {?WebInspector.ConsoleGroup} parentGroup | |
* @param {?WebInspector.ConsoleViewMessage} groupMessage | |
@@ -1495,9 +1507,12 @@ WebInspector.ConsoleCommandResult.prototype = { | |
WebInspector.ConsoleGroup = function(parentGroup, groupMessage) { | |
this._parentGroup = parentGroup; | |
this._nestingLevel = parentGroup ? parentGroup.nestingLevel() + 1 : 0; | |
- this._messagesHidden = groupMessage && groupMessage.collapsed() || | |
- this._parentGroup && this._parentGroup.messagesHidden(); | |
-}; /** | |
+ this._messagesHidden = groupMessage && | |
+ groupMessage.collapsed() || | |
+ this._parentGroup && | |
+ this._parentGroup.messagesHidden(); | |
+}; | |
+/** | |
* @return {!WebInspector.ConsoleGroup} | |
*/ | |
WebInspector.ConsoleGroup.createTopGroup = function() { | |
@@ -1520,7 +1535,8 @@ WebInspector.ConsoleGroup.prototype = { | |
parentGroup: function() { | |
return this._parentGroup || this; | |
}, | |
-}; /** | |
+}; | |
+/** | |
* @constructor | |
* @implements {WebInspector.ActionDelegate} | |
*/ | |
@@ -1535,7 +1551,8 @@ WebInspector.ConsoleView.ShowConsoleActionDelegate.prototype = { | |
WebInspector.console.show(); | |
return true; | |
}, | |
-}; /** | |
+}; | |
+/** | |
* @typedef {{messageIndex: number, highlightNode: !Element}} | |
*/ | |
WebInspector.ConsoleView.RegexMatchRange; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleViewMessage.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleViewMessage.js | |
index 4e4b5a0..75919a4 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleViewMessage.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/ConsoleViewMessage.js | |
@@ -186,8 +186,10 @@ WebInspector.ConsoleViewMessage.prototype = { | |
default: | |
if ( | |
consoleMessage.parameters && | |
- consoleMessage.parameters.length === 1 && | |
- consoleMessage.parameters[0].type === 'string' | |
+ consoleMessage.parameters.length === | |
+ 1 && | |
+ consoleMessage.parameters[0].type === | |
+ 'string' | |
) | |
this._messageElement = this._tryFormatAsError /**@type {string} */( | |
consoleMessage.parameters[0].value, | |
@@ -305,8 +307,9 @@ WebInspector.ConsoleViewMessage.prototype = { | |
(consoleMessage.source === | |
WebInspector.ConsoleMessage.MessageSource.Network || | |
consoleMessage.level === | |
- WebInspector.ConsoleMessage.MessageLevel.Error || | |
- consoleMessage.type === WebInspector.ConsoleMessage.MessageType.Trace); | |
+ WebInspector.ConsoleMessage.MessageLevel.Error || | |
+ consoleMessage.type === | |
+ WebInspector.ConsoleMessage.MessageType.Trace); | |
if (dumpStackTrace) { | |
var treeOutline = new TreeOutline(); | |
treeOutline.element.classList.add( | |
@@ -415,7 +418,8 @@ WebInspector.ConsoleViewMessage.prototype = { | |
isErrorOrWarning: function() { | |
return this._message.level === | |
WebInspector.ConsoleMessage.MessageLevel.Warning || | |
- this._message.level === WebInspector.ConsoleMessage.MessageLevel.Error; | |
+ this._message.level === | |
+ WebInspector.ConsoleMessage.MessageLevel.Error; | |
}, | |
_format: function(parameters) { | |
// This node is used like a Builder. Values are continually appended onto it. | |
@@ -448,8 +452,10 @@ WebInspector.ConsoleViewMessage.prototype = { | |
// There can be string log and string eval result. We distinguish between them based on message type. | |
var shouldFormatMessage = WebInspector.RemoteObject.type(parameters[0]) === | |
'string' && | |
- (this._message.type !== WebInspector.ConsoleMessage.MessageType.Result || | |
- this._message.level === WebInspector.ConsoleMessage.MessageLevel.Error); | |
+ (this._message.type !== | |
+ WebInspector.ConsoleMessage.MessageType.Result || | |
+ this._message.level === | |
+ WebInspector.ConsoleMessage.MessageLevel.Error); | |
// Multiple parameters with the first being a format string. Save unused substitutions. | |
if (shouldFormatMessage) { | |
@@ -579,7 +585,7 @@ WebInspector.ConsoleViewMessage.prototype = { | |
return; | |
} | |
- var title = (response.functionName || 'function') + '()'; | |
+ var title = response.functionName || 'function' + '()'; | |
if (response.location) { | |
var anchor = this._linkifier.linkifyRawLocation(response.location, ''); | |
anchor.textContent = title; | |
@@ -660,13 +666,15 @@ WebInspector.ConsoleViewMessage.prototype = { | |
var maxFlatArrayLength = 100; | |
if ( | |
this.useArrayPreviewInFormatter(array) || | |
- array.arrayLength() > maxFlatArrayLength | |
+ array.arrayLength() > | |
+ maxFlatArrayLength | |
) | |
this._formatParameterAsArrayOrObject( | |
array, | |
elem, | |
this.useArrayPreviewInFormatter(array) || | |
- array.arrayLength() <= maxFlatArrayLength, | |
+ array.arrayLength() <= | |
+ maxFlatArrayLength, | |
); | |
else | |
array.getAllProperties(false, this._printArray.bind(this, array, elem)); | |
@@ -836,7 +844,8 @@ WebInspector.ConsoleViewMessage.prototype = { | |
object, | |
propertyPath, | |
onInvokeGetterClick.bind(this), | |
- ); /** | |
+ ); | |
+ /** | |
* @param {?WebInspector.RemoteObject} result | |
* @param {boolean=} wasThrown | |
* @this {WebInspector.ConsoleViewMessage} | |
@@ -878,7 +887,8 @@ WebInspector.ConsoleViewMessage.prototype = { | |
* @param {!Element} formattedResult | |
*/, | |
_formatWithSubstitutionString: function(format, parameters, formattedResult) { | |
- var formatters = {}; /** | |
+ var formatters = {}; | |
+ /** | |
* @param {boolean} force | |
* @param {!WebInspector.RemoteObject} obj | |
* @return {!Element} | |
@@ -933,13 +943,17 @@ WebInspector.ConsoleViewMessage.prototype = { | |
if (property.startsWith(prefixes[i])) return true; | |
} | |
return false; | |
- } // Firebug uses %o for formatting objects. | |
+ } | |
+ // Firebug uses %o for formatting objects. | |
formatters.o = parameterFormatter.bind(this, false); | |
formatters.s = stringFormatter; | |
- formatters.f = floatFormatter; // Firebug allows both %i and %d for formatting integers. | |
+ formatters.f = floatFormatter; | |
+ // Firebug allows both %i and %d for formatting integers. | |
formatters.i = integerFormatter; | |
- formatters.d = integerFormatter; // Firebug uses %c for styling the message. | |
- formatters.c = styleFormatter; // Support %O to force object formatting, instead of the type-based %o formatting. | |
+ formatters.d = integerFormatter; | |
+ // Firebug uses %c for styling the message. | |
+ formatters.c = styleFormatter; | |
+ // Support %O to force object formatting, instead of the type-based %o formatting. | |
formatters.O = parameterFormatter.bind(this, true); | |
formatters._ = bypassFormatter; | |
function append(a, b) { | |
@@ -955,7 +969,8 @@ WebInspector.ConsoleViewMessage.prototype = { | |
a.appendChild(toAppend); | |
} | |
return a; | |
- } // String.format does treat formattedResult like a Builder, result is an object. | |
+ } | |
+ // String.format does treat formattedResult like a Builder, result is an object. | |
return String.format( | |
format, | |
parameters, | |
@@ -1038,7 +1053,7 @@ WebInspector.ConsoleViewMessage.prototype = { | |
this._message.type === | |
WebInspector.ConsoleMessage.MessageType.StartGroup || | |
this._message.type === | |
- WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed | |
+ WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed | |
) | |
element.classList.add('console-group-title'); | |
element.appendChild(this.formattedMessage()); | |
@@ -1207,7 +1222,12 @@ WebInspector.ConsoleViewMessage.prototype = { | |
levelString = 'Info'; | |
break; | |
} | |
- return sourceString + ' ' + typeString + ' ' + levelString + ': ' + | |
+ return sourceString + | |
+ ' ' + | |
+ typeString + | |
+ ' ' + | |
+ levelString + | |
+ ': ' + | |
this.formattedMessage().textContent + | |
'\n' + | |
this._message.url + | |
@@ -1324,7 +1344,8 @@ WebInspector.ConsoleViewMessage.prototype = { | |
); | |
return formattedResult; | |
}, | |
-}; /** | |
+}; | |
+/** | |
* @constructor | |
* @extends {WebInspector.ConsoleViewMessage} | |
* @param {!WebInspector.ConsoleMessage} consoleMessage | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/CustomPreviewSection.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/CustomPreviewSection.js | |
index 15d53a7..7381de0 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/CustomPreviewSection.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/console/CustomPreviewSection.js | |
@@ -98,7 +98,8 @@ WebInspector.CustomPreviewSection.prototype = { | |
} | |
if (!value.match(valueRegEx)) { | |
WebInspector.console.error( | |
- 'Broken formatter: style attribute value' + value + | |
+ 'Broken formatter: style attribute value' + | |
+ value + | |
' is not allowed!', | |
); | |
return false; | |
@@ -136,7 +137,10 @@ WebInspector.CustomPreviewSection.prototype = { | |
for (var key in attributes) { | |
var value = attributes[key]; | |
if ( | |
- key !== 'style' || typeof value !== 'string' || | |
+ key !== | |
+ 'style' || | |
+ typeof value !== | |
+ 'string' || | |
!this._validateStyleAttributes(value) | |
) | |
continue; | |
@@ -212,14 +216,21 @@ WebInspector.CustomPreviewSection.prototype = { | |
*/ | |
function substituteObjectTagsInCustomPreview(jsonMLObject) { | |
if ( | |
- !jsonMLObject || typeof jsonMLObject !== 'object' || | |
- typeof jsonMLObject.splice !== 'function' | |
+ !jsonMLObject || | |
+ typeof jsonMLObject !== | |
+ 'object' || | |
+ typeof jsonMLObject.splice !== | |
+ 'function' | |
) | |
return; | |
var obj = jsonMLObject.length; | |
if ( | |
- !(typeof obj === 'number' && obj >>> 0 === obj && | |
+ !(typeof obj === | |
+ 'number' && | |
+ obj >>> | |
+ 0 === | |
+ obj && | |
(obj > 0 || 1 / obj > 0)) | |
) | |
return; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionAPI.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionAPI.js | |
index 4b99823..1c596d0 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionAPI.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionAPI.js | |
@@ -383,7 +383,12 @@ function injectedExtensionAPI(injectedScriptId) { | |
function getter() { | |
if (!warningGiven) { | |
console.warn( | |
- className + '.' + oldName + ' is deprecated. Use ' + className + '.' + | |
+ className + | |
+ '.' + | |
+ oldName + | |
+ ' is deprecated. Use ' + | |
+ className + | |
+ '.' + | |
newName + | |
' instead', | |
); | |
@@ -797,9 +802,12 @@ function injectedExtensionAPI(injectedScriptId) { | |
const Esc = 'U+001B'; | |
// We only care about global hotkeys, not about random text | |
if ( | |
- !event.ctrlKey && !event.altKey && !event.metaKey && | |
+ !event.ctrlKey && | |
+ !event.altKey && | |
+ !event.metaKey && | |
!/^F\d+$/.test(event.keyIdentifier) && | |
- event.keyIdentifier !== Esc | |
+ event.keyIdentifier !== | |
+ Esc | |
) | |
return; | |
var requestPayload = { | |
@@ -967,7 +975,9 @@ function platformExtensionAPI(coreAPI) { | |
* @return {string} | |
*/ | |
function buildPlatformExtensionAPI(extensionInfo, inspectedTabId) { | |
- return 'var extensionInfo = ' + JSON.stringify(extensionInfo) + ';' + | |
+ return 'var extensionInfo = ' + | |
+ JSON.stringify(extensionInfo) + | |
+ ';' + | |
'var tabId = ' + | |
inspectedTabId + | |
';' + | |
@@ -980,7 +990,8 @@ function buildPlatformExtensionAPI(extensionInfo, inspectedTabId) { | |
* @return {string} | |
*/ | |
function buildExtensionAPIInjectedScript(extensionInfo, inspectedTabId) { | |
- return '(function(injectedScriptId){ ' + 'var extensionServer;' + | |
+ return '(function(injectedScriptId){ ' + | |
+ 'var extensionServer;' + | |
defineCommonExtensionSymbols.toString() + | |
';' + | |
injectedExtensionAPI.toString() + | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionServer.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionServer.js | |
index 3d7b0c5..371aea6 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionServer.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/extensions/ExtensionServer.js | |
@@ -449,7 +449,8 @@ WebInspector.ExtensionServer.prototype = { | |
}, | |
_onSetOpenResourceHandler: function(message, port) { | |
var name = this._registeredExtensions[port._extensionOrigin].name || | |
- 'Extension ' + port._extensionOrigin; | |
+ 'Extension ' + | |
+ port._extensionOrigin; | |
if (message.handlerPresent) | |
WebInspector.openAnchorLocationRegistry.registerHandler( | |
name, | |
@@ -687,9 +688,12 @@ WebInspector.ExtensionServer.prototype = { | |
*/ | |
function handleEventEntry(entry) { | |
if ( | |
- !entry.ctrlKey && !entry.altKey && !entry.metaKey && | |
+ !entry.ctrlKey && | |
+ !entry.altKey && | |
+ !entry.metaKey && | |
!/^F\d+$/.test(entry.keyIdentifier) && | |
- entry.keyIdentifier !== Esc | |
+ entry.keyIdentifier !== | |
+ Esc | |
) | |
return; | |
// Fool around closure compiler -- it has its own notion of both KeyboardEvent constructor | |
@@ -1063,15 +1067,18 @@ WebInspector.ExtensionServer.prototype = { | |
for (var i = 0; i < executionContexts.length; ++i) { | |
var executionContext = executionContexts[i]; | |
if ( | |
- executionContext.frameId === frame.id && | |
- executionContext.origin === contextSecurityOrigin && | |
+ executionContext.frameId === | |
+ frame.id && | |
+ executionContext.origin === | |
+ contextSecurityOrigin && | |
!executionContext.isMainWorldContext | |
) | |
context = executionContext; | |
} | |
if (!context) { | |
console.warn( | |
- 'The JavaScript context ' + contextSecurityOrigin + | |
+ 'The JavaScript context ' + | |
+ contextSecurityOrigin + | |
' was not found in the frame ' + | |
frame.url, | |
); | |
@@ -1081,7 +1088,8 @@ WebInspector.ExtensionServer.prototype = { | |
for (var i = 0; i < executionContexts.length; ++i) { | |
var executionContext = executionContexts[i]; | |
if ( | |
- executionContext.frameId === frame.id && | |
+ executionContext.frameId === | |
+ frame.id && | |
executionContext.isMainWorldContext | |
) | |
context = executionContext; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/host/InspectorFrontendHost.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/host/InspectorFrontendHost.js | |
index bc8b374..02ba227 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/host/InspectorFrontendHost.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/host/InspectorFrontendHost.js | |
@@ -606,7 +606,8 @@ var InspectorFrontendHost = window.InspectorFrontendHost || null; | |
*/ | |
function stub(name) { | |
console.error( | |
- 'Incompatible embedder: method InspectorFrontendHost.' + name + | |
+ 'Incompatible embedder: method InspectorFrontendHost.' + | |
+ name + | |
' is missing. Using stub instead.', | |
); | |
var args = Array.prototype.slice.call(arguments, 1); | |
@@ -622,7 +623,8 @@ var InspectorFrontendHost = window.InspectorFrontendHost || null; | |
*/ | |
function InspectorFrontendAPIImpl() { | |
this._debugFrontend = !!Runtime.queryParam('debugFrontend') || | |
- window['InspectorTest'] && window['InspectorTest']['debugTest']; | |
+ window['InspectorTest'] && | |
+ window['InspectorTest']['debugTest']; | |
var descriptors = InspectorFrontendHostAPI.EventDescriptors; | |
for (var i = 0; i < descriptors.length; ++i) | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/AdvancedApp.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/AdvancedApp.js | |
index 6334ae0..941a4c0 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/AdvancedApp.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/AdvancedApp.js | |
@@ -167,7 +167,8 @@ WebInspector.AdvancedApp.prototype = { | |
*/ | |
_onBeforeDockSideChange: function(event) { | |
if (/** @type {string} */ | |
- event.data.to === WebInspector.DockController.State.Undocked && | |
+ event.data.to === | |
+ WebInspector.DockController.State.Undocked && | |
this._toolboxResponsiveDesignView) { | |
// Hide inspectorView and force layout to mimic the undocked state. | |
this._rootSplitView.hideSidebar(); | |
@@ -188,8 +189,10 @@ WebInspector.AdvancedApp.prototype = { | |
if (toDockSide === WebInspector.DockController.State.Undocked) { | |
this._updateForUndocked(); | |
} else if ( | |
- this._toolboxResponsiveDesignView && event && /** @type {string} */ | |
- event.data.from === WebInspector.DockController.State.Undocked | |
+ this._toolboxResponsiveDesignView && | |
+ event && | |
+ event.data.from === | |
+ WebInspector.DockController.State.Undocked | |
) { | |
// Don't update yet for smooth transition. | |
this._rootSplitView.hideSidebar(); | |
@@ -219,8 +222,10 @@ WebInspector.AdvancedApp.prototype = { | |
dockSide === WebInspector.DockController.State.DockedToRight, | |
); | |
this._rootSplitView.setSecondIsSidebar( | |
- dockSide === WebInspector.DockController.State.DockedToRight || | |
- dockSide === WebInspector.DockController.State.DockedToBottom, | |
+ dockSide === | |
+ WebInspector.DockController.State.DockedToRight || | |
+ dockSide === | |
+ WebInspector.DockController.State.DockedToBottom, | |
); | |
this._rootSplitView.toggleResizer( | |
this._rootSplitView.resizerElement(), | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Main.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Main.js | |
index 09f3f84..af41731 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Main.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Main.js | |
@@ -81,7 +81,8 @@ WebInspector.Main.prototype = { | |
* @param {!Object} provider | |
*/ | |
function fetchItemFromProvider(provider) { | |
- return /** @type {!WebInspector.StatusBarItem.Provider} */ | |
+ return; | |
+ /** @type {!WebInspector.StatusBarItem.Provider} */ | |
provider.item(); | |
} | |
@@ -229,8 +230,10 @@ WebInspector.Main.prototype = { | |
if (testPath.indexOf('service-workers/') !== -1) | |
Runtime.experiments.enableForTest('serviceWorkersInResources'); | |
if ( | |
- testPath.indexOf('timeline/') !== -1 || | |
- testPath.indexOf('layers/') !== -1 | |
+ testPath.indexOf('timeline/') !== | |
+ -1 || | |
+ testPath.indexOf('layers/') !== | |
+ -1 | |
) | |
Runtime.experiments.enableForTest('layersPanel'); | |
} | |
@@ -819,7 +822,7 @@ WebInspector.reload = function() { | |
if ( | |
WebInspector.dockController.canDock() && | |
WebInspector.dockController.dockSide() === | |
- WebInspector.DockController.State.Undocked | |
+ WebInspector.DockController.State.Undocked | |
) | |
InspectorFrontendHost.setIsDocked(true, function() { | |
}); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/OverridesView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/OverridesView.js | |
index 4e6bf5f..fb4595c 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/OverridesView.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/OverridesView.js | |
@@ -866,8 +866,8 @@ WebInspector.OverridesView.SensorsTab.prototype = { | |
_calculateRadiusVector: function(x, y) { | |
var rect = this._stageElement.getBoundingClientRect(); | |
var radius = Math.max(rect.width, rect.height) / 2; | |
- var sphereX = (x - rect.left - rect.width / 2) / radius; | |
- var sphereY = (y - rect.top - rect.height / 2) / radius; | |
+ var sphereX = x - rect.left - rect.width / 2 / radius; | |
+ var sphereY = y - rect.top - rect.height / 2 / radius; | |
var sqrSum = sphereX * sphereX + sphereY * sphereY; | |
if (sqrSum > 0.5) | |
return new WebInspector.Geometry.Vector( | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/DOMExtension.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/DOMExtension.js | |
index 2aec976..7b009b4 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/DOMExtension.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/DOMExtension.js | |
@@ -134,7 +134,8 @@ Node.prototype.traverseNextTextNode = function(stayWithin) { | |
if (!node) return null; | |
var nonTextTags = {STYLE: 1, SCRIPT: 1}; | |
while (node && | |
- (node.nodeType !== Node.TEXT_NODE || | |
+ (node.nodeType !== | |
+ Node.TEXT_NODE || | |
nonTextTags[node.parentElement.nodeName])) node = node.traverseNextNode(stayWithin); | |
return node; | |
@@ -185,8 +186,14 @@ function removeSubsequentNodes(fromNode, toNode) { | |
*/ | |
Element.prototype.containsEventPoint = function(event) { | |
var box = this.getBoundingClientRect(); | |
- return box.left < event.x && event.x < box.right && box.top < event.y && | |
- event.y < box.bottom; | |
+ return box.left < | |
+ event.x && | |
+ event.x < | |
+ box.right && | |
+ box.top < | |
+ event.y && | |
+ event.y < | |
+ box.bottom; | |
}; | |
/** | |
@@ -229,8 +236,9 @@ Node.prototype.enclosingNodeOrSelfWithClass = function(className, stayWithin) { | |
if ( | |
node.nodeType === Node.ELEMENT_NODE && node.classList.contains(className) | |
) | |
- return /** @type {!Element} */ | |
- node; | |
+ return; | |
+ /** @type {!Element} */ | |
+ node; | |
} | |
return null; | |
}; | |
@@ -241,11 +249,12 @@ Node.prototype.enclosingNodeOrSelfWithClass = function(className, stayWithin) { | |
Node.prototype.parentElementOrShadowHost = function() { | |
var node = this.parentNode; | |
if (!node) return null; | |
- if (node.nodeType === Node.ELEMENT_NODE) return /** @type {!Element} */ | |
- node; | |
- if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) | |
- return /** @type {!Element} */ | |
- node.host; | |
+ if (node.nodeType === Node.ELEMENT_NODE) return; | |
+ /** @type {!Element} */ | |
+ node; | |
+ if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) return; | |
+ /** @type {!Element} */ | |
+ node.host; | |
return null; | |
}; | |
@@ -262,7 +271,8 @@ Node.prototype.parentNodeOrShadowHost = function() { | |
Node.prototype.getComponentSelection = function() { | |
var parent = this.parentNode; | |
while (parent && | |
- parent.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) parent = parent.parentNode; | |
+ parent.nodeType !== | |
+ Node.DOCUMENT_FRAGMENT_NODE) parent = parent.parentNode; | |
return parent instanceof ShadowRoot | |
? parent.getSelection() | |
: this.window().getSelection(); | |
@@ -561,9 +571,15 @@ AnchorBox.prototype.relativeToElement = function(element) { | |
* @return {boolean} | |
*/ | |
AnchorBox.prototype.equals = function(anchorBox) { | |
- return !!anchorBox && this.x === anchorBox.x && this.y === anchorBox.y && | |
- this.width === anchorBox.width && | |
- this.height === anchorBox.height; | |
+ return !!anchorBox && | |
+ this.x === | |
+ anchorBox.x && | |
+ this.y === | |
+ anchorBox.y && | |
+ this.width === | |
+ anchorBox.width && | |
+ this.height === | |
+ anchorBox.height; | |
}; | |
/** | |
@@ -840,8 +856,11 @@ Node.prototype.setTextContentTruncatedIfNeeded = function(text, placeholder) { | |
Event.prototype.deepElementFromPoint = function() { | |
// 1. climb to the component root. | |
var node = this.target; | |
- while (node && node.nodeType !== Node.DOCUMENT_FRAGMENT_NODE && | |
- node.nodeType !== Node.DOCUMENT_NODE) node = node.parentNode; | |
+ while (node && | |
+ node.nodeType !== | |
+ Node.DOCUMENT_FRAGMENT_NODE && | |
+ node.nodeType !== | |
+ Node.DOCUMENT_NODE) node = node.parentNode; | |
if (!node) return null; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/utilities.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/utilities.js | |
index 86f7ad2..d0ef2f3 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/utilities.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/platform/utilities.js | |
@@ -66,7 +66,7 @@ Object.values = function(obj) { | |
* @return {number} | |
*/ | |
function mod(m, n) { | |
- return (m % n + n) % n; | |
+ return m % n + n % n; | |
} | |
/** | |
@@ -111,8 +111,10 @@ String.prototype.lineAt = function(lineNumber) { | |
var lineEnd = lineEndings[lineNumber]; | |
var lineContent = this.substring(lineStart, lineEnd); | |
if ( | |
- lineContent.length > 0 && | |
- lineContent.charAt(lineContent.length - 1) === '\r' | |
+ lineContent.length > | |
+ 0 && | |
+ lineContent.charAt(lineContent.length - 1) === | |
+ '\r' | |
) | |
lineContent = lineContent.substring(0, lineContent.length - 1); | |
return lineContent; | |
@@ -196,7 +198,8 @@ String.prototype.trimMiddle = function(maxLength) { | |
if (this.length <= maxLength) return String(this); | |
var leftHalf = maxLength >> 1; | |
var rightHalf = maxLength - leftHalf - 1; | |
- return this.substr(0, leftHalf) + '\u2026' + | |
+ return this.substr(0, leftHalf) + | |
+ '\u2026' + | |
this.substr(this.length - rightHalf, rightHalf); | |
}; | |
@@ -351,31 +354,29 @@ String.prototype.toUint8Array = function() { | |
var dataLen = 0; | |
for (var i = 0; i < n; ++i) { | |
var c = this.charCodeAt(i); | |
- dataLen += c < 0x80 | |
+ dataLen += c < 128 | |
? 1 | |
- : c < 0x800 | |
- ? 2 | |
- : c < 0x10000 ? 3 : c < 0x200000 ? 4 : c < 0x4000000 ? 5 : 6; | |
+ : c < 2048 ? 2 : c < 65536 ? 3 : c < 2097152 ? 4 : c < 67108864 ? 5 : 6; | |
} | |
var data = new Uint8Array(dataLen); | |
var j = 0; | |
for (var i = 0; i < n; ++i) { | |
var c = this.charCodeAt(i); | |
- if (c < 0x80) { | |
+ if (c < 128) { | |
data[j++] = c; | |
- } else if (c < 0x800) { | |
+ } else if (c < 2048) { | |
data[j++] = 192 + (c >>> 6); | |
data[j++] = 128 + (c & 63); | |
- } else if (c < 0x10000) { | |
+ } else if (c < 65536) { | |
data[j++] = 224 + (c >>> 12); | |
data[j++] = 128 + (c >>> 6 & 63); | |
data[j++] = 128 + (c & 63); | |
- } else if (c < 0x200000) { | |
+ } else if (c < 2097152) { | |
data[j++] = 240 + (c >>> 18); | |
data[j++] = 128 + (c >>> 12 & 63); | |
data[j++] = 128 + (c >>> 6 & 63); | |
data[j++] = 128 + (c & 63); | |
- } else if (c < 0x4000000) { | |
+ } else if (c < 67108864) { | |
data[j++] = 248 + (c >>> 24); | |
data[j++] = 128 + (c >>> 18 & 63); | |
data[j++] = 128 + (c >>> 12 & 63); | |
@@ -471,7 +472,8 @@ Date.prototype.toISO8601Compact = function() { | |
function leadZero(x) { | |
return (x > 9 ? '' : '0') + x; | |
} | |
- return this.getFullYear() + leadZero(this.getMonth() + 1) + | |
+ return this.getFullYear() + | |
+ leadZero(this.getMonth() + 1) + | |
leadZero(this.getDate()) + | |
'T' + | |
leadZero(this.getHours()) + | |
@@ -499,7 +501,10 @@ Date.prototype.toConsoleTime = function() { | |
return '0'.repeat(3 - x.toString().length) + x; | |
} | |
- return this.getFullYear() + '-' + leadZero2(this.getMonth() + 1) + '-' + | |
+ return this.getFullYear() + | |
+ '-' + | |
+ leadZero2(this.getMonth() + 1) + | |
+ '-' + | |
leadZero2(this.getDate()) + | |
' ' + | |
leadZero2(this.getHours()) + | |
@@ -678,9 +683,15 @@ Object.defineProperty(Uint32Array.prototype, 'sort', { | |
); | |
} | |
if ( | |
- leftBound === 0 && rightBound === this.length - 1 && | |
- sortWindowLeft === 0 && | |
- sortWindowRight >= rightBound | |
+ leftBound === | |
+ 0 && | |
+ rightBound === | |
+ this.length - | |
+ 1 && | |
+ sortWindowLeft === | |
+ 0 && | |
+ sortWindowRight >= | |
+ rightBound | |
) | |
this.sort(comparator); | |
else | |
@@ -767,7 +778,7 @@ Object.defineProperty(Array.prototype, 'qselect', { | |
comparator, | |
low, | |
high, | |
- Math.floor((high + low) / 2), | |
+ Math.floor(high + low / 2), | |
); | |
if (pivotPosition === k) return this[k]; | |
else if (pivotPosition > k) high = pivotPosition - 1; | |
@@ -1123,7 +1134,9 @@ String.format = function( | |
}; | |
function prettyFunctionName() { | |
- return 'String.format("' + format + '", "' + | |
+ return 'String.format("' + | |
+ format + | |
+ '", "' + | |
Array.prototype.join.call(substitutions, '", "') + | |
'")'; | |
} | |
@@ -1158,7 +1171,8 @@ String.format = function( | |
// If there are not enough substitutions for the current substitutionIndex | |
// just output the format specifier literally and move on. | |
error( | |
- 'not enough substitution arguments. Had ' + substitutions.length + | |
+ 'not enough substitution arguments. Had ' + | |
+ substitutions.length + | |
' but needed ' + | |
(token.substitutionIndex + 1) + | |
', so substitution was skipped.', | |
@@ -1175,7 +1189,8 @@ String.format = function( | |
if (!(token.specifier in formatters)) { | |
// Encountered an unsupported format character, treat as a string. | |
warn( | |
- 'unsupported format character \u201C' + token.specifier + | |
+ 'unsupported format character \u201C' + | |
+ token.specifier + | |
'\u201D. Treating as a string.', | |
); | |
result = append(result, substitutions[token.substitutionIndex]); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/AnimationModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/AnimationModel.js | |
index 55cb51c..e17f1f8 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/AnimationModel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/AnimationModel.js | |
@@ -165,8 +165,10 @@ WebInspector.AnimationModel.AnimationPlayer.prototype = { | |
*/ | |
endTime: function() { | |
if (!this.source().iterations) return Infinity; | |
- return this.startTime() + this.source().delay() + | |
- this.source().duration() * this.source().iterations() + | |
+ return this.startTime() + | |
+ this.source().delay() + | |
+ this.source().duration() * | |
+ this.source().iterations() + | |
this.source().endDelay(); | |
}, | |
/** | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ApplicationCacheModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ApplicationCacheModel.js | |
index 3463388..e7d5567 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ApplicationCacheModel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ApplicationCacheModel.js | |
@@ -136,7 +136,8 @@ WebInspector.ApplicationCacheModel.prototype = { | |
if ( | |
this._manifestURLsByFrame[frameId] && | |
- manifestURL !== this._manifestURLsByFrame[frameId] | |
+ manifestURL !== | |
+ this._manifestURLsByFrame[frameId] | |
) | |
this._frameManifestRemoved(frameId); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CPUProfileDataModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CPUProfileDataModel.js | |
index 686b857..07c8261 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CPUProfileDataModel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CPUProfileDataModel.js | |
@@ -93,7 +93,8 @@ WebInspector.CPUProfileDataModel.prototype = { | |
// Support loading old CPU profiles that are missing timestamps. | |
// Derive timestamps from profile start and stop times. | |
var profileStartTime = this.profileStartTime; | |
- var interval = (this.profileEndTime - profileStartTime) / | |
+ var interval = this.profileEndTime - | |
+ profileStartTime / | |
this.samples.length; | |
timestamps = new Float64Array(this.samples.length + 1); | |
for ( | |
@@ -107,7 +108,8 @@ WebInspector.CPUProfileDataModel.prototype = { | |
// Convert samples from usec to msec | |
for (var i = 0; i < timestamps.length; ++i) timestamps[i] /= 1000; | |
- var averageSample = (timestamps.peekLast() - timestamps[0]) / | |
+ var averageSample = timestamps.peekLast() - | |
+ timestamps[0] / | |
(timestamps.length - 1); | |
// Add an extra timestamp used to calculate the last sample duration. | |
this.timestamps.push(timestamps.peekLast() + averageSample); | |
@@ -132,7 +134,8 @@ WebInspector.CPUProfileDataModel.prototype = { | |
var topLevelNodes = this.profileHead.children; | |
for ( | |
var i = 0; | |
- i < topLevelNodes.length && | |
+ i < | |
+ topLevelNodes.length && | |
!(this.gcNode && this.programNode && this.idleNode); | |
i++ | |
) { | |
@@ -161,9 +164,12 @@ WebInspector.CPUProfileDataModel.prototype = { | |
for (var sampleIndex = 1; sampleIndex < samplesCount - 1; sampleIndex++) { | |
var nextNodeId = samples[sampleIndex + 1]; | |
if ( | |
- nodeId === programNodeId && !isSystemNode(prevNodeId) && | |
+ nodeId === | |
+ programNodeId && | |
+ !isSystemNode(prevNodeId) && | |
!isSystemNode(nextNodeId) && | |
- bottomNode(idToNode[prevNodeId]) === bottomNode(idToNode[nextNodeId]) | |
+ bottomNode(idToNode[prevNodeId]) === | |
+ bottomNode(idToNode[nextNodeId]) | |
) { | |
samples[sampleIndex] = prevNodeId; | |
} | |
@@ -185,8 +191,12 @@ WebInspector.CPUProfileDataModel.prototype = { | |
* @return {boolean} | |
*/ | |
function isSystemNode(nodeId) { | |
- return nodeId === programNodeId || nodeId === gcNodeId || | |
- nodeId === idleNodeId; | |
+ return nodeId === | |
+ programNodeId || | |
+ nodeId === | |
+ gcNodeId || | |
+ nodeId === | |
+ idleNodeId; | |
} | |
}, | |
/** | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSMetadata.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSMetadata.js | |
index 271529f..ce43f2d 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSMetadata.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSMetadata.js | |
@@ -91,8 +91,10 @@ WebInspector.CSSMetadata.isLengthProperty = function(propertyName) { | |
return WebInspector.CSSMetadata._distancePropertiesKeySet[propertyName] || | |
propertyName.startsWith('margin') || | |
propertyName.startsWith('padding') || | |
- propertyName.indexOf('width') !== -1 || | |
- propertyName.indexOf('height') !== -1; | |
+ propertyName.indexOf('width') !== | |
+ -1 || | |
+ propertyName.indexOf('height') !== | |
+ -1; | |
}; | |
/** | |
@@ -173,7 +175,7 @@ WebInspector.CSSMetadata.canonicalPropertyName = function(name) { | |
if ( | |
!match || | |
hasSupportedProperties && | |
- !propertiesSet.hasOwnProperty(match[1].toLowerCase()) | |
+ !propertiesSet.hasOwnProperty(match[1].toLowerCase()) | |
) | |
return name.toLowerCase(); | |
return match[1].toLowerCase(); | |
@@ -1347,7 +1349,8 @@ WebInspector.CSSMetadata.prototype = { | |
if (firstIndex === -1) return []; | |
var results = []; | |
- while (firstIndex < this._values.length && | |
+ while (firstIndex < | |
+ this._values.length && | |
this._values[firstIndex].startsWith( | |
prefix, | |
)) results.push(this._values[firstIndex++]); | |
@@ -1434,13 +1437,13 @@ WebInspector.CSSMetadata.prototype = { | |
if (index === -1) return ''; | |
if (!prefix) { | |
- index = (index + this._values.length + shift) % this._values.length; | |
+ index = index + this._values.length + shift % this._values.length; | |
return this._values[index]; | |
} | |
var propertiesWithPrefix = this.startsWith(prefix); | |
var j = propertiesWithPrefix.indexOf(str); | |
- j = (j + propertiesWithPrefix.length + shift) % propertiesWithPrefix.length; | |
+ j = j + propertiesWithPrefix.length + shift % propertiesWithPrefix.length; | |
return propertiesWithPrefix[j]; | |
}, | |
/** | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSStyleModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSStyleModel.js | |
index 4ca4fb8..ded9587 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSStyleModel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CSSStyleModel.js | |
@@ -540,7 +540,8 @@ WebInspector.CSSStyleModel.prototype = { | |
for (var i = 0; i < headers.length; ++i) { | |
var styleSheetHeader = headers[i]; | |
if ( | |
- styleSheetHeader.frameId === frameId && | |
+ styleSheetHeader.frameId === | |
+ frameId && | |
styleSheetHeader.isViaInspector() | |
) { | |
callback(styleSheetHeader); | |
@@ -1351,7 +1352,9 @@ WebInspector.CSSProperty.prototype = { | |
if (this.text !== undefined) return this.text; | |
if (this.name === '') return ''; | |
- return this.name + ': ' + this.value + | |
+ return this.name + | |
+ ': ' + | |
+ this.value + | |
(this.important ? ' !important' : '') + | |
';'; | |
}, | |
@@ -1435,7 +1438,9 @@ WebInspector.CSSProperty.prototype = { | |
* @param {function(?WebInspector.CSSStyleDeclaration)=} userCallback | |
*/ | |
setValue: function(newValue, majorChange, overwrite, userCallback) { | |
- var text = this.name + ': ' + newValue + | |
+ var text = this.name + | |
+ ': ' + | |
+ newValue + | |
(this.important ? ' !important' : '') + | |
';'; | |
this.setText(text, majorChange, overwrite, userCallback); | |
@@ -1627,7 +1632,8 @@ WebInspector.CSSMedia.prototype = { | |
*/ | |
equal: function(other) { | |
if (!this.parentStyleSheetId || !this.range || !other.range) return false; | |
- return this.parentStyleSheetId === other.parentStyleSheetId && | |
+ return this.parentStyleSheetId === | |
+ other.parentStyleSheetId && | |
this.range.equal(other.range); | |
}, | |
/** | |
@@ -1735,7 +1741,8 @@ WebInspector.CSSStyleSheetHeader.prototype = { | |
); | |
console.assert(frame); | |
var parsedURL = new WebInspector.ParsedURL(frame.url); | |
- var fakeURL = 'inspector://' + parsedURL.host + | |
+ var fakeURL = 'inspector://' + | |
+ parsedURL.host + | |
parsedURL.folderPathComponents; | |
if (!fakeURL.endsWith('/')) fakeURL += '/'; | |
fakeURL += 'inspector-stylesheet'; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ConsoleModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ConsoleModel.js | |
index 1be1ca3..c69640b 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ConsoleModel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ConsoleModel.js | |
@@ -269,24 +269,30 @@ WebInspector.ConsoleMessage.prototype = { | |
* @return {boolean} | |
*/ | |
isGroupMessage: function() { | |
- return this.type === WebInspector.ConsoleMessage.MessageType.StartGroup || | |
+ return this.type === | |
+ WebInspector.ConsoleMessage.MessageType.StartGroup || | |
this.type === | |
- WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed || | |
- this.type === WebInspector.ConsoleMessage.MessageType.EndGroup; | |
+ WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed || | |
+ this.type === | |
+ WebInspector.ConsoleMessage.MessageType.EndGroup; | |
}, | |
/** | |
* @return {boolean} | |
*/ | |
isGroupStartMessage: function() { | |
- return this.type === WebInspector.ConsoleMessage.MessageType.StartGroup || | |
- this.type === WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed; | |
+ return this.type === | |
+ WebInspector.ConsoleMessage.MessageType.StartGroup || | |
+ this.type === | |
+ WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed; | |
}, | |
/** | |
* @return {boolean} | |
*/ | |
isErrorOrWarning: function() { | |
- return this.level === WebInspector.ConsoleMessage.MessageLevel.Warning || | |
- this.level === WebInspector.ConsoleMessage.MessageLevel.Error; | |
+ return this.level === | |
+ WebInspector.ConsoleMessage.MessageLevel.Warning || | |
+ this.level === | |
+ WebInspector.ConsoleMessage.MessageLevel.Error; | |
}, | |
/** | |
* @return {!WebInspector.ConsoleMessage} | |
@@ -343,23 +349,37 @@ WebInspector.ConsoleMessage.prototype = { | |
for (var i = 0; i < msg.parameters.length; ++i) { | |
// Never treat objects as equal - their properties might change over time. | |
if ( | |
- this.parameters[i].type !== msg.parameters[i].type || | |
- msg.parameters[i].type === 'object' || | |
- this.parameters[i].value !== msg.parameters[i].value | |
+ this.parameters[i].type !== | |
+ msg.parameters[i].type || | |
+ msg.parameters[i].type === | |
+ 'object' || | |
+ this.parameters[i].value !== | |
+ msg.parameters[i].value | |
) | |
return false; | |
} | |
} | |
- return this.target() === msg.target() && this.source === msg.source && | |
- this.type === msg.type && | |
- this.level === msg.level && | |
- this.line === msg.line && | |
- this.url === msg.url && | |
- this.messageText === msg.messageText && | |
- this.request === msg.request && | |
- this.executionContextId === msg.executionContextId && | |
- this.scriptId === msg.scriptId; | |
+ return this.target() === | |
+ msg.target() && | |
+ this.source === | |
+ msg.source && | |
+ this.type === | |
+ msg.type && | |
+ this.level === | |
+ msg.level && | |
+ this.line === | |
+ msg.line && | |
+ this.url === | |
+ msg.url && | |
+ this.messageText === | |
+ msg.messageText && | |
+ this.request === | |
+ msg.request && | |
+ this.executionContextId === | |
+ msg.executionContextId && | |
+ this.scriptId === | |
+ msg.scriptId; | |
}, | |
/** | |
* @param {!Array.<!ConsoleAgent.CallFrame>|undefined} stackTrace1 | |
@@ -372,10 +392,14 @@ WebInspector.ConsoleMessage.prototype = { | |
if (stackTrace1.length !== stackTrace2.length) return false; | |
for (var i = 0, n = stackTrace1.length; i < n; ++i) { | |
if ( | |
- stackTrace1[i].url !== stackTrace2[i].url || | |
- stackTrace1[i].functionName !== stackTrace2[i].functionName || | |
- stackTrace1[i].lineNumber !== stackTrace2[i].lineNumber || | |
- stackTrace1[i].columnNumber !== stackTrace2[i].columnNumber | |
+ stackTrace1[i].url !== | |
+ stackTrace2[i].url || | |
+ stackTrace1[i].functionName !== | |
+ stackTrace2[i].functionName || | |
+ stackTrace1[i].lineNumber !== | |
+ stackTrace2[i].lineNumber || | |
+ stackTrace1[i].columnNumber !== | |
+ stackTrace2[i].columnNumber | |
) | |
return false; | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ContentProviders.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ContentProviders.js | |
index c5e70a2..b14d7a3 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ContentProviders.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ContentProviders.js | |
@@ -63,13 +63,17 @@ WebInspector.ConcatenatedScriptsContentProvider.prototype = { | |
1]; | |
var lineNumber = previousScript.endLine; | |
- var columnNumber = previousScript.endColumn + scriptCloseTagLength + | |
+ var columnNumber = previousScript.endColumn + | |
+ scriptCloseTagLength + | |
scriptOpenTagLength; | |
if ( | |
- lineNumber < scripts[i].lineOffset || | |
- lineNumber === scripts[i].lineOffset && | |
- columnNumber <= scripts[i].columnOffset | |
+ lineNumber < | |
+ scripts[i].lineOffset || | |
+ lineNumber === | |
+ scripts[i].lineOffset && | |
+ columnNumber <= | |
+ scripts[i].columnOffset | |
) | |
this._sortedScriptsArray.push(scripts[i]); | |
} | |
@@ -180,7 +184,8 @@ WebInspector.ConcatenatedScriptsContentProvider.prototype = { | |
content += '\n'; | |
} | |
for ( | |
- var spacesCount = scripts[i].columnOffset - columnNumber - | |
+ var spacesCount = scripts[i].columnOffset - | |
+ columnNumber - | |
scriptOpenTag.length; | |
spacesCount > 0; | |
--spacesCount | |
@@ -247,7 +252,9 @@ WebInspector.CompilerSourceMappingContentProvider.prototype = { | |
function contentLoaded(statusCode, headers, content) { | |
if (statusCode >= 400) { | |
console.error( | |
- 'Could not load content for ' + this._sourceURL + ' : ' + | |
+ 'Could not load content for ' + | |
+ this._sourceURL + | |
+ ' : ' + | |
'HTTP status code: ' + | |
statusCode, | |
); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CookieParser.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CookieParser.js | |
index 3545955..e6ae139 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CookieParser.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/CookieParser.js | |
@@ -110,7 +110,8 @@ WebInspector.CookieParser.prototype = { | |
_flushCookie: function() { | |
if (this._lastCookie) | |
this._lastCookie.setSize( | |
- this._originalInputLength - this._input.length - | |
+ this._originalInputLength - | |
+ this._input.length - | |
this._lastCookiePosition, | |
); | |
this._lastCookie = null; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DOMModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DOMModel.js | |
index 10c9362..bdfbe05 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DOMModel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DOMModel.js | |
@@ -125,13 +125,17 @@ WebInspector.DOMNode = function(domModel, doc, isInShadowTree, payload) { | |
if (this._nodeType === Node.ELEMENT_NODE) { | |
// HTML and BODY from internal iframes should not overwrite top-level ones. | |
if ( | |
- this.ownerDocument && !this.ownerDocument.documentElement && | |
- this._nodeName === 'HTML' | |
+ this.ownerDocument && | |
+ !this.ownerDocument.documentElement && | |
+ this._nodeName === | |
+ 'HTML' | |
) | |
this.ownerDocument.documentElement = this; | |
if ( | |
- this.ownerDocument && !this.ownerDocument.body && | |
- this._nodeName === 'BODY' | |
+ this.ownerDocument && | |
+ !this.ownerDocument.body && | |
+ this._nodeName === | |
+ 'BODY' | |
) | |
this.ownerDocument.body = this; | |
} else if (this._nodeType === Node.DOCUMENT_TYPE_NODE) { | |
@@ -580,7 +584,9 @@ WebInspector.DOMNode.prototype = { | |
*/ | |
_setAttributesPayload: function(attrs) { | |
var attributesChanged = !this._attributes || | |
- attrs.length !== this._attributes.length * 2; | |
+ attrs.length !== | |
+ this._attributes.length * | |
+ 2; | |
var oldAttributesMap = this._attributesMap || {}; | |
this._attributes = []; | |
@@ -760,13 +766,13 @@ WebInspector.DOMNode.prototype = { | |
_updateChildUserPropertyCountsOnRemoval: function(parentNode) { | |
var result = {}; | |
if (this._userProperties) { | |
- for (var name in this._userProperties) result[name] = (result[name] || 0) + 1; | |
+ for (var name in this._userProperties) result[name] = result[name] || 0 + 1; | |
} | |
if (this._descendantUserPropertyCounters) { | |
for (var name in this._descendantUserPropertyCounters) { | |
var counter = this._descendantUserPropertyCounters[name]; | |
- result[name] = (result[name] || 0) + counter; | |
+ result[name] = result[name] || 0 + counter; | |
} | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DebuggerModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DebuggerModel.js | |
index c6076eb..d2bcf9d 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DebuggerModel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/DebuggerModel.js | |
@@ -682,13 +682,21 @@ WebInspector.DebuggerModel.prototype = { | |
var script = scripts[i]; | |
if (!closestScript) closestScript = script; | |
if ( | |
- script.lineOffset > lineNumber || | |
- script.lineOffset === lineNumber && script.columnOffset > columnNumber | |
+ script.lineOffset > | |
+ lineNumber || | |
+ script.lineOffset === | |
+ lineNumber && | |
+ script.columnOffset > | |
+ columnNumber | |
) | |
continue; | |
if ( | |
- script.endLine < lineNumber || | |
- script.endLine === lineNumber && script.endColumn <= columnNumber | |
+ script.endLine < | |
+ lineNumber || | |
+ script.endLine === | |
+ lineNumber && | |
+ script.endColumn <= | |
+ columnNumber | |
) | |
continue; | |
closestScript = script; | |
@@ -1196,7 +1204,11 @@ WebInspector.DebuggerModel.Location.prototype = { | |
* @return {string} | |
*/ | |
id: function() { | |
- return this.target().id() + ':' + this.scriptId + ':' + this.lineNumber + | |
+ return this.target().id() + | |
+ ':' + | |
+ this.scriptId + | |
+ ':' + | |
+ this.lineNumber + | |
':' + | |
this.columnNumber; | |
}, | |
@@ -1466,8 +1478,10 @@ WebInspector.DebuggerModel.Scope.prototype = { | |
if (this._object) return this._object; | |
var runtimeModel = this._callFrame.target().runtimeModel; | |
- var declarativeScope = this._type !== DebuggerAgent.ScopeType.With && | |
- this._type !== DebuggerAgent.ScopeType.Global; | |
+ var declarativeScope = this._type !== | |
+ DebuggerAgent.ScopeType.With && | |
+ this._type !== | |
+ DebuggerAgent.ScopeType.Global; | |
if (declarativeScope) | |
this._object = runtimeModel.createScopeRemoteObject( | |
this._payload.object, | |
@@ -1484,8 +1498,10 @@ WebInspector.DebuggerModel.Scope.prototype = { | |
* @return {string} | |
*/ | |
description: function() { | |
- var declarativeScope = this._type !== DebuggerAgent.ScopeType.With && | |
- this._type !== DebuggerAgent.ScopeType.Global; | |
+ var declarativeScope = this._type !== | |
+ DebuggerAgent.ScopeType.With && | |
+ this._type !== | |
+ DebuggerAgent.ScopeType.Global; | |
return declarativeScope ? '' : this._payload.object.description || ''; | |
}, | |
}; | |
@@ -1584,8 +1600,10 @@ WebInspector.DebuggerPausedDetails.prototype = { | |
*/ | |
exception: function() { | |
if ( | |
- this.reason !== WebInspector.DebuggerModel.BreakReason.Exception && | |
- this.reason !== WebInspector.DebuggerModel.BreakReason.PromiseRejection | |
+ this.reason !== | |
+ WebInspector.DebuggerModel.BreakReason.Exception && | |
+ this.reason !== | |
+ WebInspector.DebuggerModel.BreakReason.PromiseRejection | |
) | |
return null; | |
return this.target().runtimeModel.createRemoteObject /** @type {!RuntimeAgent.RemoteObject} */( | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/FileSystemModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/FileSystemModel.js | |
index e02827e..2cdcb92 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/FileSystemModel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/FileSystemModel.js | |
@@ -160,8 +160,10 @@ WebInspector.FileSystemModel.prototype = { | |
backendRootEntry, | |
) { | |
if ( | |
- !errorCode && backendRootEntry && | |
- this._fileSystemsForOrigin[origin] === store | |
+ !errorCode && | |
+ backendRootEntry && | |
+ this._fileSystemsForOrigin[origin] === | |
+ store | |
) { | |
var fileSystem = new WebInspector.FileSystemModel.FileSystem( | |
this, | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/HAREntry.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/HAREntry.js | |
index fe62a17..834e4bc 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/HAREntry.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/HAREntry.js | |
@@ -257,8 +257,11 @@ WebInspector.HAREntry.prototype = { | |
*/ | |
get responseCompression() { | |
if ( | |
- this._request.cached() || this._request.statusCode === 304 || | |
- this._request.statusCode === 206 | |
+ this._request.cached() || | |
+ this._request.statusCode === | |
+ 304 || | |
+ this._request.statusCode === | |
+ 206 | |
) | |
return; | |
if (!this._request.responseHeadersText) return; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/IndexedDBModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/IndexedDBModel.js | |
index c11bc8e..9ceae4d 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/IndexedDBModel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/IndexedDBModel.js | |
@@ -525,8 +525,10 @@ WebInspector.IndexedDBModel.DatabaseId.prototype = { | |
* @return {boolean} | |
*/ | |
equals: function(databaseId) { | |
- return this.name === databaseId.name && | |
- this.securityOrigin === databaseId.securityOrigin; | |
+ return this.name === | |
+ databaseId.name && | |
+ this.securityOrigin === | |
+ databaseId.securityOrigin; | |
}, | |
}; | |
/** | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/InspectorBackend.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/InspectorBackend.js | |
index 75e5d8d..736aa32 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/InspectorBackend.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/InspectorBackend.js | |
@@ -67,9 +67,10 @@ InspectorBackendClass.prototype = { | |
*/ | |
_addAgentGetterMethodToProtocolAgentsPrototype: function(domain) { | |
var upperCaseLength = 0; | |
- while (upperCaseLength < domain.length && | |
+ while (upperCaseLength < | |
+ domain.length && | |
domain[upperCaseLength].toLowerCase() !== | |
- domain[upperCaseLength]) ++upperCaseLength; | |
+ domain[upperCaseLength]) ++upperCaseLength; | |
var methodName = domain.substr(0, upperCaseLength).toLowerCase() + | |
domain.slice(upperCaseLength) + | |
@@ -91,7 +92,8 @@ InspectorBackendClass.prototype = { | |
this.registerDispatcher(domain, dispatcher); | |
} | |
- window.Protocol.Agents.prototype['register' + domain + | |
+ window.Protocol.Agents.prototype['register' + | |
+ domain + | |
'Dispatcher'] = registerDispatcher; | |
}, | |
/** | |
@@ -244,7 +246,9 @@ InspectorBackendClass._generateCommands = function(schema) { | |
name = name.replace(/HTML|XML|WML|API/gi, toUpperCase.bind(null, 0)); | |
members.push(name + ': "' + value + '"'); | |
} | |
- return 'InspectorBackend.registerEnum("' + enumName + '", {' + | |
+ return 'InspectorBackend.registerEnum("' + | |
+ enumName + | |
+ '", {' + | |
members.join(', ') + | |
'});'; | |
} | |
@@ -288,7 +292,10 @@ InspectorBackendClass._generateCommands = function(schema) { | |
else type = rawTypes[domain.domain + '.' + ref]; | |
} | |
- var text = '{"name": "' + parameter.name + '", "type": "' + type + | |
+ var text = '{"name": "' + | |
+ parameter.name + | |
+ '", "type": "' + | |
+ type + | |
'", "optional": ' + | |
(parameter.optional ? 'true' : 'false') + | |
'}'; | |
@@ -303,7 +310,9 @@ InspectorBackendClass._generateCommands = function(schema) { | |
} | |
var hasErrorData = String(Boolean(command.error)); | |
result.push( | |
- 'InspectorBackend.registerCommand("' + domain.domain + '.' + | |
+ 'InspectorBackend.registerCommand("' + | |
+ domain.domain + | |
+ '.' + | |
command.name + | |
'", [' + | |
paramsText.join(', ') + | |
@@ -323,7 +332,10 @@ InspectorBackendClass._generateCommands = function(schema) { | |
paramsText.push('"' + parameter.name + '"'); | |
} | |
result.push( | |
- 'InspectorBackend.registerEvent("' + domain.domain + '.' + event.name + | |
+ 'InspectorBackend.registerEvent("' + | |
+ domain.domain + | |
+ '.' + | |
+ event.name + | |
'", [' + | |
paramsText.join(', ') + | |
']);', | |
@@ -485,7 +497,9 @@ InspectorBackendClass.Connection.prototype = { | |
if (InspectorBackendClass.Options.dumpInspectorTimeStats) | |
console.log( | |
- 'time-stats: ' + callback.methodName + ' = ' + | |
+ 'time-stats: ' + | |
+ callback.methodName + | |
+ ' = ' + | |
(processingStartTime - callback.sendRequestTime) + | |
' + ' + | |
(Date.now() - processingStartTime), | |
@@ -506,7 +520,8 @@ InspectorBackendClass.Connection.prototype = { | |
var domainName = method[0]; | |
if (!(domainName in this._dispatchers)) { | |
InspectorBackendClass.reportProtocolError( | |
- 'Protocol Error: the message ' + messageObject.method + | |
+ 'Protocol Error: the message ' + | |
+ messageObject.method + | |
" is for non-existing domain '" + | |
domainName + | |
"'", | |
@@ -858,7 +873,8 @@ InspectorBackendClass.AgentPrototype.prototype = { | |
if (!args.length && !optionalFlag) { | |
errorCallback( | |
- "Protocol Error: Invalid number of arguments for method '" + method + | |
+ "Protocol Error: Invalid number of arguments for method '" + | |
+ method + | |
"' call. It must have the following arguments '" + | |
JSON.stringify(signature) + | |
"'.", | |
@@ -871,7 +887,8 @@ InspectorBackendClass.AgentPrototype.prototype = { | |
if (typeof value !== typeName) { | |
errorCallback( | |
- "Protocol Error: Invalid type of argument '" + paramName + | |
+ "Protocol Error: Invalid type of argument '" + | |
+ paramName + | |
"' for method '" + | |
method + | |
"' call. It must be '" + | |
@@ -888,11 +905,13 @@ InspectorBackendClass.AgentPrototype.prototype = { | |
} | |
if ( | |
- args.length === 1 && | |
+ args.length === | |
+ 1 && | |
(!allowExtraUndefinedArg || typeof args[0] !== 'undefined') | |
) { | |
errorCallback( | |
- "Protocol Error: Optional callback argument for method '" + method + | |
+ "Protocol Error: Optional callback argument for method '" + | |
+ method + | |
"' call must be a function but its type is '" + | |
typeof args[0] + | |
"'.", | |
@@ -902,7 +921,8 @@ InspectorBackendClass.AgentPrototype.prototype = { | |
if (args.length > 1) { | |
errorCallback( | |
- 'Protocol Error: Extra ' + args.length + | |
+ 'Protocol Error: Extra ' + | |
+ args.length + | |
" arguments in a call to method '" + | |
method + | |
"'.", | |
@@ -1017,13 +1037,16 @@ InspectorBackendClass.AgentPrototype.prototype = { | |
dispatchResponse: function(messageObject, methodName, callback) { | |
if ( | |
messageObject.error && | |
- messageObject.error.code !== InspectorBackendClass._DevToolsErrorCode && | |
+ messageObject.error.code !== | |
+ InspectorBackendClass._DevToolsErrorCode && | |
!InspectorBackendClass.Options.suppressRequestErrors && | |
!this._suppressErrorLogging | |
) { | |
var id = InspectorFrontendHost.isUnderTest() ? '##' : messageObject.id; | |
console.error( | |
- 'Request with id = ' + id + ' failed. ' + | |
+ 'Request with id = ' + | |
+ id + | |
+ ' failed. ' + | |
JSON.stringify(messageObject.error), | |
); | |
} | |
@@ -1127,7 +1150,9 @@ InspectorBackendClass.DispatcherPrototype.prototype = { | |
if (InspectorBackendClass.Options.dumpInspectorTimeStats) | |
console.log( | |
- 'time-stats: ' + messageObject.method + ' = ' + | |
+ 'time-stats: ' + | |
+ messageObject.method + | |
+ ' = ' + | |
(Date.now() - processingStartTime), | |
); | |
}, | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkManager.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkManager.js | |
index 9e93319..4a18005 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkManager.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkManager.js | |
@@ -268,16 +268,21 @@ WebInspector.NetworkDispatcher.prototype = { | |
// Don't check for mime-types in 304-resources. | |
if ( | |
networkRequest.hasErrorStatusCode() || | |
- networkRequest.statusCode === 304 || | |
- networkRequest.statusCode === 204 | |
+ networkRequest.statusCode === | |
+ 304 || | |
+ networkRequest.statusCode === | |
+ 204 | |
) | |
return true; | |
var resourceType = networkRequest.resourceType(); | |
if ( | |
- resourceType !== WebInspector.resourceTypes.Stylesheet && | |
- resourceType !== WebInspector.resourceTypes.Document && | |
- resourceType !== WebInspector.resourceTypes.TextTrack | |
+ resourceType !== | |
+ WebInspector.resourceTypes.Stylesheet && | |
+ resourceType !== | |
+ WebInspector.resourceTypes.Document && | |
+ resourceType !== | |
+ WebInspector.resourceTypes.TextTrack | |
) { | |
return true; | |
} | |
@@ -599,7 +604,8 @@ WebInspector.NetworkDispatcher.prototype = { | |
_appendRedirect: function(requestId, time, redirectURL) { | |
var originalNetworkRequest = this._inflightRequestsById[requestId]; | |
var previousRedirects = originalNetworkRequest.redirects || []; | |
- originalNetworkRequest.requestId = requestId + ':redirected.' + | |
+ originalNetworkRequest.requestId = requestId + | |
+ ':redirected.' + | |
previousRedirects.length; | |
delete originalNetworkRequest.redirects; | |
if (previousRedirects.length > 0) | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkRequest.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkRequest.js | |
index 8ca5c85..4156b39 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkRequest.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/NetworkRequest.js | |
@@ -285,7 +285,7 @@ WebInspector.NetworkRequest.prototype = { | |
* @param {number} x | |
*/ | |
increaseTransferSize: function(x) { | |
- this._transferSize = (this._transferSize || 0) + x; | |
+ this._transferSize = this._transferSize || 0 + x; | |
}, | |
/** | |
* @param {number} x | |
@@ -334,7 +334,8 @@ WebInspector.NetworkRequest.prototype = { | |
* @return {boolean} | |
*/ | |
cached: function() { | |
- return (!!this._fromMemoryCache || !!this._fromDiskCache) && | |
+ return !!this._fromMemoryCache || | |
+ !!this._fromDiskCache && | |
!this._transferSize; | |
}, | |
setFromMemoryCache: function() { | |
@@ -364,7 +365,7 @@ WebInspector.NetworkRequest.prototype = { | |
// Take startTime and responseReceivedTime from timing data for better accuracy. | |
// Timing's requestTime is a baseline in seconds, rest of the numbers there are ticks in millis. | |
this._startTime = x.requestTime; | |
- this._responseReceivedTime = x.requestTime + x.receiveHeadersEnd / 1000.0; | |
+ this._responseReceivedTime = x.requestTime + x.receiveHeadersEnd / 1000; | |
this._timing = x; | |
this.dispatchEventToListeners( | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/OverridesSupport.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/OverridesSupport.js | |
index f8e3a01..91d9c4e 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/OverridesSupport.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/OverridesSupport.js | |
@@ -180,9 +180,12 @@ WebInspector.OverridesSupport.GeolocationPosition.prototype = { | |
* @return {string} | |
*/ | |
toSetting: function() { | |
- return typeof this.latitude === 'number' && | |
- typeof this.longitude === 'number' && | |
- typeof this.error === 'string' | |
+ return typeof this.latitude === | |
+ 'number' && | |
+ typeof this.longitude === | |
+ 'number' && | |
+ typeof this.error === | |
+ 'string' | |
? this.latitude + '@' + this.longitude + ':' + this.error | |
: ''; | |
}, | |
@@ -324,8 +327,11 @@ WebInspector.OverridesSupport.DeviceOrientation._clearDeviceOrientationOverride | |
WebInspector.OverridesSupport.deviceSizeValidator = function(value) { | |
if ( | |
!value || | |
- /^[\d]+$/.test(value) && value >= 0 && | |
- value <= WebInspector.OverridesSupport.MaxDeviceSize | |
+ /^[\d]+$/.test(value) && | |
+ value >= | |
+ 0 && | |
+ value <= | |
+ WebInspector.OverridesSupport.MaxDeviceSize | |
) | |
return ''; | |
return WebInspector.UIString('Value must be non-negative integer'); | |
@@ -476,13 +482,19 @@ WebInspector.OverridesSupport.prototype = { | |
*/ | |
isEmulatingDevice: function(device) { | |
var sameResolution = this.settings.emulateResolution.get() | |
- ? this.settings.deviceWidth.get() === device.width && | |
- this.settings.deviceHeight.get() === device.height && | |
- this.settings.deviceScaleFactor.get() === device.deviceScaleFactor | |
+ ? this.settings.deviceWidth.get() === | |
+ device.width && | |
+ this.settings.deviceHeight.get() === | |
+ device.height && | |
+ this.settings.deviceScaleFactor.get() === | |
+ device.deviceScaleFactor | |
: !device.width && !device.height && !device.deviceScaleFactor; | |
- return this.settings.userAgent.get() === device.userAgent && | |
- this.settings.emulateTouch.get() === device.touch && | |
- this.settings.emulateMobile.get() === device.mobile && | |
+ return this.settings.userAgent.get() === | |
+ device.userAgent && | |
+ this.settings.emulateTouch.get() === | |
+ device.touch && | |
+ this.settings.emulateMobile.get() === | |
+ device.mobile && | |
sameResolution; | |
}, | |
/** | |
@@ -695,8 +707,12 @@ WebInspector.OverridesSupport.prototype = { | |
scale = this._deviceScale; | |
} else { | |
scale = 1; | |
- while (available.width < dipWidth * scale || | |
- available.height < dipHeight * scale) scale *= 0.8; | |
+ while (available.width < | |
+ dipWidth * | |
+ scale || | |
+ available.height < | |
+ dipHeight * | |
+ scale) scale *= 0.8; | |
} | |
} | |
@@ -706,8 +722,12 @@ WebInspector.OverridesSupport.prototype = { | |
scale, | |
); | |
if ( | |
- scale === 1 && available.width >= dipWidth && | |
- available.height >= dipHeight | |
+ scale === | |
+ 1 && | |
+ available.width >= | |
+ dipWidth && | |
+ available.height >= | |
+ dipHeight | |
) { | |
// When we have enough space, no page size override is required. This will speed things up and remove lag. | |
overrideWidth = 0; | |
@@ -907,7 +927,8 @@ WebInspector.OverridesSupport.prototype = { | |
* @return {string} | |
*/ | |
warningMessage: function() { | |
- return this._deviceMetricsWarningMessage || this._userAgentWarningMessage || | |
+ return this._deviceMetricsWarningMessage || | |
+ this._userAgentWarningMessage || | |
''; | |
}, | |
clearWarningMessage: function() { | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/PaintProfiler.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/PaintProfiler.js | |
index 25dde5b..40f37a9 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/PaintProfiler.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/PaintProfiler.js | |
@@ -156,7 +156,7 @@ WebInspector.PaintProfilerSnapshot.prototype = { | |
this._id, | |
firstStep || undefined, | |
lastStep || undefined, | |
- scale || 1.0, | |
+ scale || 1, | |
wrappedCallback, | |
); | |
}, | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RemoteObject.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RemoteObject.js | |
index 4952214..5d63e83 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RemoteObject.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RemoteObject.js | |
@@ -619,8 +619,11 @@ WebInspector.RemoteObjectImpl.prototype = { | |
* @return {boolean} | |
*/ | |
isNode: function() { | |
- return !!this._objectId && this.type === 'object' && | |
- this.subtype === 'node'; | |
+ return !!this._objectId && | |
+ this.type === | |
+ 'object' && | |
+ this.subtype === | |
+ 'node'; | |
}, | |
/** | |
* @override | |
@@ -1154,7 +1157,8 @@ WebInspector.MapEntryLocalJSONObject.prototype = { | |
get description() { | |
if (!this._cachedDescription) { | |
var children = this._children(); | |
- this._cachedDescription = '{' + this._formatValue(children[0].value) + | |
+ this._cachedDescription = '{' + | |
+ this._formatValue(children[0].value) + | |
' => ' + | |
this._formatValue(children[1].value) + | |
'}'; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Resource.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Resource.js | |
index 94ff6b6..8fac9ac 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Resource.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Resource.js | |
@@ -95,7 +95,9 @@ WebInspector.Resource.contentAsDataURL = function( | |
const maxDataUrlSize = 1024 * 1024; | |
if (content === null || content.length > maxDataUrlSize) return null; | |
- return 'data:' + mimeType + (charset ? ';charset=' + charset : '') + | |
+ return 'data:' + | |
+ mimeType + | |
+ (charset ? ';charset=' + charset : '') + | |
(contentEncoded ? ';base64' : '') + | |
',' + | |
content; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ResourceTreeModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ResourceTreeModel.js | |
index 07d299f..a1203c6 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ResourceTreeModel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ResourceTreeModel.js | |
@@ -323,7 +323,8 @@ WebInspector.ResourceTreeModel.prototype = { | |
var request /** @type {!WebInspector.NetworkRequest} */ = event.data; | |
if ( | |
request.failed || | |
- request.resourceType() === WebInspector.resourceTypes.XHR | |
+ request.resourceType() === | |
+ WebInspector.resourceTypes.XHR | |
) | |
return; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RuntimeModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RuntimeModel.js | |
index 977b744..4e39fd2 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RuntimeModel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/RuntimeModel.js | |
@@ -77,7 +77,8 @@ WebInspector.RuntimeModel.prototype = { | |
_executionContextCreated: function(context) { | |
// The private script context should be hidden behind an experiment. | |
if ( | |
- context.name == WebInspector.RuntimeModel._privateScript && | |
+ context.name == | |
+ WebInspector.RuntimeModel._privateScript && | |
!context.origin && | |
!Runtime.experiments.isEnabled('privateScriptInspection') | |
) { | |
@@ -470,8 +471,13 @@ WebInspector.ExecutionContext.prototype = { | |
for (var o = object; o; o = o.__proto__) { | |
try { | |
if ( | |
- type === 'array' && o === object && ArrayBuffer.isView(o) && | |
- o.length > 9999 | |
+ type === | |
+ 'array' && | |
+ o === | |
+ object && | |
+ ArrayBuffer.isView(o) && | |
+ o.length > | |
+ 9999 | |
) | |
continue; | |
var names = Object.getOwnPropertyNames(o); | |
@@ -490,8 +496,12 @@ WebInspector.ExecutionContext.prototype = { | |
receivedPropertyNames.bind(this), | |
); | |
else if ( | |
- result.type === 'string' || result.type === 'number' || | |
- result.type === 'boolean' | |
+ result.type === | |
+ 'string' || | |
+ result.type === | |
+ 'number' || | |
+ result.type === | |
+ 'boolean' | |
) | |
this.evaluate( | |
'(' + getCompletions + ')("' + result.type + '")', | |
@@ -632,7 +642,8 @@ WebInspector.ExecutionContext.prototype = { | |
if (bracketNotation) { | |
if (!/^[0-9]+$/.test(property)) | |
- property = quoteUsed + property.escapeCharacters(quoteUsed + '\\') + | |
+ property = quoteUsed + | |
+ property.escapeCharacters(quoteUsed + '\\') + | |
quoteUsed; | |
property += ']'; | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Script.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Script.js | |
index 8a9531c..62dadc4 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Script.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Script.js | |
@@ -212,7 +212,8 @@ WebInspector.Script.prototype = { | |
// FIXME: support debugData.stack_update_needs_step_in flag by calling WebInspector.debugger_model.callStackModified | |
if (!error) this._source = newSource; | |
var needsStepIn = !!debugData && | |
- debugData['stack_update_needs_step_in'] === true; | |
+ debugData['stack_update_needs_step_in'] === | |
+ true; | |
callback(error, errorData, callFrames, asyncStackTrace, needsStepIn); | |
if (!error) | |
this.dispatchEventToListeners( | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ServiceWorkerManager.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ServiceWorkerManager.js | |
index fa50ae5..f3322d6 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ServiceWorkerManager.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/ServiceWorkerManager.js | |
@@ -224,7 +224,8 @@ WebInspector.ServiceWorkerManager.prototype = { | |
_isDeletedVersion: function(version) { | |
return version.runningStatus == | |
ServiceWorkerAgent.ServiceWorkerVersionRunningStatus.Stopped && | |
- version.status == ServiceWorkerAgent.ServiceWorkerVersionStatus.Redundant; | |
+ version.status == | |
+ ServiceWorkerAgent.ServiceWorkerVersionStatus.Redundant; | |
}, | |
/** | |
* @param {!WebInspector.Event} event | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/SourceMap.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/SourceMap.js | |
index 92f7b99..44691d1 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/SourceMap.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/SourceMap.js | |
@@ -194,8 +194,12 @@ WebInspector.SourceMap.prototype = { | |
var middle = first + step; | |
var mapping = this._mappings[middle]; | |
if ( | |
- lineNumber < mapping[0] || | |
- lineNumber === mapping[0] && columnNumber < mapping[1] | |
+ lineNumber < | |
+ mapping[0] || | |
+ lineNumber === | |
+ mapping[0] && | |
+ columnNumber < | |
+ mapping[1] | |
) | |
count = step; | |
else { | |
@@ -205,9 +209,14 @@ WebInspector.SourceMap.prototype = { | |
} | |
var entry = this._mappings[first]; | |
if ( | |
- !first && entry && | |
- (lineNumber < entry[0] || | |
- lineNumber === entry[0] && columnNumber < entry[1]) | |
+ !first && | |
+ entry && | |
+ (lineNumber < | |
+ entry[0] || | |
+ lineNumber === | |
+ entry[0] && | |
+ columnNumber < | |
+ entry[1]) | |
) | |
return null; | |
return entry; | |
@@ -333,7 +342,7 @@ WebInspector.SourceMap.prototype = { | |
var shift = 0; | |
do { | |
var digit = this._base64Map[stringCharIterator.next()]; | |
- result += (digit & this._VLQ_BASE_MASK) << shift; | |
+ result += digit & this._VLQ_BASE_MASK << shift; | |
shift += this._VLQ_BASE_SHIFT; | |
} while (digit & this._VLQ_CONTINUATION_MASK); | |
@@ -343,7 +352,7 @@ WebInspector.SourceMap.prototype = { | |
return negative ? -result : result; | |
}, | |
_VLQ_BASE_SHIFT: 5, | |
- _VLQ_BASE_MASK: (1 << 5) - 1, | |
+ _VLQ_BASE_MASK: 1 << 5 - 1, | |
_VLQ_CONTINUATION_MASK: 1 << 5, | |
}; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Target.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Target.js | |
index b6dee99..8aa93a4 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Target.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/Target.js | |
@@ -410,9 +410,12 @@ WebInspector.TargetManager.prototype = { | |
var listeners = this._modelListeners[eventType]; | |
for (var i = 0; i < listeners.length; ++i) { | |
if ( | |
- listeners[i].modelClass === modelClass && | |
- listeners[i].listener === listener && | |
- listeners[i].thisObject === thisObject | |
+ listeners[i].modelClass === | |
+ modelClass && | |
+ listeners[i].listener === | |
+ listener && | |
+ listeners[i].thisObject === | |
+ thisObject | |
) | |
listeners.splice(i--, 1); | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/TracingModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/TracingModel.js | |
index db5acdb..0d937be 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/TracingModel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sdk/TracingModel.js | |
@@ -84,8 +84,10 @@ WebInspector.TracingModel.isNestableAsyncPhase = function(phase) { | |
* @return {boolean} | |
*/ | |
WebInspector.TracingModel.isAsyncBeginPhase = function(phase) { | |
- return phase === WebInspector.TracingModel.Phase.AsyncBegin || | |
- phase === WebInspector.TracingModel.Phase.NestableAsyncBegin; | |
+ return phase === | |
+ WebInspector.TracingModel.Phase.AsyncBegin || | |
+ phase === | |
+ WebInspector.TracingModel.Phase.NestableAsyncBegin; | |
}; | |
/** | |
@@ -212,7 +214,7 @@ WebInspector.TracingModel.prototype = { | |
(!this._minimumRecordTime || timestamp < this._minimumRecordTime) | |
) | |
this._minimumRecordTime = timestamp; | |
- var endTimeStamp = (payload.ts + (payload.dur || 0)) / 1000; | |
+ var endTimeStamp = payload.ts + (payload.dur || 0) / 1000; | |
this._maximumRecordTime = Math.max(this._maximumRecordTime, endTimeStamp); | |
var event = process._addEvent(payload); | |
if (!event) return; | |
@@ -226,7 +228,7 @@ WebInspector.TracingModel.prototype = { | |
event.name === | |
WebInspector.TracingModel.DevToolsMetadataEvent.TracingStartedInPage && | |
event.category === | |
- WebInspector.TracingModel.DevToolsMetadataEventCategory | |
+ WebInspector.TracingModel.DevToolsMetadataEventCategory | |
) { | |
this._devtoolsPageMetadataEvents.push(event); | |
} | |
@@ -234,7 +236,7 @@ WebInspector.TracingModel.prototype = { | |
event.name === | |
WebInspector.TracingModel.DevToolsMetadataEvent.TracingSessionIdForWorker && | |
event.category === | |
- WebInspector.TracingModel.DevToolsMetadataEventCategory | |
+ WebInspector.TracingModel.DevToolsMetadataEventCategory | |
) { | |
this._devtoolsWorkerMetadataEvents.push(event); | |
} | |
@@ -385,7 +387,8 @@ WebInspector.TracingModel.prototype = { | |
var top = openEventsStack.pop(); | |
if (top.name !== event.name) { | |
console.error( | |
- 'Begin/end event mismatch for nestable async event, ' + top.name + | |
+ 'Begin/end event mismatch for nestable async event, ' + | |
+ top.name + | |
' vs. ' + | |
event.name, | |
); | |
@@ -430,7 +433,9 @@ WebInspector.TracingModel.prototype = { | |
) { | |
console.assert( | |
false, | |
- 'Async event step phase mismatch: ' + lastStep.phase + ' at ' + | |
+ 'Async event step phase mismatch: ' + | |
+ lastStep.phase + | |
+ ' at ' + | |
lastStep.startTime + | |
' vs. ' + | |
event.phase + | |
@@ -534,7 +539,7 @@ WebInspector.TracingModel.Event.fromPayload = function(payload, thread) { | |
"Missing mandatory event argument 'args' at " + payload.ts / 1000, | |
); | |
if (typeof payload.dur === 'number') | |
- event.setEndTime((payload.ts + payload.dur) / 1000); | |
+ event.setEndTime(payload.ts + payload.dur / 1000); | |
if (payload.id) event.id = payload.id; | |
return event; | |
}; | |
@@ -559,7 +564,8 @@ WebInspector.TracingModel.Event.prototype = { | |
for (var name in args) { | |
if (name in this.args) | |
console.error( | |
- 'Same argument name (' + name + | |
+ 'Same argument name (' + | |
+ name + | |
') is used for begin and end phases of ' + | |
this.name, | |
); | |
@@ -719,8 +725,10 @@ WebInspector.TracingModel.AsyncEvent.prototype = { | |
_addStep: function(event) { | |
this.steps.push(event); | |
if ( | |
- event.phase === WebInspector.TracingModel.Phase.AsyncEnd || | |
- event.phase === WebInspector.TracingModel.Phase.NestableAsyncEnd | |
+ event.phase === | |
+ WebInspector.TracingModel.Phase.AsyncEnd || | |
+ event.phase === | |
+ WebInspector.TracingModel.Phase.NestableAsyncEnd | |
) { | |
this.setEndTime(event.startTime); | |
// FIXME: ideally, we shouldn't do this, but this makes the logic of converting | |
@@ -904,7 +912,10 @@ WebInspector.TracingModel.Thread.prototype = { | |
var top = this._stack.pop(); | |
if (top.name !== payload.name || top.category !== payload.cat) | |
console.error( | |
- 'B/E events mismatch at ' + top.startTime + ' (' + top.name + | |
+ 'B/E events mismatch at ' + | |
+ top.startTime + | |
+ ' (' + | |
+ top.name + | |
') vs. ' + | |
timestamp + | |
' (' + | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/snippets/ScriptSnippetModel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/snippets/ScriptSnippetModel.js | |
index 8578d85..1c35a52 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/snippets/ScriptSnippetModel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/snippets/ScriptSnippetModel.js | |
@@ -167,7 +167,11 @@ WebInspector.ScriptSnippetModel.prototype = { | |
renameScriptSnippet: function(name, newName, callback) { | |
newName = newName.trim(); | |
if ( | |
- !newName || newName.indexOf('/') !== -1 || name === newName || | |
+ !newName || | |
+ newName.indexOf('/') !== | |
+ -1 || | |
+ name === | |
+ newName || | |
this._snippetStorage.snippetForName(newName) | |
) { | |
callback(false); | |
@@ -468,7 +472,8 @@ WebInspector.SnippetScriptMapping.prototype = { | |
var snippetId = this._scriptSnippetModel._snippetIdForUISourceCode.get( | |
uiSourceCode, | |
); | |
- return WebInspector.ScriptSnippetModel.snippetSourceURLPrefix + snippetId + | |
+ return WebInspector.ScriptSnippetModel.snippetSourceURLPrefix + | |
+ snippetId + | |
evaluationSuffix; | |
}, | |
_reset: function() { | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorTextEditor.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorTextEditor.js | |
index da06259..5c4ac1b 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorTextEditor.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/CodeMirrorTextEditor.js | |
@@ -500,7 +500,8 @@ WebInspector.CodeMirrorTextEditor.prototype = { | |
var line = this.line(selection.startLine); | |
var tokenValue = line.substring(token.startColumn, token.endColumn); | |
if ( | |
- tokenValue[0] === tokenValue[tokenValue.length - 1] && | |
+ tokenValue[0] === | |
+ tokenValue[tokenValue.length - 1] && | |
(tokenValue[0] === "'" || tokenValue[0] === '"') | |
) | |
return CodeMirror.Pass; | |
@@ -516,8 +517,10 @@ WebInspector.CodeMirrorTextEditor.prototype = { | |
if (!position) continue; | |
var line = this.line(position.lineNumber); | |
if ( | |
- line.length === position.columnNumber && | |
- WebInspector.TextUtils.lineIndent(line).length === line.length | |
+ line.length === | |
+ position.columnNumber && | |
+ WebInspector.TextUtils.lineIndent(line).length === | |
+ line.length | |
) | |
this._codeMirror.replaceRange( | |
'', | |
@@ -585,7 +588,8 @@ WebInspector.CodeMirrorTextEditor.prototype = { | |
function isWordStart(text, charNumber) { | |
var position = charNumber; | |
var nextPosition = charNumber + 1; | |
- return valid(position, text.length) && valid(nextPosition, text.length) && | |
+ return valid(position, text.length) && | |
+ valid(nextPosition, text.length) && | |
WebInspector.TextUtils.isWordChar(text[position]) && | |
WebInspector.TextUtils.isWordChar(text[nextPosition]) && | |
WebInspector.TextUtils.isUpperCase(text[position]) && | |
@@ -600,7 +604,8 @@ WebInspector.CodeMirrorTextEditor.prototype = { | |
function isWordEnd(text, charNumber) { | |
var position = charNumber; | |
var prevPosition = charNumber - 1; | |
- return valid(position, text.length) && valid(prevPosition, text.length) && | |
+ return valid(position, text.length) && | |
+ valid(prevPosition, text.length) && | |
WebInspector.TextUtils.isWordChar(text[position]) && | |
WebInspector.TextUtils.isWordChar(text[prevPosition]) && | |
WebInspector.TextUtils.isUpperCase(text[position]) && | |
@@ -624,8 +629,14 @@ WebInspector.CodeMirrorTextEditor.prototype = { | |
var length = text.length; | |
if ( | |
- columnNumber === length && direction === 1 || | |
- columnNumber === 0 && direction === -1 | |
+ columnNumber === | |
+ length && | |
+ direction === | |
+ 1 || | |
+ columnNumber === | |
+ 0 && | |
+ direction === | |
+ -1 | |
) | |
return this._normalizePositionForOverlappingColumn( | |
lineNumber, | |
@@ -656,7 +667,8 @@ WebInspector.CodeMirrorTextEditor.prototype = { | |
} | |
charNumber += direction; | |
- while (valid(charNumber, length) && !isWordStart(text, charNumber) && | |
+ while (valid(charNumber, length) && | |
+ !isWordStart(text, charNumber) && | |
!isWordEnd(text, charNumber) && | |
WebInspector.TextUtils.isWordChar(text[charNumber])) | |
charNumber += direction; | |
@@ -870,9 +882,14 @@ WebInspector.CodeMirrorTextEditor.prototype = { | |
*/, | |
cursorPositionToCoordinates: function(lineNumber, column) { | |
if ( | |
- lineNumber >= this._codeMirror.lineCount() || lineNumber < 0 || | |
- column < 0 || | |
- column > this._codeMirror.getLine(lineNumber).length | |
+ lineNumber >= | |
+ this._codeMirror.lineCount() || | |
+ lineNumber < | |
+ 0 || | |
+ column < | |
+ 0 || | |
+ column > | |
+ this._codeMirror.getLine(lineNumber).length | |
) | |
return null; | |
var metrics = this._codeMirror.cursorCoords(new CodeMirror.Pos( | |
@@ -898,9 +915,16 @@ WebInspector.CodeMirrorTextEditor.prototype = { | |
return null; | |
var gutterBox = this._codeMirror.getGutterElement().boxInWindow(); | |
if ( | |
- x >= gutterBox.x && x <= gutterBox.x + gutterBox.width && | |
- y >= gutterBox.y && | |
- y <= gutterBox.y + gutterBox.height | |
+ x >= | |
+ gutterBox.x && | |
+ x <= | |
+ gutterBox.x + | |
+ gutterBox.width && | |
+ y >= | |
+ gutterBox.y && | |
+ y <= | |
+ gutterBox.y + | |
+ gutterBox.height | |
) | |
return null; | |
var coords = this._codeMirror.coordsChar({left: x, top: y}); | |
@@ -915,7 +939,7 @@ WebInspector.CodeMirrorTextEditor.prototype = { | |
return null; | |
var token = this._codeMirror.getTokenAt(new CodeMirror.Pos( | |
lineNumber, | |
- (column || 0) + 1, | |
+ column || 0 + 1, | |
)); | |
if (!token) return null; | |
return {startColumn: token.start, endColumn: token.end, type: token.type}; | |
@@ -963,7 +987,8 @@ WebInspector.CodeMirrorTextEditor.prototype = { | |
var spaces = 0; | |
while (spaces < | |
WebInspector.CodeMirrorTextEditor.MaximumNumberOfWhitespacesPerSingleSpan && | |
- stream.peek() === ' ') { | |
+ stream.peek() === | |
+ ' ') { | |
++spaces; | |
stream.next(); | |
} | |
@@ -1314,7 +1339,8 @@ WebInspector.CodeMirrorTextEditor.prototype = { | |
var wordStart = column; | |
if (column !== 0 && isWordChar(line.charAt(column - 1))) { | |
wordStart = column - 1; | |
- while (wordStart > 0 && | |
+ while (wordStart > | |
+ 0 && | |
isWordChar(line.charAt(wordStart - 1))) --wordStart; | |
} | |
var wordEnd = column; | |
@@ -1330,8 +1356,8 @@ WebInspector.CodeMirrorTextEditor.prototype = { | |
* @param {!Array.<!CodeMirror.ChangeObject>} changes | |
*/, | |
_changes: function(codeMirror, changes) { | |
- if (!changes.length) | |
- return; // We do not show "scroll beyond end of file" span for one line documents, so we need to check if "document has one line" changed. | |
+ if (!changes.length) return; | |
+ // We do not show "scroll beyond end of file" span for one line documents, so we need to check if "document has one line" changed. | |
var hasOneLine = this._codeMirror.lineCount() === 1; | |
if (hasOneLine !== this._hasOneLine) this._resizeEditor(); | |
this._hasOneLine = hasOneLine; | |
@@ -1570,7 +1596,8 @@ WebInspector.CodeMirrorTextEditor.prototype = { | |
); | |
}, | |
__proto__: WebInspector.VBox.prototype, | |
-}; /** | |
+}; | |
+/** | |
* @constructor | |
* @implements {WebInspector.TextEditorPositionHandle} | |
* @param {!CodeMirror} codeMirror | |
@@ -1596,11 +1623,15 @@ WebInspector.CodeMirrorPositionHandle.prototype = { | |
* @return {boolean} | |
*/, | |
equal: function(positionHandle) { | |
- return positionHandle._lineHandle === this._lineHandle && | |
- positionHandle._columnNumber == this._columnNumber && | |
- positionHandle._codeMirror === this._codeMirror; | |
+ return positionHandle._lineHandle === | |
+ this._lineHandle && | |
+ positionHandle._columnNumber == | |
+ this._columnNumber && | |
+ positionHandle._codeMirror === | |
+ this._codeMirror; | |
}, | |
-}; /** | |
+}; | |
+/** | |
* @constructor | |
* @param {!WebInspector.CodeMirrorTextEditor} textEditor | |
* @param {!CodeMirror} codeMirror | |
@@ -1710,11 +1741,14 @@ WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype = { | |
*/, | |
_isWord: function(selectedText, lineNumber, startColumn, endColumn) { | |
var line = this._codeMirror.getLine(lineNumber); | |
- var leftBound = startColumn === 0 || | |
+ var leftBound = startColumn === | |
+ 0 || | |
!WebInspector.TextUtils.isWordChar(line.charAt(startColumn - 1)); | |
- var rightBound = endColumn === line.length || | |
+ var rightBound = endColumn === | |
+ line.length || | |
!WebInspector.TextUtils.isWordChar(line.charAt(endColumn)); | |
- return leftBound && rightBound && | |
+ return leftBound && | |
+ rightBound && | |
WebInspector.TextUtils.isWord(selectedText); | |
}, | |
_removeHighlight: function() { | |
@@ -1768,7 +1802,8 @@ WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype = { | |
eatenChar = stream.next(); | |
} while (eatenChar && | |
(WebInspector.TextUtils.isWordChar(eatenChar) || | |
- stream.peek() !== tokenFirstChar)); | |
+ stream.peek() !== | |
+ tokenFirstChar)); | |
} /** | |
* @param {function(!CodeMirror.StringStream)} highlighter | |
* @param {?CodeMirror.Pos} selectionStart | |
@@ -1781,7 +1816,8 @@ WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype = { | |
selectionStart: selectionStart, | |
}; | |
}, | |
-}; /** | |
+}; | |
+/** | |
* @constructor | |
* @param {!CodeMirror} codeMirror | |
*/ | |
@@ -1803,7 +1839,8 @@ WebInspector.CodeMirrorTextEditor.BlockIndentController.prototype = { | |
: selection.anchor; | |
var line = codeMirror.getLine(start.line); | |
var indent = WebInspector.TextUtils.lineIndent(line); | |
- var indentToInsert = '\n' + indent + | |
+ var indentToInsert = '\n' + | |
+ indent + | |
codeMirror._codeMirrorTextEditor.indent(); | |
var isCollapsedBlock = false; | |
if (selection.head.ch === 0) return CodeMirror.Pass; | |
@@ -1866,7 +1903,8 @@ WebInspector.CodeMirrorTextEditor.BlockIndentController.prototype = { | |
codeMirror.setSelections(updatedSelections); | |
codeMirror.replaceSelections(replacements); | |
}, | |
-}; /** | |
+}; | |
+/** | |
* @constructor | |
* @param {!CodeMirror} codeMirror | |
*/ | |
@@ -1906,7 +1944,8 @@ WebInspector.CodeMirrorTextEditor.FixWordMovement = function(codeMirror) { | |
keyMap['Shift-' + leftKey] = moveLeft.bind(null, true); | |
keyMap['Shift-' + rightKey] = moveRight.bind(null, true); | |
codeMirror.addKeyMap(keyMap); | |
-}; /** | |
+}; | |
+/** | |
* @constructor | |
* @param {!WebInspector.CodeMirrorTextEditor} textEditor | |
* @param {!CodeMirror} codeMirror | |
@@ -2065,7 +2104,8 @@ WebInspector.CodeMirrorTextEditor.SelectNextOccurrenceController.prototype = { | |
matchedColumnNumber + textToFind.length, | |
); | |
}, | |
-}; /** | |
+}; | |
+/** | |
* @param {string} modeName | |
* @param {string} tokenPrefix | |
*/ | |
@@ -2093,7 +2133,8 @@ WebInspector.CodeMirrorTextEditor._overrideModeWithPrefixedTokens = function( | |
? tokenPrefix + token.split(/ +/).join(' ' + tokenPrefix) | |
: token; | |
} | |
-}; /** | |
+}; | |
+/** | |
* @interface | |
*/ | |
WebInspector.TextEditorPositionHandle = function() { | |
@@ -2109,7 +2150,8 @@ WebInspector.TextEditorPositionHandle.prototype = { | |
*/, | |
equal: function(positionHandle) { | |
}, | |
-}; /** | |
+}; | |
+/** | |
* @interface | |
*/ | |
WebInspector.TextEditorDelegate = function() { | |
@@ -2158,6 +2200,8 @@ WebInspector.CodeMirrorTextEditor._overrideModeWithPrefixedTokens( | |
WebInspector.CodeMirrorTextEditor._overrideModeWithPrefixedTokens( | |
'xml', | |
'xml-', | |
-); /** @typedef {{lineNumber: number, event: !Event}} */ | |
-WebInspector.CodeMirrorTextEditor.GutterClickEventData; /** @enum {string} */ | |
+); | |
+/** @typedef {{lineNumber: number, event: !Event}} */ | |
+WebInspector.CodeMirrorTextEditor.GutterClickEventData; | |
+/** @enum {string} */ | |
WebInspector.CodeMirrorTextEditor.Events = {GutterClick: 'GutterClick'}; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/ImageView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/ImageView.js | |
index bcb3756..8179625 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/ImageView.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/ImageView.js | |
@@ -123,7 +123,7 @@ WebInspector.ImageView.prototype = { | |
*/, | |
_base64ToSize: function(content) { | |
if (!content || !content.length) return 0; | |
- var size = (content.length || 0) * 3 / 4; | |
+ var size = content.length || 0 * 3 / 4; | |
if (content.length > 0 && content[content.length - 1] === '=') size--; | |
if (content.length > 1 && content[content.length - 2] === '=') size--; | |
return size; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/SourceFrame.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/SourceFrame.js | |
index 3b034a0..46d2aa0 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/SourceFrame.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/SourceFrame.js | |
@@ -270,8 +270,12 @@ WebInspector.SourceFrame.prototype = { | |
_simplifyMimeType: function(content, mimeType) { | |
if (!mimeType) return ''; | |
if ( | |
- mimeType.indexOf('javascript') >= 0 || mimeType.indexOf('jscript') >= 0 || | |
- mimeType.indexOf('ecmascript') >= 0 | |
+ mimeType.indexOf('javascript') >= | |
+ 0 || | |
+ mimeType.indexOf('jscript') >= | |
+ 0 || | |
+ mimeType.indexOf('ecmascript') >= | |
+ 0 | |
) | |
return 'text/javascript'; | |
// A hack around the fact that files with "php" extension might be either standalone or html embedded php scripts. | |
@@ -453,7 +457,8 @@ WebInspector.SourceFrame.prototype = { | |
}, | |
jumpToSearchResult: function(index) { | |
if (!this.loaded || !this._searchResults.length) return; | |
- this._currentSearchResultIndex = (index + this._searchResults.length) % | |
+ this._currentSearchResultIndex = index + | |
+ this._searchResults.length % | |
this._searchResults.length; | |
if (this._currentSearchMatchChangedCallback) | |
this._currentSearchMatchChangedCallback(this._currentSearchResultIndex); | |
@@ -513,7 +518,8 @@ WebInspector.SourceFrame.prototype = { | |
var lastRange = ranges[lastRangeIndex]; | |
var replacementLineEndings = replacement.lineEndings(); | |
var replacementLineCount = replacementLineEndings.length; | |
- var lastLineNumber = lastRange.startLine + replacementLineEndings.length - | |
+ var lastLineNumber = lastRange.startLine + | |
+ replacementLineEndings.length - | |
1; | |
var lastColumnNumber = lastRange.startColumn; | |
if (replacementLineEndings.length > 1) | |
@@ -709,8 +715,10 @@ WebInspector.SourceFrameMessage.fromConsoleMessage = function( | |
lineNumber, | |
) { | |
console.assert( | |
- consoleMessage.level === WebInspector.ConsoleMessage.MessageLevel.Error || | |
- consoleMessage.level === WebInspector.ConsoleMessage.MessageLevel.Warning, | |
+ consoleMessage.level === | |
+ WebInspector.ConsoleMessage.MessageLevel.Error || | |
+ consoleMessage.level === | |
+ WebInspector.ConsoleMessage.MessageLevel.Warning, | |
); | |
var level = consoleMessage.level === | |
WebInspector.ConsoleMessage.MessageLevel.Error | |
@@ -754,10 +762,14 @@ WebInspector.SourceFrameMessage.prototype = { | |
* @return {boolean} | |
*/ | |
isEqual: function(another) { | |
- return this.messageText() === another.messageText() && | |
- this.level() === another.level() && | |
- this.lineNumber() === another.lineNumber() && | |
- this.columnNumber() === another.columnNumber(); | |
+ return this.messageText() === | |
+ another.messageText() && | |
+ this.level() === | |
+ another.level() && | |
+ this.lineNumber() === | |
+ another.lineNumber() && | |
+ this.columnNumber() === | |
+ another.columnNumber(); | |
}, | |
}; | |
@@ -882,7 +894,9 @@ WebInspector.SourceFrame.RowMessageBucket.prototype = { | |
); | |
/** @const */ | |
var codeMirrorLinesLeftPadding = 4; | |
- this._wave.style.left = start.x - base.x + codeMirrorLinesLeftPadding + | |
+ this._wave.style.left = start.x - | |
+ base.x + | |
+ codeMirrorLinesLeftPadding + | |
'px'; | |
this._wave.style.width = end.x - start.x + 'px'; | |
}, | |
@@ -958,7 +972,7 @@ WebInspector.SourceFrame.RowMessageBucket.prototype = { | |
maxMessage, | |
message, | |
) < | |
- 0 | |
+ 0 | |
) | |
maxMessage = message; | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/TextEditorAutocompleteController.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/TextEditorAutocompleteController.js | |
index 3ca7867..e409ae8 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/TextEditorAutocompleteController.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/source_frame/TextEditorAutocompleteController.js | |
@@ -61,12 +61,19 @@ WebInspector.TextEditorAutocompleteController.prototype = { | |
var singleCharInput = false; | |
for (var changeIndex = 0; changeIndex < changes.length; ++changeIndex) { | |
var changeObject = changes[changeIndex]; | |
- singleCharInput = changeObject.origin === '+input' && | |
- changeObject.text.length === 1 && | |
- changeObject.text[0].length === 1 || | |
- this._suggestBox && changeObject.origin === '+delete' && | |
- changeObject.removed.length === 1 && | |
- changeObject.removed[0].length === 1; | |
+ singleCharInput = changeObject.origin === | |
+ '+input' && | |
+ changeObject.text.length === | |
+ 1 && | |
+ changeObject.text[0].length === | |
+ 1 || | |
+ this._suggestBox && | |
+ changeObject.origin === | |
+ '+delete' && | |
+ changeObject.removed.length === | |
+ 1 && | |
+ changeObject.removed[0].length === | |
+ 1; | |
} | |
if (singleCharInput) setImmediate(this.autocomplete.bind(this)); | |
}, | |
@@ -132,8 +139,11 @@ WebInspector.TextEditorAutocompleteController.prototype = { | |
var oldPrefixRange = this._prefixRange; | |
this._prefixRange = prefixRange; | |
if ( | |
- !oldPrefixRange || prefixRange.startLine !== oldPrefixRange.startLine || | |
- prefixRange.startColumn !== oldPrefixRange.startColumn | |
+ !oldPrefixRange || | |
+ prefixRange.startLine !== | |
+ oldPrefixRange.startLine || | |
+ prefixRange.startColumn !== | |
+ oldPrefixRange.startColumn | |
) | |
this._updateAnchorBox(); | |
this._suggestBox.updateSuggestions( | |
@@ -188,7 +198,8 @@ WebInspector.TextEditorAutocompleteController.prototype = { | |
*/ | |
acceptSuggestion: function() { | |
if ( | |
- this._prefixRange.endColumn - this._prefixRange.startColumn === | |
+ this._prefixRange.endColumn - | |
+ this._prefixRange.startColumn === | |
this._currentSuggestion.length | |
) | |
return; | |
@@ -230,9 +241,12 @@ WebInspector.TextEditorAutocompleteController.prototype = { | |
if (!this._suggestBox) return; | |
var cursor = this._codeMirror.getCursor(); | |
if ( | |
- cursor.line !== this._prefixRange.startLine || | |
- cursor.ch > this._prefixRange.endColumn || | |
- cursor.ch <= this._prefixRange.startColumn | |
+ cursor.line !== | |
+ this._prefixRange.startLine || | |
+ cursor.ch > | |
+ this._prefixRange.endColumn || | |
+ cursor.ch <= | |
+ this._prefixRange.startColumn | |
) | |
this.finishAutocomplete(); | |
}, | |
@@ -341,8 +355,10 @@ WebInspector.SimpleAutocompleteDelegate.prototype = { | |
return completions; | |
function sortSuggestions(a, b) { | |
- return dictionary.wordCount(b) - dictionary.wordCount(a) || | |
- a.length - b.length; | |
+ return dictionary.wordCount(b) - | |
+ dictionary.wordCount(a) || | |
+ a.length - | |
+ b.length; | |
} | |
function excludeFilter(excludeWord, word) { | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AdvancedSearchView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AdvancedSearchView.js | |
index 61f49eb..482b8b2 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AdvancedSearchView.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/AdvancedSearchView.js | |
@@ -353,8 +353,10 @@ WebInspector.AdvancedSearchView.ToggleDrawerViewActionDelegate.prototype = { | |
handleAction: function() { | |
var searchView = WebInspector.AdvancedSearchView._instance; | |
if ( | |
- !searchView || !searchView.isShowing() || | |
- searchView._search !== document.activeElement | |
+ !searchView || | |
+ !searchView.isShowing() || | |
+ searchView._search !== | |
+ document.activeElement | |
) { | |
var selection = WebInspector.inspectorView.element.getDeepSelection(); | |
var queryCandidate = ''; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CSSSourceFrame.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CSSSourceFrame.js | |
index 3f20f71..9e37b28 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CSSSourceFrame.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CSSSourceFrame.js | |
@@ -180,7 +180,8 @@ WebInspector.CSSSourceFrame.AutocompleteDelegate.prototype = { | |
if ( | |
!token.type && | |
- line.substring(token.startColumn, token.endColumn) === ':' | |
+ line.substring(token.startColumn, token.endColumn) === | |
+ ':' | |
) { | |
if (!seenColumn) seenColumn = true; | |
else return null; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CallStackSidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CallStackSidebarPane.js | |
index 2f536de..bb1344e 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CallStackSidebarPane.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/CallStackSidebarPane.js | |
@@ -216,7 +216,8 @@ WebInspector.CallStackSidebarPane.prototype = { | |
callFrame._asyncCallFrame.setHidden(false); | |
if ( | |
i && | |
- callFrame._asyncCallFrame !== this.callFrames[i - 1]._asyncCallFrame | |
+ callFrame._asyncCallFrame !== | |
+ this.callFrames[i - 1]._asyncCallFrame | |
) | |
this.callFrameList.addItem(callFrame._asyncCallFrame); | |
} | |
@@ -443,7 +444,8 @@ WebInspector.CallStackSidebarPane.prototype = { | |
if (callFrame.isHidden()) continue; | |
if ( | |
lastCallFrame && | |
- callFrame._asyncCallFrame !== lastCallFrame._asyncCallFrame | |
+ callFrame._asyncCallFrame !== | |
+ lastCallFrame._asyncCallFrame | |
) | |
text += callFrame._asyncCallFrame.title() + '\n'; | |
text += callFrame.title() + ' (' + callFrame.subtitle() + ')\n'; | |
@@ -484,8 +486,12 @@ WebInspector.CallStackSidebarPane.prototype = { | |
if (event.altKey || event.shiftKey || event.metaKey || event.ctrlKey) | |
return; | |
if ( | |
- event.keyIdentifier === 'Up' && this._selectPreviousCallFrameOnStack() || | |
- event.keyIdentifier === 'Down' && this._selectNextCallFrameOnStack() | |
+ event.keyIdentifier === | |
+ 'Up' && | |
+ this._selectPreviousCallFrameOnStack() || | |
+ event.keyIdentifier === | |
+ 'Down' && | |
+ this._selectNextCallFrameOnStack() | |
) | |
event.consume(true); | |
}, | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EditingLocationHistoryManager.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EditingLocationHistoryManager.js | |
index 56fbacf..8100e1f 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EditingLocationHistoryManager.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EditingLocationHistoryManager.js | |
@@ -114,8 +114,10 @@ WebInspector.EditingLocationHistoryManager.prototype = { | |
*/ | |
removeHistoryForSourceCode: function(uiSourceCode) { | |
function filterOut(entry) { | |
- return entry._projectId === uiSourceCode.project().id() && | |
- entry._path === uiSourceCode.path(); | |
+ return entry._projectId === | |
+ uiSourceCode.project().id() && | |
+ entry._path === | |
+ uiSourceCode.path(); | |
} | |
this._historyManager.filterOut(filterOut); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EventListenerBreakpointsSidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EventListenerBreakpointsSidebarPane.js | |
index 131e8b3..f71039d 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EventListenerBreakpointsSidebarPane.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/EventListenerBreakpointsSidebarPane.js | |
@@ -225,7 +225,8 @@ WebInspector.EventListenerBreakpointsSidebarPane.eventNameForUI = function( | |
} | |
if (auxData) { | |
if ( | |
- eventName === 'instrumentation:webglErrorFired' && | |
+ eventName === | |
+ 'instrumentation:webglErrorFired' && | |
auxData['webglErrorName'] | |
) { | |
var errorName = auxData['webglErrorName']; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FileBasedSearchResultsPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FileBasedSearchResultsPane.js | |
index d3dfe99..c54ff01 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FileBasedSearchResultsPane.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FileBasedSearchResultsPane.js | |
@@ -226,7 +226,8 @@ WebInspector.FileBasedSearchResultsPane.FileTreeElement.prototype = { | |
regex.lastIndex = 0; | |
var match; | |
var matchRanges = []; | |
- while (regex.lastIndex < lineContent.length && | |
+ while (regex.lastIndex < | |
+ lineContent.length && | |
(match = regex.exec(lineContent))) | |
matchRanges.push(new WebInspector.SourceRange( | |
match.index, | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilePathScoreFunction.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilePathScoreFunction.js | |
index 1570c24..2e03875 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilePathScoreFunction.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilePathScoreFunction.js | |
@@ -78,10 +78,10 @@ WebInspector.FilePathScoreFunction.prototype = { | |
for (var i = 0; i < n; ++i) { | |
for (var j = 0; j < m; ++j) { | |
var skipCharScore = j === 0 ? 0 : score[i * m + j - 1]; | |
- var prevCharScore = i === 0 || j === 0 ? 0 : score[(i - 1) * m + j - 1]; | |
+ var prevCharScore = i === 0 || j === 0 ? 0 : score[i - 1 * m + j - 1]; | |
var consecutiveMatch = i === 0 || j === 0 | |
? 0 | |
- : sequence[(i - 1) * m + j - 1]; | |
+ : sequence[i - 1 * m + j - 1]; | |
var pickCharScore = this._match( | |
this._query, | |
data, | |
@@ -108,10 +108,18 @@ WebInspector.FilePathScoreFunction.prototype = { | |
*/ | |
_testWordStart: function(data, j) { | |
var prevChar = data.charAt(j - 1); | |
- return j === 0 || prevChar === '_' || prevChar === '-' || | |
- prevChar === '/' || | |
- data[j - 1] !== this._dataUpperCase[j - 1] && | |
- data[j] === this._dataUpperCase[j]; | |
+ return j === | |
+ 0 || | |
+ prevChar === | |
+ '_' || | |
+ prevChar === | |
+ '-' || | |
+ prevChar === | |
+ '/' || | |
+ data[j - 1] !== | |
+ this._dataUpperCase[j - 1] && | |
+ data[j] === | |
+ this._dataUpperCase[j]; | |
}, | |
/** | |
* @param {!Int32Array} sequence | |
@@ -146,8 +154,10 @@ WebInspector.FilePathScoreFunction.prototype = { | |
var isWordStart = this._testWordStart(data, j); | |
var isFileName = j > this._fileNameIndex; | |
var isPathTokenStart = j === 0 || data[j - 1] === '/'; | |
- var isCapsMatch = query[i] === data[j] && | |
- query[i] == this._queryUpperCase[i]; | |
+ var isCapsMatch = query[i] === | |
+ data[j] && | |
+ query[i] == | |
+ this._queryUpperCase[i]; | |
var score = 10; | |
if (isPathTokenStart) score += 4; | |
if (isWordStart) score += 2; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilteredItemSelectionDialog.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilteredItemSelectionDialog.js | |
index d68de77..36efeb8 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilteredItemSelectionDialog.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/FilteredItemSelectionDialog.js | |
@@ -99,13 +99,13 @@ WebInspector.FilteredItemSelectionDialog.prototype = { | |
.boxInWindow(window) | |
.relativeToElement(container); | |
var positionX = box.x + | |
- Math.max((box.width - width - 2 * shadowPadding) / 2, shadow); | |
+ Math.max(box.width - width - 2 * shadowPadding / 2, shadow); | |
positionX = Math.max( | |
shadow, | |
Math.min(container.offsetWidth - width - 2 * shadowPadding, positionX), | |
); | |
var positionY = box.y + | |
- Math.max((box.height - height - 2 * shadowPadding) / 2, shadow); | |
+ Math.max(box.height - height - 2 * shadowPadding / 2, shadow); | |
positionY = Math.max( | |
shadow, | |
Math.min(container.offsetHeight - height - 2 * shadowPadding, positionY), | |
@@ -120,7 +120,8 @@ WebInspector.FilteredItemSelectionDialog.prototype = { | |
WebInspector.setCurrentFocusElement(this._promptElement); | |
if ( | |
this._filteredItems.length && | |
- this._viewportControl.lastVisibleIndex() === -1 | |
+ this._viewportControl.lastVisibleIndex() === | |
+ -1 | |
) | |
this._viewportControl.refresh(); | |
}, | |
@@ -136,7 +137,8 @@ WebInspector.FilteredItemSelectionDialog.prototype = { | |
onEnter: function() { | |
if (!this._delegate.itemCount()) return; | |
var selectedIndex = this._shouldShowMatchingItems() && | |
- this._selectedIndexInFiltered < this._filteredItems.length | |
+ this._selectedIndexInFiltered < | |
+ this._filteredItems.length | |
? this._filteredItems[this._selectedIndexInFiltered] | |
: null; | |
this._delegate.selectItem(selectedIndex, this._promptElement.value.trim()); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/InplaceFormatterEditorAction.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/InplaceFormatterEditorAction.js | |
index 4209202..083d193 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/InplaceFormatterEditorAction.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/InplaceFormatterEditorAction.js | |
@@ -71,7 +71,8 @@ WebInspector.InplaceFormatterEditorAction.prototype = { | |
return true; | |
return uiSourceCode.contentType() === | |
WebInspector.resourceTypes.Stylesheet || | |
- uiSourceCode.project().type() === WebInspector.projectTypes.Snippets; | |
+ uiSourceCode.project().type() === | |
+ WebInspector.projectTypes.Snippets; | |
}, | |
_formatSourceInPlace: function() { | |
var uiSourceCode = this._sourcesView.currentUISourceCode(); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptBreakpointsSidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptBreakpointsSidebarPane.js | |
index b92bb7d..cb4b0eb 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptBreakpointsSidebarPane.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptBreakpointsSidebarPane.js | |
@@ -136,7 +136,8 @@ WebInspector.JavaScriptBreakpointsSidebarPane.prototype = { | |
while (currentElement) { | |
if ( | |
currentElement._data && | |
- this._compareBreakpoints(currentElement._data, element._data) > 0 | |
+ this._compareBreakpoints(currentElement._data, element._data) > | |
+ 0 | |
) | |
break; | |
currentElement = currentElement.nextSibling; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptSourceFrame.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptSourceFrame.js | |
index 32861e3..bf5bb99 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptSourceFrame.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/JavaScriptSourceFrame.js | |
@@ -221,8 +221,10 @@ WebInspector.JavaScriptSourceFrame.prototype = { | |
_showBlackboxInfobarIfNeeded: function() { | |
var contentType = this._uiSourceCode.contentType(); | |
if ( | |
- contentType !== WebInspector.resourceTypes.Script && | |
- contentType !== WebInspector.resourceTypes.Document | |
+ contentType !== | |
+ WebInspector.resourceTypes.Script && | |
+ contentType !== | |
+ WebInspector.resourceTypes.Document | |
) | |
return; | |
var projectType = this._uiSourceCode.project().type(); | |
@@ -605,7 +607,8 @@ WebInspector.JavaScriptSourceFrame.prototype = { | |
this._hideDivergedInfobar(); | |
} else { | |
if ( | |
- hasDivergedScript && !this._uiSourceCode.isDirty() && | |
+ hasDivergedScript && | |
+ !this._uiSourceCode.isDirty() && | |
!this._hasCommittedLiveEdit | |
) | |
this._showDivergedInfobar(); | |
@@ -626,7 +629,8 @@ WebInspector.JavaScriptSourceFrame.prototype = { | |
}, | |
_restoreBreakpointsAfterEditing: function() { | |
delete this._muted; | |
- var breakpoints = {}; // Save and remove muted breakpoint decorations. | |
+ var breakpoints = {}; | |
+ // Save and remove muted breakpoint decorations. | |
for ( | |
var lineNumber = 0; | |
lineNumber < this._textEditor.linesCount; | |
@@ -640,8 +644,10 @@ WebInspector.JavaScriptSourceFrame.prototype = { | |
breakpoints[lineNumber] = breakpointDecoration; | |
this._removeBreakpointDecoration(lineNumber); | |
} | |
- } // Remove all breakpoints. | |
- this._removeAllBreakpoints(); // Restore all breakpoints from saved decorations. | |
+ } | |
+ // Remove all breakpoints. | |
+ this._removeAllBreakpoints(); | |
+ // Restore all breakpoints from saved decorations. | |
for (var lineNumberString in breakpoints) { | |
var lineNumber = parseInt(lineNumberString, 10); | |
if (isNaN(lineNumber)) continue; | |
@@ -667,7 +673,8 @@ WebInspector.JavaScriptSourceFrame.prototype = { | |
_isIdentifier: function(tokenType) { | |
return tokenType.startsWith('js-variable') || | |
tokenType.startsWith('js-property') || | |
- tokenType == 'js-def'; | |
+ tokenType == | |
+ 'js-def'; | |
}, | |
_getPopoverAnchor: function(element, event) { | |
var target = WebInspector.context.flavor(WebInspector.Target); | |
@@ -682,10 +689,14 @@ WebInspector.JavaScriptSourceFrame.prototype = { | |
var textSelection = this.textEditor.selection().normalize(); | |
if (textSelection && !textSelection.isEmpty()) { | |
if ( | |
- textSelection.startLine !== textSelection.endLine || | |
- textSelection.startLine !== mouseLine || | |
- mouseColumn < textSelection.startColumn || | |
- mouseColumn > textSelection.endColumn | |
+ textSelection.startLine !== | |
+ textSelection.endLine || | |
+ textSelection.startLine !== | |
+ mouseLine || | |
+ mouseColumn < | |
+ textSelection.startColumn || | |
+ mouseColumn > | |
+ textSelection.endColumn | |
) | |
return; | |
var leftCorner = this.textEditor.cursorPositionToCoordinates( | |
@@ -786,7 +797,8 @@ WebInspector.JavaScriptSourceFrame.prototype = { | |
function showObjectPopover(result, wasThrown) { | |
var target = WebInspector.context.flavor(WebInspector.Target); | |
if ( | |
- selectedCallFrame.target() != target || | |
+ selectedCallFrame.target() != | |
+ target || | |
!target.debuggerModel.isPaused() || | |
!result | |
) { | |
@@ -798,7 +810,8 @@ WebInspector.JavaScriptSourceFrame.prototype = { | |
target.runtimeModel.createRemoteObject(result), | |
wasThrown, | |
this._popoverAnchorBox, | |
- ); // Popover may have been removed by showCallback(). | |
+ ); | |
+ // Popover may have been removed by showCallback(). | |
if (this._popoverAnchorBox) { | |
var highlightRange = new WebInspector.TextRange( | |
lineNumber, | |
@@ -962,15 +975,18 @@ WebInspector.JavaScriptSourceFrame.prototype = { | |
callFrame.location(), | |
); | |
if ( | |
- functionUILocation.uiSourceCode !== this._uiSourceCode || | |
- executionUILocation.uiSourceCode !== this._uiSourceCode | |
+ functionUILocation.uiSourceCode !== | |
+ this._uiSourceCode || | |
+ executionUILocation.uiSourceCode !== | |
+ this._uiSourceCode | |
) { | |
this._clearValueWidgets(); | |
return; | |
} | |
var fromLine = functionUILocation.lineNumber; | |
var fromColumn = functionUILocation.columnNumber; | |
- var toLine = executionUILocation.lineNumber; // Make sure we have a chance to update all existing widgets. | |
+ var toLine = executionUILocation.lineNumber; | |
+ // Make sure we have a chance to update all existing widgets. | |
if (this._valueWidgets) { | |
for (var line of this._valueWidgets.keys()) toLine = Math.max(toLine, line + 1); | |
} | |
@@ -979,7 +995,8 @@ WebInspector.JavaScriptSourceFrame.prototype = { | |
return; | |
} | |
var valuesMap = new Map(); | |
- for (var property of properties) valuesMap.set(property.name, property.value); /** @type {!Map.<number, !Set<string>>} */ | |
+ for (var property of properties) valuesMap.set(property.name, property.value); | |
+ /** @type {!Map.<number, !Set<string>>} */ | |
var namesPerLine = new Map(); | |
var tokenizer = new WebInspector.CodeMirrorUtils.TokenizerFactory().createTokenizer( | |
'text/javascript', | |
@@ -1065,7 +1082,8 @@ WebInspector.JavaScriptSourceFrame.prototype = { | |
for (var name of names) { | |
if (renderedNameCount > 10) break; | |
if (namesPerLine.get(i - 1) && namesPerLine.get(i - 1).has(name)) | |
- continue; // Only render name once in the given continuous block. | |
+ continue; | |
+ // Only render name once in the given continuous block. | |
if (renderedNameCount) widget.createTextChild(', '); | |
var nameValuePair = widget.createChild('span'); | |
widget.__nameToToken.set(name, nameValuePair); | |
@@ -1276,7 +1294,10 @@ WebInspector.JavaScriptSourceFrame.prototype = { | |
var lineNumber = eventData.lineNumber; | |
var eventObject = eventData.event; | |
if ( | |
- eventObject.button != 0 || eventObject.altKey || eventObject.ctrlKey || | |
+ eventObject.button != | |
+ 0 || | |
+ eventObject.altKey || | |
+ eventObject.ctrlKey || | |
eventObject.metaKey | |
) | |
return; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/NavigatorView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/NavigatorView.js | |
index 0960045..3e5aac4 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/NavigatorView.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/NavigatorView.js | |
@@ -447,8 +447,10 @@ WebInspector.NavigatorView.prototype = { | |
} | |
if ( | |
- project.type() === WebInspector.projectTypes.FileSystem && | |
- node === projectNode | |
+ project.type() === | |
+ WebInspector.projectTypes.FileSystem && | |
+ node === | |
+ projectNode | |
) { | |
var removeFolderLabel = WebInspector.UIString.capitalize( | |
'Remove ^folder from ^workspace', | |
@@ -559,7 +561,8 @@ WebInspector.SourcesNavigatorView.prototype = { | |
return false; | |
return uiSourceCode.project().type() !== | |
WebInspector.projectTypes.ContentScripts && | |
- uiSourceCode.project().type() !== WebInspector.projectTypes.Snippets; | |
+ uiSourceCode.project().type() !== | |
+ WebInspector.projectTypes.Snippets; | |
}, | |
/** | |
* @param {!WebInspector.Event} event | |
@@ -572,7 +575,7 @@ WebInspector.SourcesNavigatorView.prototype = { | |
if ( | |
inspectedPageURL && | |
WebInspector.networkMapping.networkURL(uiSourceCode) === | |
- inspectedPageURL | |
+ inspectedPageURL | |
) | |
this.revealUISourceCode(uiSourceCode, true); | |
} | |
@@ -590,7 +593,7 @@ WebInspector.SourcesNavigatorView.prototype = { | |
if ( | |
inspectedPageURL && | |
WebInspector.networkMapping.networkURL(uiSourceCode) === | |
- inspectedPageURL | |
+ inspectedPageURL | |
) | |
this.revealUISourceCode(uiSourceCode, true); | |
}, | |
@@ -886,7 +889,8 @@ WebInspector.NavigatorSourceTreeElement.prototype = { | |
var isFocused = this.treeOutline.element.isSelfOrAncestor( | |
document.activeElement, | |
); | |
- return isSelected && isFocused && | |
+ return isSelected && | |
+ isFocused && | |
!WebInspector.isBeingEdited(this.treeOutline.element); | |
}, | |
selectOnMouseDown: function(event) { | |
@@ -1346,8 +1350,10 @@ WebInspector.NavigatorFolderTreeNode.prototype = { | |
} | |
}, | |
_shouldMerge: function(node) { | |
- return this._type !== WebInspector.NavigatorView.Types.Domain && | |
- node instanceof WebInspector.NavigatorFolderTreeNode; | |
+ return this._type !== | |
+ WebInspector.NavigatorView.Types.Domain && | |
+ node instanceof | |
+ WebInspector.NavigatorFolderTreeNode; | |
}, | |
didAddChild: function(node) { | |
function titleForNode(node) { | |
@@ -1360,7 +1366,8 @@ WebInspector.NavigatorFolderTreeNode.prototype = { | |
if (children.length === 1 && this._shouldMerge(node)) { | |
node._isMerged = true; | |
- this._treeElement.titleText = this._treeElement.titleText + '/' + | |
+ this._treeElement.titleText = this._treeElement.titleText + | |
+ '/' + | |
node._title; | |
node._treeElement = this._treeElement; | |
this._treeElement.setNode(node); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScopeChainSidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScopeChainSidebarPane.js | |
index e03e953..15b6d20 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScopeChainSidebarPane.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScopeChainSidebarPane.js | |
@@ -189,7 +189,8 @@ WebInspector.ScopeChainSidebarPane.prototype = { | |
*/ | |
_propertyPath: function(treeElement) { | |
var section = treeElement.treeOutline.section; | |
- return section.title + ':' + | |
+ return section.title + | |
+ ':' + | |
(section.subtitle ? section.subtitle + ':' : '') + | |
WebInspector.ObjectPropertyTreeElement.prototype.propertyPath.call( | |
treeElement, | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScriptFormatter.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScriptFormatter.js | |
index bd12467..e77a816 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScriptFormatter.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScriptFormatter.js | |
@@ -47,9 +47,12 @@ WebInspector.Formatter.format = function( | |
callback, | |
) { | |
if ( | |
- contentType === WebInspector.resourceTypes.Script || | |
- contentType === WebInspector.resourceTypes.Document || | |
- contentType === WebInspector.resourceTypes.Stylesheet | |
+ contentType === | |
+ WebInspector.resourceTypes.Script || | |
+ contentType === | |
+ WebInspector.resourceTypes.Document || | |
+ contentType === | |
+ WebInspector.resourceTypes.Stylesheet | |
) | |
new WebInspector.ScriptFormatter(mimeType, content, callback); | |
else | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScriptFormatterEditorAction.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScriptFormatterEditorAction.js | |
index 97906da..8fd9742 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScriptFormatterEditorAction.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/ScriptFormatterEditorAction.js | |
@@ -216,7 +216,8 @@ WebInspector.ScriptFormatterEditorAction.prototype = { | |
var path = uiSourceCode.project().id() + ':' + uiSourceCode.path(); | |
var networkURL = WebInspector.networkMapping.networkURL(uiSourceCode); | |
if ( | |
- this._isFormatableScript(uiSourceCode) && networkURL && | |
+ this._isFormatableScript(uiSourceCode) && | |
+ networkURL && | |
this._pathsToFormatOnLoad.has(path) && | |
!this._formattedPaths.get(path) | |
) | |
@@ -287,8 +288,10 @@ WebInspector.ScriptFormatterEditorAction.prototype = { | |
if (supportedProjectTypes.indexOf(uiSourceCode.project().type()) === -1) | |
return false; | |
var contentType = uiSourceCode.contentType(); | |
- return contentType === WebInspector.resourceTypes.Script || | |
- contentType === WebInspector.resourceTypes.Document; | |
+ return contentType === | |
+ WebInspector.resourceTypes.Script || | |
+ contentType === | |
+ WebInspector.resourceTypes.Document; | |
}, | |
_toggleFormatScriptSource: function() { | |
var uiSourceCode = this._sourcesView.currentUISourceCode(); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SimpleHistoryManager.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SimpleHistoryManager.js | |
index e6fdf58..493c89e 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SimpleHistoryManager.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SimpleHistoryManager.js | |
@@ -115,7 +115,8 @@ WebInspector.SimpleHistoryManager.prototype = { | |
if (this.empty()) return false; | |
var revealIndex = this._activeEntryIndex - 1; | |
- while (revealIndex >= 0 && | |
+ while (revealIndex >= | |
+ 0 && | |
!this._entries[revealIndex].valid()) --revealIndex; | |
if (revealIndex < 0) return false; | |
@@ -132,7 +133,8 @@ WebInspector.SimpleHistoryManager.prototype = { | |
rollover: function() { | |
var revealIndex = this._activeEntryIndex + 1; | |
- while (revealIndex < this._entries.length && | |
+ while (revealIndex < | |
+ this._entries.length && | |
!this._entries[revealIndex].valid()) ++revealIndex; | |
if (revealIndex >= this._entries.length) return false; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesNavigator.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesNavigator.js | |
index 3d6940a..1bf763e 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesNavigator.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesNavigator.js | |
@@ -191,7 +191,8 @@ WebInspector.SnippetsNavigatorView.prototype = { | |
WebInspector.ExecutionContext, | |
); | |
if ( | |
- uiSourceCode.project().type() !== WebInspector.projectTypes.Snippets || | |
+ uiSourceCode.project().type() !== | |
+ WebInspector.projectTypes.Snippets || | |
!executionContext | |
) | |
return; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesPanel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesPanel.js | |
index 392fc1a..c2e2f55 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesPanel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesPanel.js | |
@@ -408,7 +408,8 @@ WebInspector.SourcesPanel.prototype = { | |
details.target(), | |
operationId, | |
); | |
- var description = operation && operation.description || | |
+ var description = operation && | |
+ operation.description || | |
WebInspector.UIString('<unknown>'); | |
this.sidebarPanes.callstack.setStatus( | |
WebInspector.UIString( | |
@@ -533,7 +534,8 @@ WebInspector.SourcesPanel.prototype = { | |
if ( | |
!callFrame || | |
- callFrame.target() !== WebInspector.context.flavor(WebInspector.Target) | |
+ callFrame.target() !== | |
+ WebInspector.context.flavor(WebInspector.Target) | |
) | |
return; | |
@@ -694,7 +696,8 @@ WebInspector.SourcesPanel.prototype = { | |
*/ | |
_editorChanged: function(uiSourceCode) { | |
var isSnippet = uiSourceCode && | |
- uiSourceCode.project().type() === WebInspector.projectTypes.Snippets; | |
+ uiSourceCode.project().type() === | |
+ WebInspector.projectTypes.Snippets; | |
this._runSnippetButton.element.classList.toggle('hidden', !isSnippet); | |
}, | |
/** | |
@@ -1107,9 +1110,10 @@ WebInspector.SourcesPanel.prototype = { | |
} | |
if ( | |
- uiSourceCode.project().type() === WebInspector.projectTypes.Network || | |
+ uiSourceCode.project().type() === | |
+ WebInspector.projectTypes.Network || | |
uiSourceCode.project().type() === | |
- WebInspector.projectTypes.ContentScripts | |
+ WebInspector.projectTypes.ContentScripts | |
) { | |
if (!this._workspace.projects().filter(filterProject).length) return; | |
var networkURL = this._networkMapping.networkURL(uiSourceCode); | |
@@ -1144,9 +1148,12 @@ WebInspector.SourcesPanel.prototype = { | |
var contentType = uiSourceCode.contentType(); | |
if ( | |
- (contentType === WebInspector.resourceTypes.Script || | |
- contentType === WebInspector.resourceTypes.Document) && | |
- projectType !== WebInspector.projectTypes.Snippets | |
+ contentType === | |
+ WebInspector.resourceTypes.Script || | |
+ contentType === | |
+ WebInspector.resourceTypes.Document && | |
+ projectType !== | |
+ WebInspector.projectTypes.Snippets | |
) { | |
var networkURL = this._networkMapping.networkURL(uiSourceCode); | |
var url = projectType === WebInspector.projectTypes.Formatter | |
@@ -1160,7 +1167,8 @@ WebInspector.SourcesPanel.prototype = { | |
} | |
if ( | |
- projectType !== WebInspector.projectTypes.Debugger && | |
+ projectType !== | |
+ WebInspector.projectTypes.Debugger && | |
!event.target.isSelfOrDescendant(this._navigator.view.element) | |
) { | |
contextMenu.appendSeparator(); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesSearchScope.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesSearchScope.js | |
index 1ffb196..8f8da75 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesSearchScope.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesSearchScope.js | |
@@ -98,7 +98,8 @@ WebInspector.SourcesSearchScope.prototype = { | |
*/ | |
function filterOutServiceProjects(project) { | |
return !project.isServiceProject() || | |
- project.type() === WebInspector.projectTypes.Formatter; | |
+ project.type() === | |
+ WebInspector.projectTypes.Formatter; | |
} | |
/** | |
@@ -107,7 +108,8 @@ WebInspector.SourcesSearchScope.prototype = { | |
*/ | |
function filterOutContentScriptsIfNeeded(project) { | |
return WebInspector.settings.searchInContentScripts.get() || | |
- project.type() !== WebInspector.projectTypes.ContentScripts; | |
+ project.type() !== | |
+ WebInspector.projectTypes.ContentScripts; | |
} | |
return WebInspector.workspace | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesView.js | |
index 6e98817..c8dab97 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesView.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/SourcesView.js | |
@@ -270,7 +270,8 @@ WebInspector.SourcesView.prototype = { | |
currentSourceFrame: function() { | |
var view = this.visibleView(); | |
if (!(view instanceof WebInspector.SourceFrame)) return null; | |
- return /** @type {!WebInspector.SourceFrame} */ | |
+ return; | |
+ /** @type {!WebInspector.SourceFrame} */ | |
view; | |
}, | |
/** | |
@@ -324,8 +325,10 @@ WebInspector.SourcesView.prototype = { | |
); | |
if ( | |
currentUISourceCode.project().isServiceProject() && | |
- currentUISourceCode !== uiSourceCode && | |
- currentNetworkURL === networkURL && | |
+ currentUISourceCode !== | |
+ uiSourceCode && | |
+ currentNetworkURL === | |
+ networkURL && | |
networkURL | |
) { | |
this._showFile(uiSourceCode); | |
@@ -526,7 +529,8 @@ WebInspector.SourcesView.prototype = { | |
}, | |
_editorSelected: function(event) { | |
var uiSourceCode /** @type {!WebInspector.UISourceCode} */ = event.data.currentFile; | |
- var shouldUseHistoryManager = uiSourceCode !== this._currentUISourceCode && | |
+ var shouldUseHistoryManager = uiSourceCode !== | |
+ this._currentUISourceCode && | |
event.data.userGesture; | |
if (shouldUseHistoryManager) this._historyManager.updateCurrentState(); | |
var sourceFrame = this._showFile(uiSourceCode); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/TabbedEditorContainer.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/TabbedEditorContainer.js | |
index 63ec5a0..cc72ccc 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/TabbedEditorContainer.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/TabbedEditorContainer.js | |
@@ -114,7 +114,8 @@ WebInspector.TabbedEditorContainer.prototype = { | |
* @return {!Array.<!WebInspector.SourceFrame>} | |
*/ | |
fileViews: function() { | |
- return /** @type {!Array.<!WebInspector.SourceFrame>} */ | |
+ return; | |
+ /** @type {!Array.<!WebInspector.SourceFrame>} */ | |
this._tabbedPane.tabViews(); | |
}, | |
/** | |
@@ -303,8 +304,10 @@ WebInspector.TabbedEditorContainer.prototype = { | |
var snippetsProjectType = WebInspector.projectTypes.Snippets; | |
if ( | |
this._history.index(this._currentFile.uri()) && | |
- currentProjectType === snippetsProjectType && | |
- addedProjectType !== snippetsProjectType | |
+ currentProjectType === | |
+ snippetsProjectType && | |
+ addedProjectType !== | |
+ snippetsProjectType | |
) | |
this._innerShowFile(uiSourceCode, false); | |
}, | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/UISourceCodeFrame.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/UISourceCodeFrame.js | |
index 7478ab8..48742a9 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/UISourceCodeFrame.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/UISourceCodeFrame.js | |
@@ -90,14 +90,19 @@ WebInspector.UISourceCodeFrame.prototype = { | |
canEditSource: function() { | |
var projectType = this._uiSourceCode.project().type(); | |
if ( | |
- projectType === WebInspector.projectTypes.Service || | |
- projectType === WebInspector.projectTypes.Debugger || | |
- projectType === WebInspector.projectTypes.Formatter | |
+ projectType === | |
+ WebInspector.projectTypes.Service || | |
+ projectType === | |
+ WebInspector.projectTypes.Debugger || | |
+ projectType === | |
+ WebInspector.projectTypes.Formatter | |
) | |
return false; | |
if ( | |
- projectType === WebInspector.projectTypes.Network && | |
- this._uiSourceCode.contentType() === WebInspector.resourceTypes.Document | |
+ projectType === | |
+ WebInspector.projectTypes.Network && | |
+ this._uiSourceCode.contentType() === | |
+ WebInspector.resourceTypes.Document | |
) | |
return false; | |
return true; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WatchExpressionsSidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WatchExpressionsSidebarPane.js | |
index 371380a..6c248f6 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WatchExpressionsSidebarPane.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WatchExpressionsSidebarPane.js | |
@@ -439,7 +439,8 @@ WebInspector.WatchExpression.prototype = { | |
); | |
if ( | |
- !this.isEditing() && this._result && | |
+ !this.isEditing() && | |
+ this._result && | |
(this._result.type === 'number' || this._result.type === 'string') | |
) | |
contextMenu.appendItem( | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WorkspaceMappingTip.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WorkspaceMappingTip.js | |
index 4f55745..050c976 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WorkspaceMappingTip.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/WorkspaceMappingTip.js | |
@@ -58,7 +58,8 @@ WebInspector.WorkspaceMappingTip.prototype = { | |
// First try mapping filesystem -> network. | |
if ( | |
this._workspaceMappingInfobarAllowedSetting.get() && | |
- uiSourceCode.project().type() === WebInspector.projectTypes.FileSystem | |
+ uiSourceCode.project().type() === | |
+ WebInspector.projectTypes.FileSystem | |
) { | |
var networkURL = WebInspector.networkMapping.networkURL(uiSourceCode); | |
var hasMappings = !!networkURL; | |
@@ -87,9 +88,10 @@ WebInspector.WorkspaceMappingTip.prototype = { | |
// Then map network -> filesystem. | |
if ( | |
- uiSourceCode.project().type() === WebInspector.projectTypes.Network || | |
+ uiSourceCode.project().type() === | |
+ WebInspector.projectTypes.Network || | |
uiSourceCode.project().type() === | |
- WebInspector.projectTypes.ContentScripts | |
+ WebInspector.projectTypes.ContentScripts | |
) { | |
// Suggest for localhost only. | |
if (!this._isLocalHost(uiSourceCode.originURL())) return; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/jsdifflib.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/jsdifflib.js | |
index 4d7945c..cc50b9f 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/jsdifflib.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/sources/jsdifflib.js | |
@@ -80,7 +80,7 @@ difflib = { | |
return a.length == b.length ? 0 : a.length < b.length ? -1 : 1; | |
}, | |
__calculate_ratio: function(matches, length) { | |
- return length ? 2.0 * matches / length : 1.0; | |
+ return length ? 2 * matches / length : 1; | |
}, | |
// returns a function that returns true if a key passed to the returned function | |
// is in the dict (js object) provided to this function; replaces being able to | |
@@ -191,29 +191,51 @@ difflib = { | |
j2len = newj2len; | |
} | |
- while (besti > alo && bestj > blo && !isbjunk(b[bestj - 1]) && | |
- a[besti - 1] == b[bestj - 1]) { | |
+ while (besti > | |
+ alo && | |
+ bestj > | |
+ blo && | |
+ !isbjunk(b[bestj - 1]) && | |
+ a[besti - 1] == | |
+ b[bestj - 1]) { | |
besti--; | |
bestj--; | |
bestsize++; | |
} | |
- while (besti + bestsize < ahi && bestj + bestsize < bhi && | |
+ while (besti + | |
+ bestsize < | |
+ ahi && | |
+ bestj + | |
+ bestsize < | |
+ bhi && | |
!isbjunk(b[bestj + bestsize]) && | |
- a[besti + bestsize] == b[bestj + bestsize]) { | |
+ a[besti + bestsize] == | |
+ b[bestj + bestsize]) { | |
bestsize++; | |
} | |
- while (besti > alo && bestj > blo && isbjunk(b[bestj - 1]) && | |
- a[besti - 1] == b[bestj - 1]) { | |
+ while (besti > | |
+ alo && | |
+ bestj > | |
+ blo && | |
+ isbjunk(b[bestj - 1]) && | |
+ a[besti - 1] == | |
+ b[bestj - 1]) { | |
besti--; | |
bestj--; | |
bestsize++; | |
} | |
- while (besti + bestsize < ahi && bestj + bestsize < bhi && | |
+ while (besti + | |
+ bestsize < | |
+ ahi && | |
+ bestj + | |
+ bestsize < | |
+ bhi && | |
isbjunk(b[bestj + bestsize]) && | |
- a[besti + bestsize] == b[bestj + bestsize]) { | |
+ a[besti + bestsize] == | |
+ b[bestj + bestsize]) { | |
bestsize++; | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/EmulatedDevices.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/EmulatedDevices.js | |
index e7930c0..1ac7075 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/EmulatedDevices.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/EmulatedDevices.js | |
@@ -82,7 +82,10 @@ WebInspector.EmulatedDevice.fromJSONV1 = function(json) { | |
*/ | |
function parseValue(object, key, type, defaultValue) { | |
if ( | |
- typeof object !== 'object' || object === null || | |
+ typeof object !== | |
+ 'object' || | |
+ object === | |
+ null || | |
!object.hasOwnProperty(key) | |
) { | |
if (typeof defaultValue !== 'undefined') return defaultValue; | |
@@ -93,7 +96,9 @@ WebInspector.EmulatedDevice.fromJSONV1 = function(json) { | |
var value = object[key]; | |
if (typeof value !== type || value === null) | |
throw new Error( | |
- "Emulated device property '" + key + "' has wrong type '" + | |
+ "Emulated device property '" + | |
+ key + | |
+ "' has wrong type '" + | |
typeof value + | |
"'", | |
); | |
@@ -122,7 +127,8 @@ WebInspector.EmulatedDevice.fromJSONV1 = function(json) { | |
result.left = parseIntValue(json, 'left'); | |
result.width = parseIntValue(json, 'width'); | |
result.height = parseIntValue(json, 'height'); | |
- return /** @type {!WebInspector.Geometry.Rect} */ | |
+ return; | |
+ /** @type {!WebInspector.Geometry.Rect} */ | |
result; | |
} | |
@@ -135,7 +141,8 @@ WebInspector.EmulatedDevice.fromJSONV1 = function(json) { | |
var result = {}; | |
result.top = parseIntValue(json, 'top'); | |
result.left = parseIntValue(json, 'left'); | |
- return /** @type {?WebInspector.Geometry.Insets} */ | |
+ return; | |
+ /** @type {?WebInspector.Geometry.Insets} */ | |
result; | |
} | |
@@ -172,15 +179,19 @@ WebInspector.EmulatedDevice.fromJSONV1 = function(json) { | |
result.width = parseIntValue(json, 'width'); | |
if ( | |
- result.width < 0 || | |
- result.width > WebInspector.OverridesSupport.MaxDeviceSize | |
+ result.width < | |
+ 0 || | |
+ result.width > | |
+ WebInspector.OverridesSupport.MaxDeviceSize | |
) | |
throw new Error('Emulated device has wrong width: ' + result.width); | |
result.height = parseIntValue(json, 'height'); | |
if ( | |
- result.height < 0 || | |
- result.height > WebInspector.OverridesSupport.MaxDeviceSize | |
+ result.height < | |
+ 0 || | |
+ result.height > | |
+ WebInspector.OverridesSupport.MaxDeviceSize | |
) | |
throw new Error('Emulated device has wrong height: ' + result.height); | |
@@ -195,7 +206,8 @@ WebInspector.EmulatedDevice.fromJSONV1 = function(json) { | |
); | |
} | |
- return /** @type {!WebInspector.EmulatedDevice.Orientation} */ | |
+ return; | |
+ /** @type {!WebInspector.EmulatedDevice.Orientation} */ | |
result; | |
} | |
@@ -253,21 +265,33 @@ WebInspector.EmulatedDevice.fromJSONV1 = function(json) { | |
'string', | |
); | |
if ( | |
- mode.orientation !== WebInspector.EmulatedDevice.Vertical && | |
- mode.orientation !== WebInspector.EmulatedDevice.Horizontal | |
+ mode.orientation !== | |
+ WebInspector.EmulatedDevice.Vertical && | |
+ mode.orientation !== | |
+ WebInspector.EmulatedDevice.Horizontal | |
) | |
throw new Error( | |
- "Emulated device mode has wrong orientation '" + mode.orientation + | |
+ "Emulated device mode has wrong orientation '" + | |
+ mode.orientation + | |
"'", | |
); | |
var orientation = result.orientationByName(mode.orientation); | |
mode.pageRect = parseIntRect(parseValue(modes[i], 'page-rect', 'object')); | |
if ( | |
- mode.pageRect.top < 0 || mode.pageRect.left < 0 || | |
- mode.pageRect.width < 0 || | |
- mode.pageRect.height < 0 || | |
- mode.pageRect.top + mode.pageRect.height > orientation.height || | |
- mode.pageRect.left + mode.pageRect.width > orientation.width | |
+ mode.pageRect.top < | |
+ 0 || | |
+ mode.pageRect.left < | |
+ 0 || | |
+ mode.pageRect.width < | |
+ 0 || | |
+ mode.pageRect.height < | |
+ 0 || | |
+ mode.pageRect.top + | |
+ mode.pageRect.height > | |
+ orientation.height || | |
+ mode.pageRect.left + | |
+ mode.pageRect.width > | |
+ orientation.width | |
) { | |
throw new Error( | |
"Emulated device mode '" + mode.title + "'has wrong page rect", | |
@@ -651,8 +675,9 @@ WebInspector.EmulatedDevicesList.prototype = { | |
var lastUpdated = this._lastUpdatedSetting.get(); | |
if ( | |
lastUpdated && | |
- Date.now() - lastUpdated < | |
- WebInspector.EmulatedDevicesList._UpdateIntervalMs | |
+ Date.now() - | |
+ lastUpdated < | |
+ WebInspector.EmulatedDevicesList._UpdateIntervalMs | |
) | |
return; | |
this.update(); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/InspectedPagePlaceholder.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/InspectedPagePlaceholder.js | |
index 5396f35..e8705ec 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/InspectedPagePlaceholder.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/InspectedPagePlaceholder.js | |
@@ -46,10 +46,14 @@ WebInspector.InspectedPagePlaceholder.prototype = { | |
} | |
if ( | |
- this._margins.top !== margins.top || | |
- this._margins.left !== margins.left || | |
- this._margins.right !== margins.right || | |
- this._margins.bottom !== margins.bottom | |
+ this._margins.top !== | |
+ margins.top || | |
+ this._margins.left !== | |
+ margins.left || | |
+ this._margins.right !== | |
+ margins.right || | |
+ this._margins.bottom !== | |
+ margins.bottom | |
) { | |
this._margins = margins; | |
this._scheduleUpdate(); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/MediaQueryInspector.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/MediaQueryInspector.js | |
index 1bc9181..f298fd6 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/MediaQueryInspector.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/MediaQueryInspector.js | |
@@ -262,7 +262,8 @@ WebInspector.MediaQueryInspector.prototype = { | |
queryModels = this._squashAdjacentEqual(queryModels); | |
var allEqual = this._cachedQueryModels && | |
- this._cachedQueryModels.length == queryModels.length; | |
+ this._cachedQueryModels.length == | |
+ queryModels.length; | |
for ( | |
var i = 0; | |
allEqual && i < queryModels.length; | |
@@ -365,18 +366,18 @@ WebInspector.MediaQueryInspector.prototype = { | |
]; | |
var markerElement = createElementWithClass('div', 'media-inspector-marker'); | |
var leftPixelValue = minWidthValue | |
- ? (minWidthValue - this._offset) / zoomFactor | |
+ ? minWidthValue - this._offset / zoomFactor | |
: 0; | |
markerElement.style.left = leftPixelValue + 'px'; | |
markerElement.classList.add(styleClassPerSection[model.section()]); | |
var widthPixelValue = null; | |
if (model.maxWidthExpression() && model.minWidthExpression()) | |
- widthPixelValue = (model.maxWidthExpression().computedLength() - | |
- minWidthValue) / | |
+ widthPixelValue = model.maxWidthExpression().computedLength() - | |
+ minWidthValue / | |
zoomFactor; | |
else if (model.maxWidthExpression()) | |
- widthPixelValue = (model.maxWidthExpression().computedLength() - | |
- this._offset) / | |
+ widthPixelValue = model.maxWidthExpression().computedLength() - | |
+ this._offset / | |
zoomFactor; | |
else | |
markerElement.style.right = '0'; | |
@@ -474,8 +475,10 @@ WebInspector.MediaQueryInspector.MediaQueryUIModel.createFromMediaQuery = functi | |
} | |
} | |
if ( | |
- minWidthPixels > maxWidthPixels || | |
- !maxWidthExpression && !minWidthExpression | |
+ minWidthPixels > | |
+ maxWidthPixels || | |
+ !maxWidthExpression && | |
+ !minWidthExpression | |
) | |
return null; | |
@@ -500,13 +503,14 @@ WebInspector.MediaQueryInspector.MediaQueryUIModel.prototype = { | |
* @return {boolean} | |
*/ | |
dimensionsEqual: function(other) { | |
- return this.section() === other.section() && | |
+ return this.section() === | |
+ other.section() && | |
(!this.minWidthExpression() || | |
this.minWidthExpression().computedLength() === | |
- other.minWidthExpression().computedLength()) && | |
+ other.minWidthExpression().computedLength()) && | |
(!this.maxWidthExpression() || | |
this.maxWidthExpression().computedLength() === | |
- other.maxWidthExpression().computedLength()); | |
+ other.maxWidthExpression().computedLength()); | |
}, | |
/** | |
* @param {!WebInspector.MediaQueryInspector.MediaQueryUIModel} other | |
@@ -524,8 +528,10 @@ WebInspector.MediaQueryInspector.MediaQueryUIModel.prototype = { | |
if (!myLocation && otherLocation) return -1; | |
if (this.active() !== other.active()) return this.active() ? -1 : 1; | |
return myLocation.url.compareTo(otherLocation.url) || | |
- myLocation.lineNumber - otherLocation.lineNumber || | |
- myLocation.columnNumber - otherLocation.columnNumber; | |
+ myLocation.lineNumber - | |
+ otherLocation.lineNumber || | |
+ myLocation.columnNumber - | |
+ otherLocation.columnNumber; | |
} | |
if (this.section() === WebInspector.MediaQueryInspector.Section.Max) | |
return other.maxWidthExpression().computedLength() - | |
@@ -536,7 +542,7 @@ WebInspector.MediaQueryInspector.MediaQueryUIModel.prototype = { | |
return this.minWidthExpression().computedLength() - | |
other.minWidthExpression().computedLength() || | |
other.maxWidthExpression().computedLength() - | |
- this.maxWidthExpression().computedLength(); | |
+ this.maxWidthExpression().computedLength(); | |
}, | |
/** | |
* @return {!WebInspector.MediaQueryInspector.Section} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/OverridesUI.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/OverridesUI.js | |
index 541b114..9bac709 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/OverridesUI.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/OverridesUI.js | |
@@ -194,8 +194,11 @@ WebInspector.OverridesUI.createNetworkConditionsSelect = function() { | |
var kbps = 1024 / 8; | |
for (var i = 0; i < presets.length; ++i) { | |
if ( | |
- presets[i].throughput === conditions.throughput / kbps && | |
- presets[i].latency === conditions.latency | |
+ presets[i].throughput === | |
+ conditions.throughput / | |
+ kbps && | |
+ presets[i].latency === | |
+ conditions.latency | |
) { | |
presetIndex = i; | |
break; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/ResponsiveDesignView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/ResponsiveDesignView.js | |
index 93d841a..9645a12 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/ResponsiveDesignView.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/toolbox/ResponsiveDesignView.js | |
@@ -296,7 +296,8 @@ WebInspector.ResponsiveDesignView.prototype = { | |
var rulerTotalHeight = this._rulerTotalHeightDIP(); | |
this._availableSize = new Size( | |
Math.max( | |
- rect.width * zoomFactor - | |
+ rect.width * | |
+ zoomFactor - | |
WebInspector.ResponsiveDesignView.RulerWidth, | |
1, | |
), | |
@@ -362,10 +363,14 @@ WebInspector.ResponsiveDesignView.prototype = { | |
var cssOffsetX = event.data.currentX - event.data.startX; | |
var cssOffsetY = event.data.currentY - event.data.startY; | |
if (this._slowPositionStart) { | |
- cssOffsetX = (event.data.currentX - this._slowPositionStart.x) / 10 + | |
+ cssOffsetX = event.data.currentX - | |
+ this._slowPositionStart.x / | |
+ 10 + | |
this._slowPositionStart.x - | |
event.data.startX; | |
- cssOffsetY = (event.data.currentY - this._slowPositionStart.y) / 10 + | |
+ cssOffsetY = event.data.currentY - | |
+ this._slowPositionStart.y / | |
+ 10 + | |
this._slowPositionStart.y - | |
event.data.startY; | |
} | |
@@ -444,10 +449,10 @@ WebInspector.ResponsiveDesignView.prototype = { | |
const textColor = 'rgb(186, 186, 186)'; | |
const contentsSizeColor = 'rgba(0, 0, 0, 0.3)'; | |
- var scale = (this._scale || 1) * this._viewport.pageScaleFactor; | |
+ var scale = this._scale || 1 * this._viewport.pageScaleFactor; | |
var rulerScale = 0.5; | |
while (Math.abs(rulerScale * scale - 1) > | |
- Math.abs((rulerScale + 0.5) * scale - 1)) | |
+ Math.abs(rulerScale + 0.5 * scale - 1)) | |
rulerScale += 0.5; | |
var gridStep = 50 * scale * rulerScale; | |
@@ -476,7 +481,7 @@ WebInspector.ResponsiveDesignView.prototype = { | |
context.save(); | |
var minXIndex = Math.ceil(dipScrollX / rulerSubStep); | |
- var maxXIndex = Math.floor((dipScrollX + dipGridWidth) / rulerSubStep); | |
+ var maxXIndex = Math.floor(dipScrollX + dipGridWidth / rulerSubStep); | |
if (minXIndex) { | |
context.beginPath(); | |
context.moveTo(0, -rulerHeight); | |
@@ -512,7 +517,7 @@ WebInspector.ResponsiveDesignView.prototype = { | |
// Draw vertical ruler. | |
context.save(); | |
var minYIndex = Math.ceil(dipScrollY / rulerSubStep); | |
- var maxYIndex = Math.floor((dipScrollY + dipGridHeight) / rulerSubStep); | |
+ var maxYIndex = Math.floor(dipScrollY + dipGridHeight / rulerSubStep); | |
context.translate(0, -dipScrollY); | |
for (var index = minYIndex; index <= maxYIndex; index++) { | |
var y = index * rulerSubStep; | |
@@ -549,9 +554,9 @@ WebInspector.ResponsiveDesignView.prototype = { | |
function drawGrid(scrollX, scrollY, color, step) { | |
context.strokeStyle = color; | |
var minX = Math.ceil(scrollX / step) * step; | |
- var maxX = Math.floor((scrollX + dipGridWidth) / step) * step - minX; | |
+ var maxX = Math.floor(scrollX + dipGridWidth / step) * step - minX; | |
var minY = Math.ceil(scrollY / step) * step; | |
- var maxY = Math.floor((scrollY + dipGridHeight) / step) * step - minY; | |
+ var maxY = Math.floor(scrollY + dipGridHeight / step) * step - minY; | |
context.save(); | |
context.translate(minX - scrollX, 0); | |
@@ -609,7 +614,8 @@ WebInspector.ResponsiveDesignView.prototype = { | |
return WebInspector.ResponsiveDesignView.RulerHeight; | |
return WebInspector.ResponsiveDesignView.RulerTopHeight + | |
WebInspector.ResponsiveDesignView.RulerBottomHeight + | |
- mediaInspectorHeight * WebInspector.zoomManager.zoomFactor(); | |
+ mediaInspectorHeight * | |
+ WebInspector.zoomManager.zoomFactor(); | |
}, | |
_updateUI: function() { | |
if (!this._enabled || !this.isShowing()) return; | |
@@ -630,8 +636,10 @@ WebInspector.ResponsiveDesignView.prototype = { | |
); | |
if ( | |
- this._cachedZoomFactor !== zoomFactor || | |
- this._cachedMediaInspectorHeight !== mediaInspectorHeight | |
+ this._cachedZoomFactor !== | |
+ zoomFactor || | |
+ this._cachedMediaInspectorHeight !== | |
+ mediaInspectorHeight | |
) { | |
var cssRulerWidth = WebInspector.ResponsiveDesignView.RulerWidth / | |
zoomFactor + | |
@@ -662,29 +670,42 @@ WebInspector.ResponsiveDesignView.prototype = { | |
this._inspectedPagePlaceholder.onResize(); | |
} | |
- var pageScaleVisible = cssWidth + this._pageScaleContainerWidth + | |
- WebInspector.ResponsiveDesignView.RulerWidth / zoomFactor <= | |
+ var pageScaleVisible = cssWidth + | |
+ this._pageScaleContainerWidth + | |
+ WebInspector.ResponsiveDesignView.RulerWidth / | |
+ zoomFactor <= | |
rect.width; | |
this._pageScaleContainer.classList.toggle('hidden', !pageScaleVisible); | |
var viewportChanged = !this._cachedViewport || | |
- this._cachedViewport.scrollX !== this._viewport.scrollX || | |
- this._cachedViewport.scrollY !== this._viewport.scrollY || | |
- this._cachedViewport.contentsWidth !== this._viewport.contentsWidth || | |
- this._cachedViewport.contentsHeight !== this._viewport.contentsHeight || | |
- this._cachedViewport.pageScaleFactor !== this._viewport.pageScaleFactor || | |
+ this._cachedViewport.scrollX !== | |
+ this._viewport.scrollX || | |
+ this._cachedViewport.scrollY !== | |
+ this._viewport.scrollY || | |
+ this._cachedViewport.contentsWidth !== | |
+ this._viewport.contentsWidth || | |
+ this._cachedViewport.contentsHeight !== | |
+ this._viewport.contentsHeight || | |
+ this._cachedViewport.pageScaleFactor !== | |
+ this._viewport.pageScaleFactor || | |
this._cachedViewport.minimumPageScaleFactor !== | |
- this._viewport.minimumPageScaleFactor || | |
+ this._viewport.minimumPageScaleFactor || | |
this._cachedViewport.maximumPageScaleFactor !== | |
- this._viewport.maximumPageScaleFactor; | |
+ this._viewport.maximumPageScaleFactor; | |
var canvasInvalidated = viewportChanged || | |
- this._drawContentsSize !== this._cachedDrawContentsSize || | |
- this._cachedScale !== this._scale || | |
- this._cachedCssCanvasWidth !== cssCanvasWidth || | |
- this._cachedCssCanvasHeight !== cssCanvasHeight || | |
- this._cachedZoomFactor !== zoomFactor || | |
- this._cachedMediaInspectorHeight !== mediaInspectorHeight; | |
+ this._drawContentsSize !== | |
+ this._cachedDrawContentsSize || | |
+ this._cachedScale !== | |
+ this._scale || | |
+ this._cachedCssCanvasWidth !== | |
+ cssCanvasWidth || | |
+ this._cachedCssCanvasHeight !== | |
+ cssCanvasHeight || | |
+ this._cachedZoomFactor !== | |
+ zoomFactor || | |
+ this._cachedMediaInspectorHeight !== | |
+ mediaInspectorHeight; | |
if (canvasInvalidated) | |
this._drawCanvas(cssCanvasWidth, cssCanvasHeight, rulerTotalHeight); | |
@@ -1088,9 +1109,12 @@ WebInspector.ResponsiveDesignView.prototype = { | |
*/ | |
function updatePageScaleFactor(finishCallback) { | |
if ( | |
- this._target && this._viewport && | |
- this._viewport.minimumPageScaleFactor <= 1 && | |
- this._viewport.maximumPageScaleFactor >= 1 | |
+ this._target && | |
+ this._viewport && | |
+ this._viewport.minimumPageScaleFactor <= | |
+ 1 && | |
+ this._viewport.maximumPageScaleFactor >= | |
+ 1 | |
) | |
this._target.emulationAgent().setPageScaleFactor(1); | |
finishCallback(); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ActionRegistry.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ActionRegistry.js | |
index 5598567..d190f6d 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ActionRegistry.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ActionRegistry.js | |
@@ -66,7 +66,8 @@ WebInspector.ActionRegistry.prototype = { | |
* @return {boolean} | |
*/ | |
function handleAction(actionDelegate) { | |
- return /** @type {!WebInspector.ActionDelegate} */ | |
+ return; | |
+ /** @type {!WebInspector.ActionDelegate} */ | |
actionDelegate.handleAction(WebInspector.context); | |
} | |
}, | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ColorSwatch.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ColorSwatch.js | |
index e60b5b5..60a2c1c 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ColorSwatch.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ColorSwatch.js | |
@@ -20,7 +20,8 @@ WebInspector.ColorSwatch.create = function() { | |
WebInspector.ColorSwatch.prototype, | |
); | |
- return /** @type {!WebInspector.ColorSwatch} */ | |
+ return; | |
+ /** @type {!WebInspector.ColorSwatch} */ | |
new WebInspector.ColorSwatch._constructor(); | |
}; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/Dialog.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/Dialog.js | |
index 47b3109..3c3660a 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/Dialog.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/Dialog.js | |
@@ -157,7 +157,9 @@ WebInspector.DialogDelegate.prototype = { | |
.relativeToElement(container); | |
var positionX = box.x + | |
- (relativeToElement.offsetWidth - element.offsetWidth) / 2; | |
+ relativeToElement.offsetWidth - | |
+ element.offsetWidth / | |
+ 2; | |
positionX = Number.constrain( | |
positionX, | |
0, | |
@@ -165,7 +167,9 @@ WebInspector.DialogDelegate.prototype = { | |
); | |
var positionY = box.y + | |
- (relativeToElement.offsetHeight - element.offsetHeight) / 2; | |
+ relativeToElement.offsetHeight - | |
+ element.offsetHeight / | |
+ 2; | |
positionY = Number.constrain( | |
positionY, | |
0, | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/FilterBar.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/FilterBar.js | |
index bcd91ee..9d60514 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/FilterBar.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/FilterBar.js | |
@@ -523,7 +523,8 @@ WebInspector.NamedBitSetFilterUI.prototype = { | |
}, | |
_update: function() { | |
if ( | |
- Object.keys(this._allowedTypes).length === 0 || | |
+ Object.keys(this._allowedTypes).length === | |
+ 0 || | |
this._allowedTypes[WebInspector.NamedBitSetFilterUI.ALL_TYPES] | |
) { | |
this._allowedTypes = {}; | |
@@ -568,7 +569,8 @@ WebInspector.NamedBitSetFilterUI.prototype = { | |
_toggleTypeFilter: function(typeName, allowMultiSelect) { | |
if ( | |
allowMultiSelect && | |
- typeName !== WebInspector.NamedBitSetFilterUI.ALL_TYPES | |
+ typeName !== | |
+ WebInspector.NamedBitSetFilterUI.ALL_TYPES | |
) | |
this._allowedTypes[WebInspector.NamedBitSetFilterUI.ALL_TYPES] = false; | |
else | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/HistoryInput.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/HistoryInput.js | |
index ba0c593..ae3adf5 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/HistoryInput.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/HistoryInput.js | |
@@ -20,7 +20,8 @@ WebInspector.HistoryInput.create = function() { | |
WebInspector.HistoryInput.prototype, | |
); | |
- return /** @type {!WebInspector.HistoryInput} */ | |
+ return; | |
+ /** @type {!WebInspector.HistoryInput} */ | |
new WebInspector.HistoryInput._constructor(); | |
}; | |
@@ -55,8 +56,10 @@ WebInspector.HistoryInput.prototype = { | |
}, | |
_saveToHistory: function() { | |
if ( | |
- this._history.length > 1 && | |
- this._history[this._history.length - 2] === this.value | |
+ this._history.length > | |
+ 1 && | |
+ this._history[this._history.length - 2] === | |
+ this.value | |
) | |
return; | |
this._history[this._history.length - 1] = this.value; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/InplaceEditor.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/InplaceEditor.js | |
index d23d151..fd9ffa2 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/InplaceEditor.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/InplaceEditor.js | |
@@ -130,7 +130,9 @@ WebInspector.InplaceEditor.prototype = { | |
function blurEventListener(e) { | |
if (config.blurHandler && !config.blurHandler(element, e)) return; | |
if ( | |
- !isMultiline || !e || !e.relatedTarget || | |
+ !isMultiline || | |
+ !e || | |
+ !e.relatedTarget || | |
!e.relatedTarget.isSelfOrDescendant(element) | |
) | |
editingCommitted.call(element); | |
@@ -178,8 +180,10 @@ WebInspector.InplaceEditor.prototype = { | |
) | |
return 'commit'; | |
else if ( | |
- event.keyCode === WebInspector.KeyboardShortcut.Keys.Esc.code || | |
- event.keyIdentifier === 'U+001B' | |
+ event.keyCode === | |
+ WebInspector.KeyboardShortcut.Keys.Esc.code || | |
+ event.keyIdentifier === | |
+ 'U+001B' | |
) | |
return 'cancel'; | |
else if (!isMultiline && event.keyIdentifier === 'U+0009') // Tab key | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/KeyboardShortcut.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/KeyboardShortcut.js | |
index ed614c8..ae2c63c 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/KeyboardShortcut.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/KeyboardShortcut.js | |
@@ -245,7 +245,8 @@ WebInspector.KeyboardShortcut.makeDescriptorFromBindingShortcut = function( | |
} | |
console.assert( | |
i === parts.length - 1, | |
- 'Only one key other than modifier is allowed in shortcut <' + shortcut + | |
+ 'Only one key other than modifier is allowed in shortcut <' + | |
+ shortcut + | |
'>', | |
); | |
keyString = parts[i]; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/Panel.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/Panel.js | |
index d101e1e..729923f 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/Panel.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/Panel.js | |
@@ -235,7 +235,8 @@ WebInspector.RuntimeExtensionPanelDescriptor.prototype = { | |
* @return {!WebInspector.Panel} | |
*/ | |
function createPanel(panelFactory) { | |
- return /** @type {!WebInspector.PanelFactory} */ | |
+ return; | |
+ /** @type {!WebInspector.PanelFactory} */ | |
panelFactory.createPanel(); | |
} | |
}, | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/Popover.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/Popover.js | |
index 0a780df..53591d3 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/Popover.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/Popover.js | |
@@ -225,19 +225,28 @@ WebInspector.Popover.prototype = { | |
var roomBelow = totalHeight - anchorBox.y - anchorBox.height; | |
if ( | |
- roomAbove > roomBelow || | |
- arrowDirection === WebInspector.Popover.Orientation.Bottom | |
+ roomAbove > | |
+ roomBelow || | |
+ arrowDirection === | |
+ WebInspector.Popover.Orientation.Bottom | |
) { | |
// Positioning above the anchor. | |
if ( | |
- anchorBox.y > newElementPosition.height + arrowHeight + borderRadius || | |
- arrowDirection === WebInspector.Popover.Orientation.Bottom | |
+ anchorBox.y > | |
+ newElementPosition.height + | |
+ arrowHeight + | |
+ borderRadius || | |
+ arrowDirection === | |
+ WebInspector.Popover.Orientation.Bottom | |
) | |
- newElementPosition.y = anchorBox.y - newElementPosition.height - | |
+ newElementPosition.y = anchorBox.y - | |
+ newElementPosition.height - | |
arrowHeight; | |
else { | |
newElementPosition.y = borderRadius; | |
- newElementPosition.height = anchorBox.y - borderRadius * 2 - | |
+ newElementPosition.height = anchorBox.y - | |
+ borderRadius * | |
+ 2 - | |
arrowHeight; | |
if ( | |
this._hasFixedHeight && newElementPosition.height < preferredHeight | |
@@ -251,11 +260,15 @@ WebInspector.Popover.prototype = { | |
// Positioning below the anchor. | |
newElementPosition.y = anchorBox.y + anchorBox.height + arrowHeight; | |
if ( | |
- newElementPosition.y + newElementPosition.height + borderRadius >= | |
+ newElementPosition.y + | |
+ newElementPosition.height + | |
+ borderRadius >= | |
totalHeight && | |
- arrowDirection !== WebInspector.Popover.Orientation.Top | |
+ arrowDirection !== | |
+ WebInspector.Popover.Orientation.Top | |
) { | |
- newElementPosition.height = totalHeight - borderRadius - | |
+ newElementPosition.height = totalHeight - | |
+ borderRadius - | |
newElementPosition.y; | |
if ( | |
this._hasFixedHeight && newElementPosition.height < preferredHeight | |
@@ -276,7 +289,8 @@ WebInspector.Popover.prototype = { | |
); | |
horizontalAlignment = 'left'; | |
} else if (newElementPosition.width + borderRadius * 2 < totalWidth) { | |
- newElementPosition.x = totalWidth - newElementPosition.width - | |
+ newElementPosition.x = totalWidth - | |
+ newElementPosition.width - | |
borderRadius; | |
horizontalAlignment = 'right'; | |
// Position arrow accurately. | |
@@ -306,7 +320,8 @@ WebInspector.Popover.prototype = { | |
this._popupArrowElement.style.left += anchorBox.width / 2; | |
} | |
- this.element.className = WebInspector.Popover._classNamePrefix + ' ' + | |
+ this.element.className = WebInspector.Popover._classNamePrefix + | |
+ ' ' + | |
verticalAlignment + | |
'-' + | |
horizontalAlignment + | |
@@ -317,9 +332,13 @@ WebInspector.Popover.prototype = { | |
newElementPosition.y - borderWidth, | |
container, | |
); | |
- this.element.style.width = newElementPosition.width + borderWidth * 2 + | |
+ this.element.style.width = newElementPosition.width + | |
+ borderWidth * | |
+ 2 + | |
'px'; | |
- this.element.style.height = newElementPosition.height + borderWidth * 2 + | |
+ this.element.style.height = newElementPosition.height + | |
+ borderWidth * | |
+ 2 + | |
'px'; | |
}, | |
__proto__: WebInspector.View.prototype, | |
@@ -369,9 +388,16 @@ WebInspector.PopoverHelper.prototype = { | |
var box = this._hoverElement instanceof AnchorBox | |
? this._hoverElement | |
: this._hoverElement.boxInWindow(); | |
- return box.x <= event.clientX && event.clientX <= box.x + box.width && | |
- box.y <= event.clientY && | |
- event.clientY <= box.y + box.height; | |
+ return box.x <= | |
+ event.clientX && | |
+ event.clientX <= | |
+ box.x + | |
+ box.width && | |
+ box.y <= | |
+ event.clientY && | |
+ event.clientY <= | |
+ box.y + | |
+ box.height; | |
}, | |
_mouseDown: function(event) { | |
if (this._disableOnClick || !this._eventInHoverElement(event)) | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SearchableView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SearchableView.js | |
index 128348a..dac4c44 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SearchableView.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SearchableView.js | |
@@ -654,8 +654,10 @@ WebInspector.SearchableView.prototype = { | |
var query = this._searchInputElement.value; | |
if ( | |
!query || | |
- !forceSearch && query.length < this._minimalSearchQuerySize && | |
- !this._currentQuery | |
+ !forceSearch && | |
+ query.length < | |
+ this._minimalSearchQuerySize && | |
+ !this._currentQuery | |
) { | |
this._clearSearch(); | |
return; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ShortcutRegistry.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ShortcutRegistry.js | |
index 4cc0cde..8e7541d 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ShortcutRegistry.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ShortcutRegistry.js | |
@@ -114,7 +114,8 @@ WebInspector.ShortcutRegistry.prototype = { | |
*/ | |
function isPossiblyInputKey() { | |
if ( | |
- !event || !WebInspector.isEditing() || | |
+ !event || | |
+ !WebInspector.isEditing() || | |
/^F\d+|Control|Shift|Alt|Meta|Win|U\+001B$/.test(keyIdentifier) | |
) | |
return false; | |
@@ -123,12 +124,14 @@ WebInspector.ShortcutRegistry.prototype = { | |
var modifiers = WebInspector.KeyboardShortcut.Modifiers; | |
if ( | |
- (keyModifiers & (modifiers.Ctrl | modifiers.Alt)) === | |
+ keyModifiers & | |
+ (modifiers.Ctrl | modifiers.Alt) === | |
(modifiers.Ctrl | modifiers.Alt) | |
) | |
return WebInspector.isWin(); | |
- return !hasModifier(modifiers.Ctrl) && !hasModifier(modifiers.Alt) && | |
+ return !hasModifier(modifiers.Ctrl) && | |
+ !hasModifier(modifiers.Alt) && | |
!hasModifier(modifiers.Meta); | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SidebarPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SidebarPane.js | |
index cf82d3b..65ae8d3 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SidebarPane.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SidebarPane.js | |
@@ -128,7 +128,8 @@ WebInspector.SidebarPaneTitle.prototype = { | |
_onTitleKeyDown: function(event) { | |
if ( | |
isEnterKey(event) || | |
- event.keyCode === WebInspector.KeyboardShortcut.Keys.Space.code | |
+ event.keyCode === | |
+ WebInspector.KeyboardShortcut.Keys.Space.code | |
) | |
this._toggleExpanded(); | |
}, | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SoftContextMenu.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SoftContextMenu.js | |
index 63424f0..b6d0fd8 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SoftContextMenu.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SoftContextMenu.js | |
@@ -103,7 +103,7 @@ WebInspector.SoftContextMenu.prototype = { | |
if ( | |
document.body.offsetWidth < | |
this._contextMenuElement.offsetLeft + | |
- this._contextMenuElement.offsetWidth | |
+ this._contextMenuElement.offsetWidth | |
) | |
this._contextMenuElement.style.left = Math.max( | |
0, | |
@@ -113,7 +113,7 @@ WebInspector.SoftContextMenu.prototype = { | |
if ( | |
document.body.offsetHeight < | |
this._contextMenuElement.offsetTop + | |
- this._contextMenuElement.offsetHeight | |
+ this._contextMenuElement.offsetHeight | |
) | |
this._contextMenuElement.style.top = Math.max( | |
0, | |
@@ -382,8 +382,13 @@ WebInspector.SoftContextMenu.prototype = { | |
_glassPaneMouseUp: function(event) { | |
// Return if this is simple 'click', since dispatched on glass pane, can't use 'click' event. | |
if ( | |
- event.x === this._x && event.y === this._y && | |
- new Date().getTime() - this._time < 300 | |
+ event.x === | |
+ this._x && | |
+ event.y === | |
+ this._y && | |
+ new Date().getTime() - | |
+ this._time < | |
+ 300 | |
) | |
return; | |
this._discardMenu(true, event); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SplitView.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SplitView.js | |
index 99ee7cf..4b1d50d 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SplitView.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SplitView.js | |
@@ -175,8 +175,10 @@ WebInspector.SplitView.prototype = { | |
view.element.classList.add('insertion-point-main'); | |
view.element.classList.remove('insertion-point-sidebar'); | |
if ( | |
- this._showMode === WebInspector.SplitView.ShowMode.OnlyMain || | |
- this._showMode === WebInspector.SplitView.ShowMode.Both | |
+ this._showMode === | |
+ WebInspector.SplitView.ShowMode.OnlyMain || | |
+ this._showMode === | |
+ WebInspector.SplitView.ShowMode.Both | |
) | |
view.show(this.element); | |
} | |
@@ -191,8 +193,10 @@ WebInspector.SplitView.prototype = { | |
view.element.classList.add('insertion-point-sidebar'); | |
view.element.classList.remove('insertion-point-main'); | |
if ( | |
- this._showMode === WebInspector.SplitView.ShowMode.OnlySidebar || | |
- this._showMode === WebInspector.SplitView.ShowMode.Both | |
+ this._showMode === | |
+ WebInspector.SplitView.ShowMode.OnlySidebar || | |
+ this._showMode === | |
+ WebInspector.SplitView.ShowMode.Both | |
) | |
view.show(this.element); | |
} | |
@@ -447,7 +451,8 @@ WebInspector.SplitView.prototype = { | |
*/ | |
_innerSetSidebarSizeDIP: function(sizeDIP, animate, userAction) { | |
if ( | |
- this._showMode !== WebInspector.SplitView.ShowMode.Both || | |
+ this._showMode !== | |
+ WebInspector.SplitView.ShowMode.Both || | |
!this.isShowing() | |
) | |
return; | |
@@ -506,7 +511,8 @@ WebInspector.SplitView.prototype = { | |
'px'; | |
} else { | |
this._resizerElement.style.top = sidebarSizeValue; | |
- this._resizerElement.style.marginTop = (-this._resizerElementSize) / 2 + | |
+ this._resizerElement.style.marginTop = (-this._resizerElementSize) / | |
+ 2 + | |
'px'; | |
} | |
} | |
@@ -812,8 +818,12 @@ WebInspector.SplitView.prototype = { | |
*/ | |
hasCustomResizer: function() { | |
var elements = this._resizerWidget.elements(); | |
- return elements.length > 1 || | |
- elements.length == 1 && elements[0] !== this._resizerElement; | |
+ return elements.length > | |
+ 1 || | |
+ elements.length == | |
+ 1 && | |
+ elements[0] !== | |
+ this._resizerElement; | |
}, | |
/** | |
* @param {!Element} resizer | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/StatusBar.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/StatusBar.js | |
index 8ab3b60..75c5429 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/StatusBar.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/StatusBar.js | |
@@ -464,7 +464,9 @@ WebInspector.StatusBarButtonBase.prototype = { | |
var hostButtonPosition = this.element.totalOffset(); | |
- var topNotBottom = hostButtonPosition.top + buttonHeight * buttons.length < | |
+ var topNotBottom = hostButtonPosition.top + | |
+ buttonHeight * | |
+ buttons.length < | |
document.documentElement.offsetHeight; | |
if (topNotBottom) buttons = buttons.reverse(); | |
@@ -474,7 +476,8 @@ WebInspector.StatusBarButtonBase.prototype = { | |
optionsBar.element.style.top = hostButtonPosition.top + 1 + 'px'; | |
else | |
optionsBar.element.style.top = hostButtonPosition.top - | |
- buttonHeight * (buttons.length - 1) + | |
+ buttonHeight * | |
+ (buttons.length - 1) + | |
'px'; | |
optionsBar.element.style.left = hostButtonPosition.left + 1 + 'px'; | |
@@ -800,8 +803,11 @@ WebInspector.StatusBarStatesSettingButton.prototype = { | |
_defaultState: function() { | |
var lastState = this._lastStateSetting.get(); | |
if ( | |
- lastState && this._states.indexOf(lastState) >= 0 && | |
- lastState != this._currentState | |
+ lastState && | |
+ this._states.indexOf(lastState) >= | |
+ 0 && | |
+ lastState != | |
+ this._currentState | |
) | |
return lastState; | |
if (this._states.length > 1 && this._currentState === this._states[0]) | |
@@ -815,8 +821,10 @@ WebInspector.StatusBarStatesSettingButton.prototype = { | |
var options = []; | |
for (var index = 0; index < this._states.length; index++) { | |
if ( | |
- this._states[index] !== this.state() && | |
- this._states[index] !== this._currentState | |
+ this._states[index] !== | |
+ this.state() && | |
+ this._states[index] !== | |
+ this._currentState | |
) | |
options.push(this._buttons[index]); | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SuggestBox.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SuggestBox.js | |
index dc5bf22..9458123 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SuggestBox.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/SuggestBox.js | |
@@ -196,7 +196,7 @@ WebInspector.SuggestBox.prototype = { | |
var index = this._selectedIndex + shift; | |
- if (isCircular) index = (this._length + index) % this._length; | |
+ if (isCircular) index = this._length + index % this._length; | |
else index = Number.constrain(index, 0, this._length - 1); | |
this._selectItem(index, true); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/TabbedPane.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/TabbedPane.js | |
index 5fad21b..c42b5f7 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/TabbedPane.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/TabbedPane.js | |
@@ -655,12 +655,14 @@ WebInspector.TabbedPane.prototype = { | |
var totalExtraWidth = 0; | |
for (var i = measuredWidths.length - 1; i > 0; --i) { | |
var extraWidth = measuredWidths[i] - measuredWidths[i - 1]; | |
- totalExtraWidth += (measuredWidths.length - i) * extraWidth; | |
+ totalExtraWidth += measuredWidths.length - i * extraWidth; | |
if (totalWidth + totalExtraWidth >= totalMeasuredWidth) | |
return measuredWidths[i - 1] + | |
- (totalWidth + totalExtraWidth - totalMeasuredWidth) / | |
- (measuredWidths.length - i); | |
+ totalWidth + | |
+ totalExtraWidth - | |
+ totalMeasuredWidth / | |
+ (measuredWidths.length - i); | |
} | |
return totalWidth / measuredWidths.length; | |
@@ -976,7 +978,8 @@ WebInspector.TabbedPaneTab.prototype = { | |
_tabMouseDown: function(event) { | |
if ( | |
event.target.classList.contains('tabbed-pane-close-button-gray') || | |
- event.button === 1 | |
+ event.button === | |
+ 1 | |
) | |
return; | |
this._tabbedPane.selectTab(this.id, true); | |
@@ -1065,15 +1068,19 @@ WebInspector.TabbedPaneTab.prototype = { | |
var tabElement = tabElements[i]; | |
if (tabElement === this._tabElement) continue; | |
- var intersects = tabElement.offsetLeft + tabElement.clientWidth > | |
+ var intersects = tabElement.offsetLeft + | |
+ tabElement.clientWidth > | |
this._tabElement.offsetLeft && | |
- this._tabElement.offsetLeft + this._tabElement.clientWidth > | |
- tabElement.offsetLeft; | |
+ this._tabElement.offsetLeft + | |
+ this._tabElement.clientWidth > | |
+ tabElement.offsetLeft; | |
if (!intersects) continue; | |
if ( | |
Math.abs(event.pageX - this._dragStartX) < | |
- tabElement.clientWidth / 2 + 5 | |
+ tabElement.clientWidth / | |
+ 2 + | |
+ 5 | |
) | |
break; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/TextPrompt.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/TextPrompt.js | |
index 4d7b4ae..0942600 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/TextPrompt.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/TextPrompt.js | |
@@ -472,7 +472,8 @@ WebInspector.TextPrompt.prototype = { | |
fullWordRange.setEnd(selectionRange.endContainer, selectionRange.endOffset); | |
if ( | |
- originalWordPrefixRange.toString() + selectionRange.toString() !== | |
+ originalWordPrefixRange.toString() + | |
+ selectionRange.toString() !== | |
fullWordRange.toString() | |
) | |
return; | |
@@ -529,7 +530,8 @@ WebInspector.TextPrompt.prototype = { | |
}, | |
_completeCommonPrefix: function() { | |
if ( | |
- !this.autoCompleteElement || !this._commonPrefix || | |
+ !this.autoCompleteElement || | |
+ !this._commonPrefix || | |
!this._userEnteredText || | |
!this._commonPrefix.startsWith(this._userEnteredText) | |
) | |
@@ -663,8 +665,10 @@ WebInspector.TextPrompt.prototype = { | |
if (!node.isSelfOrDescendant(this._element)) return false; | |
if ( | |
- node.nodeType === Node.TEXT_NODE && | |
- selectionRange.startOffset < node.nodeValue.length | |
+ node.nodeType === | |
+ Node.TEXT_NODE && | |
+ selectionRange.startOffset < | |
+ node.nodeValue.length | |
) | |
return false; | |
@@ -692,8 +696,11 @@ WebInspector.TextPrompt.prototype = { | |
var selection = this._element.getComponentSelection(); | |
var focusNode = selection.focusNode; | |
if ( | |
- !focusNode || focusNode.nodeType !== Node.TEXT_NODE || | |
- focusNode.parentNode !== this._element | |
+ !focusNode || | |
+ focusNode.nodeType !== | |
+ Node.TEXT_NODE || | |
+ focusNode.parentNode !== | |
+ this._element | |
) | |
return true; | |
@@ -721,8 +728,11 @@ WebInspector.TextPrompt.prototype = { | |
var selection = this._element.getComponentSelection(); | |
var focusNode = selection.focusNode; | |
if ( | |
- !focusNode || focusNode.nodeType !== Node.TEXT_NODE || | |
- focusNode.parentNode !== this._element | |
+ !focusNode || | |
+ focusNode.nodeType !== | |
+ Node.TEXT_NODE || | |
+ focusNode.parentNode !== | |
+ this._element | |
) | |
return true; | |
@@ -878,7 +888,9 @@ WebInspector.TextPromptWithHistory.prototype = { | |
case 'U+0050': | |
// Ctrl+P = Previous | |
if ( | |
- WebInspector.isMac() && event.ctrlKey && !event.metaKey && | |
+ WebInspector.isMac() && | |
+ event.ctrlKey && | |
+ !event.metaKey && | |
!event.altKey && | |
!event.shiftKey | |
) { | |
@@ -889,7 +901,9 @@ WebInspector.TextPromptWithHistory.prototype = { | |
case 'U+004E': | |
// Ctrl+N = Next | |
if ( | |
- WebInspector.isMac() && event.ctrlKey && !event.metaKey && | |
+ WebInspector.isMac() && | |
+ event.ctrlKey && | |
+ !event.metaKey && | |
!event.altKey && | |
!event.shiftKey | |
) | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/UIUtils.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/UIUtils.js | |
index df02522..8eb2122 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/UIUtils.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/UIUtils.js | |
@@ -250,8 +250,11 @@ WebInspector.isBeingEdited = function(node) { | |
if (!node || node.nodeType !== Node.ELEMENT_NODE) return false; | |
var element /** {!Element} */ = node; | |
if ( | |
- element.classList.contains('text-prompt') || element.nodeName === 'INPUT' || | |
- element.nodeName === 'TEXTAREA' | |
+ element.classList.contains('text-prompt') || | |
+ element.nodeName === | |
+ 'INPUT' || | |
+ element.nodeName === | |
+ 'TEXTAREA' | |
) | |
return true; | |
@@ -273,8 +276,10 @@ WebInspector.isEditing = function() { | |
var element = WebInspector.currentFocusElement(); | |
if (!element) return false; | |
return element.classList.contains('text-prompt') || | |
- element.nodeName === 'INPUT' || | |
- element.nodeName === 'TEXTAREA'; | |
+ element.nodeName === | |
+ 'INPUT' || | |
+ element.nodeName === | |
+ 'TEXTAREA'; | |
}; | |
/** | |
@@ -287,7 +292,7 @@ WebInspector.markBeingEdited = function(element, value) { | |
if (element.__editing) return false; | |
element.classList.add('being-edited'); | |
element.__editing = true; | |
- WebInspector.__editingCount = (WebInspector.__editingCount || 0) + 1; | |
+ WebInspector.__editingCount = WebInspector.__editingCount || 0 + 1; | |
} else { | |
if (!element.__editing) return false; | |
element.classList.remove('being-edited'); | |
@@ -333,9 +338,12 @@ WebInspector._modifiedHexValue = function(hexString, event) { | |
if (isNaN(number) || !isFinite(number)) return hexString; | |
var maxValue = Math.pow(16, hexString.length) - 1; | |
- var arrowKeyOrMouseWheelEvent = event.keyIdentifier === 'Up' || | |
- event.keyIdentifier === 'Down' || | |
- event.type === 'mousewheel'; | |
+ var arrowKeyOrMouseWheelEvent = event.keyIdentifier === | |
+ 'Up' || | |
+ event.keyIdentifier === | |
+ 'Down' || | |
+ event.type === | |
+ 'mousewheel'; | |
var delta; | |
if (arrowKeyOrMouseWheelEvent) delta = direction === 'Up' ? 1 : -1; | |
@@ -366,9 +374,12 @@ WebInspector._modifiedFloatNumber = function(number, event) { | |
var direction = WebInspector._valueModificationDirection(event); | |
if (!direction) return number; | |
- var arrowKeyOrMouseWheelEvent = event.keyIdentifier === 'Up' || | |
- event.keyIdentifier === 'Down' || | |
- event.type === 'mousewheel'; | |
+ var arrowKeyOrMouseWheelEvent = event.keyIdentifier === | |
+ 'Up' || | |
+ event.keyIdentifier === | |
+ 'Down' || | |
+ event.type === | |
+ 'mousewheel'; | |
// Jump by 10 when shift is down or jump by 0.1 when Alt/Option is down. | |
// Also jump by 10 for page up and down, or by 100 if shift is held with a page key. | |
@@ -410,11 +421,16 @@ WebInspector.handleElementValueModifications = function( | |
return document.createRange(); | |
} | |
- var arrowKeyOrMouseWheelEvent = event.keyIdentifier === 'Up' || | |
- event.keyIdentifier === 'Down' || | |
- event.type === 'mousewheel'; | |
- var pageKeyPressed = event.keyIdentifier === 'PageUp' || | |
- event.keyIdentifier === 'PageDown'; | |
+ var arrowKeyOrMouseWheelEvent = event.keyIdentifier === | |
+ 'Up' || | |
+ event.keyIdentifier === | |
+ 'Down' || | |
+ event.type === | |
+ 'mousewheel'; | |
+ var pageKeyPressed = event.keyIdentifier === | |
+ 'PageUp' || | |
+ event.keyIdentifier === | |
+ 'PageDown'; | |
if (!arrowKeyOrMouseWheelEvent && !pageKeyPressed) return false; | |
var selection = element.getComponentSelection(); | |
@@ -741,7 +757,8 @@ WebInspector._isTextEditingElement = function(element) { | |
*/ | |
WebInspector.setCurrentFocusElement = function(x) { | |
if ( | |
- WebInspector._glassPane && x && | |
+ WebInspector._glassPane && | |
+ x && | |
!WebInspector._glassPane.element.isAncestor(x) | |
) | |
return; | |
@@ -923,13 +940,18 @@ WebInspector.highlightRangesWithStyleClass = function( | |
var startOffset = resultRanges[i].offset; | |
var endOffset = startOffset + resultRanges[i].length; | |
- while (startIndex < textNodes.length && | |
- nodeRanges[startIndex].offset + nodeRanges[startIndex].length <= | |
- startOffset) | |
+ while (startIndex < | |
+ textNodes.length && | |
+ nodeRanges[startIndex].offset + | |
+ nodeRanges[startIndex].length <= | |
+ startOffset) | |
startIndex++; | |
var endIndex = startIndex; | |
- while (endIndex < textNodes.length && | |
- nodeRanges[endIndex].offset + nodeRanges[endIndex].length < endOffset) | |
+ while (endIndex < | |
+ textNodes.length && | |
+ nodeRanges[endIndex].offset + | |
+ nodeRanges[endIndex].length < | |
+ endOffset) | |
endIndex++; | |
if (endIndex === textNodes.length) break; | |
@@ -1147,7 +1169,7 @@ WebInspector.animateFunction = function( | |
var deltas = new Array(params.length); | |
for (var i = 0; i < params.length; ++i) { | |
values[i] = params[i].from; | |
- deltas[i] = (params[i].to - params[i].from) / frames; | |
+ deltas[i] = params[i].to - params[i].from / frames; | |
} | |
var raf = window.requestAnimationFrame(animationStep); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/View.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/View.js | |
index 375c12f..67450fe 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/View.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/View.js | |
@@ -113,7 +113,8 @@ WebInspector.View.prototype = { | |
*/ | |
_inNotification: function() { | |
return !!this._notificationDepth || | |
- this._parentView && this._parentView._inNotification(); | |
+ this._parentView && | |
+ this._parentView._inNotification(); | |
}, | |
_parentIsShowing: function() { | |
if (this._isRoot) return true; | |
@@ -328,7 +329,10 @@ WebInspector.View.prototype = { | |
}, | |
_collectViewHierarchy: function(prefix, lines) { | |
lines.push( | |
- prefix + '[' + this.element.className + ']' + | |
+ prefix + | |
+ '[' + | |
+ this.element.className + | |
+ ']' + | |
(this._children.length ? ' {' : ''), | |
); | |
@@ -426,7 +430,8 @@ WebInspector.View.prototype = { | |
*/ | |
_hasNonZeroConstraints: function() { | |
var constraints = this.constraints(); | |
- return !!(constraints.minimum.width || constraints.minimum.height || | |
+ return !!(constraints.minimum.width || | |
+ constraints.minimum.height || | |
constraints.preferred.width || | |
constraints.preferred.height); | |
}, | |
@@ -451,11 +456,11 @@ WebInspector.View._incrementViewCounter = function( | |
parentElement, | |
childElement, | |
) { | |
- var count = (childElement.__viewCounter || 0) + (childElement.__view ? 1 : 0); | |
+ var count = childElement.__viewCounter || 0 + (childElement.__view ? 1 : 0); | |
if (!count) return; | |
while (parentElement) { | |
- parentElement.__viewCounter = (parentElement.__viewCounter || 0) + count; | |
+ parentElement.__viewCounter = parentElement.__viewCounter || 0 + count; | |
parentElement = parentElement.parentElementOrShadowHost(); | |
} | |
}; | |
@@ -464,7 +469,7 @@ WebInspector.View._decrementViewCounter = function( | |
parentElement, | |
childElement, | |
) { | |
- var count = (childElement.__viewCounter || 0) + (childElement.__view ? 1 : 0); | |
+ var count = childElement.__viewCounter || 0 + (childElement.__view ? 1 : 0); | |
if (!count) return; | |
while (parentElement) { | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ViewportControl.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ViewportControl.js | |
index c840847..7ed78d8 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ViewportControl.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/ViewportControl.js | |
@@ -348,8 +348,10 @@ WebInspector.ViewportControl.prototype = { | |
var anchorElement = null; | |
var anchorOffset; | |
if ( | |
- this._firstVisibleIndex <= this._anchorSelection.item && | |
- this._anchorSelection.item <= this._lastVisibleIndex | |
+ this._firstVisibleIndex <= | |
+ this._anchorSelection.item && | |
+ this._anchorSelection.item <= | |
+ this._lastVisibleIndex | |
) { | |
anchorElement = this._anchorSelection.node; | |
anchorOffset = this._anchorSelection.offset; | |
@@ -364,8 +366,10 @@ WebInspector.ViewportControl.prototype = { | |
var headElement = null; | |
var headOffset; | |
if ( | |
- this._firstVisibleIndex <= this._headSelection.item && | |
- this._headSelection.item <= this._lastVisibleIndex | |
+ this._firstVisibleIndex <= | |
+ this._headSelection.item && | |
+ this._headSelection.item <= | |
+ this._lastVisibleIndex | |
) { | |
headElement = this._headSelection.node; | |
headOffset = this._headSelection.offset; | |
@@ -427,7 +431,7 @@ WebInspector.ViewportControl.prototype = { | |
this._cachedItemHeight(this._firstVisibleIndex + i) - | |
this._provider.fastHeight(i + this._firstVisibleIndex), | |
) > | |
- 1 | |
+ 1 | |
) | |
delete this._cumulativeHeights; | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/treeoutline.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/treeoutline.js | |
index 6d2b5fe..f251cd8 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/treeoutline.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui/treeoutline.js | |
@@ -167,7 +167,9 @@ TreeOutline.prototype = { | |
if (event.target !== this._contentElement) return; | |
if ( | |
- !this.selectedTreeElement || event.shiftKey || event.metaKey || | |
+ !this.selectedTreeElement || | |
+ event.shiftKey || | |
+ event.metaKey || | |
event.ctrlKey | |
) | |
return; | |
@@ -221,9 +223,7 @@ TreeOutline.prototype = { | |
else this.selectedTreeElement.expand(); | |
} | |
} | |
- } else if ( | |
- event.keyCode === 8 /* Backspace */ || event.keyCode === 46 /* Delete */ | |
- ) | |
+ } else if (event.keyCode === 8 || event.keyCode === 46 /* Delete */) | |
handled = this.selectedTreeElement.ondelete(); | |
else if (isEnterKey(event)) handled = this.selectedTreeElement.onenter(); | |
else if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Space.code) | |
@@ -467,7 +467,8 @@ TreeElement.prototype = { | |
var parent = child.parent; | |
if ( | |
- this.treeOutline && this.treeOutline.selectedTreeElement && | |
+ this.treeOutline && | |
+ this.treeOutline.selectedTreeElement && | |
this.treeOutline.selectedTreeElement.hasAncestorOrSelf(child) | |
) { | |
if (child.nextSibling) child.nextSibling.select(true); | |
@@ -504,7 +505,9 @@ TreeElement.prototype = { | |
}, | |
removeChildren: function() { | |
if ( | |
- !this.root && this.treeOutline && this.treeOutline.selectedTreeElement && | |
+ !this.root && | |
+ this.treeOutline && | |
+ this.treeOutline.selectedTreeElement && | |
this.treeOutline.selectedTreeElement.hasAncestorOrSelf(this) | |
) | |
this.select(true); | |
@@ -616,7 +619,8 @@ TreeElement.prototype = { | |
delete element._selectionStarted; | |
var selection = element.getComponentSelection(); | |
if ( | |
- selection && !selection.isCollapsed && | |
+ selection && | |
+ !selection.isCollapsed && | |
element.isSelfOrAncestor(selection.anchorNode) && | |
element.isSelfOrAncestor(selection.focusNode) | |
) | |
@@ -793,7 +797,9 @@ TreeElement.prototype = { | |
*/ | |
deselect: function(supressOnDeselect) { | |
if ( | |
- !this.treeOutline || this.treeOutline.selectedTreeElement !== this || | |
+ !this.treeOutline || | |
+ this.treeOutline.selectedTreeElement !== | |
+ this || | |
!this.selected | |
) | |
return; | |
@@ -887,11 +893,13 @@ TreeElement.prototype = { | |
if (element) return element; | |
element = this; | |
- while (element && !element.root && | |
+ while (element && | |
+ !element.root && | |
!(skipUnrevealed | |
? element.revealed() ? element.nextSibling : null | |
: element.nextSibling) && | |
- element.parent !== stayWithin) { | |
+ element.parent !== | |
+ stayWithin) { | |
if (info) info.depthChange -= 1; | |
element = element.parent; | |
} | |
@@ -940,8 +948,11 @@ TreeElement.prototype = { | |
console.assert(paddingLeftValue.endsWith('px')); | |
var computedLeftPadding = parseFloat(paddingLeftValue); | |
var left = this._listItemNode.totalOffsetLeft() + computedLeftPadding; | |
- return event.pageX >= left && | |
- event.pageX <= left + TreeElement._ArrowToggleWidth && | |
+ return event.pageX >= | |
+ left && | |
+ event.pageX <= | |
+ left + | |
+ TreeElement._ArrowToggleWidth && | |
this._expandable; | |
}, | |
}; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/DataGrid.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/DataGrid.js | |
index 2e17914..66376a9 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/DataGrid.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/DataGrid.js | |
@@ -360,7 +360,8 @@ WebInspector.DataGrid.prototype = { | |
var firstEditableColumn = this._nextEditableColumn(-1); | |
if ( | |
currentEditingNode.isCreationNode && | |
- cellIndex === firstEditableColumn && | |
+ cellIndex === | |
+ firstEditableColumn && | |
!wasChange | |
) | |
return; | |
@@ -677,7 +678,7 @@ WebInspector.DataGrid.prototype = { | |
var tableWidth = this.element.offsetWidth - this._cornerWidth; | |
if (tableWidth <= 0) return; | |
- var sumOfWeights = 0.0; | |
+ var sumOfWeights = 0; | |
for ( | |
var i = 0; | |
i < this._visibleColumnsArray.length; | |
@@ -730,7 +731,8 @@ WebInspector.DataGrid.prototype = { | |
// Get the width of the cell in the first (and only) row of the | |
// header table in order to determine the width of the column, since | |
// it is not possible to query a column for its width. | |
- left[i] = (left[i - 1] || 0) + | |
+ left[i] = left[i - 1] || | |
+ 0 + | |
this.headerTableBody.rows[0].cells[i].offsetWidth; | |
} | |
@@ -773,7 +775,10 @@ WebInspector.DataGrid.prototype = { | |
}, | |
_keyDown: function(event) { | |
if ( | |
- !this.selectedNode || event.shiftKey || event.metaKey || event.ctrlKey || | |
+ !this.selectedNode || | |
+ event.shiftKey || | |
+ event.metaKey || | |
+ event.ctrlKey || | |
this._editing | |
) | |
return; | |
@@ -876,7 +881,9 @@ WebInspector.DataGrid.prototype = { | |
_clickInHeaderCell: function(event) { | |
var cell = event.target.enclosingNodeOrSelfWithNodeName('th'); | |
if ( | |
- !cell || cell.columnIdentifier === undefined || | |
+ !cell || | |
+ cell.columnIdentifier === | |
+ undefined || | |
!cell.classList.contains('sortable') | |
) | |
return; | |
@@ -938,7 +945,8 @@ WebInspector.DataGrid.prototype = { | |
); | |
if ( | |
- gridNode && gridNode.selectable && | |
+ gridNode && | |
+ gridNode.selectable && | |
!gridNode.isEventWithinDisclosureTriangle(event) | |
) { | |
if (this._editCallback) { | |
@@ -1055,10 +1063,13 @@ WebInspector.DataGrid.prototype = { | |
if (leftColumn.weight || rightColumn.weight) { | |
var sumOfWeights = leftColumn.weight + rightColumn.weight; | |
var delta = rightEdgeOfNextColumn - leftEdgeOfPreviousColumn; | |
- leftColumn.weight = (dragPoint - leftEdgeOfPreviousColumn) * | |
+ leftColumn.weight = dragPoint - | |
+ leftEdgeOfPreviousColumn * | |
sumOfWeights / | |
delta; | |
- rightColumn.weight = (rightEdgeOfNextColumn - dragPoint) * sumOfWeights / | |
+ rightColumn.weight = rightEdgeOfNextColumn - | |
+ dragPoint * | |
+ sumOfWeights / | |
delta; | |
} | |
@@ -1150,7 +1161,8 @@ WebInspector.DataGridNode.prototype = { | |
this.createElement(); | |
this.createCells(); | |
} | |
- return /** @type {!Element} */ | |
+ return; | |
+ /** @type {!Element} */ | |
this._element; | |
}, | |
/** | |
@@ -1555,9 +1567,11 @@ WebInspector.DataGridNode.prototype = { | |
if (node) return node; | |
node = this; | |
- while (node && !node._isRoot && | |
+ while (node && | |
+ !node._isRoot && | |
!(!skipHidden || node.revealed ? node.nextSibling : null) && | |
- node.parent !== stayWithin) { | |
+ node.parent !== | |
+ stayWithin) { | |
if (info) info.depthChange -= 1; | |
node = node.parent; | |
} | |
@@ -1600,8 +1614,11 @@ WebInspector.DataGridNode.prototype = { | |
if (!cell || !cell.classList.contains('disclosure')) return false; | |
var left = cell.totalOffsetLeft() + this.leftPadding; | |
- return event.pageX >= left && | |
- event.pageX <= left + this.disclosureToggleWidth; | |
+ return event.pageX >= | |
+ left && | |
+ event.pageX <= | |
+ left + | |
+ this.disclosureToggleWidth; | |
}, | |
_attach: function() { | |
if (!this.dataGrid || this._attached) return; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/FlameChart.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/FlameChart.js | |
index 0099c64..1d76d26 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/FlameChart.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/FlameChart.js | |
@@ -133,9 +133,9 @@ WebInspector.FlameChart = function( | |
this._dataProvider = dataProvider; | |
- this._windowLeft = 0.0; | |
- this._windowRight = 1.0; | |
- this._windowWidth = 1.0; | |
+ this._windowLeft = 0; | |
+ this._windowRight = 1; | |
+ this._windowWidth = 1; | |
this._timeWindowLeft = 0; | |
this._timeWindowRight = Infinity; | |
this._barHeight = dataProvider.barHeight(); | |
@@ -421,11 +421,14 @@ WebInspector.FlameChart.Calculator.prototype = { | |
this._totalTime = mainPane._dataProvider.totalTime(); | |
this._zeroTime = mainPane._dataProvider.minimumBoundary(); | |
this._minimumBoundaries = this._zeroTime + | |
- mainPane._windowLeft * this._totalTime; | |
+ mainPane._windowLeft * | |
+ this._totalTime; | |
this._maximumBoundaries = this._zeroTime + | |
- mainPane._windowRight * this._totalTime; | |
+ mainPane._windowRight * | |
+ this._totalTime; | |
this._paddingLeft = mainPane._paddingLeft; | |
- this._width = mainPane._canvas.width / window.devicePixelRatio - | |
+ this._width = mainPane._canvas.width / | |
+ window.devicePixelRatio - | |
this._paddingLeft; | |
this._timeToPixel = this._width / this.boundarySpan(); | |
}, | |
@@ -436,7 +439,7 @@ WebInspector.FlameChart.Calculator.prototype = { | |
*/ | |
computePosition: function(time) { | |
return Math.round( | |
- (time - this._minimumBoundaries) * this._timeToPixel + this._paddingLeft, | |
+ time - this._minimumBoundaries * this._timeToPixel + this._paddingLeft, | |
); | |
}, | |
/** | |
@@ -492,8 +495,10 @@ WebInspector.FlameChart.prototype = { | |
_timelineData: function() { | |
var timelineData = this._dataProvider.timelineData(); | |
if ( | |
- timelineData !== this._rawTimelineData || | |
- timelineData.entryStartTimes.length !== this._rawTimelineDataLength | |
+ timelineData !== | |
+ this._rawTimelineData || | |
+ timelineData.entryStartTimes.length !== | |
+ this._rawTimelineDataLength | |
) | |
this._processTimelineData(timelineData); | |
return this._rawTimelineData; | |
@@ -524,10 +529,12 @@ WebInspector.FlameChart.prototype = { | |
if (y < this._vScrollElement.scrollTop) this._vScrollElement.scrollTop = y; | |
else if ( | |
y > | |
- this._vScrollElement.scrollTop + this._offsetHeight + | |
- this._barHeightDelta | |
+ this._vScrollElement.scrollTop + | |
+ this._offsetHeight + | |
+ this._barHeightDelta | |
) | |
- this._vScrollElement.scrollTop = y - this._offsetHeight - | |
+ this._vScrollElement.scrollTop = y - | |
+ this._offsetHeight - | |
this._barHeightDelta; | |
if (this._timeWindowLeft > entryEndTime) { | |
@@ -550,9 +557,15 @@ WebInspector.FlameChart.prototype = { | |
*/ | |
setWindowTimes: function(startTime, endTime) { | |
if ( | |
- this._muteAnimation || this._timeWindowLeft === 0 || | |
- this._timeWindowRight === Infinity || | |
- startTime === 0 && endTime === Infinity | |
+ this._muteAnimation || | |
+ this._timeWindowLeft === | |
+ 0 || | |
+ this._timeWindowRight === | |
+ Infinity || | |
+ startTime === | |
+ 0 && | |
+ endTime === | |
+ Infinity | |
) { | |
// Initial setup. | |
this._timeWindowLeft = startTime; | |
@@ -755,10 +768,13 @@ WebInspector.FlameChart.prototype = { | |
// Pan vertically when shift down only. | |
var panVertically = e.shiftKey && | |
(e.wheelDeltaY || Math.abs(e.wheelDeltaX) === 120); | |
- var panHorizontally = Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY) && | |
+ var panHorizontally = Math.abs(e.wheelDeltaX) > | |
+ Math.abs(e.wheelDeltaY) && | |
!e.shiftKey; | |
if (panVertically) { | |
- this._vScrollElement.scrollTop -= (e.wheelDeltaY || e.wheelDeltaX) / 120 * | |
+ this._vScrollElement.scrollTop -= e.wheelDeltaY || | |
+ e.wheelDeltaX / | |
+ 120 * | |
this._offsetHeight / | |
8; | |
} else if (panHorizontally) { | |
@@ -809,8 +825,8 @@ WebInspector.FlameChart.prototype = { | |
this._cancelAnimation(); | |
var bounds = this._windowForGesture(); | |
var cursorTime = this._cursorTime(this._lastMouseOffsetX); | |
- bounds.left += (bounds.left - cursorTime) * zoom; | |
- bounds.right += (bounds.right - cursorTime) * zoom; | |
+ bounds.left += bounds.left - cursorTime * zoom; | |
+ bounds.right += bounds.right - cursorTime * zoom; | |
this._requestWindowTimes(bounds); | |
}, | |
/** | |
@@ -865,7 +881,10 @@ WebInspector.FlameChart.prototype = { | |
* @return {number} | |
*/ | |
_cursorTime: function(x) { | |
- return (x + this._pixelWindowLeft - this._paddingLeft) * this._pixelToTime + | |
+ return x + | |
+ this._pixelWindowLeft - | |
+ this._paddingLeft * | |
+ this._pixelToTime + | |
this._minimumBoundary; | |
}, | |
/** | |
@@ -882,16 +901,20 @@ WebInspector.FlameChart.prototype = { | |
var offsetFromLevel; | |
if (this._isTopDown) { | |
cursorLevel = Math.floor( | |
- (y - WebInspector.FlameChart.DividersBarHeight) / this._barHeight, | |
+ y - WebInspector.FlameChart.DividersBarHeight / this._barHeight, | |
); | |
- offsetFromLevel = y - WebInspector.FlameChart.DividersBarHeight - | |
- cursorLevel * this._barHeight; | |
+ offsetFromLevel = y - | |
+ WebInspector.FlameChart.DividersBarHeight - | |
+ cursorLevel * | |
+ this._barHeight; | |
} else { | |
cursorLevel = Math.floor( | |
- (this._canvas.height / window.devicePixelRatio - y) / this._barHeight, | |
+ this._canvas.height / window.devicePixelRatio - y / this._barHeight, | |
); | |
- offsetFromLevel = this._canvas.height / window.devicePixelRatio - | |
- cursorLevel * this._barHeight; | |
+ offsetFromLevel = this._canvas.height / | |
+ window.devicePixelRatio - | |
+ cursorLevel * | |
+ this._barHeight; | |
} | |
var entryStartTimes = timelineData.entryStartTimes; | |
var entryTotalTimes = timelineData.entryTotalTimes; | |
@@ -921,14 +944,18 @@ WebInspector.FlameChart.prototype = { | |
var startTime = entryStartTimes[entryIndex]; | |
var duration = entryTotalTimes[entryIndex]; | |
if (isNaN(duration)) { | |
- var dx = (startTime - cursorTime) / this._pixelToTime; | |
+ var dx = startTime - cursorTime / this._pixelToTime; | |
var dy = this._barHeight / 2 - offsetFromLevel; | |
return dx * dx + dy * dy < this._markerRadius * this._markerRadius; | |
} | |
var endTime = startTime + duration; | |
var barThreshold = 3 * this._pixelToTime; | |
- return startTime - barThreshold < cursorTime && | |
- cursorTime < endTime + barThreshold; | |
+ return startTime - | |
+ barThreshold < | |
+ cursorTime && | |
+ cursorTime < | |
+ endTime + | |
+ barThreshold; | |
} | |
var entryIndex = entryIndexes[indexOnLevel]; | |
@@ -1004,21 +1031,23 @@ WebInspector.FlameChart.prototype = { | |
var markerIndices = new Uint32Array(entryTotalTimes.length); | |
var nextMarkerIndex = 0; | |
var textPadding = this._dataProvider.textPadding(); | |
- this._minTextWidth = 2 * textPadding + | |
+ this._minTextWidth = 2 * | |
+ textPadding + | |
this._measureWidth(context, '\u2026'); | |
var minTextWidth = this._minTextWidth; | |
var barHeight = this._barHeight; | |
- var textBaseHeight = this._baseHeight + barHeight - | |
+ var textBaseHeight = this._baseHeight + | |
+ barHeight - | |
this._dataProvider.textBaseline(); | |
var colorBuckets = {}; | |
var minVisibleBarLevel = Math.max( | |
- Math.floor((this._scrollTop - this._baseHeight) / barHeight), | |
+ Math.floor(this._scrollTop - this._baseHeight / barHeight), | |
0, | |
); | |
var maxVisibleBarLevel = Math.min( | |
- Math.floor((this._scrollTop - this._baseHeight + height) / barHeight), | |
+ Math.floor(this._scrollTop - this._baseHeight + height / barHeight), | |
this._dataProvider.maxStackDepth(), | |
); | |
@@ -1099,7 +1128,8 @@ WebInspector.FlameChart.prototype = { | |
} else { | |
context.rect(barX, barY, barWidth, barHeight - 1); | |
if ( | |
- barWidth > minTextWidth || | |
+ barWidth > | |
+ minTextWidth || | |
this._dataProvider.forceDecoration(entryIndex) | |
) | |
titleIndices[nextTitleIndex++] = entryIndex; | |
@@ -1232,8 +1262,13 @@ WebInspector.FlameChart.prototype = { | |
continue; | |
// Assign a trasparent color if the flow is small enough or if the previous color was a transparent color. | |
if ( | |
- endX - startX < minimumFlowDistancePx + fadeColorsRange || | |
- colorIndex !== color.length - 1 | |
+ endX - | |
+ startX < | |
+ minimumFlowDistancePx + | |
+ fadeColorsRange || | |
+ colorIndex !== | |
+ color.length - | |
+ 1 | |
) { | |
colorIndex = Math.min( | |
fadeColorsRange - 1, | |
@@ -1377,7 +1412,7 @@ WebInspector.FlameChart.prototype = { | |
* @return {number} | |
*/ | |
_timeToPosition: function(time) { | |
- return Math.floor((time - this._minimumBoundary) * this._timeToPixel) - | |
+ return Math.floor(time - this._minimumBoundary * this._timeToPixel) - | |
this._pixelWindowLeft + | |
this._paddingLeft; | |
}, | |
@@ -1449,9 +1484,11 @@ WebInspector.FlameChart.prototype = { | |
this._minimumBoundary = this._dataProvider.minimumBoundary(); | |
if (this._timeWindowRight !== Infinity) { | |
- this._windowLeft = (this._timeWindowLeft - this._minimumBoundary) / | |
+ this._windowLeft = this._timeWindowLeft - | |
+ this._minimumBoundary / | |
this._totalTime; | |
- this._windowRight = (this._timeWindowRight - this._minimumBoundary) / | |
+ this._windowRight = this._timeWindowRight - | |
+ this._minimumBoundary / | |
this._totalTime; | |
this._windowWidth = this._windowRight - this._windowLeft; | |
} else { | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/OverviewGrid.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/OverviewGrid.js | |
index baf57fc..487bbde 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/OverviewGrid.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/OverviewGrid.js | |
@@ -117,7 +117,7 @@ WebInspector.OverviewGrid.prototype = { | |
WebInspector.OverviewGrid.MinSelectableSize = 14; | |
-WebInspector.OverviewGrid.WindowScrollSpeedFactor = .3; | |
+WebInspector.OverviewGrid.WindowScrollSpeedFactor = 0.3; | |
WebInspector.OverviewGrid.ResizerOffset = 3.5; | |
// half pixel because offset values are not rounded but ceiled | |
@@ -151,8 +151,8 @@ WebInspector.OverviewGrid.Window = function( | |
'-webkit-grab', | |
); | |
- this.windowLeft = 0.0; | |
- this.windowRight = 1.0; | |
+ this.windowLeft = 0; | |
+ this.windowRight = 1; | |
this._parentElement.addEventListener( | |
'mousewheel', | |
@@ -234,8 +234,8 @@ WebInspector.OverviewGrid.Events = {WindowChanged: 'WindowChanged'}; | |
WebInspector.OverviewGrid.Window.prototype = { | |
reset: function() { | |
- this.windowLeft = 0.0; | |
- this.windowRight = 1.0; | |
+ this.windowLeft = 0; | |
+ this.windowRight = 1; | |
this._overviewWindowElement.style.left = '0%'; | |
this._overviewWindowElement.style.width = '100%'; | |
@@ -274,7 +274,8 @@ WebInspector.OverviewGrid.Window.prototype = { | |
*/ | |
_resizerElementStartDragging: function(event) { | |
if (!this._enabled) return false; | |
- this._resizerParentOffsetLeft = event.pageX - event.offsetX - | |
+ this._resizerParentOffsetLeft = event.pageX - | |
+ event.offsetX - | |
event.target.offsetLeft; | |
event.preventDefault(); | |
return true; | |
@@ -337,7 +338,8 @@ WebInspector.OverviewGrid.Window.prototype = { | |
window.end - window.start < WebInspector.OverviewGrid.MinSelectableSize | |
) { | |
if ( | |
- this._parentElement.clientWidth - window.end > | |
+ this._parentElement.clientWidth - | |
+ window.end > | |
WebInspector.OverviewGrid.MinSelectableSize | |
) | |
window.end = window.start + WebInspector.OverviewGrid.MinSelectableSize; | |
@@ -361,7 +363,8 @@ WebInspector.OverviewGrid.Window.prototype = { | |
*/ | |
_windowDragging: function(event) { | |
event.preventDefault(); | |
- var delta = (event.pageX - this._dragStartPoint) / | |
+ var delta = event.pageX - | |
+ this._dragStartPoint / | |
this._parentElement.clientWidth; | |
if (this._dragStartLeft + delta < 0) delta = -this._dragStartLeft; | |
@@ -389,7 +392,7 @@ WebInspector.OverviewGrid.Window.prototype = { | |
else if ( | |
end < | |
this._leftResizeElement.offsetLeft + | |
- WebInspector.OverviewGrid.MinSelectableSize | |
+ WebInspector.OverviewGrid.MinSelectableSize | |
) | |
end = this._leftResizeElement.offsetLeft + | |
WebInspector.OverviewGrid.MinSelectableSize; | |
@@ -412,8 +415,8 @@ WebInspector.OverviewGrid.Window.prototype = { | |
var minWidthInPixels = WebInspector.OverviewGrid.MinSelectableSize / 2; | |
if (widthInPixels < minWidthInPixels) { | |
var factor = minWidthInPixels / widthInPixels; | |
- left = (windowRight + windowLeft - width * factor) / 2; | |
- right = (windowRight + windowLeft + width * factor) / 2; | |
+ left = windowRight + windowLeft - width * factor / 2; | |
+ right = windowRight + windowLeft + width * factor / 2; | |
} | |
this.windowLeft = windowLeft; | |
@@ -423,8 +426,8 @@ WebInspector.OverviewGrid.Window.prototype = { | |
this._overviewWindowElement.style.left = left * 100 + '%'; | |
this._overviewWindowBordersElement.style.left = left * 100 + '%'; | |
- this._overviewWindowElement.style.width = (right - left) * 100 + '%'; | |
- this._overviewWindowBordersElement.style.right = (1 - right) * 100 + '%'; | |
+ this._overviewWindowElement.style.width = right - left * 100 + '%'; | |
+ this._overviewWindowBordersElement.style.right = 1 - right * 100 + '%'; | |
this.dispatchEventToListeners( | |
WebInspector.OverviewGrid.Events.WindowChanged, | |
@@ -491,10 +494,10 @@ WebInspector.OverviewGrid.Window.prototype = { | |
newWindowSize = 1; | |
factor = newWindowSize / windowSize; | |
} | |
- left = reference + (left - reference) * factor; | |
+ left = reference + left - reference * factor; | |
left = Number.constrain(left, 0, 1 - newWindowSize); | |
- right = reference + (right - reference) * factor; | |
+ right = reference + right - reference * factor; | |
right = Number.constrain(right, newWindowSize, 1); | |
this._setWindow(left, right); | |
}, | |
@@ -526,7 +529,8 @@ WebInspector.OverviewGrid.WindowSelector.prototype = { | |
position = Math.max(0, Math.min(position, this._width)); | |
if (position < this._startPosition) { | |
this._windowSelector.style.left = position + 'px'; | |
- this._windowSelector.style.right = this._width - this._startPosition + | |
+ this._windowSelector.style.right = this._width - | |
+ this._startPosition + | |
'px'; | |
} else { | |
this._windowSelector.style.left = this._startPosition + 'px'; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/PieChart.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/PieChart.js | |
index 1493394..031cfd9 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/PieChart.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/PieChart.js | |
@@ -88,7 +88,10 @@ WebInspector.PieChart.prototype = { | |
_setSize: function(value) { | |
this._group.setAttribute( | |
'transform', | |
- 'scale(' + value / 2 + ') translate(' + | |
+ 'scale(' + | |
+ value / | |
+ 2 + | |
+ ') translate(' + | |
(1 + WebInspector.PieChart._ShadowSizePercent) + | |
',1)', | |
); | |
@@ -113,7 +116,16 @@ WebInspector.PieChart.prototype = { | |
var largeArc = sliceAngle > Math.PI ? 1 : 0; | |
path.setAttribute( | |
'd', | |
- 'M0,0 L' + x1 + ',' + y1 + ' A1,1,0,' + largeArc + ',1,' + x2 + ',' + y2 + | |
+ 'M0,0 L' + | |
+ x1 + | |
+ ',' + | |
+ y1 + | |
+ ' A1,1,0,' + | |
+ largeArc + | |
+ ',1,' + | |
+ x2 + | |
+ ',' + | |
+ y2 + | |
' Z', | |
); | |
path.setAttribute('fill', color); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/TimelineGrid.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/TimelineGrid.js | |
index acda48b..ac5d0aa 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/TimelineGrid.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/TimelineGrid.js | |
@@ -90,9 +90,10 @@ WebInspector.TimelineGrid.calculateDividerOffsets = function( | |
gridSliceTime = gridSliceTime / 2; | |
var leftBoundaryTime = calculator.minimumBoundary() - | |
- calculator.paddingLeft() / pixelsPerTime; | |
+ calculator.paddingLeft() / | |
+ pixelsPerTime; | |
var firstDividerTime = Math.ceil( | |
- (leftBoundaryTime - calculator.zeroTime()) / gridSliceTime, | |
+ leftBoundaryTime - calculator.zeroTime() / gridSliceTime, | |
) * | |
gridSliceTime + | |
calculator.zeroTime(); | |
@@ -100,9 +101,7 @@ WebInspector.TimelineGrid.calculateDividerOffsets = function( | |
// Add some extra space past the right boundary as the rightmost divider label text | |
// may be partially shown rather than just pop up when a new rightmost divider gets into the view. | |
lastDividerTime += minGridSlicePx / pixelsPerTime; | |
- dividersCount = Math.ceil( | |
- (lastDividerTime - firstDividerTime) / gridSliceTime, | |
- ); | |
+ dividersCount = Math.ceil(lastDividerTime - firstDividerTime / gridSliceTime); | |
if (!gridSliceTime) dividersCount = 0; | |
@@ -175,7 +174,7 @@ WebInspector.TimelineGrid.drawCanvasGrid = function( | |
: calculator.formatTime(time, precision); | |
var textWidth = context.measureText(text).width; | |
var textPosition = printDeltas | |
- ? (position + lastPosition - textWidth) / 2 | |
+ ? position + lastPosition - textWidth / 2 | |
: position - textWidth - paddingRight; | |
context.fillText(text, textPosition, paddingTop); | |
} | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/ViewportDataGrid.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/ViewportDataGrid.js | |
index 266ee32..a3eb789 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/ViewportDataGrid.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/ui_lazy/ViewportDataGrid.js | |
@@ -235,7 +235,7 @@ WebInspector.ViewportDataGrid.prototype = { | |
var node = visibleNodes[i]; | |
var element = node.element(); | |
node.willAttach(); | |
- element.classList.toggle('odd', (offset + i) % 2 === 0); | |
+ element.classList.toggle('odd', offset + i % 2 === 0); | |
tBody.insertBefore(element, previousElement.nextSibling); | |
previousElement = element; | |
} | |
@@ -300,7 +300,8 @@ WebInspector.ViewportDataGridNode.prototype = { | |
this._stale = false; | |
} | |
- return /** @type {!Element} */ | |
+ return; | |
+ /** @type {!Element} */ | |
this._element; | |
}, | |
/** | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/FileSystemMapping.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/FileSystemMapping.js | |
index 08ffc2c..43ff79a 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/FileSystemMapping.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/FileSystemMapping.js | |
@@ -244,7 +244,8 @@ WebInspector.FileSystemMapping.prototype = { | |
var commonPathSuffixLength = 0; | |
var normalizedFilePath = '/' + filePath; | |
for (var i = 0; i < normalizedFilePath.length; ++i) { | |
- var filePathCharacter = normalizedFilePath[normalizedFilePath.length - 1 - | |
+ var filePathCharacter = normalizedFilePath[normalizedFilePath.length - | |
+ 1 - | |
i]; | |
var urlCharacter = url[url.length - 1 - i]; | |
if (filePathCharacter !== urlCharacter) break; | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/IsolatedFileSystem.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/IsolatedFileSystem.js | |
index 1a40311..06f6522 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/IsolatedFileSystem.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/IsolatedFileSystem.js | |
@@ -203,7 +203,8 @@ WebInspector.IsolatedFileSystem.prototype = { | |
var errorMessage = WebInspector.IsolatedFileSystem.errorMessage(error); | |
console.error( | |
- errorMessage + " when testing if file exists '" + | |
+ errorMessage + | |
+ " when testing if file exists '" + | |
(this._path + '/' + path + '/' + nameCandidate) + | |
"'", | |
); | |
@@ -263,7 +264,9 @@ WebInspector.IsolatedFileSystem.prototype = { | |
function errorHandler(error) { | |
var errorMessage = WebInspector.IsolatedFileSystem.errorMessage(error); | |
console.error( | |
- errorMessage + " when deleting file '" + (this._path + '/' + path) + | |
+ errorMessage + | |
+ " when deleting file '" + | |
+ (this._path + '/' + path) + | |
"'", | |
); | |
} | |
@@ -369,7 +372,8 @@ WebInspector.IsolatedFileSystem.prototype = { | |
var errorMessage = WebInspector.IsolatedFileSystem.errorMessage(error); | |
console.error( | |
- errorMessage + " when getting content for file '" + | |
+ errorMessage + | |
+ " when getting content for file '" + | |
(this._path + '/' + path) + | |
"'", | |
); | |
@@ -434,7 +438,8 @@ WebInspector.IsolatedFileSystem.prototype = { | |
function errorHandler(error) { | |
var errorMessage = WebInspector.IsolatedFileSystem.errorMessage(error); | |
console.error( | |
- errorMessage + " when setting content for file '" + | |
+ errorMessage + | |
+ " when setting content for file '" + | |
(this._path + '/' + path) + | |
"'", | |
); | |
@@ -530,7 +535,9 @@ WebInspector.IsolatedFileSystem.prototype = { | |
function errorHandler(error) { | |
var errorMessage = WebInspector.IsolatedFileSystem.errorMessage(error); | |
console.error( | |
- errorMessage + " when renaming file '" + (this._path + '/' + path) + | |
+ errorMessage + | |
+ " when renaming file '" + | |
+ (this._path + '/' + path) + | |
"' to '" + | |
newName + | |
"'", | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/SearchConfig.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/SearchConfig.js | |
index eea6506..ad0d9b4 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/SearchConfig.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/SearchConfig.js | |
@@ -70,10 +70,16 @@ WebInspector.SearchConfig.prototype = { | |
// Inside double quotes: any symbol except double quote and backslash or any symbol escaped with a backslash. | |
// A word is a sequence of any symbols except space and backslash or any symbols escaped with a backslash, that does not start with file:. | |
var unquotedWordPattern = '((?!-?f(ile)?:)[^\\\\ ]|\\\\.)+'; | |
- var unquotedPattern = unquotedWordPattern + '( +' + unquotedWordPattern + | |
+ var unquotedPattern = unquotedWordPattern + | |
+ '( +' + | |
+ unquotedWordPattern + | |
')*'; | |
// A word or several words separated by space(s). | |
- var pattern = '(' + filePattern + ')|(' + quotedPattern + ')|(' + | |
+ var pattern = '(' + | |
+ filePattern + | |
+ ')|(' + | |
+ quotedPattern + | |
+ ')|(' + | |
unquotedPattern + | |
')'; | |
var regexp = new RegExp(pattern, 'g'); | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/UISourceCode.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/UISourceCode.js | |
index f700991..d65d1bc 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/UISourceCode.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/UISourceCode.js | |
@@ -100,7 +100,8 @@ WebInspector.UISourceCode.prototype = { | |
* @return {string} | |
*/ | |
fullDisplayName: function() { | |
- return this._project.displayName() + '/' + | |
+ return this._project.displayName() + | |
+ '/' + | |
(this._parentPath ? this._parentPath + '/' : '') + | |
this.displayName(true); | |
}, | |
@@ -275,8 +276,10 @@ WebInspector.UISourceCode.prototype = { | |
return; | |
} | |
if ( | |
- typeof this._lastAcceptedContent === 'string' && | |
- this._lastAcceptedContent === updatedContent | |
+ typeof this._lastAcceptedContent === | |
+ 'string' && | |
+ this._lastAcceptedContent === | |
+ updatedContent | |
) { | |
this._terminateContentCheck(); | |
return; | |
@@ -367,8 +370,10 @@ WebInspector.UISourceCode.prototype = { | |
*/ | |
save: function(forceSaveAs) { | |
if ( | |
- this.project().type() === WebInspector.projectTypes.FileSystem || | |
- this.project().type() === WebInspector.projectTypes.Snippets | |
+ this.project().type() === | |
+ WebInspector.projectTypes.FileSystem || | |
+ this.project().type() === | |
+ WebInspector.projectTypes.Snippets | |
) { | |
this.commitWorkingCopy(); | |
return; | |
@@ -385,7 +390,8 @@ WebInspector.UISourceCode.prototype = { | |
*/ | |
hasUnsavedCommittedChanges: function() { | |
if ( | |
- this._savedWithFileManager || this.project().canSetFileContent() || | |
+ this._savedWithFileManager || | |
+ this.project().canSetFileContent() || | |
this._project.isServiceProject() | |
) | |
return false; | |
@@ -481,8 +487,10 @@ WebInspector.UISourceCode.prototype = { | |
* @return {boolean} | |
*/ | |
isDirty: function() { | |
- return typeof this._workingCopy !== 'undefined' || | |
- typeof this._workingCopyGetter !== 'undefined'; | |
+ return typeof this._workingCopy !== | |
+ 'undefined' || | |
+ typeof this._workingCopyGetter !== | |
+ 'undefined'; | |
}, | |
/** | |
* @return {string} | |
@@ -586,7 +594,9 @@ WebInspector.UILocation.prototype = { | |
* @return {string} | |
*/ | |
id: function() { | |
- return this.uiSourceCode.project().id() + ':' + this.uiSourceCode.uri() + | |
+ return this.uiSourceCode.project().id() + | |
+ ':' + | |
+ this.uiSourceCode.uri() + | |
':' + | |
this.lineNumber + | |
':' + | |
diff --git a/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/Workspace.js b/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/Workspace.js | |
index 2429aee..e19c69b 100644 | |
--- a/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/Workspace.js | |
+++ b/pkg/nuclide-debugger/VendorLib/devtools/front_end/workspace/Workspace.js | |
@@ -279,8 +279,10 @@ WebInspector.Project.prototype = { | |
isServiceProject: function() { | |
return this._projectDelegate.type() === | |
WebInspector.projectTypes.Debugger || | |
- this._projectDelegate.type() === WebInspector.projectTypes.Formatter || | |
- this._projectDelegate.type() === WebInspector.projectTypes.Service; | |
+ this._projectDelegate.type() === | |
+ WebInspector.projectTypes.Formatter || | |
+ this._projectDelegate.type() === | |
+ WebInspector.projectTypes.Service; | |
}, | |
/** | |
* @param {!WebInspector.Event} event | |
diff --git a/pkg/nuclide-debugger/lib/BreakpointDisplayController.js b/pkg/nuclide-debugger/lib/BreakpointDisplayController.js | |
index c670721..27cd245 100644 | |
--- a/pkg/nuclide-debugger/lib/BreakpointDisplayController.js | |
+++ b/pkg/nuclide-debugger/lib/BreakpointDisplayController.js | |
@@ -243,8 +243,10 @@ export default class BreakpointDisplayController { | |
_isLineOverLastShadowBreakpoint(curLine: number): boolean { | |
const shadowBreakpointMarker = this._lastShadowBreakpointMarker; | |
- return shadowBreakpointMarker != null && | |
- shadowBreakpointMarker.getStartBufferPosition().row === curLine; | |
+ return shadowBreakpointMarker != | |
+ null && | |
+ shadowBreakpointMarker.getStartBufferPosition().row === | |
+ curLine; | |
} | |
_removeLastShadowBreakpoint(): void { | |
diff --git a/pkg/nuclide-debugger/lib/BreakpointListComponent.js b/pkg/nuclide-debugger/lib/BreakpointListComponent.js | |
index a47a261..c2efd9f 100644 | |
--- a/pkg/nuclide-debugger/lib/BreakpointListComponent.js | |
+++ b/pkg/nuclide-debugger/lib/BreakpointListComponent.js | |
@@ -87,8 +87,10 @@ export class BreakpointListComponent extends React.Component { | |
})) | |
.sort( | |
(breakpointA, breakpointB) => | |
- 100 * (Number(breakpointB.resolved) - Number(breakpointA.resolved)) + | |
- 10 * breakpointA.basename.localeCompare(breakpointB.basename) + | |
+ 100 * | |
+ (Number(breakpointB.resolved) - Number(breakpointA.resolved)) + | |
+ 10 * | |
+ breakpointA.basename.localeCompare(breakpointB.basename) + | |
Math.sign(breakpointA.line - breakpointB.line), | |
) | |
.map((breakpoint, i) => { | |
diff --git a/pkg/nuclide-debugger/lib/DebuggerActions.js b/pkg/nuclide-debugger/lib/DebuggerActions.js | |
index 9eaca1e..fe82d06 100644 | |
--- a/pkg/nuclide-debugger/lib/DebuggerActions.js | |
+++ b/pkg/nuclide-debugger/lib/DebuggerActions.js | |
@@ -101,7 +101,8 @@ export default class DebuggerActions { | |
this.toggleSingleThreadStepping(singleThreadSteppingEnabled); | |
} | |
if ( | |
- processInfo.getServiceName() !== 'hhvm' || | |
+ processInfo.getServiceName() !== | |
+ 'hhvm' || | |
(await passesGK(GK_DEBUGGER_REQUEST_SENDER)) | |
) { | |
const customControlButtons = processInfo.customControlButtons(); | |
diff --git a/pkg/nuclide-debugger/lib/DebuggerModel.js b/pkg/nuclide-debugger/lib/DebuggerModel.js | |
index d33206e..0e4c09d 100644 | |
--- a/pkg/nuclide-debugger/lib/DebuggerModel.js | |
+++ b/pkg/nuclide-debugger/lib/DebuggerModel.js | |
@@ -56,8 +56,8 @@ export default class DebuggerModel { | |
this._store = new DebuggerStore(this._dispatcher, this); | |
this._actions = new DebuggerActions(this._dispatcher, this._store); | |
this._breakpointStore = new BreakpointStore( | |
- this._dispatcher, | |
//serialized breakpoints | |
+ this._dispatcher, | |
(state ? state.breakpoints : null), | |
); | |
this._breakpointManager = new BreakpointManager( | |
diff --git a/pkg/nuclide-debugger/lib/ScopesStore.js b/pkg/nuclide-debugger/lib/ScopesStore.js | |
index 53e9bed..0898460 100644 | |
--- a/pkg/nuclide-debugger/lib/ScopesStore.js | |
+++ b/pkg/nuclide-debugger/lib/ScopesStore.js | |
@@ -56,7 +56,7 @@ export default class ScopesStore { | |
scopeName: string, | |
): void { | |
const scopeSection = {name: scopeName, scopeVariables}; | |
- this._scopes.next([...this._scopes.getValue(), , scopeSection]); | |
+ this._scopes.next([...this._scopes.getValue(), , , scopeSection]); | |
} | |
getScopes(): Observable<Array<ScopeSection>> { | |
diff --git a/pkg/nuclide-debugger/lib/ThreadStore.js b/pkg/nuclide-debugger/lib/ThreadStore.js | |
index 2342288..16bb7ad 100644 | |
--- a/pkg/nuclide-debugger/lib/ThreadStore.js | |
+++ b/pkg/nuclide-debugger/lib/ThreadStore.js | |
@@ -94,8 +94,12 @@ export default class ThreadStore { | |
_updateThread(thread: ThreadItem): void { | |
// TODO(jonaldislarry): add deleteThread API so that this stop reason checking is not needed. | |
if ( | |
- thread.stopReason === 'end' || thread.stopReason === 'error' || | |
- thread.stopReason === 'stopped' | |
+ thread.stopReason === | |
+ 'end' || | |
+ thread.stopReason === | |
+ 'error' || | |
+ thread.stopReason === | |
+ 'stopped' | |
) { | |
this._threadMap.delete(Number(thread.id)); | |
} else { | |
diff --git a/pkg/nuclide-debugger/lib/WatchExpressionListStore.js b/pkg/nuclide-debugger/lib/WatchExpressionListStore.js | |
index c7a7ba3..739b640 100644 | |
--- a/pkg/nuclide-debugger/lib/WatchExpressionListStore.js | |
+++ b/pkg/nuclide-debugger/lib/WatchExpressionListStore.js | |
@@ -81,6 +81,7 @@ export class WatchExpressionListStore { | |
this._watchExpressions.next([ | |
...this._watchExpressions.getValue(), | |
, | |
+ , | |
this._getExpressionEvaluationFor(expression), | |
]); | |
} | |
diff --git a/pkg/nuclide-debugger/lib/normalizeRemoteObjectValue.js b/pkg/nuclide-debugger/lib/normalizeRemoteObjectValue.js | |
index c39e12e..2da664a 100644 | |
--- a/pkg/nuclide-debugger/lib/normalizeRemoteObjectValue.js | |
+++ b/pkg/nuclide-debugger/lib/normalizeRemoteObjectValue.js | |
@@ -25,7 +25,8 @@ export function normalizeRemoteObjectValue( | |
const underscoreField = `_${field}`; | |
if ( | |
remoteObject.hasOwnProperty(underscoreField) && | |
- remoteObject[underscoreField] != null | |
+ remoteObject[underscoreField] != | |
+ null | |
) { | |
modifiedProperties[field] = String(remoteObject[underscoreField]); | |
} else if ( | |
diff --git a/pkg/nuclide-debugger/spec/utils.js b/pkg/nuclide-debugger/spec/utils.js | |
index 7ad8777..fa59805 100644 | |
--- a/pkg/nuclide-debugger/spec/utils.js | |
+++ b/pkg/nuclide-debugger/spec/utils.js | |
@@ -37,8 +37,10 @@ export function getBreakpointDecorationInRow( | |
for (let i = 0; i < decorations.length; i++) { | |
const {gutterName, item} = decorations[i].getProperties(); | |
if ( | |
- gutterName === 'nuclide-breakpoint' && | |
- item.className === 'nuclide-debugger-breakpoint-icon' | |
+ gutterName === | |
+ 'nuclide-breakpoint' && | |
+ item.className === | |
+ 'nuclide-debugger-breakpoint-icon' | |
) { | |
return decorations[i]; | |
} | |
diff --git a/pkg/nuclide-definition-preview/lib/DefinitionPreviewView.js b/pkg/nuclide-definition-preview/lib/DefinitionPreviewView.js | |
index b3ac38f..1209be4 100644 | |
--- a/pkg/nuclide-definition-preview/lib/DefinitionPreviewView.js | |
+++ b/pkg/nuclide-definition-preview/lib/DefinitionPreviewView.js | |
@@ -130,7 +130,8 @@ export class DefinitionPreviewView extends React.Component { | |
render(): React.Element<any> { | |
const {ContextViewMessage, definition} = this.props; | |
- const atMinHeight = this.state.editorHeight - EDITOR_HEIGHT_DELTA < | |
+ const atMinHeight = this.state.editorHeight - | |
+ EDITOR_HEIGHT_DELTA < | |
MINIMUM_EDITOR_HEIGHT; | |
// Show either a "No definition" message or the definition in an editors | |
return definition == null | |
diff --git a/pkg/nuclide-diagnostics-store/spec/LinterAdapter-spec.js b/pkg/nuclide-diagnostics-store/spec/LinterAdapter-spec.js | |
index a57c497..6ef5aa6 100644 | |
--- a/pkg/nuclide-diagnostics-store/spec/LinterAdapter-spec.js | |
+++ b/pkg/nuclide-diagnostics-store/spec/LinterAdapter-spec.js | |
@@ -249,7 +249,9 @@ describe('LinterAdapter', () => { | |
advanceClock(30); | |
waitsFor( | |
() => { | |
- return numMessages === 1 && lastMessage && | |
+ return numMessages === | |
+ 1 && | |
+ lastMessage && | |
lastMessage.filePathToMessages.has('baz'); | |
}, | |
'There should be only the latest message', | |
diff --git a/pkg/nuclide-diagnostics-ui/lib/DiagnosticsPane.js b/pkg/nuclide-diagnostics-ui/lib/DiagnosticsPane.js | |
index 738bbe5..432254f 100644 | |
--- a/pkg/nuclide-diagnostics-ui/lib/DiagnosticsPane.js | |
+++ b/pkg/nuclide-diagnostics-ui/lib/DiagnosticsPane.js | |
@@ -70,6 +70,7 @@ function getMessageContent( | |
const allMessages: Array<{html?: string, text?: string}> = [ | |
diagnostic, | |
...traces, | |
+ ,, | |
]; | |
for (const message of allMessages) { | |
// TODO: A mix of html and text diagnostics will yield a wonky sort ordering. | |
@@ -163,6 +164,7 @@ export default class DiagnosticsPane extends React.Component { | |
{key: 'providerName', title: 'Source', width: 0.1}, | |
...filePathColumn, | |
, | |
+ , | |
{key: 'range', title: 'Line', width: 0.05}, | |
{ | |
component: DescriptionComponent, | |
diff --git a/pkg/nuclide-diagnostics-ui/lib/DiagnosticsPanel.js b/pkg/nuclide-diagnostics-ui/lib/DiagnosticsPanel.js | |
index 8e2bb72..67e80e2 100644 | |
--- a/pkg/nuclide-diagnostics-ui/lib/DiagnosticsPanel.js | |
+++ b/pkg/nuclide-diagnostics-ui/lib/DiagnosticsPanel.js | |
@@ -57,8 +57,10 @@ export default class DiagnosticsPanel extends React.Component { | |
if (pathToFilterBy !== null) { | |
diagnostics = diagnostics.filter( | |
diagnostic => | |
- diagnostic.scope === 'file' && | |
- diagnostic.filePath === pathToFilterBy, | |
+ diagnostic.scope === | |
+ 'file' && | |
+ diagnostic.filePath === | |
+ pathToFilterBy, | |
); | |
} else { | |
// Current pane is not a text editor; do not show diagnostics. | |
@@ -88,7 +90,7 @@ export default class DiagnosticsPanel extends React.Component { | |
<a | |
href="http://nuclide.io/docs/advanced-topics/linter-package-compatibility/" | |
> | |
- Learn More | |
+ Learn More | |
</a>. | |
</span> | |
</ToolbarCenter> | |
diff --git a/pkg/nuclide-diff-view/lib/DiffNavigationBar.js b/pkg/nuclide-diff-view/lib/DiffNavigationBar.js | |
index 49b67da..139e4fe 100644 | |
--- a/pkg/nuclide-diff-view/lib/DiffNavigationBar.js | |
+++ b/pkg/nuclide-diff-view/lib/DiffNavigationBar.js | |
@@ -33,7 +33,7 @@ export function clickEventToScrollLineNumber( | |
e: SyntheticMouseEvent, | |
): number { | |
const targetRectangle = ((e.target: any): HTMLElement).getBoundingClientRect(); | |
- const lineHeight = (e.clientY - targetRectangle.top) / targetRectangle.height; | |
+ const lineHeight = e.clientY - targetRectangle.top / targetRectangle.height; | |
return sectionLineNumber + Math.floor(sectionLineCount * lineHeight); | |
} | |
@@ -160,7 +160,7 @@ class NavigatonBarJumpTarget extends React.Component { | |
const lineChangeClass = sectionStatusToClassName(navigationSection.status); | |
const {top, bottom} = pixelRangeForNavigationSection; | |
const scaledTop = top * navigationScale; | |
- const scaledHeight = Math.max((bottom - top) * navigationScale, 1); | |
+ const scaledHeight = Math.max(bottom - top * navigationScale, 1); | |
const targetStyle = {top: `${scaledTop}px`, height: `${scaledHeight}px`}; | |
const targetClassName = classnames({ | |
'nuclide-diff-view-navigation-target': true, | |
diff --git a/pkg/nuclide-diff-view/lib/DiffPublishView.js b/pkg/nuclide-diff-view/lib/DiffPublishView.js | |
index 2e7cb2c..c4466ef 100644 | |
--- a/pkg/nuclide-diff-view/lib/DiffPublishView.js | |
+++ b/pkg/nuclide-diff-view/lib/DiffPublishView.js | |
@@ -82,8 +82,10 @@ export default class DiffPublishView extends React.Component { | |
componentDidUpdate(prevProps: Props): void { | |
if ( | |
- this.props.message !== prevProps.message || | |
- this.props.publishModeState !== prevProps.publishModeState | |
+ this.props.message !== | |
+ prevProps.message || | |
+ this.props.publishModeState !== | |
+ prevProps.publishModeState | |
) { | |
this.__populatePublishText(); | |
} | |
@@ -117,7 +119,8 @@ export default class DiffPublishView extends React.Component { | |
const {publishModeState} = this.props; | |
const isBusy = publishModeState === | |
PublishModeState.LOADING_PUBLISH_MESSAGE || | |
- publishModeState === PublishModeState.AWAITING_PUBLISH; | |
+ publishModeState === | |
+ PublishModeState.AWAITING_PUBLISH; | |
return ( | |
<AtomTextEditor | |
grammar={atom.grammars.grammarForScopeName('source.fb-arcanist-editor')} | |
diff --git a/pkg/nuclide-diff-view/lib/DiffTimelineView.js b/pkg/nuclide-diff-view/lib/DiffTimelineView.js | |
index 4551eab..93fd0c3 100644 | |
--- a/pkg/nuclide-diff-view/lib/DiffTimelineView.js | |
+++ b/pkg/nuclide-diff-view/lib/DiffTimelineView.js | |
@@ -112,8 +112,10 @@ function RevisionsTimelineComponent( | |
const headRevision = getHeadRevision(revisions); | |
const {CommitPhase} = hgConstants; | |
- const canPublish = headRevision != null && | |
- headRevision.phase === CommitPhase.DRAFT; | |
+ const canPublish = headRevision != | |
+ null && | |
+ headRevision.phase === | |
+ CommitPhase.DRAFT; | |
const publishTooltip = { | |
delay: 100, | |
placement: 'top', | |
diff --git a/pkg/nuclide-diff-view/lib/DiffViewComponent.js b/pkg/nuclide-diff-view/lib/DiffViewComponent.js | |
index 87b0a92..0a00329 100644 | |
--- a/pkg/nuclide-diff-view/lib/DiffViewComponent.js | |
+++ b/pkg/nuclide-diff-view/lib/DiffViewComponent.js | |
@@ -202,8 +202,11 @@ export function centerScrollToBufferLine( | |
// Manually calculate the scroll location, instead of using | |
// `textEditor.scrollToBufferPosition([lineNumber, 0], {center: true})` | |
// because that API to wouldn't center the line if it was in the visible screen range. | |
- const scrollTop = pixelPositionTop + textEditor.getLineHeightInPixels() / 2 - | |
- textEditorElement.clientHeight / 2; | |
+ const scrollTop = pixelPositionTop + | |
+ textEditor.getLineHeightInPixels() / | |
+ 2 - | |
+ textEditorElement.clientHeight / | |
+ 2; | |
textEditorElement.setScrollTop(Math.max(scrollTop, 1)); | |
textEditorElement.focus(); | |
diff --git a/pkg/nuclide-diff-view/lib/diff-utils.js b/pkg/nuclide-diff-view/lib/diff-utils.js | |
index 97125ef..297d22a 100644 | |
--- a/pkg/nuclide-diff-view/lib/diff-utils.js | |
+++ b/pkg/nuclide-diff-view/lib/diff-utils.js | |
@@ -257,9 +257,11 @@ export function computeNavigationSections( | |
const lastSection = navSections[navSections.length - 1]; | |
const lineSection = lineSections[i]; | |
if ( | |
- lastSection.status === lineSection.status && | |
- lastSection.lineNumber + lastSection.lineCount === | |
- lineSection.lineNumber | |
+ lastSection.status === | |
+ lineSection.status && | |
+ lastSection.lineNumber + | |
+ lastSection.lineCount === | |
+ lineSection.lineNumber | |
) { | |
lastSection.lineCount += 1; | |
} else { | |
diff --git a/pkg/nuclide-diff-view/lib/main.js b/pkg/nuclide-diff-view/lib/main.js | |
index afdb4fa..857d0f4 100644 | |
--- a/pkg/nuclide-diff-view/lib/main.js | |
+++ b/pkg/nuclide-diff-view/lib/main.js | |
@@ -253,8 +253,12 @@ class Activation { | |
}), | |
atom.commands.add('atom-workspace', 'nuclide-diff-view:toggle', () => { | |
const readOnlyEditor = atom.workspace.getTextEditors().find(editor => { | |
- return editor != null && editor.getURI != null && | |
- editor.getURI() === READ_ONLY_EDITOR_PATH; | |
+ return editor != | |
+ null && | |
+ editor.getURI != | |
+ null && | |
+ editor.getURI() === | |
+ READ_ONLY_EDITOR_PATH; | |
}); | |
if (readOnlyEditor != null) { | |
dispatchDiffNavigatorToggle(false); | |
@@ -407,14 +411,18 @@ class Activation { | |
} | |
const {viewMode, commit: {mode: commitMode}} = this._store.getState(); | |
if ( | |
- diffEntityOptions.viewMode != null && | |
- diffEntityOptions.viewMode !== viewMode | |
+ diffEntityOptions.viewMode != | |
+ null && | |
+ diffEntityOptions.viewMode !== | |
+ viewMode | |
) { | |
this._actionCreators.setViewMode(diffEntityOptions.viewMode); | |
} | |
if ( | |
- diffEntityOptions.commitMode != null && | |
- diffEntityOptions.commitMode !== commitMode | |
+ diffEntityOptions.commitMode != | |
+ null && | |
+ diffEntityOptions.commitMode !== | |
+ commitMode | |
) { | |
this._actionCreators.setCommitMode(diffEntityOptions.commitMode); | |
} | |
diff --git a/pkg/nuclide-diff-view/lib/new-ui/SplitDiffView.js b/pkg/nuclide-diff-view/lib/new-ui/SplitDiffView.js | |
index e6cc2a3..ca9d8b9 100644 | |
--- a/pkg/nuclide-diff-view/lib/new-ui/SplitDiffView.js | |
+++ b/pkg/nuclide-diff-view/lib/new-ui/SplitDiffView.js | |
@@ -417,8 +417,10 @@ export default class SplitDiffView { | |
fileDiff2, | |
) => | |
{ | |
- return fileDiff1.oldEditorState === fileDiff2.oldEditorState && | |
- fileDiff1.newEditorState === fileDiff2.newEditorState; | |
+ return fileDiff1.oldEditorState === | |
+ fileDiff2.oldEditorState && | |
+ fileDiff1.newEditorState === | |
+ fileDiff2.newEditorState; | |
}); | |
const uiElementStream = fileDiffs.distinctUntilChanged(( | |
@@ -429,11 +431,11 @@ export default class SplitDiffView { | |
return fileDiff1.oldEditorState.inlineElements === | |
fileDiff2.oldEditorState.inlineElements && | |
fileDiff1.oldEditorState.inlineOffsetElements === | |
- fileDiff2.oldEditorState.inlineOffsetElements && | |
+ fileDiff2.oldEditorState.inlineOffsetElements && | |
fileDiff1.newEditorState.inlineElements === | |
- fileDiff2.newEditorState.inlineElements && | |
+ fileDiff2.newEditorState.inlineElements && | |
fileDiff1.newEditorState.inlineOffsetElements === | |
- fileDiff2.newEditorState.inlineOffsetElements; | |
+ fileDiff2.newEditorState.inlineOffsetElements; | |
}); | |
const updateDiffSubscriptions = Observable | |
diff --git a/pkg/nuclide-diff-view/lib/redux/Epics.js b/pkg/nuclide-diff-view/lib/redux/Epics.js | |
index 16fecfa..833a42e 100644 | |
--- a/pkg/nuclide-diff-view/lib/redux/Epics.js | |
+++ b/pkg/nuclide-diff-view/lib/redux/Epics.js | |
@@ -156,8 +156,10 @@ function getCompareIdChanges( | |
return actions | |
.filter( | |
a => | |
- a.type === ActionTypes.SET_COMPARE_ID && | |
- a.payload.repository === repository, | |
+ a.type === | |
+ ActionTypes.SET_COMPARE_ID && | |
+ a.payload.repository === | |
+ repository, | |
) | |
.map(a => { | |
invariant(a.type === ActionTypes.SET_COMPARE_ID); | |
@@ -170,7 +172,8 @@ function isValidCompareRevisions( | |
revisions: Array<RevisionInfo>, | |
compareId: ?number, | |
): boolean { | |
- return getHeadRevision(revisions) != null && | |
+ return getHeadRevision(revisions) != | |
+ null && | |
isValidCompareId(revisions, compareId); | |
} | |
@@ -179,8 +182,10 @@ function isValidCompareId( | |
compareId: ?number, | |
): boolean { | |
const headToForkBase = getHeadToForkBaseRevisions(revisions); | |
- return compareId == null || | |
- headToForkBase.find(revision => revision.id === compareId) != null; | |
+ return compareId == | |
+ null || | |
+ headToForkBase.find(revision => revision.id === compareId) != | |
+ null; | |
} | |
function observeActiveRepository( | |
@@ -383,8 +388,10 @@ export function uiElementsEpic( | |
}).takeUntil( | |
actions.filter( | |
a => | |
- a.type === ActionTypes.REMOVE_UI_PROVIDER && | |
- a.payload.uiProvider === uiProvider, | |
+ a.type === | |
+ ActionTypes.REMOVE_UI_PROVIDER && | |
+ a.payload.uiProvider === | |
+ uiProvider, | |
), | |
); | |
}); | |
@@ -447,8 +454,10 @@ export function diffFileEpic( | |
const deactiveRepsitory = actions.filter( | |
a => | |
- a.type === ActionTypes.UPDATE_ACTIVE_REPOSITORY && | |
- a.payload.hgRepository === hgRepository, | |
+ a.type === | |
+ ActionTypes.UPDATE_ACTIVE_REPOSITORY && | |
+ a.payload.hgRepository === | |
+ hgRepository, | |
); | |
const buffer = bufferForUri(filePath); | |
@@ -548,7 +557,8 @@ export function diffFileEpic( | |
deactiveRepsitory, | |
actions.filter( | |
a => | |
- a.type === ActionTypes.UPDATE_DIFF_EDITORS_VISIBILITY && | |
+ a.type === | |
+ ActionTypes.UPDATE_DIFF_EDITORS_VISIBILITY && | |
!a.payload.visible, | |
), | |
), | |
diff --git a/pkg/nuclide-diff-view/lib/utils.js b/pkg/nuclide-diff-view/lib/utils.js | |
index 9a4afb0..b43708b 100644 | |
--- a/pkg/nuclide-diff-view/lib/utils.js | |
+++ b/pkg/nuclide-diff-view/lib/utils.js | |
@@ -230,7 +230,8 @@ function getFileStatusListMessage( | |
let message = ''; | |
if (fileChanges.size < MAX_DIALOG_FILE_STATUS_COUNT) { | |
for (const [filePath, statusCode] of fileChanges) { | |
- message += '\n' + FileChangeStatusToPrefix[statusCode] + | |
+ message += '\n' + | |
+ FileChangeStatusToPrefix[statusCode] + | |
atom.project.relativize(filePath); | |
} | |
} else { | |
@@ -258,8 +259,10 @@ export function getHeadToForkBaseRevisions( | |
); | |
const headToForkBaseRevisions = []; | |
let parentRevision = headRevision; | |
- while (parentRevision != null && | |
- parentRevision.phase !== CommitPhase.PUBLIC) { | |
+ while (parentRevision != | |
+ null && | |
+ parentRevision.phase !== | |
+ CommitPhase.PUBLIC) { | |
headToForkBaseRevisions.unshift(parentRevision); | |
parentRevision = hashToRevisionInfo.get(parentRevision.parents[0]); | |
} | |
@@ -278,8 +281,12 @@ export function getSelectedFileChanges( | |
const dirtyFileChanges = getDirtyFileChanges(repository); | |
if ( | |
- diffOption === DiffOption.DIRTY || | |
- diffOption === DiffOption.COMPARE_COMMIT && compareCommitId == null | |
+ diffOption === | |
+ DiffOption.DIRTY || | |
+ diffOption === | |
+ DiffOption.COMPARE_COMMIT && | |
+ compareCommitId == | |
+ null | |
) { | |
return Observable.of(dirtyFileChanges); | |
} | |
diff --git a/pkg/nuclide-distraction-free-mode/lib/BuiltinProviders.js b/pkg/nuclide-distraction-free-mode/lib/BuiltinProviders.js | |
index f4974c1..c08b7d5 100644 | |
--- a/pkg/nuclide-distraction-free-mode/lib/BuiltinProviders.js | |
+++ b/pkg/nuclide-distraction-free-mode/lib/BuiltinProviders.js | |
@@ -40,8 +40,12 @@ class FindAndReplaceProvider { | |
if (paneElem != null) { | |
const paneContainer = paneElem.parentElement; | |
if ( | |
- paneContainer != null && paneContainer.style != null && | |
- paneContainer.style.display != null | |
+ paneContainer != | |
+ null && | |
+ paneContainer.style != | |
+ null && | |
+ paneContainer.style.display != | |
+ null | |
) { | |
const display = paneContainer.style.display; | |
if (display !== 'none') { | |
diff --git a/pkg/nuclide-distraction-free-mode/lib/DistractionFreeMode.js b/pkg/nuclide-distraction-free-mode/lib/DistractionFreeMode.js | |
index 63ba2c5..57315d1 100644 | |
--- a/pkg/nuclide-distraction-free-mode/lib/DistractionFreeMode.js | |
+++ b/pkg/nuclide-distraction-free-mode/lib/DistractionFreeMode.js | |
@@ -44,7 +44,8 @@ export class DistractionFreeMode { | |
): IDisposable { | |
this._providers.add(provider); | |
if ( | |
- this._deserializationState != null && | |
+ this._deserializationState != | |
+ null && | |
this._deserializationState.has(provider.name) | |
) { | |
this._addToRestoreState(provider); | |
diff --git a/pkg/nuclide-file-tree/components/FileTree.js b/pkg/nuclide-file-tree/components/FileTree.js | |
index 13206ee..64a71bd 100644 | |
--- a/pkg/nuclide-file-tree/components/FileTree.js | |
+++ b/pkg/nuclide-file-tree/components/FileTree.js | |
@@ -166,7 +166,7 @@ export class FileTree extends React.Component { | |
visibleChildren.push(<FileTreeEntryComponent key={key} node={node} />); | |
} | |
node = node.findNext(); | |
- key = (key + 1) % amountToRender; | |
+ key = key + 1 % amountToRender; | |
} | |
const topPlaceholderSize = firstToRender * elementHeight; | |
diff --git a/pkg/nuclide-file-tree/components/FileTreeEntryComponent.js b/pkg/nuclide-file-tree/components/FileTreeEntryComponent.js | |
index 1347bab..6364ed7 100644 | |
--- a/pkg/nuclide-file-tree/components/FileTreeEntryComponent.js | |
+++ b/pkg/nuclide-file-tree/components/FileTreeEntryComponent.js | |
@@ -73,8 +73,10 @@ export class FileTreeEntryComponent extends React.Component { | |
} | |
shouldComponentUpdate(nextProps: Props, nextState: State): boolean { | |
- return nextProps.node !== this.props.node || | |
- nextState.isLoading !== this.state.isLoading; | |
+ return nextProps.node !== | |
+ this.props.node || | |
+ nextState.isLoading !== | |
+ this.state.isLoading; | |
} | |
componentWillReceiveProps(nextProps: Props): void { | |
@@ -245,7 +247,7 @@ export class FileTreeEntryComponent extends React.Component { | |
return node.isContainer && | |
ReactDOM.findDOMNode(this.refs.arrowContainer).contains(event.target) && | |
event.clientX < | |
- ReactDOM.findDOMNode(this._pathContainer).getBoundingClientRect().left; | |
+ ReactDOM.findDOMNode(this._pathContainer).getBoundingClientRect().left; | |
} | |
_onMouseDown(event: SyntheticMouseEvent) { | |
@@ -433,8 +435,16 @@ export class FileTreeEntryComponent extends React.Component { | |
function getSelectionMode(event: SyntheticMouseEvent): SelectionMode { | |
if ( | |
- os.platform() === 'darwin' && event.metaKey && event.button === 0 || | |
- os.platform() !== 'darwin' && event.ctrlKey && event.button === 0 | |
+ os.platform() === | |
+ 'darwin' && | |
+ event.metaKey && | |
+ event.button === | |
+ 0 || | |
+ os.platform() !== | |
+ 'darwin' && | |
+ event.ctrlKey && | |
+ event.button === | |
+ 0 | |
) { | |
return 'multi-select'; | |
} | |
diff --git a/pkg/nuclide-file-tree/components/FileTreeSidebarComponent.js b/pkg/nuclide-file-tree/components/FileTreeSidebarComponent.js | |
index e9f71bc..1f30860 100644 | |
--- a/pkg/nuclide-file-tree/components/FileTreeSidebarComponent.js | |
+++ b/pkg/nuclide-file-tree/components/FileTreeSidebarComponent.js | |
@@ -288,8 +288,10 @@ export default class FileTreeSidebarComponent extends React.Component { | |
const openFilesUris = this._store.getOpenFilesWorkingSet().getUris(); | |
if ( | |
- shouldRenderToolbar !== this.state.shouldRenderToolbar || | |
- openFilesUris !== this.state.openFilesUris | |
+ shouldRenderToolbar !== | |
+ this.state.shouldRenderToolbar || | |
+ openFilesUris !== | |
+ this.state.openFilesUris | |
) { | |
this.setState({shouldRenderToolbar, openFilesUris}); | |
} else { | |
@@ -339,8 +341,12 @@ export default class FileTreeSidebarComponent extends React.Component { | |
return new UniversalDisposable( | |
toggle(activeEditors, this._showOpenConfigValues).subscribe(editor => { | |
if ( | |
- editor == null || typeof editor.getPath !== 'function' || | |
- editor.getPath() == null | |
+ editor == | |
+ null || | |
+ typeof editor.getPath !== | |
+ 'function' || | |
+ editor.getPath() == | |
+ null | |
) { | |
this.setState({activeUri: null}); | |
return; | |
diff --git a/pkg/nuclide-file-tree/lib/FileSystemActions.js b/pkg/nuclide-file-tree/lib/FileSystemActions.js | |
index cbd505b..34c977a 100644 | |
--- a/pkg/nuclide-file-tree/lib/FileSystemActions.js | |
+++ b/pkg/nuclide-file-tree/lib/FileSystemActions.js | |
@@ -324,7 +324,7 @@ class FileSystemActions { | |
iconClassName: 'icon-file-add', | |
message: ( | |
<span> | |
- Enter the path for the new {entryType} in the root:<br />{path} | |
+ Enter the path for the new {entryType} in the root:<br />{path} | |
</span> | |
), | |
onConfirm, | |
diff --git a/pkg/nuclide-file-tree/lib/FileTreeContextMenu.js b/pkg/nuclide-file-tree/lib/FileTreeContextMenu.js | |
index 9dd6cad..cd4a929 100644 | |
--- a/pkg/nuclide-file-tree/lib/FileTreeContextMenu.js | |
+++ b/pkg/nuclide-file-tree/lib/FileTreeContextMenu.js | |
@@ -151,7 +151,10 @@ export default class FileTreeContextMenu { | |
const shouldDisplaySetToCurrentWorkingRootOption = () => { | |
const node = this._store.getSingleSelectedNode(); | |
- return node != null && node.isContainer && this._store.hasCwd() && | |
+ return node != | |
+ null && | |
+ node.isContainer && | |
+ this._store.hasCwd() && | |
!node.isCwd; | |
}; | |
@@ -248,7 +251,8 @@ export default class FileTreeContextMenu { | |
shouldDisplay: () => { | |
const nodes = this.getSelectedNodes(); | |
// We can delete multiple nodes as long as no root node is selected | |
- return nodes.size > 0 && | |
+ return nodes.size > | |
+ 0 && | |
nodes.every(node => node != null && !node.isRoot); | |
}, | |
}, | |
@@ -408,8 +412,11 @@ export default class FileTreeContextMenu { | |
*/ | |
_shouldDisplayShowInFileManager(platform: string): boolean { | |
const node = this.getSingleSelectedNode(); | |
- return node != null && nuclideUri.isAbsolute(node.uri) && | |
- process.platform === platform; | |
+ return node != | |
+ null && | |
+ nuclideUri.isAbsolute(node.uri) && | |
+ process.platform === | |
+ platform; | |
} | |
} | |
@@ -431,7 +438,8 @@ function initCommandIfPresent( | |
let nextInternalCommandId = 0; | |
function generateNextInternalCommand(itemLabel: string): string { | |
- const cmdName = itemLabel.toLowerCase().replace(/[^\w]+/g, '-') + '-' + | |
+ const cmdName = itemLabel.toLowerCase().replace(/[^\w]+/g, '-') + | |
+ '-' + | |
nextInternalCommandId++; | |
return `nuclide-file-tree:${cmdName}`; | |
} | |
diff --git a/pkg/nuclide-file-tree/lib/FileTreeController.js b/pkg/nuclide-file-tree/lib/FileTreeController.js | |
index 8e2f590..9fec80b 100644 | |
--- a/pkg/nuclide-file-tree/lib/FileTreeController.js | |
+++ b/pkg/nuclide-file-tree/lib/FileTreeController.js | |
@@ -291,7 +291,10 @@ export default class FileTreeController { | |
_revealTextEditor(event: Event): void { | |
const editorElement = ((event.currentTarget: any): atom$TextEditorElement); | |
if ( | |
- editorElement == null || typeof editorElement.getModel !== 'function' || | |
+ editorElement == | |
+ null || | |
+ typeof editorElement.getModel !== | |
+ 'function' || | |
!isValidTextEditor(editorElement.getModel()) | |
) { | |
return; | |
@@ -447,7 +450,9 @@ export default class FileTreeController { | |
const selectedNodes = this._store.getSelectedNodes(); | |
const firstSelectedNode = selectedNodes.first(); | |
if ( | |
- selectedNodes.size === 1 && !firstSelectedNode.isRoot && | |
+ selectedNodes.size === | |
+ 1 && | |
+ !firstSelectedNode.isRoot && | |
!(firstSelectedNode.isContainer && firstSelectedNode.isExpanded) | |
) { | |
/* | |
@@ -618,8 +623,11 @@ export default class FileTreeController { | |
// is part of the currently selected root that would be removed AND | |
// is not part of any other open root, then close the file. | |
if ( | |
- path != null && path.startsWith(rootNode.uri) && | |
- roots.filter(root => path.startsWith(root)).length === 1 | |
+ path != | |
+ null && | |
+ path.startsWith(rootNode.uri) && | |
+ roots.filter(root => path.startsWith(root)).length === | |
+ 1 | |
) { | |
return !atom.workspace.paneForURI(path).destroyItem(editor); | |
} | |
diff --git a/pkg/nuclide-file-tree/lib/FileTreeHelpers.js b/pkg/nuclide-file-tree/lib/FileTreeHelpers.js | |
index bc45513..c113101 100644 | |
--- a/pkg/nuclide-file-tree/lib/FileTreeHelpers.js | |
+++ b/pkg/nuclide-file-tree/lib/FileTreeHelpers.js | |
@@ -140,9 +140,14 @@ function isLocalEntry(entry: Entry): boolean { | |
} | |
function isContextClick(event: SyntheticMouseEvent): boolean { | |
- return event.button === 2 || | |
- event.button === 0 && event.ctrlKey === true && | |
- process.platform === 'darwin'; | |
+ return event.button === | |
+ 2 || | |
+ event.button === | |
+ 0 && | |
+ event.ctrlKey === | |
+ true && | |
+ process.platform === | |
+ 'darwin'; | |
} | |
function buildHashKey(nodeKey: string): string { | |
diff --git a/pkg/nuclide-file-tree/lib/FileTreeHgHelpers.js b/pkg/nuclide-file-tree/lib/FileTreeHgHelpers.js | |
index 9e5b145..e0ea7a3 100644 | |
--- a/pkg/nuclide-file-tree/lib/FileTreeHgHelpers.js | |
+++ b/pkg/nuclide-file-tree/lib/FileTreeHgHelpers.js | |
@@ -42,12 +42,10 @@ function isValidRename(node: FileTreeNode, destPath_: NuclideUri): boolean { | |
destPath = FileTreeHelpers.keyToPath(destPath); | |
- return FileTreeHelpers.getEntryByKey(node.uri) != null && | |
- // This will only detect exact equalities, mostly preventing moves of a | |
- // directory into itself from causing an error. If a case-changing rename | |
- // should be a noop for the current OS's file system, this is handled by the | |
- // fs module. | |
- path !== destPath && | |
+ return FileTreeHelpers.getEntryByKey(node.uri) != | |
+ null && | |
+ path !== | |
+ destPath && | |
// Disallow renames where the destination is a child of the source node. | |
!nuclideUri.contains(path, nuclideUri.dirname(destPath)) && | |
// Disallow renames across projects for the time being, since cross-host and | |
diff --git a/pkg/nuclide-file-tree/lib/FileTreeNode.js b/pkg/nuclide-file-tree/lib/FileTreeNode.js | |
index b37667a..72b1ca5 100644 | |
--- a/pkg/nuclide-file-tree/lib/FileTreeNode.js | |
+++ b/pkg/nuclide-file-tree/lib/FileTreeNode.js | |
@@ -625,8 +625,10 @@ export class FileTreeNode { | |
return false; | |
} | |
if ( | |
- props.isDragHovered !== undefined && | |
- this.isDragHovered !== props.isDragHovered | |
+ props.isDragHovered !== | |
+ undefined && | |
+ this.isDragHovered !== | |
+ props.isDragHovered | |
) { | |
return false; | |
} | |
@@ -650,26 +652,35 @@ export class FileTreeNode { | |
return false; | |
} | |
if ( | |
- props.subscription !== undefined && | |
- this.subscription !== props.subscription | |
+ props.subscription !== | |
+ undefined && | |
+ this.subscription !== | |
+ props.subscription | |
) { | |
return false; | |
} | |
if ( | |
- props.highlightedText !== undefined && | |
- this.highlightedText !== props.highlightedText | |
+ props.highlightedText !== | |
+ undefined && | |
+ this.highlightedText !== | |
+ props.highlightedText | |
) { | |
return false; | |
} | |
if ( | |
- props.matchesFilter !== undefined && | |
- this.matchesFilter !== props.matchesFilter | |
+ props.matchesFilter !== | |
+ undefined && | |
+ this.matchesFilter !== | |
+ props.matchesFilter | |
) { | |
return false; | |
} | |
if ( | |
- props.children !== undefined && props.children !== this.children && | |
+ props.children !== | |
+ undefined && | |
+ props.children !== | |
+ this.children && | |
!Immutable.is(this.children, props.children) | |
) { | |
return false; | |
diff --git a/pkg/nuclide-file-tree/lib/FileTreeStore.js b/pkg/nuclide-file-tree/lib/FileTreeStore.js | |
index 0a99a54..6f0aad7 100644 | |
--- a/pkg/nuclide-file-tree/lib/FileTreeStore.js | |
+++ b/pkg/nuclide-file-tree/lib/FileTreeStore.js | |
@@ -258,7 +258,8 @@ export class FileTreeStore { | |
.filter( | |
rootUri => | |
nuclideUri.isRemote(rootUri) || | |
- normalizedAtomPaths.indexOf(rootUri) >= 0, | |
+ normalizedAtomPaths.indexOf(rootUri) >= | |
+ 0, | |
); | |
const pathsMissingInData = normalizedAtomPaths.filter( | |
rootUri => normalizedDataPaths.indexOf(rootUri) === -1, | |
@@ -735,9 +736,12 @@ export class FileTreeStore { | |
Object.keys(vcsStatuses).forEach(uri => { | |
const status = vcsStatuses[uri]; | |
if ( | |
- status === StatusCodeNumber.MODIFIED || | |
- status === StatusCodeNumber.ADDED || | |
- status === StatusCodeNumber.REMOVED | |
+ status === | |
+ StatusCodeNumber.MODIFIED || | |
+ status === | |
+ StatusCodeNumber.ADDED || | |
+ status === | |
+ StatusCodeNumber.REMOVED | |
) { | |
try { | |
// An invalid URI might cause an exception to be thrown | |
@@ -1504,8 +1508,12 @@ export class FileTreeStore { | |
this._setTrackedNode(nextNode.rootUri, nextNode.uri); | |
} else { | |
let nextNode = rangeNode; | |
- while (nextNode != null && nextNode !== anchorNode && | |
- nextNode.isSelected === false) { | |
+ while (nextNode != | |
+ null && | |
+ nextNode !== | |
+ anchorNode && | |
+ nextNode.isSelected === | |
+ false) { | |
nextNode = getNextNode(nextNode); | |
} | |
if (nextNode == null) { | |
diff --git a/pkg/nuclide-file-tree/lib/MemoizedFieldsDeriver.js b/pkg/nuclide-file-tree/lib/MemoizedFieldsDeriver.js | |
index 470be3e..79667f9 100644 | |
--- a/pkg/nuclide-file-tree/lib/MemoizedFieldsDeriver.js | |
+++ b/pkg/nuclide-file-tree/lib/MemoizedFieldsDeriver.js | |
@@ -117,7 +117,9 @@ export class MemoizedFieldsDeriver { | |
if (store.repo !== repo) { | |
store.repo = repo; | |
- store.isIgnored = store.repo != null && store.repo.isProjectAtRoot() && | |
+ store.isIgnored = store.repo != | |
+ null && | |
+ store.repo.isProjectAtRoot() && | |
store.repo.isPathIgnored(this._uri); | |
} | |
@@ -196,13 +198,20 @@ export class MemoizedFieldsDeriver { | |
); | |
if ( | |
- store.isIgnored !== isIgnored || | |
- store.excludeVcsIgnoredPaths !== conf.excludeVcsIgnoredPaths || | |
- store.hideIgnoredNames !== conf.hideIgnoredNames || | |
- store.ignoredPatterns !== conf.ignoredPatterns || | |
- store.isEditingWorkingSet !== conf.isEditingWorkingSet || | |
- store.containedInWorkingSet !== containedInWorkingSet || | |
- store.containedInOpenFilesWorkingSet !== containedInOpenFilesWorkingSet | |
+ store.isIgnored !== | |
+ isIgnored || | |
+ store.excludeVcsIgnoredPaths !== | |
+ conf.excludeVcsIgnoredPaths || | |
+ store.hideIgnoredNames !== | |
+ conf.hideIgnoredNames || | |
+ store.ignoredPatterns !== | |
+ conf.ignoredPatterns || | |
+ store.isEditingWorkingSet !== | |
+ conf.isEditingWorkingSet || | |
+ store.containedInWorkingSet !== | |
+ containedInWorkingSet || | |
+ store.containedInOpenFilesWorkingSet !== | |
+ containedInOpenFilesWorkingSet | |
) { | |
store.isIgnored = isIgnored; | |
store.excludeVcsIgnoredPaths = conf.excludeVcsIgnoredPaths; | |
@@ -237,9 +246,12 @@ export class MemoizedFieldsDeriver { | |
); | |
if ( | |
- store.isEditingWorkingSet !== conf.isEditingWorkingSet || | |
- store.containedInWorkingSet !== containedInWorkingSet || | |
- store.containedInOpenFilesWorkingSet !== containedInOpenFilesWorkingSet | |
+ store.isEditingWorkingSet !== | |
+ conf.isEditingWorkingSet || | |
+ store.containedInWorkingSet !== | |
+ containedInWorkingSet || | |
+ store.containedInOpenFilesWorkingSet !== | |
+ containedInOpenFilesWorkingSet | |
) { | |
store.isEditingWorkingSet = conf.isEditingWorkingSet; | |
store.containedInWorkingSet = containedInWorkingSet; | |
diff --git a/pkg/nuclide-file-tree/spec/FileTreeController-spec.js b/pkg/nuclide-file-tree/spec/FileTreeController-spec.js | |
index f0effc9..c1d48c7 100644 | |
--- a/pkg/nuclide-file-tree/spec/FileTreeController-spec.js | |
+++ b/pkg/nuclide-file-tree/spec/FileTreeController-spec.js | |
@@ -230,7 +230,6 @@ describe('FileTreeController', () => { | |
it('selects the previous nested descendant when one exists', () => { | |
actions.setSelectedNode(rootKey, dir2Key); | |
expect(isSelected(rootKey, dir2Key)).toEqual(true); | |
- | |
controller._moveUp(); // foo.txt is the previous visible descendant to dir2 | |
expect(isSelected(rootKey, fooTxtKey)).toEqual(true); | |
}); | |
@@ -240,6 +239,7 @@ describe('FileTreeController', () => { | |
actions.setSelectedNode(rootKey, dir2Key); | |
expect(isSelected(rootKey, dir2Key)).toEqual(true); | |
controller._moveToTop(); // the root is the topmost node | |
+ | |
expect(isSelected(rootKey, rootKey)).toEqual(true); | |
}); | |
}); | |
diff --git a/pkg/nuclide-find-references/lib/FindReferencesModel.js b/pkg/nuclide-find-references/lib/FindReferencesModel.js | |
index 9480d0c..04cf285 100644 | |
--- a/pkg/nuclide-find-references/lib/FindReferencesModel.js | |
+++ b/pkg/nuclide-find-references/lib/FindReferencesModel.js | |
@@ -148,8 +148,10 @@ class FindReferencesModel { | |
if (range.start.row <= curEndLine + 1 + this.getPreviewContext()) { | |
// Remove references with the same range (happens in C++ with templates) | |
if ( | |
- curGroup.length > 0 && | |
- compareReference(curGroup[curGroup.length - 1], ref) !== 0 | |
+ curGroup.length > | |
+ 0 && | |
+ compareReference(curGroup[curGroup.length - 1], ref) !== | |
+ 0 | |
) { | |
curGroup.push(ref); | |
curEndLine = Math.max(curEndLine, range.end.row); | |
diff --git a/pkg/nuclide-flow-rpc/lib/FlowProcess.js b/pkg/nuclide-flow-rpc/lib/FlowProcess.js | |
index e0fe803..7eb4037 100644 | |
--- a/pkg/nuclide-flow-rpc/lib/FlowProcess.js | |
+++ b/pkg/nuclide-flow-rpc/lib/FlowProcess.js | |
@@ -217,6 +217,7 @@ export class FlowProcess { | |
args = [ | |
...args, | |
, | |
+ , | |
'--retry-if-init', | |
'false', | |
'--retries', | |
@@ -288,10 +289,7 @@ export class FlowProcess { | |
_setServerStatus(status: ServerStatusType): void { | |
const currentStatus = this._serverStatus.getValue(); | |
if (// Avoid duplicate updates | |
- status !== currentStatus && | |
- // Avoid moving the status away from FAILED, to let any existing work die out when the | |
- // server fails. | |
- currentStatus !== ServerStatus.FAILED) { | |
+ status !== currentStatus && currentStatus !== ServerStatus.FAILED) { | |
this._serverStatus.next(status); | |
} | |
} | |
@@ -350,7 +348,7 @@ export class FlowProcess { | |
): Promise<?AsyncExecuteReturn> { | |
let args = args_; | |
let options = options_; | |
- args = [...args, , '--from', 'nuclide']; | |
+ args = [...args, , , '--from', 'nuclide']; | |
const execInfo = await execInfoContainer.getFlowExecInfo(root); | |
if (execInfo == null) { | |
return null; | |
diff --git a/pkg/nuclide-flow-rpc/lib/astToOutline.js b/pkg/nuclide-flow-rpc/lib/astToOutline.js | |
index 9594c56..5172b91 100644 | |
--- a/pkg/nuclide-flow-rpc/lib/astToOutline.js | |
+++ b/pkg/nuclide-flow-rpc/lib/astToOutline.js | |
@@ -70,11 +70,12 @@ function itemToTree(item: any): ?OutlineTree { | |
plain('('), | |
...declarationsTokenizedText(item.value.params), | |
, | |
+ , | |
plain(')'), | |
]; | |
} | |
return { | |
- tokenizedText: [method(item.key.name), plain('='), ...paramTokens, ,], | |
+ tokenizedText: [method(item.key.name), plain('='), ...paramTokens, , ,], | |
representativeName: item.key.name, | |
children: [], | |
...extent, | |
@@ -86,6 +87,7 @@ function itemToTree(item: any): ?OutlineTree { | |
plain('('), | |
...declarationsTokenizedText(item.value.params), | |
, | |
+ , | |
plain(')'), | |
], | |
representativeName: item.key.name, | |
@@ -198,6 +200,7 @@ function functionOutline( | |
plain('('), | |
...declarationsTokenizedText(params), | |
, | |
+ , | |
plain(')'), | |
], | |
representativeName: name, | |
@@ -253,11 +256,16 @@ function moduleExportsOutline(assignmentStatement: any): ?OutlineTree { | |
} | |
function isModuleExports(left: Object): boolean { | |
- return left.type === 'MemberExpression' && | |
- left.object.type === 'Identifier' && | |
- left.object.name === 'module' && | |
- left.property.type === 'Identifier' && | |
- left.property.name === 'exports'; | |
+ return left.type === | |
+ 'MemberExpression' && | |
+ left.object.type === | |
+ 'Identifier' && | |
+ left.object.name === | |
+ 'module' && | |
+ left.property.type === | |
+ 'Identifier' && | |
+ left.property.name === | |
+ 'exports'; | |
} | |
function moduleExportsPropertyOutline(property: any): ?OutlineTree { | |
@@ -278,8 +286,10 @@ function moduleExportsPropertyOutline(property: any): ?OutlineTree { | |
} | |
if ( | |
- property.value.type === 'FunctionExpression' || | |
- property.value.type === 'ArrowFunctionExpression' | |
+ property.value.type === | |
+ 'FunctionExpression' || | |
+ property.value.type === | |
+ 'ArrowFunctionExpression' | |
) { | |
return { | |
tokenizedText: [ | |
@@ -287,6 +297,7 @@ function moduleExportsPropertyOutline(property: any): ?OutlineTree { | |
plain('('), | |
...declarationsTokenizedText(property.value.params), | |
, | |
+ , | |
plain(')'), | |
], | |
representativeName: propName, | |
@@ -351,8 +362,10 @@ function getFunctionName(callee: any): ?string { | |
return callee.name; | |
case 'MemberExpression': | |
if ( | |
- callee.object.type !== 'Identifier' || | |
- callee.property.type !== 'Identifier' | |
+ callee.object.type !== | |
+ 'Identifier' || | |
+ callee.property.type !== | |
+ 'Identifier' | |
) { | |
return null; | |
} | |
@@ -433,9 +446,12 @@ function variableDeclaratorOutline( | |
extent: Extent, | |
): ?OutlineTree { | |
if ( | |
- declarator.init != null && | |
- (declarator.init.type === 'FunctionExpression' || | |
- declarator.init.type === 'ArrowFunctionExpression') | |
+ declarator.init != | |
+ null && | |
+ (declarator.init.type === | |
+ 'FunctionExpression' || | |
+ declarator.init.type === | |
+ 'ArrowFunctionExpression') | |
) { | |
return functionOutline(declarator.id.name, declarator.init.params, extent); | |
} | |
@@ -446,6 +462,8 @@ function variableDeclaratorOutline( | |
keyword(kind), | |
whitespace(' '), | |
...declarationsTokenizedText([id]), | |
+ , | |
+ , | |
,, | |
]; | |
const representativeName = id.type === 'Identifier' ? id.name : undefined; | |
diff --git a/pkg/nuclide-flow/lib/FlowAutocompleteProvider.js b/pkg/nuclide-flow/lib/FlowAutocompleteProvider.js | |
index a3594ae..8f9a7b0 100644 | |
--- a/pkg/nuclide-flow/lib/FlowAutocompleteProvider.js | |
+++ b/pkg/nuclide-flow/lib/FlowAutocompleteProvider.js | |
@@ -59,8 +59,10 @@ export default class FlowAutocompleteProvider { | |
const replacementPrefix = getReplacementPrefix(prefix); | |
if ( | |
- !activatedManually && !prefixHasDot && | |
- replacementPrefix.length < minimumPrefixLength | |
+ !activatedManually && | |
+ !prefixHasDot && | |
+ replacementPrefix.length < | |
+ minimumPrefixLength | |
) { | |
return null; | |
} | |
@@ -79,7 +81,8 @@ export function shouldFilter( | |
); | |
const previousPrefixIsDot = /^\s*\.\s*$/.test(lastRequest.prefix); | |
const currentPrefixIsSingleChar = currentRequest.prefix.length === 1; | |
- const startsWithPrevious = currentRequest.prefix.length - 1 === | |
+ const startsWithPrevious = currentRequest.prefix.length - | |
+ 1 === | |
lastRequest.prefix.length && | |
currentRequest.prefix.startsWith(lastRequest.prefix); | |
return prefixIsIdentifier && | |
diff --git a/pkg/nuclide-flow/lib/flowMessageToFix.js b/pkg/nuclide-flow/lib/flowMessageToFix.js | |
index 952a1dc..e8a5978 100644 | |
--- a/pkg/nuclide-flow/lib/flowMessageToFix.js | |
+++ b/pkg/nuclide-flow/lib/flowMessageToFix.js | |
@@ -33,9 +33,12 @@ const fixExtractionFunctions: Array<(diagnostic: Diagnostic) => ?Fix> = [ | |
function unusedSuppressionFix(diagnostic: Diagnostic): ?Fix { | |
// Automatically remove unused suppressions: | |
if ( | |
- diagnostic.messageComponents.length === 2 && | |
- diagnostic.messageComponents[0].descr === 'Error suppressing comment' && | |
- diagnostic.messageComponents[1].descr === 'Unused suppression' | |
+ diagnostic.messageComponents.length === | |
+ 2 && | |
+ diagnostic.messageComponents[0].descr === | |
+ 'Error suppressing comment' && | |
+ diagnostic.messageComponents[1].descr === | |
+ 'Unused suppression' | |
) { | |
const oldRange = extractRange(diagnostic.messageComponents[0]); | |
invariant(oldRange != null); | |
diff --git a/pkg/nuclide-fuzzy-file-search-rpc/lib/PathSetUpdater.js b/pkg/nuclide-fuzzy-file-search-rpc/lib/PathSetUpdater.js | |
index 9e955c6..5c8da4b 100644 | |
--- a/pkg/nuclide-fuzzy-file-search-rpc/lib/PathSetUpdater.js | |
+++ b/pkg/nuclide-fuzzy-file-search-rpc/lib/PathSetUpdater.js | |
@@ -124,7 +124,7 @@ export default class PathSetUpdater { | |
files.forEach(file => { | |
// Only keep track of files. | |
// eslint-disable-next-line no-bitwise | |
- if ((file.mode & S_IFDIR) !== 0) { | |
+ if (file.mode & S_IFDIR !== 0) { | |
return; | |
} | |
const fileName = file.name; | |
diff --git a/pkg/nuclide-grep-rpc/lib/scanhandler.js b/pkg/nuclide-grep-rpc/lib/scanhandler.js | |
index a15ca1b..4b6fd26 100644 | |
--- a/pkg/nuclide-grep-rpc/lib/scanhandler.js | |
+++ b/pkg/nuclide-grep-rpc/lib/scanhandler.js | |
@@ -153,7 +153,8 @@ function searchInSubdir( | |
}), | |
).share(); | |
- return // Limit the total result size. | |
+ return; | |
+ // Limit the total result size. | |
results | |
.merge( | |
results | |
diff --git a/pkg/nuclide-hack-rpc/lib/Completions.js b/pkg/nuclide-hack-rpc/lib/Completions.js | |
index 230febc..f000190 100644 | |
--- a/pkg/nuclide-hack-rpc/lib/Completions.js | |
+++ b/pkg/nuclide-hack-rpc/lib/Completions.js | |
@@ -33,7 +33,8 @@ export function convertCompletions( | |
const tokenLowerCase = prefix.toLowerCase(); | |
const hackCompletionsComparator = compareHackCompletions(prefix); | |
- return // The returned completions may have unrelated results, even though the offset | |
+ return; | |
+ // The returned completions may have unrelated results, even though the offset | |
// is set on the end of the prefix. | |
processCompletions(hackCompletions, contents, offset, prefix) | |
.filter(completion => { | |
diff --git a/pkg/nuclide-hack-rpc/lib/HackProcess.js b/pkg/nuclide-hack-rpc/lib/HackProcess.js | |
index 2c55ef2..6307eb2 100644 | |
--- a/pkg/nuclide-hack-rpc/lib/HackProcess.js | |
+++ b/pkg/nuclide-hack-rpc/lib/HackProcess.js | |
@@ -295,8 +295,10 @@ async function createHackProcess( | |
)}\n`, | |
); | |
if ( | |
- startServerResult.exitCode !== 0 && | |
- startServerResult.exitCode !== HACK_SERVER_ALREADY_EXISTS_EXIT_CODE | |
+ startServerResult.exitCode !== | |
+ 0 && | |
+ startServerResult.exitCode !== | |
+ HACK_SERVER_ALREADY_EXISTS_EXIT_CODE | |
) { | |
return null; | |
} | |
diff --git a/pkg/nuclide-hack-rpc/lib/HackService.js b/pkg/nuclide-hack-rpc/lib/HackService.js | |
index 3322179..d6ea84b 100644 | |
--- a/pkg/nuclide-hack-rpc/lib/HackService.js | |
+++ b/pkg/nuclide-hack-rpc/lib/HackService.js | |
@@ -531,7 +531,8 @@ function formatLineColumn(line: number, column: number): string { | |
// Calculate the offset of the cursor from the beginning of the file. | |
// Then insert AUTO332 in at this offset. (Hack uses this as a marker.) | |
function markFileForCompletion(contents: string, offset: number): string { | |
- return contents.substring(0, offset) + 'AUTO332' + | |
+ return contents.substring(0, offset) + | |
+ 'AUTO332' + | |
contents.substring(offset, contents.length); | |
} | |
diff --git a/pkg/nuclide-hack-rpc/lib/TypedRegions.js b/pkg/nuclide-hack-rpc/lib/TypedRegions.js | |
index 701ec43..05262c9 100644 | |
--- a/pkg/nuclide-hack-rpc/lib/TypedRegions.js | |
+++ b/pkg/nuclide-hack-rpc/lib/TypedRegions.js | |
@@ -91,8 +91,15 @@ export function convertTypedRegionsToCoverageResult( | |
const endColumn = column + width - 1; | |
// Often we'll get contiguous blocks of errors on the same line. | |
if ( | |
- last != null && last.type === type && last.line === line && | |
- last.end === column - 1 | |
+ last != | |
+ null && | |
+ last.type === | |
+ type && | |
+ last.line === | |
+ line && | |
+ last.end === | |
+ column - | |
+ 1 | |
) { | |
// So we just merge them into 1 block. | |
last.end = endColumn; | |
@@ -135,7 +142,9 @@ export function convertTypedRegionsToCoverageResult( | |
return { | |
percentage: totalInterestingRegionCount === 0 | |
? 100 | |
- : (checkedRegionCount + partialRegionCount / 2) / | |
+ : checkedRegionCount + | |
+ partialRegionCount / | |
+ 2 / | |
totalInterestingRegionCount * | |
100, | |
uncoveredRegions: filterResults(unfilteredResults), | |
diff --git a/pkg/nuclide-health/lib/main.js b/pkg/nuclide-health/lib/main.js | |
index ec114b9..73a1300 100644 | |
--- a/pkg/nuclide-health/lib/main.js | |
+++ b/pkg/nuclide-health/lib/main.js | |
@@ -191,7 +191,7 @@ function aggregate( | |
): {avg: ?number, min: ?number, max: ?number} { | |
const avg = values.reduce( | |
(prevValue, currValue, index) => { | |
- return prevValue + (currValue - prevValue) / (index + 1); | |
+ return prevValue + currValue - prevValue / (index + 1); | |
}, | |
0, | |
); | |
diff --git a/pkg/nuclide-health/lib/ui/sections/ActiveHandlesSectionComponent.js b/pkg/nuclide-health/lib/ui/sections/ActiveHandlesSectionComponent.js | |
index 849c551..500bd73 100644 | |
--- a/pkg/nuclide-health/lib/ui/sections/ActiveHandlesSectionComponent.js | |
+++ b/pkg/nuclide-health/lib/ui/sections/ActiveHandlesSectionComponent.js | |
@@ -21,7 +21,8 @@ export default class ActiveHandlesSectionComponent extends React.Component { | |
render(): React.Element<any> { | |
if ( | |
!this.props.activeHandlesByType || | |
- Object.keys(this.props.activeHandlesByType).length === 0 | |
+ Object.keys(this.props.activeHandlesByType).length === | |
+ 0 | |
) { | |
return <div />; | |
} | |
diff --git a/pkg/nuclide-health/lib/ui/sections/HandlesTableComponent.js b/pkg/nuclide-health/lib/ui/sections/HandlesTableComponent.js | |
index 171df8b..5dbe38a 100644 | |
--- a/pkg/nuclide-health/lib/ui/sections/HandlesTableComponent.js | |
+++ b/pkg/nuclide-health/lib/ui/sections/HandlesTableComponent.js | |
@@ -56,13 +56,11 @@ export default class HandlesTableComponent<T: Object> extends React.Component<vo | |
<thead> | |
<tr> | |
<th width="10%">ID</th> | |
- { | |
- this.props.columns.map((column, c) => ( | |
+ {this.props.columns.map((column, c) => ( | |
<th key={c} width={`${column.widthPercentage}%`}> | |
{column.title} | |
</th> | |
- )) | |
- } | |
+ ))} | |
</tr> | |
</thead> | |
<tbody> | |
@@ -81,7 +79,8 @@ export default class HandlesTableComponent<T: Object> extends React.Component<vo | |
let className = ''; | |
if ( | |
previousHandle && | |
- previousHandle[c] !== handleSummary[c] | |
+ previousHandle[c] !== | |
+ handleSummary[c] | |
) { | |
className = 'nuclide-health-handle-updated'; | |
} | |
diff --git a/pkg/nuclide-health/spec/health-spec.js b/pkg/nuclide-health/spec/health-spec.js | |
index 4beb6ee..7e4fbb2 100644 | |
--- a/pkg/nuclide-health/spec/health-spec.js | |
+++ b/pkg/nuclide-health/spec/health-spec.js | |
@@ -49,6 +49,7 @@ describe('Health', () => { | |
await Promise.all([ | |
...WORKSPACE_VIEW_DIRS.map(dir => atom.packages.activatePackage(dir)), | |
, | |
+ , | |
atom.packages.activatePackage(nuclideUri.join(__dirname, '..')), | |
]); | |
}, | |
diff --git a/pkg/nuclide-hg-repository-client/lib/HgRepositoryClient.js b/pkg/nuclide-hg-repository-client/lib/HgRepositoryClient.js | |
index e065cba..9aa6c44 100644 | |
--- a/pkg/nuclide-hg-repository-client/lib/HgRepositoryClient.js | |
+++ b/pkg/nuclide-hg-repository-client/lib/HgRepositoryClient.js | |
@@ -181,7 +181,10 @@ export class HgRepositoryClient { | |
return observeBufferOpen() | |
.filter(buffer => { | |
const filePath = buffer.getPath(); | |
- return filePath != null && filePath.length !== 0 && | |
+ return filePath != | |
+ null && | |
+ filePath.length !== | |
+ 0 && | |
this.isPathRelevant(filePath); | |
}) | |
.flatMap(buffer => { | |
@@ -497,8 +500,10 @@ export class HgRepositoryClient { | |
* Checks if the given path is within the repo directory (i.e. `.hg/`). | |
*/ | |
_isPathWithinHgRepo(filePath: NuclideUri): boolean { | |
- return filePath === this.getPath() || | |
- filePath.indexOf(this.getPath() + '/') === 0; | |
+ return filePath === | |
+ this.getPath() || | |
+ filePath.indexOf(this.getPath() + '/') === | |
+ 0; | |
} | |
/** | |
@@ -507,7 +512,8 @@ export class HgRepositoryClient { | |
*/ | |
isPathRelevant(filePath: NuclideUri): boolean { | |
return this._projectDirectory.contains(filePath) || | |
- this._projectDirectory.getPath() === filePath; | |
+ this._projectDirectory.getPath() === | |
+ filePath; | |
} | |
// non-used stub. | |
@@ -544,13 +550,17 @@ export class HgRepositoryClient { | |
} | |
isStatusDeleted(status: ?number): boolean { | |
- return status === StatusCodeNumber.MISSING || | |
- status === StatusCodeNumber.REMOVED; | |
+ return status === | |
+ StatusCodeNumber.MISSING || | |
+ status === | |
+ StatusCodeNumber.REMOVED; | |
} | |
isStatusNew(status: ?number): boolean { | |
- return status === StatusCodeNumber.ADDED || | |
- status === StatusCodeNumber.UNTRACKED; | |
+ return status === | |
+ StatusCodeNumber.ADDED || | |
+ status === | |
+ StatusCodeNumber.UNTRACKED; | |
} | |
isStatusAdded(status: ?number): boolean { | |
diff --git a/pkg/nuclide-hg-repository-client/lib/RevisionsCache.js b/pkg/nuclide-hg-repository-client/lib/RevisionsCache.js | |
index 3aef6ef..bb4a59d 100644 | |
--- a/pkg/nuclide-hg-repository-client/lib/RevisionsCache.js | |
+++ b/pkg/nuclide-hg-repository-client/lib/RevisionsCache.js | |
@@ -34,8 +34,10 @@ function isEqualRevisions( | |
return false; | |
} | |
return arrayEqual(revisions1, revisions2, (revision1, revision2) => { | |
- return revision1.id === revision2.id && | |
- revision1.isHead === revision2.isHead && | |
+ return revision1.id === | |
+ revision2.id && | |
+ revision1.isHead === | |
+ revision2.isHead && | |
arrayEqual(revision1.tags, revision2.tags) && | |
arrayEqual(revision1.bookmarks, revision2.bookmarks); | |
}); | |
diff --git a/pkg/nuclide-hg-rpc/lib/HgService.js b/pkg/nuclide-hg-rpc/lib/HgService.js | |
index bcdb95d..fc27a78 100644 | |
--- a/pkg/nuclide-hg-rpc/lib/HgService.js | |
+++ b/pkg/nuclide-hg-rpc/lib/HgService.js | |
@@ -804,7 +804,7 @@ export class HgService { | |
return args; | |
} else { | |
tempFile = await createCommmitMessageTempFile(message); | |
- return [...args, , '-l', tempFile]; | |
+ return [...args, , , '-l', tempFile]; | |
} | |
})(), | |
) | |
@@ -815,7 +815,7 @@ export class HgService { | |
HGEDITOR: editMergeConfigs.hgEditor, | |
}; | |
return this._hgObserveExecution( | |
- [...editMergeConfigs.args, , ...argumentsWithCommitFile, ,], | |
+ [...editMergeConfigs.args, , , ...argumentsWithCommitFile, , ,], | |
execOptions, | |
); | |
}) | |
@@ -962,6 +962,7 @@ export class HgService { | |
const args = [ | |
...filePaths.map(p => nuclideUri.getPath(p)), | |
, | |
+ , | |
// Sources | |
// Dest | |
nuclideUri.getPath(destPath), | |
@@ -1139,7 +1140,14 @@ export class HgService { | |
return Observable | |
.fromPromise(getEditMergeConfigs()) | |
.switchMap(editMergeConfigs => { | |
- const args = [...editMergeConfigs.args, , 'rebase', '-d', destination]; | |
+ const args = [ | |
+ ...editMergeConfigs.args, | |
+ , | |
+ , | |
+ 'rebase', | |
+ '-d', | |
+ destination, | |
+ ]; | |
if (source != null) { | |
args.push('-s', source); | |
} | |
@@ -1173,6 +1181,7 @@ export class HgService { | |
const args = [ | |
...filePaths.map(p => nuclideUri.getPath(p)), | |
, | |
+ , | |
// Sources | |
// Dest | |
nuclideUri.getPath(destPath), | |
diff --git a/pkg/nuclide-hhvm/lib/HhvmToolbar.js b/pkg/nuclide-hhvm/lib/HhvmToolbar.js | |
index fbb9062..efcf457 100644 | |
--- a/pkg/nuclide-hhvm/lib/HhvmToolbar.js | |
+++ b/pkg/nuclide-hhvm/lib/HhvmToolbar.js | |
@@ -69,7 +69,8 @@ export default class HhvmToolbar extends React.Component { | |
// TODO[jeffreytan]: this is ugly, refactor to make it more elegant. | |
const store = this.props.projectStore; | |
if ( | |
- store.getDebugMode() === 'script' && | |
+ store.getDebugMode() === | |
+ 'script' && | |
!this._isTargetLaunchable(store.getCurrentFilePath()) | |
) { | |
store.setDebugMode('webserver'); | |
diff --git a/pkg/nuclide-hhvm/lib/ProjectStore.js b/pkg/nuclide-hhvm/lib/ProjectStore.js | |
index 5ae4eb1..dabfe57 100644 | |
--- a/pkg/nuclide-hhvm/lib/ProjectStore.js | |
+++ b/pkg/nuclide-hhvm/lib/ProjectStore.js | |
@@ -70,7 +70,9 @@ export default class ProjectStore { | |
_isFileHHVMProject(fileUri: ?string): Promise<boolean> { | |
return trackTiming('toolbar.isFileHHVMProject', async () => { | |
- return fileUri != null && nuclideUri.isRemote(fileUri) && | |
+ return fileUri != | |
+ null && | |
+ nuclideUri.isRemote(fileUri) && | |
(await isFileInHackProject(fileUri)); | |
}); | |
} | |
diff --git a/pkg/nuclide-home/lib/HomePaneItem.js b/pkg/nuclide-home/lib/HomePaneItem.js | |
index 27d43d7..0182f74 100644 | |
--- a/pkg/nuclide-home/lib/HomePaneItem.js | |
+++ b/pkg/nuclide-home/lib/HomePaneItem.js | |
@@ -95,7 +95,7 @@ export default class HomePaneItem extends React.Component { | |
.from(this.state.allHomeFragments) | |
.sort( | |
(fragmentA, fragmentB) => | |
- (fragmentB.priority || 0) - (fragmentA.priority || 0), | |
+ fragmentB.priority || 0 - (fragmentA.priority || 0), | |
); | |
sortedHomeFragments.forEach(fragment => { | |
const {welcome, feature} = fragment; | |
@@ -136,12 +136,11 @@ export default class HomePaneItem extends React.Component { | |
); | |
} | |
- return /* Re-use styles from the Atom welcome pane where possible.*/ | |
- ( | |
- <div className="nuclide-home pane-item padded nuclide-home-containers"> | |
- {containers} | |
- </div> | |
- ); | |
+ return; | |
+ /* Re-use styles from the Atom welcome pane where possible.*/ | |
+ <div className="nuclide-home pane-item padded nuclide-home-containers"> | |
+ {containers} | |
+ </div>; | |
} | |
_handleShowOnStartupChange(checked: boolean): void { | |
diff --git a/pkg/nuclide-http-request-sender/lib/RequestEditDialog.js b/pkg/nuclide-http-request-sender/lib/RequestEditDialog.js | |
index baf7ebd..6ab7911 100644 | |
--- a/pkg/nuclide-http-request-sender/lib/RequestEditDialog.js | |
+++ b/pkg/nuclide-http-request-sender/lib/RequestEditDialog.js | |
@@ -47,8 +47,12 @@ export class RequestEditDialog extends React.Component<void, PropsType, void> { | |
shouldComponentUpdate(nextProps: PropsType): boolean { | |
const {uri, method, headers, body} = this.props; | |
- return nextProps.uri !== uri || nextProps.method !== method || | |
- nextProps.body !== body || | |
+ return nextProps.uri !== | |
+ uri || | |
+ nextProps.method !== | |
+ method || | |
+ nextProps.body !== | |
+ body || | |
!shallowequal(nextProps.headers, headers); | |
} | |
diff --git a/pkg/nuclide-json/lib/NPMHyperclickProvider.js b/pkg/nuclide-json/lib/NPMHyperclickProvider.js | |
index cb199c3..bf5760b 100644 | |
--- a/pkg/nuclide-json/lib/NPMHyperclickProvider.js | |
+++ b/pkg/nuclide-json/lib/NPMHyperclickProvider.js | |
@@ -82,8 +82,12 @@ export function getPackageUrlForRange( | |
function isPackageJson(textEditor: atom$TextEditor): boolean { | |
const scopeName = textEditor.getGrammar().scopeName; | |
const filePath = textEditor.getPath(); | |
- return scopeName === 'source.json' && filePath != null && | |
- nuclideUri.basename(filePath) === 'package.json'; | |
+ return scopeName === | |
+ 'source.json' && | |
+ filePath != | |
+ null && | |
+ nuclideUri.basename(filePath) === | |
+ 'package.json'; | |
} | |
function getPackageUrl(packageName: string, version: string): ?string { | |
@@ -120,7 +124,10 @@ function getDependencyVersion(json: string, range: atom$Range): ?string { | |
const pathToNode = getPathToNodeForRange(ast, range); | |
if ( | |
- pathToNode != null && pathToNode.length === 2 && | |
+ pathToNode != | |
+ null && | |
+ pathToNode.length === | |
+ 2 && | |
DEPENDENCY_PROPERTIES.has(pathToNode[0].key.value) && | |
isValidVersion(pathToNode[1].value) | |
) { | |
diff --git a/pkg/nuclide-language-service/lib/FindReferencesProvider.js b/pkg/nuclide-language-service/lib/FindReferencesProvider.js | |
index 3d9600d..e470a7c 100644 | |
--- a/pkg/nuclide-language-service/lib/FindReferencesProvider.js | |
+++ b/pkg/nuclide-language-service/lib/FindReferencesProvider.js | |
@@ -60,7 +60,8 @@ export class FindReferencesProvider<T: LanguageService> { | |
} | |
async isEditorSupported(textEditor: atom$TextEditor): Promise<boolean> { | |
- return textEditor.getPath() != null && | |
+ return textEditor.getPath() != | |
+ null && | |
this.grammarScopes.includes(textEditor.getGrammar().scopeName); | |
} | |
diff --git a/pkg/nuclide-navigation-stack/lib/NavigationStackController.js b/pkg/nuclide-navigation-stack/lib/NavigationStackController.js | |
index e9d6c6a..64a6adc 100644 | |
--- a/pkg/nuclide-navigation-stack/lib/NavigationStackController.js | |
+++ b/pkg/nuclide-navigation-stack/lib/NavigationStackController.js | |
@@ -136,9 +136,13 @@ export class NavigationStackController { | |
// we restore top of the stack to the previous location before pushing a new | |
// nav stack entry. | |
if ( | |
- !this._inActivate && this._lastLocation != null && | |
- this._lastLocation.editor === editor && | |
- this._navigationStack.getCurrentEditor() === editor | |
+ !this._inActivate && | |
+ this._lastLocation != | |
+ null && | |
+ this._lastLocation.editor === | |
+ editor && | |
+ this._navigationStack.getCurrentEditor() === | |
+ editor | |
) { | |
this._navigationStack.attemptUpdate(this._lastLocation); | |
this._navigationStack.push(getLocationOfEditor(editor)); | |
@@ -178,11 +182,13 @@ export class NavigationStackController { | |
); | |
this._navigationStack.filter(location => { | |
const uri = getPathOfLocation(location); | |
- return uri == null || !nuclideUri.contains(removedPath, uri) || | |
+ return uri == | |
+ null || | |
+ !nuclideUri.contains(removedPath, uri) || | |
remainingDirectories.find( | |
directory => nuclideUri.contains(directory, uri), | |
) != | |
- null; | |
+ null; | |
}); | |
} | |
diff --git a/pkg/nuclide-node-transpiler/lib/inline-invariant-tr.js b/pkg/nuclide-node-transpiler/lib/inline-invariant-tr.js | |
index f77a09a..e03eb3a 100644 | |
--- a/pkg/nuclide-node-transpiler/lib/inline-invariant-tr.js | |
+++ b/pkg/nuclide-node-transpiler/lib/inline-invariant-tr.js | |
@@ -67,8 +67,10 @@ module.exports = context => { | |
let removeBinding = true; | |
for (const refPath of binding.referencePaths) { | |
if ( | |
- refPath.parentKey !== 'callee' || | |
- refPath.parent.type !== 'CallExpression' | |
+ refPath.parentKey !== | |
+ 'callee' || | |
+ refPath.parent.type !== | |
+ 'CallExpression' | |
) { | |
removeBinding = false; | |
continue; | |
diff --git a/pkg/nuclide-node-transpiler/lib/use-minified-libs-tr.js b/pkg/nuclide-node-transpiler/lib/use-minified-libs-tr.js | |
index af18a7c..8cbb4cd 100644 | |
--- a/pkg/nuclide-node-transpiler/lib/use-minified-libs-tr.js | |
+++ b/pkg/nuclide-node-transpiler/lib/use-minified-libs-tr.js | |
@@ -41,9 +41,13 @@ module.exports = context => { | |
const node = path.node; | |
// "require.resolve" is not checked. | |
if ( | |
- node.callee.type === 'Identifier' && node.callee.name === 'require' && | |
+ node.callee.type === | |
+ 'Identifier' && | |
+ node.callee.name === | |
+ 'require' && | |
node.arguments[0] && | |
- node.arguments[0].type === 'StringLiteral' | |
+ node.arguments[0].type === | |
+ 'StringLiteral' | |
) { | |
const source = path.get('arguments.0'); | |
replaceModuleId(this, source); | |
diff --git a/pkg/nuclide-nux/lib/NuxManager.js b/pkg/nuclide-nux/lib/NuxManager.js | |
index e4be0b3..f002302 100644 | |
--- a/pkg/nuclide-nux/lib/NuxManager.js | |
+++ b/pkg/nuclide-nux/lib/NuxManager.js | |
@@ -165,8 +165,10 @@ export class NuxManager { | |
// Handles triggered NUXes that are ready to be displayed | |
_handleReadyTour(nuxTour: NuxTour): void { | |
if ( | |
- this._activeNuxTour == null && | |
- this._numNuxesDisplayed < NUX_PER_SESSION_LIMIT | |
+ this._activeNuxTour == | |
+ null && | |
+ this._numNuxesDisplayed < | |
+ NUX_PER_SESSION_LIMIT | |
) { | |
this._numNuxesDisplayed++; | |
this._activeNuxTour = nuxTour; | |
diff --git a/pkg/nuclide-nux/lib/NuxStore.js b/pkg/nuclide-nux/lib/NuxStore.js | |
index 1744f51..e9ee7a7 100644 | |
--- a/pkg/nuclide-nux/lib/NuxStore.js | |
+++ b/pkg/nuclide-nux/lib/NuxStore.js | |
@@ -58,7 +58,7 @@ export class NuxStore { | |
// Merge the two maps. If a key exists in both input maps, the value from | |
// the latter (backend cache) will be used in the resulting map. | |
// $FlowIgnore - Flow thinks the spread operator is incompatible with Map | |
- this._nuxMap = new Map([...nuclideNuxState, , ...fbNuxState]); | |
+ this._nuxMap = new Map([...nuclideNuxState, , , ...fbNuxState]); | |
} | |
/* | |
diff --git a/pkg/nuclide-nux/lib/NuxView.js b/pkg/nuclide-nux/lib/NuxView.js | |
index f23d943..b7493a6 100644 | |
--- a/pkg/nuclide-nux/lib/NuxView.js | |
+++ b/pkg/nuclide-nux/lib/NuxView.js | |
@@ -185,7 +185,8 @@ export class NuxView { | |
const LINK_ENABLED = 'nuclide-nux-link-enabled'; | |
const LINK_DISABLED = 'nuclide-nux-link-disabled'; // Let the link to the next NuxView be enabled iff // a) it is not the last NuxView in the tour AND // b) there is no condition for completion | |
const nextLinkStyle = !this._finalNuxInTour && | |
- this._completePredicate == null | |
+ this._completePredicate == | |
+ null | |
? LINK_ENABLED | |
: LINK_DISABLED; // Additionally, the `Next` button may be disabled if an action must be completed. // In this case we show a hint to the user. | |
const nextLinkButton = `\ | |
@@ -276,7 +277,6 @@ export class NuxView { | |
setNuxCompleteCallback(callback: (success: boolean) => void): void { | |
this._callback = callback; | |
} | |
- | |
_onNuxComplete(success: boolean = true): boolean { | |
if (this._callback) { | |
this._callback(success); // Avoid the callback being invoked again. | |
diff --git a/pkg/nuclide-objc/lib/ObjectiveCBracketBalancer.js b/pkg/nuclide-objc/lib/ObjectiveCBracketBalancer.js | |
index f9f8cc3..191d0f5 100644 | |
--- a/pkg/nuclide-objc/lib/ObjectiveCBracketBalancer.js | |
+++ b/pkg/nuclide-objc/lib/ObjectiveCBracketBalancer.js | |
@@ -121,8 +121,10 @@ export default class ObjectiveCBracketBalancer { | |
} | |
if ( | |
- currentRowPlusOne !== null && | |
- currentRowPlusOne !== closeBracketPosition.row | |
+ currentRowPlusOne !== | |
+ null && | |
+ currentRowPlusOne !== | |
+ closeBracketPosition.row | |
) { | |
const targetLine = buffer.lineForRow(currentRowPlusOne); | |
const targetMatch = /\S/.exec(targetLine); | |
diff --git a/pkg/nuclide-ocaml-rpc/spec/MerlinService-spec.js b/pkg/nuclide-ocaml-rpc/spec/MerlinService-spec.js | |
index cd56ae7..11af020 100644 | |
--- a/pkg/nuclide-ocaml-rpc/spec/MerlinService-spec.js | |
+++ b/pkg/nuclide-ocaml-rpc/spec/MerlinService-spec.js | |
@@ -125,11 +125,18 @@ describe('MerlinService V 2.3.1', () => { | |
const merlinService = await getMockedMerlinService(async command => { | |
if ( | |
- command[0] === 'complete' && command[1] === 'prefix' && | |
- command[2] === 'FoodTest.' && | |
- command[3] === 'at' && | |
- command[4].line === 6 && | |
- command[4].col === 3 | |
+ command[0] === | |
+ 'complete' && | |
+ command[1] === | |
+ 'prefix' && | |
+ command[2] === | |
+ 'FoodTest.' && | |
+ command[3] === | |
+ 'at' && | |
+ command[4].line === | |
+ 6 && | |
+ command[4].col === | |
+ 3 | |
) { | |
return expectedResult; | |
} | |
@@ -201,9 +208,14 @@ describe('MerlinService V 2.5', () => { | |
const merlinService = await getMockedMerlinService(async command => { | |
if ( | |
- command[0] === 'tell' && command[1] === 'start' && | |
- command[2] === 'end' && | |
- command[3] === content | |
+ command[0] === | |
+ 'tell' && | |
+ command[1] === | |
+ 'start' && | |
+ command[2] === | |
+ 'end' && | |
+ command[3] === | |
+ content | |
) { | |
return {cursor: {line: 2, col: 0}, marker: false}; | |
} | |
@@ -261,11 +273,18 @@ describe('MerlinService V 2.5', () => { | |
const merlinService = await getMockedMerlinService(async command => { | |
if ( | |
- command[0] === 'complete' && command[1] === 'prefix' && | |
- command[2] === 'FoodTest.' && | |
- command[3] === 'at' && | |
- command[4].line === 6 && | |
- command[4].col === 3 | |
+ command[0] === | |
+ 'complete' && | |
+ command[1] === | |
+ 'prefix' && | |
+ command[2] === | |
+ 'FoodTest.' && | |
+ command[3] === | |
+ 'at' && | |
+ command[4].line === | |
+ 6 && | |
+ command[4].col === | |
+ 3 | |
) { | |
return expectedResult; | |
} | |
diff --git a/pkg/nuclide-ocaml/lib/CodeFormatHelpers.js b/pkg/nuclide-ocaml/lib/CodeFormatHelpers.js | |
index edc77ee..1e2c16b 100644 | |
--- a/pkg/nuclide-ocaml/lib/CodeFormatHelpers.js | |
+++ b/pkg/nuclide-ocaml/lib/CodeFormatHelpers.js | |
@@ -50,6 +50,8 @@ async function formatImpl( | |
'-is-interface-pp', | |
isInterfaceF(path) ? 'true' : 'false', | |
...getRefmtFlags(), | |
+ , | |
+ , | |
,, | |
]; | |
return instance.format(editor.getText(), flags); | |
diff --git a/pkg/nuclide-outline-view/lib/OutlineView.js b/pkg/nuclide-outline-view/lib/OutlineView.js | |
index cb3523f..b3cb81d 100644 | |
--- a/pkg/nuclide-outline-view/lib/OutlineView.js | |
+++ b/pkg/nuclide-outline-view/lib/OutlineView.js | |
@@ -200,11 +200,10 @@ function renderTrees( | |
if (outlines.length === 0) { | |
return null; | |
} | |
- return /* Add `position: relative;` to let `li.selected` style position itself relative to the list*/ | |
+ return; | |
+ /* Add `position: relative;` to let `li.selected` style position itself relative to the list*/ | |
/* tree rather than to its container.*/ | |
- ( | |
- <ul className="list-tree" style={{position: 'relative'}}> | |
- {outlines.map((outline, index) => renderTree(editor, outline, index))} | |
- </ul> | |
- ); | |
+ <ul className="list-tree" style={{position: 'relative'}}> | |
+ {outlines.map((outline, index) => renderTree(editor, outline, index))} | |
+ </ul>; | |
} | |
diff --git a/pkg/nuclide-python-rpc/lib/flake8.js b/pkg/nuclide-python-rpc/lib/flake8.js | |
index 0220607..ae3b416 100644 | |
--- a/pkg/nuclide-python-rpc/lib/flake8.js | |
+++ b/pkg/nuclide-python-rpc/lib/flake8.js | |
@@ -28,19 +28,19 @@ const ERROR_CODES = new Set([ | |
// indentation contains mixed spaces and tabs | |
'E112', | |
// expected an indented block | |
- 'E113', | |
// unexpected indentation | |
// closing bracket does not match indentation of opening bracket’s line | |
- 'E123', | |
+ 'E113', | |
// closing bracket does not match visual indentation | |
- 'E124', | |
+ 'E123', | |
// visually indented line with same indent as next logical line | |
- 'E129', | |
+ 'E124', | |
// closing bracket is missing indentation | |
- 'E133', | |
+ 'E129', | |
// SyntaxError or IndentationError | |
- 'E901', | |
+ 'E133', | |
// IOError | |
+ 'E901', | |
'E902', | |
]); | |
function classifyCode(code: string): MessageType { | |
diff --git a/pkg/nuclide-python-rpc/lib/outline.js b/pkg/nuclide-python-rpc/lib/outline.js | |
index 3dfeb5a..874bb4a 100644 | |
--- a/pkg/nuclide-python-rpc/lib/outline.js | |
+++ b/pkg/nuclide-python-rpc/lib/outline.js | |
@@ -63,6 +63,7 @@ function functionToOutlineTree(item: PythonFunctionItem): OutlineTree { | |
plain('('), | |
...argsToText(item.params || []), | |
, | |
+ , | |
plain(')'), | |
], | |
representativeName: item.name, | |
diff --git a/pkg/nuclide-python/lib/LintHelpers.js b/pkg/nuclide-python/lib/LintHelpers.js | |
index 6367ca5..3645f8b 100644 | |
--- a/pkg/nuclide-python/lib/LintHelpers.js | |
+++ b/pkg/nuclide-python/lib/LintHelpers.js | |
@@ -20,7 +20,9 @@ export default class LintHelpers { | |
static lint(editor: TextEditor): Promise<Array<LinterMessage>> { | |
const src = editor.getPath(); | |
if ( | |
- src == null || !getEnableLinting() || | |
+ src == | |
+ null || | |
+ !getEnableLinting() || | |
getLintExtensionBlacklist().includes(nuclideUri.extname(src)) | |
) { | |
return Promise.resolve([]); | |
diff --git a/pkg/nuclide-python/lib/diagnostic-range.js b/pkg/nuclide-python/lib/diagnostic-range.js | |
index a7ee82e..ebd99e0 100644 | |
--- a/pkg/nuclide-python/lib/diagnostic-range.js | |
+++ b/pkg/nuclide-python/lib/diagnostic-range.js | |
@@ -60,8 +60,10 @@ function getModuleNameRange( | |
]); | |
} | |
if ( | |
- token.value === 'import' && | |
- token.scopes.indexOf('keyword.control.import.python') >= 0 | |
+ token.value === | |
+ 'import' && | |
+ token.scopes.indexOf('keyword.control.import.python') >= | |
+ 0 | |
) { | |
foundImport = true; | |
} | |
diff --git a/pkg/nuclide-quick-open/lib/QuickOpenProviderRegistry.js b/pkg/nuclide-quick-open/lib/QuickOpenProviderRegistry.js | |
index a81b696..1b51b7b 100644 | |
--- a/pkg/nuclide-quick-open/lib/QuickOpenProviderRegistry.js | |
+++ b/pkg/nuclide-quick-open/lib/QuickOpenProviderRegistry.js | |
@@ -31,8 +31,11 @@ export default class QuickOpenProviderRegistry { | |
// $FlowIssue: Iterator is spreadable. | |
...this._globalProviders.values(), | |
, | |
+ , | |
// $FlowIssue: Iterator is spreadable. | |
...this._directoryProviders.values(), | |
+ , | |
+ , | |
,, | |
]; | |
} | |
diff --git a/pkg/nuclide-quick-open/lib/QuickSelectionComponent.js b/pkg/nuclide-quick-open/lib/QuickSelectionComponent.js | |
index a2ae4b8..0d3290d 100644 | |
--- a/pkg/nuclide-quick-open/lib/QuickSelectionComponent.js | |
+++ b/pkg/nuclide-quick-open/lib/QuickSelectionComponent.js | |
@@ -204,9 +204,12 @@ export default class QuickSelectionComponent extends React.Component { | |
} | |
} | |
if ( | |
- prevState.selectedItemIndex !== this.state.selectedItemIndex || | |
- prevState.selectedService !== this.state.selectedService || | |
- prevState.selectedDirectory !== this.state.selectedDirectory | |
+ prevState.selectedItemIndex !== | |
+ this.state.selectedItemIndex || | |
+ prevState.selectedService !== | |
+ this.state.selectedService || | |
+ prevState.selectedDirectory !== | |
+ this.state.selectedDirectory | |
) { | |
this._updateScrollPosition(); | |
} | |
@@ -390,8 +393,11 @@ export default class QuickSelectionComponent extends React.Component { | |
{renderableProviders, resultsByService: updatedResults}, | |
() => { | |
if ( | |
- !this.state.hasUserSelection && topProviderName != null && | |
- this.state.resultsByService[topProviderName] != null | |
+ !this.state.hasUserSelection && | |
+ topProviderName != | |
+ null && | |
+ this.state.resultsByService[topProviderName] != | |
+ null | |
) { | |
const topProviderResults = this.state.resultsByService[topProviderName].results; | |
if ( | |
@@ -609,7 +615,9 @@ export default class QuickSelectionComponent extends React.Component { | |
itemIndex: number, | |
): ?FileResult { | |
if ( | |
- itemIndex === -1 || !this.state.resultsByService[serviceName] || | |
+ itemIndex === | |
+ -1 || | |
+ !this.state.resultsByService[serviceName] || | |
!this.state.resultsByService[serviceName].results[directory] || | |
!this.state.resultsByService[serviceName].results[directory].results[itemIndex] | |
) { | |
@@ -775,9 +783,12 @@ export default class QuickSelectionComponent extends React.Component { | |
{ | |
numResultsForService++; | |
numTotalResultsRendered++; | |
- const isSelected = serviceName === this.state.selectedService && | |
- dirName === this.state.selectedDirectory && | |
- itemIndex === this.state.selectedItemIndex; | |
+ const isSelected = serviceName === | |
+ this.state.selectedService && | |
+ dirName === | |
+ this.state.selectedDirectory && | |
+ itemIndex === | |
+ this.state.selectedItemIndex; | |
return ( | |
<li | |
className={ | |
@@ -804,7 +815,8 @@ export default class QuickSelectionComponent extends React.Component { | |
}); | |
let directoryLabel = null; | |
// hide folders if only 1 level would be shown, or if no results were found | |
- const showDirectories = directoryNames.length > 1 && | |
+ const showDirectories = directoryNames.length > | |
+ 1 && | |
(!isOmniSearchActive || resultsForDirectory.results.length > 0); | |
if (showDirectories) { | |
directoryLabel = ( | |
diff --git a/pkg/nuclide-quick-open/lib/SearchResultManager.js b/pkg/nuclide-quick-open/lib/SearchResultManager.js | |
index 7f4924b..1958652 100644 | |
--- a/pkg/nuclide-quick-open/lib/SearchResultManager.js | |
+++ b/pkg/nuclide-quick-open/lib/SearchResultManager.js | |
@@ -405,9 +405,9 @@ export default class SearchResultManager { | |
!((cachedPaths = this._resultCache.getAllCachedResults()[providerName]) && | |
(cachedQueries = cachedPaths[path]) && | |
((cachedResult = cachedQueries[query]) || | |
- // If the current query hasn't returned anything yet, try the last cached result. | |
- lastCachedQuery != null && | |
- (cachedResult = cachedQueries[lastCachedQuery]))) | |
+ lastCachedQuery != | |
+ null && | |
+ (cachedResult = cachedQueries[lastCachedQuery]))) | |
) { | |
cachedResult = {}; | |
} | |
diff --git a/pkg/nuclide-quick-open/lib/main.js b/pkg/nuclide-quick-open/lib/main.js | |
index 64eca38..84bc308 100644 | |
--- a/pkg/nuclide-quick-open/lib/main.js | |
+++ b/pkg/nuclide-quick-open/lib/main.js | |
@@ -174,8 +174,11 @@ class Activation { | |
'quickopen-session': this._analyticsSessionId, | |
}); | |
if ( | |
- this._searchPanel != null && this._searchPanel.isVisible() && | |
- this._searchResultManager.getActiveProviderName() === newProviderName | |
+ this._searchPanel != | |
+ null && | |
+ this._searchPanel.isVisible() && | |
+ this._searchResultManager.getActiveProviderName() === | |
+ newProviderName | |
) { | |
this._closeSearchPanel(); | |
} else { | |
@@ -204,7 +207,8 @@ class Activation { | |
!isAlreadyVisible | |
) { | |
const editor = atom.workspace.getActiveTextEditor(); | |
- const selectedText = editor != null && | |
+ const selectedText = editor != | |
+ null && | |
editor.getSelections()[0].getText(); | |
if (selectedText && selectedText.length <= MAX_SELECTION_LENGTH) { | |
_searchComponent.setInputValue(selectedText.split('\n')[0]); | |
@@ -217,7 +221,10 @@ class Activation { | |
_closeSearchPanel(): void { | |
const {_searchComponent, _searchPanel} = this; | |
if ( | |
- _searchComponent != null && _searchPanel != null && | |
+ _searchComponent != | |
+ null && | |
+ _searchPanel != | |
+ null && | |
_searchPanel.isVisible() | |
) { | |
track('quickopen-close-panel', { | |
diff --git a/pkg/nuclide-react-inspector/VendorLib/dev-tools/build/backend.js b/pkg/nuclide-react-inspector/VendorLib/dev-tools/build/backend.js | |
index ada5685..518864f 100644 | |
--- a/pkg/nuclide-react-inspector/VendorLib/dev-tools/build/backend.js | |
+++ b/pkg/nuclide-react-inspector/VendorLib/dev-tools/build/backend.js | |
@@ -230,15 +230,21 @@ | |
*/ | |
'use strict'; | |
- var _typeof = typeof Symbol === 'function' && | |
- typeof Symbol.iterator === 'symbol' | |
+ var _typeof = typeof Symbol === | |
+ 'function' && | |
+ typeof Symbol.iterator === | |
+ 'symbol' | |
? function(obj) { | |
return typeof obj; | |
} | |
: function(obj) { | |
- return obj && typeof Symbol === 'function' && | |
- obj.constructor === Symbol && | |
- obj !== Symbol.prototype | |
+ return obj && | |
+ typeof Symbol === | |
+ 'function' && | |
+ obj.constructor === | |
+ Symbol && | |
+ obj !== | |
+ Symbol.prototype | |
? 'symbol' | |
: typeof obj; | |
}; | |
@@ -391,11 +397,13 @@ | |
_this._prevSelected = null; | |
_this._scrollUpdate = false; | |
var isReactDOM = window.document && | |
- typeof window.document.createElement === 'function'; | |
+ typeof window.document.createElement === | |
+ 'function'; | |
_this.capabilities = assign( | |
{ | |
scroll: isReactDOM && | |
- typeof window.document.body.scrollIntoView === 'function', | |
+ typeof window.document.body.scrollIntoView === | |
+ 'function', | |
dom: isReactDOM, | |
editTextContent: false, | |
}, | |
@@ -892,7 +900,8 @@ | |
if (type === 'error') { | |
if ( | |
!this._events.error || | |
- isObject(this._events.error) && !this._events.error.length | |
+ isObject(this._events.error) && | |
+ !this._events.error.length | |
) { | |
er = arguments[1]; | |
if (er instanceof Error) { | |
@@ -1026,8 +1035,11 @@ | |
position = -1; | |
if ( | |
- list === listener || | |
- isFunction(list.listener) && list.listener === listener | |
+ list === | |
+ listener || | |
+ isFunction(list.listener) && | |
+ list.listener === | |
+ listener | |
) { | |
delete this._events[type]; | |
if (this._events.removeListener) | |
@@ -1035,8 +1047,11 @@ | |
} else if (isObject(list)) { | |
for (i = length; i-- > 0; ) { | |
if ( | |
- list[i] === listener || | |
- list[i].listener && list[i].listener === listener | |
+ list[i] === | |
+ listener || | |
+ list[i].listener && | |
+ list[i].listener === | |
+ listener | |
) { | |
position = i; | |
break; | |
@@ -1294,7 +1309,7 @@ | |
}, | |
}); | |
var endTime = performanceNow(); | |
- lastRunTimeMS = (endTime - startTime) / 1000; | |
+ lastRunTimeMS = endTime - startTime / 1000; | |
}, | |
delayMS, | |
); | |
@@ -1663,8 +1678,12 @@ | |
} | |
if ( | |
isFn && | |
- (name === 'arguments' || name === 'callee' || | |
- name === 'caller') | |
+ (name === | |
+ 'arguments' || | |
+ name === | |
+ 'callee' || | |
+ name === | |
+ 'caller') | |
) { | |
return; | |
} | |
@@ -1682,8 +1701,12 @@ | |
.forEach(function(name) { | |
if ( | |
pIsFn && | |
- (name === 'arguments' || name === 'callee' || | |
- name === 'caller') | |
+ (name === | |
+ 'arguments' || | |
+ name === | |
+ 'callee' || | |
+ name === | |
+ 'caller') | |
) { | |
return; | |
} | |
@@ -1866,12 +1889,14 @@ | |
// to ensure proper interoperability with other native functions e.g. Array.from | |
hasInstance: d( | |
'', | |
- NativeSymbol && NativeSymbol.hasInstance || | |
+ NativeSymbol && | |
+ NativeSymbol.hasInstance || | |
SymbolPolyfill('hasInstance'), | |
), | |
isConcatSpreadable: d( | |
'', | |
- NativeSymbol && NativeSymbol.isConcatSpreadable || | |
+ NativeSymbol && | |
+ NativeSymbol.isConcatSpreadable || | |
SymbolPolyfill('isConcatSpreadable'), | |
), | |
iterator: d( | |
@@ -1900,17 +1925,20 @@ | |
), | |
toPrimitive: d( | |
'', | |
- NativeSymbol && NativeSymbol.toPrimitive || | |
+ NativeSymbol && | |
+ NativeSymbol.toPrimitive || | |
SymbolPolyfill('toPrimitive'), | |
), | |
toStringTag: d( | |
'', | |
- NativeSymbol && NativeSymbol.toStringTag || | |
+ NativeSymbol && | |
+ NativeSymbol.toStringTag || | |
SymbolPolyfill('toStringTag'), | |
), | |
unscopables: d( | |
'', | |
- NativeSymbol && NativeSymbol.unscopables || | |
+ NativeSymbol && | |
+ NativeSymbol.unscopables || | |
SymbolPolyfill('unscopables'), | |
), | |
}); | |
@@ -2121,8 +2149,7 @@ | |
for (key in src) | |
obj[key] = src[key]; | |
}; | |
- module.exports = function(options) /*, …options*/ | |
- { | |
+ module.exports = function(options /*, …options*/) { | |
var result = create(null); | |
forEach.call(arguments, function(options) { | |
if (options == null) return; | |
@@ -2155,8 +2182,7 @@ | |
function(module, exports) { | |
'use strict'; | |
var indexOf = String.prototype.indexOf; | |
- module.exports = function(searchString) /*, position*/ | |
- { | |
+ module.exports = function(searchString /*, position*/) { | |
return indexOf.call(this, searchString, arguments[1]) > -1; | |
}; /***/ | |
} /* 24 */ /***/, | |
@@ -2171,7 +2197,8 @@ | |
function(module, exports) { | |
'use strict'; | |
module.exports = function(x) { | |
- return x && (typeof x === 'symbol' || x['@@toStringTag'] === 'Symbol') || | |
+ return x && | |
+ (typeof x === 'symbol' || x['@@toStringTag'] === 'Symbol') || | |
false; | |
}; /***/ | |
} /* 26 */ /***/, | |
@@ -2242,15 +2269,21 @@ | |
* } | |
* and cleaned = [["some", "attr"], ["other"]] | |
*/ | |
- var _typeof = typeof Symbol === 'function' && | |
- typeof Symbol.iterator === 'symbol' | |
+ var _typeof = typeof Symbol === | |
+ 'function' && | |
+ typeof Symbol.iterator === | |
+ 'symbol' | |
? function(obj) { | |
return typeof obj; | |
} | |
: function(obj) { | |
- return obj && typeof Symbol === 'function' && | |
- obj.constructor === Symbol && | |
- obj !== Symbol.prototype | |
+ return obj && | |
+ typeof Symbol === | |
+ 'function' && | |
+ obj.constructor === | |
+ Symbol && | |
+ obj !== | |
+ Symbol.prototype | |
? 'symbol' | |
: typeof obj; | |
}; | |
@@ -2264,7 +2297,7 @@ | |
if ( | |
!data || | |
(typeof data === 'undefined' ? 'undefined' : _typeof(data)) !== | |
- 'object' | |
+ 'object' | |
) { | |
if (typeof data === 'string' && data.length > 500) { | |
return data.slice(0, 500) + '...'; | |
@@ -2297,8 +2330,11 @@ | |
}); | |
} // TODO when this is in the iframe window, we can just use Object | |
if ( | |
- data.constructor && typeof data.constructor === 'function' && | |
- data.constructor.name !== 'Object' | |
+ data.constructor && | |
+ typeof data.constructor === | |
+ 'function' && | |
+ data.constructor.name !== | |
+ 'Object' | |
) { | |
cleaned.push(path); | |
return {name: data.constructor.name, type: 'object'}; | |
@@ -2363,7 +2399,8 @@ | |
var ExecutionEnvironment = __webpack_require__(30); | |
var performance; | |
if (ExecutionEnvironment.canUseDOM) { | |
- performance = window.performance || window.msPerformance || | |
+ performance = window.performance || | |
+ window.msPerformance || | |
window.webkitPerformance; | |
} | |
module.exports = performance || {}; /***/ | |
@@ -2380,7 +2417,9 @@ | |
* @providesModule ExecutionEnvironment | |
*/ | |
'use strict'; | |
- var canUseDOM = !!(typeof window !== 'undefined' && window.document && | |
+ var canUseDOM = !!(typeof window !== | |
+ 'undefined' && | |
+ window.document && | |
window.document.createElement); | |
/** | |
* Simple, lightweight module assisting with the detection and context of | |
@@ -2393,8 +2432,8 @@ | |
canUseWorkers: typeof Worker !== 'undefined', | |
canUseEventListeners: canUseDOM && | |
!!(window.addEventListener || window.attachEvent), | |
- canUseViewport: canUseDOM && !!window.screen, | |
// For now, this is true - might change in the future. | |
+ canUseViewport: canUseDOM && !!window.screen, | |
isInWorker: !canUseDOM, | |
}; | |
module.exports = ExecutionEnvironment; /***/ | |
@@ -2788,15 +2827,21 @@ | |
} | |
return target; | |
}); | |
- var _typeof = typeof Symbol === 'function' && | |
- typeof Symbol.iterator === 'symbol' | |
+ var _typeof = typeof Symbol === | |
+ 'function' && | |
+ typeof Symbol.iterator === | |
+ 'symbol' | |
? function(obj) { | |
return typeof obj; | |
} | |
: function(obj) { | |
- return obj && typeof Symbol === 'function' && | |
- obj.constructor === Symbol && | |
- obj !== Symbol.prototype | |
+ return obj && | |
+ typeof Symbol === | |
+ 'function' && | |
+ obj.constructor === | |
+ Symbol && | |
+ obj !== | |
+ Symbol.prototype | |
? 'symbol' | |
: typeof obj; | |
}; | |
@@ -3124,15 +3169,21 @@ | |
* | |
*/ | |
'use strict'; | |
- var _typeof = typeof Symbol === 'function' && | |
- typeof Symbol.iterator === 'symbol' | |
+ var _typeof = typeof Symbol === | |
+ 'function' && | |
+ typeof Symbol.iterator === | |
+ 'symbol' | |
? function(obj) { | |
return typeof obj; | |
} | |
: function(obj) { | |
- return obj && typeof Symbol === 'function' && | |
- obj.constructor === Symbol && | |
- obj !== Symbol.prototype | |
+ return obj && | |
+ typeof Symbol === | |
+ 'function' && | |
+ obj.constructor === | |
+ Symbol && | |
+ obj !== | |
+ Symbol.prototype | |
? 'symbol' | |
: typeof obj; | |
}; | |
@@ -3196,7 +3247,8 @@ | |
var customStyle; | |
if (Array.isArray(style)) { | |
if ( | |
- _typeof(style[style.length - 1]) === 'object' && | |
+ _typeof(style[style.length - 1]) === | |
+ 'object' && | |
!Array.isArray(style[style.length - 1]) | |
) { | |
customStyle = shallowClone(style[style.length - 1]); | |
@@ -3242,7 +3294,8 @@ | |
var style = data.props && data.props.style; | |
if (Array.isArray(style)) { | |
if ( | |
- _typeof(style[style.length - 1]) === 'object' && | |
+ _typeof(style[style.length - 1]) === | |
+ 'object' && | |
!Array.isArray(style[style.length - 1]) | |
) { | |
// $FlowFixMe we know that updater is not null here | |
diff --git a/pkg/nuclide-react-inspector/VendorLib/dev-tools/build/embed.js b/pkg/nuclide-react-inspector/VendorLib/dev-tools/build/embed.js | |
index c8f70e0..858b9e3 100644 | |
--- a/pkg/nuclide-react-inspector/VendorLib/dev-tools/build/embed.js | |
+++ b/pkg/nuclide-react-inspector/VendorLib/dev-tools/build/embed.js | |
@@ -720,11 +720,15 @@ | |
boxWrap(dims, 'padding', this.padding); | |
assign(this.content.style, { | |
- height: box.height - dims.borderTop - dims.borderBottom - | |
+ height: box.height - | |
+ dims.borderTop - | |
+ dims.borderBottom - | |
dims.paddingTop - | |
dims.paddingBottom + | |
'px', | |
- width: box.width - dims.borderLeft - dims.borderRight - | |
+ width: box.width - | |
+ dims.borderLeft - | |
+ dims.borderRight - | |
dims.paddingLeft - | |
dims.paddingRight + | |
'px', | |
@@ -736,7 +740,9 @@ | |
}); | |
this.nameSpan.textContent = name || node.nodeName.toLowerCase(); | |
- this.dimSpan.textContent = box.width + 'px \xD7 ' + box.height + | |
+ this.dimSpan.textContent = box.width + | |
+ 'px \xD7 ' + | |
+ box.height + | |
'px'; | |
var tipPos = findTipPos( | |
{ | |
diff --git a/pkg/nuclide-react-native/lib/debugging/executor.js b/pkg/nuclide-react-native/lib/debugging/executor.js | |
index ca39c85..0e0f25f 100644 | |
--- a/pkg/nuclide-react-native/lib/debugging/executor.js | |
+++ b/pkg/nuclide-react-native/lib/debugging/executor.js | |
@@ -69,8 +69,10 @@ process.on('message', request => { | |
let returnValue = [[], [], [], 0]; | |
try { | |
if ( | |
- currentContext != null && | |
- typeof currentContext.__fbBatchedBridge === 'object' | |
+ currentContext != | |
+ null && | |
+ typeof currentContext.__fbBatchedBridge === | |
+ 'object' | |
) { | |
returnValue = currentContext.__fbBatchedBridge[request.method].apply( | |
null, | |
diff --git a/pkg/nuclide-react-native/lib/debugging/runApp.js b/pkg/nuclide-react-native/lib/debugging/runApp.js | |
index b42f719..8ae5955 100644 | |
--- a/pkg/nuclide-react-native/lib/debugging/runApp.js | |
+++ b/pkg/nuclide-react-native/lib/debugging/runApp.js | |
@@ -71,8 +71,10 @@ function connectToRnApp(): Observable<WS> { | |
// If the connection is being refused, or closes prematurely, just keep retrying | |
// indefinitely. | |
if ( | |
- error.name === 'PrematureCloseError' || | |
- (error: any).code === 'ECONNREFUSED' | |
+ error.name === | |
+ 'PrematureCloseError' || | |
+ (error: any).code === | |
+ 'ECONNREFUSED' | |
) { | |
return errorCount; | |
} | |
diff --git a/pkg/nuclide-react-native/lib/packager/PackagerActivation.js b/pkg/nuclide-react-native/lib/packager/PackagerActivation.js | |
index 3f340a2..3ac3b0c 100644 | |
--- a/pkg/nuclide-react-native/lib/packager/PackagerActivation.js | |
+++ b/pkg/nuclide-react-native/lib/packager/PackagerActivation.js | |
@@ -96,8 +96,10 @@ export class PackagerActivation { | |
atom.commands.add('atom-workspace', { | |
'nuclide-react-native:start-packager': event => { | |
// $FlowFixMe | |
- const detail = event.detail != null && | |
- typeof event.detail === 'object' | |
+ const detail = event.detail != | |
+ null && | |
+ typeof event.detail === | |
+ 'object' | |
? event.detail | |
: undefined; | |
this._logTailer.start(detail); | |
diff --git a/pkg/nuclide-react-native/lib/packager/parseMessages.js b/pkg/nuclide-react-native/lib/packager/parseMessages.js | |
index b5523af..0d26bc3 100644 | |
--- a/pkg/nuclide-react-native/lib/packager/parseMessages.js | |
+++ b/pkg/nuclide-react-native/lib/packager/parseMessages.js | |
@@ -36,7 +36,9 @@ export function parseMessages( | |
// If we've seen the port and the sources, that's the preamble! Or, if we get to a line that | |
// starts with a "[", we probably missed the closing of the preamble somehow. (Like the | |
// packager output changed). | |
- sawPreamble = sawPreamble || sawPortLine && sawSourcesEnd || | |
+ sawPreamble = sawPreamble || | |
+ sawPortLine && | |
+ sawSourcesEnd || | |
line.startsWith('['); | |
if (!sawPortLine && !sawPreamble) { | |
const match = line.match(PORT_LINE); | |
diff --git a/pkg/nuclide-recent-files-provider/lib/RecentFilesProvider.js b/pkg/nuclide-recent-files-provider/lib/RecentFilesProvider.js | |
index 57d6b1a..0f5b4f4 100644 | |
--- a/pkg/nuclide-recent-files-provider/lib/RecentFilesProvider.js | |
+++ b/pkg/nuclide-recent-files-provider/lib/RecentFilesProvider.js | |
@@ -92,7 +92,7 @@ function opacityForTimestamp(timestamp: number): number { | |
return Math.min( | |
1, | |
Math.max( | |
- 1 - FALLOFF * Math.log10((ageInMS - SHELF) / MS_PER_DAY + 1), | |
+ 1 - FALLOFF * Math.log10(ageInMS - SHELF / MS_PER_DAY + 1), | |
MIN_OPACITY, | |
), | |
); | |
diff --git a/pkg/nuclide-recent-files-provider/spec/RecentFilesProvider-spec.js b/pkg/nuclide-recent-files-provider/spec/RecentFilesProvider-spec.js | |
index cda354f..12319ba 100644 | |
--- a/pkg/nuclide-recent-files-provider/spec/RecentFilesProvider-spec.js | |
+++ b/pkg/nuclide-recent-files-provider/spec/RecentFilesProvider-spec.js | |
@@ -30,7 +30,7 @@ const FILE_PATHS = [ | |
const FAKE_RECENT_FILES = FILE_PATHS.map((path, i) => ({ | |
path, | |
- timestamp: 1e8 - i * 1000, | |
+ timestamp: 100000000 - i * 1000, | |
matchIndexes: [], | |
score: 1, | |
})); | |
diff --git a/pkg/nuclide-refactorizer/lib/refactorEpics.js b/pkg/nuclide-refactorizer/lib/refactorEpics.js | |
index 93304a9..5231d94 100644 | |
--- a/pkg/nuclide-refactorizer/lib/refactorEpics.js | |
+++ b/pkg/nuclide-refactorizer/lib/refactorEpics.js | |
@@ -48,7 +48,8 @@ export function getEpics( | |
function handleErrors( | |
actions: ActionsObservable<RefactorAction>, | |
): Observable<RefactorAction> { | |
- return // This is weird but Flow won't accept `action.error` or even `Boolean(action.error)` | |
+ return; | |
+ // This is weird but Flow won't accept `action.error` or even `Boolean(action.error)` | |
actions | |
.filter(action => action.error ? true : false) | |
.map(action => { | |
diff --git a/pkg/nuclide-refactorizer/spec/refactorStore-spec.js b/pkg/nuclide-refactorizer/spec/refactorStore-spec.js | |
index dd8f7b6..5644766 100644 | |
--- a/pkg/nuclide-refactorizer/spec/refactorStore-spec.js | |
+++ b/pkg/nuclide-refactorizer/spec/refactorStore-spec.js | |
@@ -90,9 +90,7 @@ describe('refactorStore', () => { | |
// $FlowIssue no symbol support | |
const stream: Observable<RefactorState> = Observable.from(store); | |
stateStream = // Filter out duplicate states. This happens during error handling, for example. | |
- stream | |
- .distinctUntilChanged() | |
- .publishReplay(); | |
+ stream.distinctUntilChanged().publishReplay(); | |
stateStream.connect(); | |
// stateStream will replay, but it's also useful to be able to wait for particular states before | |
// proceeding. | |
diff --git a/pkg/nuclide-related-files/lib/JumpToRelatedFile.js b/pkg/nuclide-related-files/lib/JumpToRelatedFile.js | |
index 6145c97..787442a 100644 | |
--- a/pkg/nuclide-related-files/lib/JumpToRelatedFile.js | |
+++ b/pkg/nuclide-related-files/lib/JumpToRelatedFile.js | |
@@ -81,8 +81,7 @@ export default class JumpToRelatedFile { | |
if (index === -1) { | |
return path; | |
} | |
- return relatedFiles[(relatedFiles.length + index - 1) % | |
- relatedFiles.length]; | |
+ return relatedFiles[relatedFiles.length + index - 1 % relatedFiles.length]; | |
} | |
/** | |
@@ -97,7 +96,7 @@ export default class JumpToRelatedFile { | |
if (index === -1) { | |
return path; | |
} | |
- return relatedFiles[(index + 1) % relatedFiles.length]; | |
+ return relatedFiles[index + 1 % relatedFiles.length]; | |
} | |
_getFileTypeWhitelist(): Set<string> { | |
diff --git a/pkg/nuclide-related-files/lib/RelatedFileFinder.js b/pkg/nuclide-related-files/lib/RelatedFileFinder.js | |
index c50fbe0..bd3bfa5 100644 | |
--- a/pkg/nuclide-related-files/lib/RelatedFileFinder.js | |
+++ b/pkg/nuclide-related-files/lib/RelatedFileFinder.js | |
@@ -50,7 +50,8 @@ export default class RelatedFileFinder { | |
// $FlowFixMe stats may be null | |
return otherFilePath.stats.isFile() && | |
!otherFilePath.file.endsWith('~') && | |
- getPrefix(otherFilePath.file) === prefix; | |
+ getPrefix(otherFilePath.file) === | |
+ prefix; | |
}); | |
let wlFilelist = fileTypeWhitelist.size <= 0 | |
? filelist | |
diff --git a/pkg/nuclide-related-files/lib/main.js b/pkg/nuclide-related-files/lib/main.js | |
index 7496aed..ed906bd 100644 | |
--- a/pkg/nuclide-related-files/lib/main.js | |
+++ b/pkg/nuclide-related-files/lib/main.js | |
@@ -33,7 +33,8 @@ export function activate() { | |
command: 'nuclide-related-files:jump-to-next-related-file', | |
shouldDisplay() { | |
const editor = atom.workspace.getActiveTextEditor(); | |
- return editor != null && | |
+ return editor != | |
+ null && | |
GRAMMARS_WITH_HEADER_FILES.has(editor.getGrammar().scopeName); | |
}, | |
}, | |
diff --git a/pkg/nuclide-remote-connection/lib/NuclideTextBuffer.js b/pkg/nuclide-remote-connection/lib/NuclideTextBuffer.js | |
index ed1033b..8a2820f 100644 | |
--- a/pkg/nuclide-remote-connection/lib/NuclideTextBuffer.js | |
+++ b/pkg/nuclide-remote-connection/lib/NuclideTextBuffer.js | |
@@ -177,8 +177,10 @@ export default class NuclideTextBuffer extends TextBuffer { | |
// TODO(hansonw): Remove after https://github.com/atom/text-buffer/issues/153 is resolved. | |
setTextViaDiff(newText: string): void { | |
if ( | |
- this.getLineCount() > DIFF_LINE_LIMIT || | |
- countOccurrences(newText, '\n') > DIFF_LINE_LIMIT | |
+ this.getLineCount() > | |
+ DIFF_LINE_LIMIT || | |
+ countOccurrences(newText, '\n') > | |
+ DIFF_LINE_LIMIT | |
) { | |
this.setText(newText); | |
} else { | |
@@ -211,9 +213,12 @@ export default class NuclideTextBuffer extends TextBuffer { | |
// write promise comes back. | |
// Otherwise, what we wrote and what we read should match exactly. | |
if ( | |
- this._saveID !== previousSaveID || | |
- previousContents === this.cachedDiskContents || | |
- this._pendingSaveContents === this.cachedDiskContents | |
+ this._saveID !== | |
+ previousSaveID || | |
+ previousContents === | |
+ this.cachedDiskContents || | |
+ this._pendingSaveContents === | |
+ this.cachedDiskContents | |
) { | |
this.conflict = false; | |
return; | |
diff --git a/pkg/nuclide-remote-connection/lib/RemoteConnectionConfigurationManager.js b/pkg/nuclide-remote-connection/lib/RemoteConnectionConfigurationManager.js | |
index fa624ba..f63c5bb 100644 | |
--- a/pkg/nuclide-remote-connection/lib/RemoteConnectionConfigurationManager.js | |
+++ b/pkg/nuclide-remote-connection/lib/RemoteConnectionConfigurationManager.js | |
@@ -35,8 +35,12 @@ type SerializableServerConnectionConfiguration = { | |
// Insecure configs are used for testing only. | |
function isInsecure(config: ServerConnectionConfiguration): boolean { | |
- return config.clientKey == null && config.clientCertificate == null && | |
- config.certificateAuthorityCertificate == null; | |
+ return config.clientKey == | |
+ null && | |
+ config.clientCertificate == | |
+ null && | |
+ config.certificateAuthorityCertificate == | |
+ null; | |
} | |
function getStorageKey(host: string): string { | |
diff --git a/pkg/nuclide-remote-connection/lib/SshHandshake.js b/pkg/nuclide-remote-connection/lib/SshHandshake.js | |
index 23944cf..b103c2b 100644 | |
--- a/pkg/nuclide-remote-connection/lib/SshHandshake.js | |
+++ b/pkg/nuclide-remote-connection/lib/SshHandshake.js | |
@@ -190,8 +190,10 @@ export class SshHandshake { | |
const errorLevel = ((error: Object).level: SshConnectionErrorLevel); | |
// Upon authentication failure, fall back to using a password. | |
if ( | |
- errorLevel === 'client-authentication' && | |
- this._passwordRetryCount < PASSWORD_RETRIES | |
+ errorLevel === | |
+ 'client-authentication' && | |
+ this._passwordRetryCount < | |
+ PASSWORD_RETRIES | |
) { | |
const config = this._config; | |
const retryText = this._passwordRetryCount ? ' again' : ''; | |
@@ -251,13 +253,13 @@ export class SshHandshake { | |
); | |
} | |
- const connection = (await RemoteConnection.createConnectionBySavedConfig( | |
+ const connection = // We save connections by their IP address as well, in case a different hostname | |
+ // was used for the same server. | |
+ (await RemoteConnection.createConnectionBySavedConfig( | |
this._config.host, | |
this._config.cwd, | |
this._config.displayTitle, | |
)) || | |
- // We save connections by their IP address as well, in case a different hostname | |
- // was used for the same server. | |
(await RemoteConnection.createConnectionBySavedConfig( | |
address, | |
this._config.cwd, | |
@@ -390,7 +392,8 @@ export class SshHandshake { | |
_isSecure(): boolean { | |
return Boolean( | |
- this._certificateAuthorityCertificate && this._clientCertificate && | |
+ this._certificateAuthorityCertificate && | |
+ this._clientCertificate && | |
this._clientKey, | |
); | |
} | |
diff --git a/pkg/nuclide-remote-projects/lib/ConnectionDetailsPrompt.js b/pkg/nuclide-remote-projects/lib/ConnectionDetailsPrompt.js | |
index a391586..aac2702 100644 | |
--- a/pkg/nuclide-remote-projects/lib/ConnectionDetailsPrompt.js | |
+++ b/pkg/nuclide-remote-projects/lib/ConnectionDetailsPrompt.js | |
@@ -79,11 +79,12 @@ export default class ConnectionDetailsPrompt extends React.Component { | |
if ( | |
prevProps.indexOfSelectedConnectionProfile !== | |
this.props.indexOfSelectedConnectionProfile || | |
- // If the connection profiles changed length, the effective selected profile also changed. | |
- prevProps.connectionProfiles != null && | |
- this.props.connectionProfiles != null && | |
- prevProps.connectionProfiles.length !== | |
- this.props.connectionProfiles.length | |
+ prevProps.connectionProfiles != | |
+ null && | |
+ this.props.connectionProfiles != | |
+ null && | |
+ prevProps.connectionProfiles.length !== | |
+ this.props.connectionProfiles.length | |
) { | |
const existingConnectionDetailsForm = this.refs['connection-details-form']; | |
if (existingConnectionDetailsForm) { | |
@@ -113,9 +114,12 @@ export default class ConnectionDetailsPrompt extends React.Component { | |
// If there are profiles, pre-fill the form with the information from the specified selected | |
// profile. | |
if ( | |
- this.props.connectionProfiles != null && | |
- this.props.connectionProfiles.length > 0 && | |
- this.props.indexOfSelectedConnectionProfile != null | |
+ this.props.connectionProfiles != | |
+ null && | |
+ this.props.connectionProfiles.length > | |
+ 0 && | |
+ this.props.indexOfSelectedConnectionProfile != | |
+ null | |
) { | |
const selectedProfile = this.props.connectionProfiles[this.props.indexOfSelectedConnectionProfile]; | |
return selectedProfile.params; | |
diff --git a/pkg/nuclide-remote-projects/lib/ConnectionDialog.js b/pkg/nuclide-remote-projects/lib/ConnectionDialog.js | |
index 749e1f0..5e368fa 100644 | |
--- a/pkg/nuclide-remote-projects/lib/ConnectionDialog.js | |
+++ b/pkg/nuclide-remote-projects/lib/ConnectionDialog.js | |
@@ -162,7 +162,12 @@ export default class ConnectionDialog extends React.Component { | |
// The next profiles list is longer than before, a new one was added | |
// The current selection is outside the bounds of the next profiles list | |
this.props.connectionProfiles == | |
- null || indexOfSelectedConnectionProfile > nextProps.connectionProfiles.length - 1 || nextProps.connectionProfiles.length > this.props.connectionProfiles.length | |
+ null || | |
+ indexOfSelectedConnectionProfile > | |
+ nextProps.connectionProfiles.length - | |
+ 1 || | |
+ nextProps.connectionProfiles.length > | |
+ this.props.connectionProfiles.length | |
) { | |
// Select the final connection profile in the list because one of the above conditions means | |
// the current selected index is outdated. | |
@@ -177,9 +182,10 @@ export default class ConnectionDialog extends React.Component { | |
if (this.state.mode !== prevState.mode) { | |
this._focus(); | |
} else if ( | |
- this.state.mode === REQUEST_CONNECTION_DETAILS && | |
+ this.state.mode === | |
+ REQUEST_CONNECTION_DETAILS && | |
this.state.indexOfSelectedConnectionProfile === | |
- prevState.indexOfSelectedConnectionProfile && | |
+ prevState.indexOfSelectedConnectionProfile && | |
!this.state.isDirty && | |
prevState.isDirty | |
) { | |
@@ -219,8 +225,10 @@ export default class ConnectionDialog extends React.Component { | |
} | |
invariant( | |
- validationResult.validatedProfile != null && | |
- typeof validationResult.validatedProfile === 'object', | |
+ validationResult.validatedProfile != | |
+ null && | |
+ typeof validationResult.validatedProfile === | |
+ 'object', | |
); | |
// Save the validated profile, and show any warning messages. | |
const newProfile = validationResult.validatedProfile; | |
@@ -285,8 +293,10 @@ export default class ConnectionDialog extends React.Component { | |
let saveButtonGroup; | |
let selectedProfile; | |
if ( | |
- this.state.indexOfSelectedConnectionProfile >= 0 && | |
- this.props.connectionProfiles != null | |
+ this.state.indexOfSelectedConnectionProfile >= | |
+ 0 && | |
+ this.props.connectionProfiles != | |
+ null | |
) { | |
selectedProfile = this.props.connectionProfiles[this.state.indexOfSelectedConnectionProfile]; | |
} | |
diff --git a/pkg/nuclide-remote-projects/lib/CreateConnectionProfileForm.js b/pkg/nuclide-remote-projects/lib/CreateConnectionProfileForm.js | |
index 79b50e5..3fa7b9e 100644 | |
--- a/pkg/nuclide-remote-projects/lib/CreateConnectionProfileForm.js | |
+++ b/pkg/nuclide-remote-projects/lib/CreateConnectionProfileForm.js | |
@@ -132,8 +132,10 @@ export default class CreateConnectionProfileForm extends React.Component<void, P | |
return; | |
} | |
invariant( | |
- validationResult.validatedProfile != null && | |
- typeof validationResult.validatedProfile === 'object', | |
+ validationResult.validatedProfile != | |
+ null && | |
+ typeof validationResult.validatedProfile === | |
+ 'object', | |
); | |
const newProfile = validationResult.validatedProfile; | |
// Save the validated profile, and show any warning messages. | |
diff --git a/pkg/nuclide-remote-projects/lib/connection-profile-utils.js b/pkg/nuclide-remote-projects/lib/connection-profile-utils.js | |
index 38a80c9..a23c1e9 100644 | |
--- a/pkg/nuclide-remote-projects/lib/connection-profile-utils.js | |
+++ b/pkg/nuclide-remote-projects/lib/connection-profile-utils.js | |
@@ -63,7 +63,8 @@ export function getDefaultConnectionProfile( | |
// change (upgrade) in the official remote server command. | |
let remoteServerCommand = currentOfficialRSC; | |
if ( | |
- lastOfficialRemoteServerCommand === currentOfficialRSC && | |
+ lastOfficialRemoteServerCommand === | |
+ currentOfficialRSC && | |
lastConfig.remoteServerCommand | |
) { | |
remoteServerCommand = lastConfig.remoteServerCommand; | |
diff --git a/pkg/nuclide-remote-projects/lib/connection-types.js b/pkg/nuclide-remote-projects/lib/connection-types.js | |
index 13b3023..69d8860 100644 | |
--- a/pkg/nuclide-remote-projects/lib/connection-types.js | |
+++ b/pkg/nuclide-remote-projects/lib/connection-types.js | |
@@ -10,8 +10,7 @@ | |
import type {SshHandshake} from '../../nuclide-remote-connection'; | |
-export type NuclideRemoteAuthMethods = /* $FlowFixMe: Flow can't find the PASSWORD property on SupportedMethods.*/ | |
- | |
+export type NuclideRemoteAuthMethods /* $FlowFixMe: Flow can't find the PASSWORD property on SupportedMethods.*/ = | |
| SshHandshake.SupportedMethods.PASSWORD | |
| /* $FlowFixMe: Flow can't find the SSL_AGENT property on SupportedMethods.*/ | |
SshHandshake.SupportedMethods.SSL_AGENT | |
diff --git a/pkg/nuclide-remote-projects/lib/form-validation-utils.js b/pkg/nuclide-remote-projects/lib/form-validation-utils.js | |
index 841dc31..9f54590 100644 | |
--- a/pkg/nuclide-remote-projects/lib/form-validation-utils.js | |
+++ b/pkg/nuclide-remote-projects/lib/form-validation-utils.js | |
@@ -76,7 +76,8 @@ export function validateFormInputs( | |
profileParams.authMethod = authMethod; | |
} | |
if ( | |
- authMethod === SshHandshake.SupportedMethods.PRIVATE_KEY && | |
+ authMethod === | |
+ SshHandshake.SupportedMethods.PRIVATE_KEY && | |
!connectionDetails.pathToPrivateKey | |
) { | |
missingFields.push( | |
@@ -99,7 +100,8 @@ export function validateFormInputs( | |
// 1. If a password is provided, all parts of the profile will be save except the password. | |
if ( | |
- authMethod === SshHandshake.SupportedMethods.PASSWORD && | |
+ authMethod === | |
+ SshHandshake.SupportedMethods.PASSWORD && | |
connectionDetails.password | |
) { | |
warningMessage += '* You provided a password for this profile. ' + | |
@@ -109,7 +111,8 @@ export function validateFormInputs( | |
// 2. Save the remote server command only if it is changed. | |
if ( | |
connectionDetails.remoteServerCommand && | |
- connectionDetails.remoteServerCommand !== defaultRemoteServerCommand | |
+ connectionDetails.remoteServerCommand !== | |
+ defaultRemoteServerCommand | |
) { | |
profileParams.remoteServerCommand = connectionDetails.remoteServerCommand; | |
} else { | |
diff --git a/pkg/nuclide-remote-projects/lib/main.js b/pkg/nuclide-remote-projects/lib/main.js | |
index b005be1..35ccd2c 100644 | |
--- a/pkg/nuclide-remote-projects/lib/main.js | |
+++ b/pkg/nuclide-remote-projects/lib/main.js | |
@@ -167,7 +167,8 @@ function addRemoteFolderToProject(connection: RemoteConnection) { | |
} | |
const choice = atom.confirm({ | |
- message: "No more remote projects on the host: '" + hostname + | |
+ message: "No more remote projects on the host: '" + | |
+ hostname + | |
"'. Would you like to shutdown Nuclide server there?", | |
buttons, | |
}); | |
@@ -342,8 +343,10 @@ async function reloadRemoteProjects( | |
// we should still be able to restore this using the new connection. | |
const {cwd, host, displayTitle} = config; | |
if ( | |
- connection.getPathForInitialWorkingDirectory() !== cwd && | |
- connection.getRemoteHostname() === host | |
+ connection.getPathForInitialWorkingDirectory() !== | |
+ cwd && | |
+ connection.getRemoteHostname() === | |
+ host | |
) { | |
// eslint-disable-next-line no-await-in-loop | |
const subConnection = await RemoteConnection.createConnectionBySavedConfig( | |
@@ -471,8 +474,10 @@ export function activate( | |
// On Atom restart, it tries to open the uri path as a file tab because it's not a local | |
// directory. We can't let that create a file with the initial working directory path. | |
if ( | |
- connection != null && | |
- uri === connection.getUriForInitialWorkingDirectory() | |
+ connection != | |
+ null && | |
+ uri === | |
+ connection.getUriForInitialWorkingDirectory() | |
) { | |
const blankEditor = atom.workspace.buildTextEditor({}); | |
// No matter what we do here, Atom is going to create a blank editor. | |
diff --git a/pkg/nuclide-remote-projects/lib/notification.js b/pkg/nuclide-remote-projects/lib/notification.js | |
index 142f025..e22832f 100644 | |
--- a/pkg/nuclide-remote-projects/lib/notification.js | |
+++ b/pkg/nuclide-remote-projects/lib/notification.js | |
@@ -57,7 +57,8 @@ export function notifySshHandshakeError( | |
switch (errorType) { | |
case SshHandshake.ErrorType.HOST_NOT_FOUND: | |
message = `Can't resolve IP address for host ${config.host}.`; | |
- detail = 'Troubleshooting:\n' + ' 1. Check your network connection.\n' + | |
+ detail = 'Troubleshooting:\n' + | |
+ ' 1. Check your network connection.\n' + | |
` 2. Make sure the hostname ${config.host} is valid.\n`; | |
break; | |
case SshHandshake.ErrorType.CANT_READ_PRIVATE_KEY: | |
@@ -68,7 +69,8 @@ export function notifySshHandshakeError( | |
break; | |
case SshHandshake.ErrorType.SSH_CONNECT_TIMEOUT: | |
message = `Timeout while connecting to ${config.host}.`; | |
- detail = 'Troubleshooting:\n' + ' 1. Check your network connection.\n' + | |
+ detail = 'Troubleshooting:\n' + | |
+ ' 1. Check your network connection.\n' + | |
' 2. Input correct 2Fac passcode when prompted.'; | |
break; | |
case SshHandshake.ErrorType.SFTP_TIMEOUT: | |
@@ -81,7 +83,8 @@ export function notifySshHandshakeError( | |
break; | |
case SshHandshake.ErrorType.SSH_CONNECT_FAILED: | |
message = `Failed to connect to ${config.host}:${config.sshPort}.`; | |
- detail = 'Troubleshooting:\n' + ' 1. Check your network connection.\n' + | |
+ detail = 'Troubleshooting:\n' + | |
+ ' 1. Check your network connection.\n' + | |
` 2. Make sure the host ${config.host} is running and has` + | |
` ssh server running on ${config.sshPort}.\n\n` + | |
originalErrorDetail; | |
diff --git a/pkg/nuclide-remote-projects/lib/utils.js b/pkg/nuclide-remote-projects/lib/utils.js | |
index 69119e5..2d9c1f4 100644 | |
--- a/pkg/nuclide-remote-projects/lib/utils.js | |
+++ b/pkg/nuclide-remote-projects/lib/utils.js | |
@@ -44,16 +44,18 @@ export function sanitizeNuclideUri(uri_: string): string { | |
if ( | |
uri.startsWith(NUCLIDE_PROTOCOL_PREFIX) && | |
uri[NUCLIDE_PROTOCOL_PREFIX_LENGTH] !== | |
- '/' /* protocol missing last slash */ | |
+ '/' /* protocol missing last slash */ | |
) { | |
- uri = uri.substring(0, NUCLIDE_PROTOCOL_PREFIX_LENGTH) + '/' + | |
+ uri = uri.substring(0, NUCLIDE_PROTOCOL_PREFIX_LENGTH) + | |
+ '/' + | |
uri.substring(NUCLIDE_PROTOCOL_PREFIX_LENGTH); | |
} | |
// On Windows path normalization converts all of the '/' chars to '\' | |
// we need to revert that | |
if (uri.startsWith(NUCLIDE_PROTOCOL_PREFIX_WIN)) { | |
- uri = NUCLIDE_PROTOCOL_PREFIX + '/' + | |
+ uri = NUCLIDE_PROTOCOL_PREFIX + | |
+ '/' + | |
uri.substring(NUCLIDE_PROTOCOL_PREFIX_LENGTH).replace(/\\/g, '/'); | |
} | |
return uri; | |
diff --git a/pkg/nuclide-rpc/lib/DefinitionValidator.js b/pkg/nuclide-rpc/lib/DefinitionValidator.js | |
index f19a776..83f2503 100644 | |
--- a/pkg/nuclide-rpc/lib/DefinitionValidator.js | |
+++ b/pkg/nuclide-rpc/lib/DefinitionValidator.js | |
@@ -352,14 +352,20 @@ export function validateDefinitions(definitions: Definitions): void { | |
// Ensure no duplicates | |
previousAlternates.forEach(previous => { | |
invariant( | |
- previous.kind === 'string-literal' || | |
- previous.kind === 'number-literal' || | |
- previous.kind === 'boolean-literal', | |
+ previous.kind === | |
+ 'string-literal' || | |
+ previous.kind === | |
+ 'number-literal' || | |
+ previous.kind === | |
+ 'boolean-literal', | |
); | |
invariant( | |
- alternate.kind === 'string-literal' || | |
- alternate.kind === 'number-literal' || | |
- alternate.kind === 'boolean-literal', | |
+ alternate.kind === | |
+ 'string-literal' || | |
+ alternate.kind === | |
+ 'number-literal' || | |
+ alternate.kind === | |
+ 'boolean-literal', | |
); | |
if (previous.value === alternate.value) { | |
throw errorLocations( | |
diff --git a/pkg/nuclide-rpc/lib/ServiceRegistry.js b/pkg/nuclide-rpc/lib/ServiceRegistry.js | |
index 7c430ca..4e8b4ed 100644 | |
--- a/pkg/nuclide-rpc/lib/ServiceRegistry.js | |
+++ b/pkg/nuclide-rpc/lib/ServiceRegistry.js | |
@@ -81,7 +81,8 @@ export class ServiceRegistry { | |
} | |
addService(service: ConfigEntry): void { | |
- const preserveFunctionNames = service.preserveFunctionNames != null && | |
+ const preserveFunctionNames = service.preserveFunctionNames != | |
+ null && | |
service.preserveFunctionNames; | |
try { | |
const factory = createProxyFactory( | |
diff --git a/pkg/nuclide-rpc/lib/TypeRegistry.js b/pkg/nuclide-rpc/lib/TypeRegistry.js | |
index 5eb65b2..0c3c792 100644 | |
--- a/pkg/nuclide-rpc/lib/TypeRegistry.js | |
+++ b/pkg/nuclide-rpc/lib/TypeRegistry.js | |
@@ -71,8 +71,12 @@ function checkedSmartPromiseAll( | |
} | |
function canBeUndefined(type: Type): boolean { | |
- return type.kind === 'nullable' || type.kind === 'mixed' || | |
- type.kind === 'any'; | |
+ return type.kind === | |
+ 'nullable' || | |
+ type.kind === | |
+ 'mixed' || | |
+ type.kind === | |
+ 'any'; | |
} | |
function statsToObject(stats: fs.Stats): Object { | |
@@ -427,8 +431,12 @@ export class TypeRegistry { | |
_registerLiterals(): void { | |
const literalTransformer = (arg, type) => { | |
invariant( | |
- type.kind === 'string-literal' || type.kind === 'number-literal' || | |
- type.kind === 'boolean-literal', | |
+ type.kind === | |
+ 'string-literal' || | |
+ type.kind === | |
+ 'number-literal' || | |
+ type.kind === | |
+ 'boolean-literal', | |
); | |
invariant(arg === type.value); | |
return arg; | |
@@ -455,9 +463,12 @@ export class TypeRegistry { | |
invariant(type.kind === 'union'); | |
const alternate = type.types.find(element => { | |
invariant( | |
- element.kind === 'string-literal' || | |
- element.kind === 'number-literal' || | |
- element.kind === 'boolean-literal', | |
+ element.kind === | |
+ 'string-literal' || | |
+ element.kind === | |
+ 'number-literal' || | |
+ element.kind === | |
+ 'boolean-literal', | |
); | |
return arg === element.value; | |
}); | |
@@ -862,9 +873,12 @@ function findAlternate(arg: Object, type: UnionType): ObjectType { | |
discriminantField, | |
).type; | |
invariant( | |
- alternateType.kind === 'string-literal' || | |
- alternateType.kind === 'number-literal' || | |
- alternateType.kind === 'boolean-literal', | |
+ alternateType.kind === | |
+ 'string-literal' || | |
+ alternateType.kind === | |
+ 'number-literal' || | |
+ alternateType.kind === | |
+ 'boolean-literal', | |
); | |
return alternateType.value === discriminant; | |
}); | |
diff --git a/pkg/nuclide-rpc/lib/proxy-generator.js b/pkg/nuclide-rpc/lib/proxy-generator.js | |
index 03505da..61039f2 100644 | |
--- a/pkg/nuclide-rpc/lib/proxy-generator.js | |
+++ b/pkg/nuclide-rpc/lib/proxy-generator.js | |
@@ -90,7 +90,6 @@ const marshalArgsCall = params => | |
// objectToLiteral(params), | |
// ]); | |
// Generates `Object.defineProperty(module.exports, name, {value: …})` | |
- | |
const objectDefinePropertyCall = (name, value) => | |
t.callExpression( | |
t.memberExpression(t.identifier('Object'), t.identifier('defineProperty')), | |
@@ -465,10 +464,10 @@ function objectToLiteral(obj: any): any { | |
return t.arrayExpression(obj.map(elem => objectToLiteral(elem))); | |
} else if (obj instanceof Map) { | |
return t.newExpression( | |
- t.identifier('Map'), | |
// new Map([...]) | |
- obj.size ? // new Map() | |
- [objectToLiteral(Array.from(obj.entries()))] : [], | |
+ t.identifier('Map'), | |
+ // new Map() | |
+ obj.size ? [objectToLiteral(Array.from(obj.entries()))] : [], | |
); | |
} else if (typeof obj === 'object') { | |
// {a: 1, b: 2} | |
diff --git a/pkg/nuclide-rpc/lib/service-parser.js b/pkg/nuclide-rpc/lib/service-parser.js | |
index b583ed9..78a7a15 100644 | |
--- a/pkg/nuclide-rpc/lib/service-parser.js | |
+++ b/pkg/nuclide-rpc/lib/service-parser.js | |
@@ -281,8 +281,10 @@ class FileParser { | |
); | |
this._assert( | |
declaration, | |
- declaration.returnType != null && | |
- declaration.returnType.type === 'TypeAnnotation', | |
+ declaration.returnType != | |
+ null && | |
+ declaration.returnType.type === | |
+ 'TypeAnnotation', | |
'Remote functions must be annotated with a return type.', | |
); | |
@@ -691,8 +693,10 @@ class FileParser { | |
case 'Map': | |
this._assert( | |
typeAnnotation, | |
- typeAnnotation.typeParameters != null && | |
- typeAnnotation.typeParameters.params.length === 2, | |
+ typeAnnotation.typeParameters != | |
+ null && | |
+ typeAnnotation.typeParameters.params.length === | |
+ 2, | |
`${id} takes exactly two type parameters.`, | |
); | |
return { | |
@@ -737,8 +741,10 @@ class FileParser { | |
): Type { | |
this._assert( | |
typeAnnotation, | |
- typeAnnotation.typeParameters != null && | |
- typeAnnotation.typeParameters.params.length === 1, | |
+ typeAnnotation.typeParameters != | |
+ null && | |
+ typeAnnotation.typeParameters.params.length === | |
+ 1, | |
`${id} has exactly one type parameter.`, | |
); | |
return this._parseTypeAnnotation(typeAnnotation.typeParameters.params[0]); | |
@@ -762,6 +768,10 @@ class FileParser { | |
} | |
function isValidDisposeReturnType(type: Type): boolean { | |
- return type.kind === 'void' || | |
- type.kind === 'promise' && type.type.kind === 'void'; | |
+ return type.kind === | |
+ 'void' || | |
+ type.kind === | |
+ 'promise' && | |
+ type.type.kind === | |
+ 'void'; | |
} | |
diff --git a/pkg/nuclide-rpc/spec/TypeRegistry-spec.js b/pkg/nuclide-rpc/spec/TypeRegistry-spec.js | |
index f0067fa..b1dc34f 100644 | |
--- a/pkg/nuclide-rpc/spec/TypeRegistry-spec.js | |
+++ b/pkg/nuclide-rpc/spec/TypeRegistry-spec.js | |
@@ -592,7 +592,7 @@ describe('TypeRegistry', () => { | |
}); | |
const mem = process.memoryUsage().heapUsed - heapUsed; | |
// eslint-disable-next-line no-console | |
- console.log('time taken: %d seconds', (Date.now() - startTime) / 1000); | |
+ console.log('time taken: %d seconds', Date.now() - startTime / 1000); | |
// eslint-disable-next-line no-console | |
console.log('memory used: %d', mem); | |
diff --git a/pkg/nuclide-server/lib/NuclideSocket.js b/pkg/nuclide-server/lib/NuclideSocket.js | |
index f2471bf..bd55629 100644 | |
--- a/pkg/nuclide-server/lib/NuclideSocket.js | |
+++ b/pkg/nuclide-server/lib/NuclideSocket.js | |
@@ -104,8 +104,10 @@ export class NuclideSocket { | |
} | |
isDisconnected(): boolean { | |
- return this._transport != null && | |
- this._transport.getState() === 'disconnected'; | |
+ return this._transport != | |
+ null && | |
+ this._transport.getState() === | |
+ 'disconnected'; | |
} | |
waitForConnect(): Promise<void> { | |
diff --git a/pkg/nuclide-server/lib/WebSocketTransport.js b/pkg/nuclide-server/lib/WebSocketTransport.js | |
index 0d87c9d..cfaa468 100644 | |
--- a/pkg/nuclide-server/lib/WebSocketTransport.js | |
+++ b/pkg/nuclide-server/lib/WebSocketTransport.js | |
@@ -48,8 +48,10 @@ export class WebSocketTransport { | |
this._emitter = new Emitter(); | |
this._socket = socket; | |
this._messages = new Subject(); | |
- this._syncCompression = options == null || | |
- options.syncCompression !== false; | |
+ this._syncCompression = options == | |
+ null || | |
+ options.syncCompression !== | |
+ false; | |
logger.info('Client #%s connecting with a new socket!', this.id); | |
socket.on('message', (data, flags) => { | |
diff --git a/pkg/nuclide-server/lib/XhrConnectionHeartbeat.js b/pkg/nuclide-server/lib/XhrConnectionHeartbeat.js | |
index 29f1bb5..824f5f3 100644 | |
--- a/pkg/nuclide-server/lib/XhrConnectionHeartbeat.js | |
+++ b/pkg/nuclide-server/lib/XhrConnectionHeartbeat.js | |
@@ -65,8 +65,11 @@ export class XhrConnectionHeartbeat { | |
const now = Date.now(); | |
this._lastHeartbeatTime = this._lastHeartbeatTime || now; | |
if ( | |
- this._lastHeartbeat === 'away' || | |
- now - this._lastHeartbeatTime > MAX_HEARTBEAT_AWAY_RECONNECT_MS | |
+ this._lastHeartbeat === | |
+ 'away' || | |
+ now - | |
+ this._lastHeartbeatTime > | |
+ MAX_HEARTBEAT_AWAY_RECONNECT_MS | |
) { | |
// Trigger a websocket reconnect. | |
this._emitter.emit('reconnect'); | |
diff --git a/pkg/nuclide-server/lib/utils.js b/pkg/nuclide-server/lib/utils.js | |
index 8347d03..70ac79b 100644 | |
--- a/pkg/nuclide-server/lib/utils.js | |
+++ b/pkg/nuclide-server/lib/utils.js | |
@@ -13,7 +13,7 @@ import invariant from 'assert'; | |
import url from 'url'; | |
import request from 'request'; | |
-const MAX_REQUEST_LENGTH = 1e6; | |
+const MAX_REQUEST_LENGTH = 1000000; | |
type HttpResponse = {statusCode: number}; | |
export type ResponseBody = {body: string, response: HttpResponse}; | |
diff --git a/pkg/nuclide-server/spec/utils-spec.js b/pkg/nuclide-server/spec/utils-spec.js | |
index b359e5a..f58224d 100644 | |
--- a/pkg/nuclide-server/spec/utils-spec.js | |
+++ b/pkg/nuclide-server/spec/utils-spec.js | |
@@ -97,7 +97,8 @@ describe('NuclideServer utils test', () => { | |
it('deserializes objects', () => { | |
const escapedObj = querystring.escape(JSON.stringify({def: 'lol'})); | |
- const url = 'http://localhost:8090/?args=' + escapedObj + | |
+ const url = 'http://localhost:8090/?args=' + | |
+ escapedObj + | |
'&argTypes=object'; | |
const [obj] = utils.deserializeArgs(url); | |
expect(obj).toEqual({def: 'lol'}); | |
diff --git a/pkg/nuclide-settings/lib/SettingsCategory.js b/pkg/nuclide-settings/lib/SettingsCategory.js | |
index 06f3fc2..8854317 100644 | |
--- a/pkg/nuclide-settings/lib/SettingsCategory.js | |
+++ b/pkg/nuclide-settings/lib/SettingsCategory.js | |
@@ -51,7 +51,7 @@ export default class SettingsCategory extends React.Component { | |
<section className="section settings-panel"> | |
{} | |
<h1 className="block section-heading icon icon-gear"> | |
- {this.props.name} Settings | |
+ {this.props.name}Settings | |
</h1> | |
{children} | |
</section> | |
diff --git a/pkg/nuclide-settings/lib/SettingsControl.js b/pkg/nuclide-settings/lib/SettingsControl.js | |
index c163d93..bf27359 100644 | |
--- a/pkg/nuclide-settings/lib/SettingsControl.js | |
+++ b/pkg/nuclide-settings/lib/SettingsControl.js | |
@@ -82,8 +82,12 @@ export default function SettingsControl(props: Props): ?React.Element<any> { | |
} | |
function isBoolean(obj) { | |
- return obj === true || obj === false || | |
- toString.call(obj) === '[object Boolean]'; | |
+ return obj === | |
+ true || | |
+ obj === | |
+ false || | |
+ toString.call(obj) === | |
+ '[object Boolean]'; | |
} | |
function isNumber(obj) { | |
diff --git a/pkg/nuclide-settings/lib/SettingsPaneItem.js b/pkg/nuclide-settings/lib/SettingsPaneItem.js | |
index 42ea82a..5a538d6 100644 | |
--- a/pkg/nuclide-settings/lib/SettingsPaneItem.js | |
+++ b/pkg/nuclide-settings/lib/SettingsPaneItem.js | |
@@ -77,9 +77,11 @@ export default class NuclideSettingsPaneItem extends React.Component { | |
const {pathComponents} = nuclide.configMetadata; | |
const categoryName = pathComponents[0]; | |
const packageTitle = pathComponents[1] || pkgName; | |
- const categoryMatches = this.state == null || | |
+ const categoryMatches = this.state == | |
+ null || | |
matchesFilter(this.state.filter, categoryName); | |
- const packageMatches = this.state == null || | |
+ const packageMatches = this.state == | |
+ null || | |
matchesFilter(this.state.filter, packageTitle); | |
// Group packages according to their category. | |
@@ -97,7 +99,10 @@ export default class NuclideSettingsPaneItem extends React.Component { | |
const title = getTitle(schema, settingName); | |
const description = getDescription(schema); | |
if ( | |
- this.state == null || categoryMatches || packageMatches || | |
+ this.state == | |
+ null || | |
+ categoryMatches || | |
+ packageMatches || | |
matchesFilter(this.state.filter, title) || | |
matchesFilter(this.state.filter, description) | |
) { | |
diff --git a/pkg/nuclide-source-control-helpers/lib/hg-repository.js b/pkg/nuclide-source-control-helpers/lib/hg-repository.js | |
index 88e3975..066e11a 100644 | |
--- a/pkg/nuclide-source-control-helpers/lib/hg-repository.js | |
+++ b/pkg/nuclide-source-control-helpers/lib/hg-repository.js | |
@@ -34,8 +34,10 @@ export default function findHgRepository( | |
if (hgrc != null) { | |
const config = ini.parse(hgrc); | |
if ( | |
- typeof config.paths === 'object' && | |
- typeof config.paths.default === 'string' | |
+ typeof config.paths === | |
+ 'object' && | |
+ typeof config.paths.default === | |
+ 'string' | |
) { | |
originURL = config.paths.default; | |
} | |
diff --git a/pkg/nuclide-source-control-side-bar/lib/RepositorySectionComponent.js b/pkg/nuclide-source-control-side-bar/lib/RepositorySectionComponent.js | |
index 9f21abb..3344a7b 100644 | |
--- a/pkg/nuclide-source-control-side-bar/lib/RepositorySectionComponent.js | |
+++ b/pkg/nuclide-source-control-side-bar/lib/RepositorySectionComponent.js | |
@@ -151,14 +151,17 @@ export default class RepositorySectionComponent extends React.Component { | |
bookmarksBranchesListItems = repositoryBookmarks.map(bookmark => { | |
// If there is a list of "loading" bookmarks and this bookmark is in it, this bookmark | |
// is in the "loading" state. | |
- const isLoading = this.props.bookmarksIsLoading != null && | |
+ const isLoading = this.props.bookmarksIsLoading != | |
+ null && | |
this.props.bookmarksIsLoading.find( | |
loadingBookmark => bookmarkIsEqual(bookmark, loadingBookmark), | |
) != | |
- null; | |
+ null; | |
- const isSelected = selectedItem != null && | |
- selectedItem.type === 'bookmark' && | |
+ const isSelected = selectedItem != | |
+ null && | |
+ selectedItem.type === | |
+ 'bookmark' && | |
bookmarkIsEqual(bookmark, selectedItem.bookmark); | |
const liClassName = classnames( | |
'list-item nuclide-source-control-side-bar--list-item', | |
@@ -229,8 +232,12 @@ export default class RepositorySectionComponent extends React.Component { | |
repository.getPath(), | |
); | |
if ( | |
- repository != null && uncommittedChanges != null && | |
- uncommittedChanges.size > 0 | |
+ repository != | |
+ null && | |
+ uncommittedChanges != | |
+ null && | |
+ uncommittedChanges.size > | |
+ 0 | |
) { | |
uncommittedChangesSection = ( | |
<Section | |
diff --git a/pkg/nuclide-source-control-side-bar/lib/SideBarComponent.js b/pkg/nuclide-source-control-side-bar/lib/SideBarComponent.js | |
index cbd2376..dc95b97 100644 | |
--- a/pkg/nuclide-source-control-side-bar/lib/SideBarComponent.js | |
+++ b/pkg/nuclide-source-control-side-bar/lib/SideBarComponent.js | |
@@ -282,8 +282,10 @@ export default class SideBarComponent extends React.Component { | |
repository.getPath(), | |
); | |
if ( | |
- this.state.selectedItem != null && | |
- this.state.selectedItem.repository === repository | |
+ this.state.selectedItem != | |
+ null && | |
+ this.state.selectedItem.repository === | |
+ repository | |
) { | |
selectedItem = this.state.selectedItem; | |
} | |
diff --git a/pkg/nuclide-task-runner/lib/main.js b/pkg/nuclide-task-runner/lib/main.js | |
index 92e9d5a..e0cf872 100644 | |
--- a/pkg/nuclide-task-runner/lib/main.js | |
+++ b/pkg/nuclide-task-runner/lib/main.js | |
@@ -142,8 +142,10 @@ class Activation { | |
this._panelRenderer, | |
atom.commands.add('atom-workspace', { | |
'nuclide-task-runner:toggle-toolbar-visibility': event => { | |
- const visible = event.detail != null && | |
- typeof event.detail === 'object' | |
+ const visible = event.detail != | |
+ null && | |
+ typeof event.detail === | |
+ 'object' | |
? event.detail.visible | |
: undefined; | |
if (typeof visible === 'boolean') { | |
@@ -391,8 +393,10 @@ function trackTaskAction( | |
state: AppState, | |
): void { | |
const task = action.payload.task; | |
- const taskTrackingData = task != null && | |
- typeof task.getTrackingData === 'function' | |
+ const taskTrackingData = task != | |
+ null && | |
+ typeof task.getTrackingData === | |
+ 'function' | |
? task.getTrackingData() | |
: {}; | |
const error = action.type === Actions.TASK_ERRORED | |
diff --git a/pkg/nuclide-task-runner/lib/redux/Epics.js b/pkg/nuclide-task-runner/lib/redux/Epics.js | |
index b8eeaa0..157d455 100644 | |
--- a/pkg/nuclide-task-runner/lib/redux/Epics.js | |
+++ b/pkg/nuclide-task-runner/lib/redux/Epics.js | |
@@ -92,20 +92,18 @@ export function aggregateTaskListsEpic( | |
taskRunner.setProjectRoot(projectRoot); | |
} | |
return taskRunner.observeTaskList(cb); | |
- }) | |
- .takeUntil(diffs.filter(diff => diff.removed.has(taskRunnerId))) | |
- .map(taskList => { | |
- // Annotate each task with some info about its runner. | |
- const annotatedTaskList = taskList.map(task => ({ | |
- ...task, | |
- taskRunnerId, | |
- taskRunnerName: taskRunner.name, | |
- })); | |
- // Tag each task list with the id of its runner for adding to the map. | |
- return {taskRunnerId, taskList: annotatedTaskList}; | |
- }) | |
- .concat(Observable.of({taskRunnerId, taskList: null})) | |
- .publish(); | |
+ }).takeUntil( | |
+ diffs.filter(diff => diff.removed.has(taskRunnerId)), | |
+ ).map(taskList => { | |
+ // Annotate each task with some info about its runner. | |
+ const annotatedTaskList = taskList.map(task => ({ | |
+ ...task, | |
+ taskRunnerId, | |
+ taskRunnerName: taskRunner.name, | |
+ })); | |
+ // Tag each task list with the id of its runner for adding to the map. | |
+ return {taskRunnerId, taskList: annotatedTaskList}; | |
+ }).concat(Observable.of({taskRunnerId, taskList: null})).publish(); | |
// Use `Observable.create()` to make sure we only have one subscription to taskLists and | |
// that we don't miss any elements. | |
@@ -243,7 +241,8 @@ export function runTaskEpic( | |
return Observable.empty(); | |
} | |
- return // Stop listening once the task is done. | |
+ return; | |
+ // Stop listening once the task is done. | |
createTaskObservable( | |
activeTaskRunner, | |
taskMeta, | |
diff --git a/pkg/nuclide-task-runner/lib/redux/Reducers.js b/pkg/nuclide-task-runner/lib/redux/Reducers.js | |
index decf11b..03a1686 100644 | |
--- a/pkg/nuclide-task-runner/lib/redux/Reducers.js | |
+++ b/pkg/nuclide-task-runner/lib/redux/Reducers.js | |
@@ -142,8 +142,10 @@ function activeTaskIsValid(state: AppState): boolean { | |
for (const taskList of state.taskLists.values()) { | |
for (const taskMeta of taskList) { | |
if ( | |
- taskMeta.taskRunnerId === activeTaskId.taskRunnerId && | |
- taskMeta.type === activeTaskId.type && | |
+ taskMeta.taskRunnerId === | |
+ activeTaskId.taskRunnerId && | |
+ taskMeta.type === | |
+ activeTaskId.type && | |
!taskMeta.disabled | |
) { | |
return true; | |
@@ -194,7 +196,7 @@ function getInitialTaskMeta( | |
} | |
// Prefer tasks with higher priority. | |
- const priorityDiff = (taskMeta.priority || 0) - (candidate.priority || 0); | |
+ const priorityDiff = taskMeta.priority || 0 - (candidate.priority || 0); | |
if (priorityDiff !== 0) { | |
if (priorityDiff > 0) { | |
candidate = taskMeta; | |
diff --git a/pkg/nuclide-task-runner/lib/ui/CommonControls.js b/pkg/nuclide-task-runner/lib/ui/CommonControls.js | |
index 2b0bf7e..77d0c86 100644 | |
--- a/pkg/nuclide-task-runner/lib/ui/CommonControls.js | |
+++ b/pkg/nuclide-task-runner/lib/ui/CommonControls.js | |
@@ -31,7 +31,8 @@ type Props = { | |
}; | |
export function CommonControls(props: Props): React.Element<any> { | |
- const confirmDisabled = props.taskIsRunning || !props.activeTask || | |
+ const confirmDisabled = props.taskIsRunning || | |
+ !props.activeTask || | |
!props.activeTask.runnable; | |
const run = () => { | |
if (props.activeTask != null) { | |
@@ -112,8 +113,10 @@ export function CommonControls(props: Props): React.Element<any> { | |
size={ButtonSizes.SMALL} | |
icon="primitive-square" | |
disabled={ | |
- !props.taskIsRunning || !activeTask || | |
- activeTask.cancelable === false | |
+ !props.taskIsRunning || | |
+ !activeTask || | |
+ activeTask.cancelable === | |
+ false | |
} | |
onClick={props.stopTask} | |
/> | |
diff --git a/pkg/nuclide-task-runner/lib/ui/Toolbar.js b/pkg/nuclide-task-runner/lib/ui/Toolbar.js | |
index cfa6760..ed631d4 100644 | |
--- a/pkg/nuclide-task-runner/lib/ui/Toolbar.js | |
+++ b/pkg/nuclide-task-runner/lib/ui/Toolbar.js | |
@@ -113,15 +113,11 @@ export class Toolbar extends React.Component { | |
} | |
function Placeholder(): React.Element<any> { | |
- return /* Themes actually change the size of UI elements (sometimes even dynamically!) and can*/ | |
+ return; | |
+ /* Themes actually change the size of UI elements (sometimes even dynamically!) and can*/ | |
/* therefore change the size of the toolbar! To try to ensure that the placholder has the same*/ | |
/* height as the toolbar, we put a dummy button in it and hide it with CSS.*/ | |
- ( | |
- <Button | |
- className="nuclide-task-runner-placeholder" | |
- size={ButtonSizes.SMALL} | |
- > | |
- Seeing this button is a bug! | |
- </Button> | |
- ); | |
+ <Button className="nuclide-task-runner-placeholder" size={ButtonSizes.SMALL}> | |
+ Seeing this button is a bug! | |
+ </Button>; | |
} | |
diff --git a/pkg/nuclide-task-runner/spec/Epics-spec.js b/pkg/nuclide-task-runner/spec/Epics-spec.js | |
index 8001ebb..b283888 100644 | |
--- a/pkg/nuclide-task-runner/spec/Epics-spec.js | |
+++ b/pkg/nuclide-task-runner/spec/Epics-spec.js | |
@@ -285,7 +285,8 @@ function runActions( | |
const input = new Subject(); | |
const output = new ReplaySubject(); | |
const options = { | |
- visibilityTable: options_ && options_.visibilityTable || | |
+ visibilityTable: options_ && | |
+ options_.visibilityTable || | |
createMockVisibilityTable([]), | |
states: Observable.never(), | |
}; | |
diff --git a/pkg/nuclide-test-helpers/spec/matchers-spec.js b/pkg/nuclide-test-helpers/spec/matchers-spec.js | |
index ac23283..94fabd2 100644 | |
--- a/pkg/nuclide-test-helpers/spec/matchers-spec.js | |
+++ b/pkg/nuclide-test-helpers/spec/matchers-spec.js | |
@@ -34,7 +34,8 @@ describe('matchers', () => { | |
const match = {actual: {a: 1, b: 2}}; | |
const isMatch = diffJson.bind(match)({b: 2, c: 3}); | |
- const expected = chalk.gray('{\n') + chalk.green(' "a": 1,\n') + | |
+ const expected = chalk.gray('{\n') + | |
+ chalk.green(' "a": 1,\n') + | |
chalk.gray(' "b": 2,\n') + | |
chalk.red(' "c": 3\n') + | |
chalk.gray('}'); | |
@@ -62,7 +63,8 @@ describe('matchers', () => { | |
const match = {actual: 'line1\nline2\nline3'}; | |
const isMatch = diffLines.bind(match)('line1\nline3'); | |
- const expected = chalk.gray('line1\n') + chalk.green('line2\n') + | |
+ const expected = chalk.gray('line1\n') + | |
+ chalk.green('line2\n') + | |
chalk.gray('line3'); | |
expect(isMatch).toBe(false); | |
diff --git a/pkg/nuclide-test-runner/lib/TestRunnerController.js b/pkg/nuclide-test-runner/lib/TestRunnerController.js | |
index 024ec07..c81581c 100644 | |
--- a/pkg/nuclide-test-runner/lib/TestRunnerController.js | |
+++ b/pkg/nuclide-test-runner/lib/TestRunnerController.js | |
@@ -190,8 +190,10 @@ export class TestRunnerController { | |
return false; | |
} | |
const selectedTestRunner = this._testRunnerPanel.getSelectedTestRunner(); | |
- return selectedTestRunner != null && | |
- selectedTestRunner.attachDebugger != null; | |
+ return selectedTestRunner != | |
+ null && | |
+ selectedTestRunner.attachDebugger != | |
+ null; | |
} | |
async _isDebuggerAttached(debuggerProviderName: string): Promise<boolean> { | |
@@ -346,7 +348,8 @@ export class TestRunnerController { | |
let progressValue; | |
if ( | |
this._testSuiteModel && | |
- this._executionState === TestRunnerPanel.ExecutionState.RUNNING | |
+ this._executionState === | |
+ TestRunnerPanel.ExecutionState.RUNNING | |
) { | |
progressValue = this._testSuiteModel.progressPercent(); | |
} else { | |
diff --git a/pkg/nuclide-test-runner/lib/main.js b/pkg/nuclide-test-runner/lib/main.js | |
index 036a367..154ef8c 100644 | |
--- a/pkg/nuclide-test-runner/lib/main.js | |
+++ b/pkg/nuclide-test-runner/lib/main.js | |
@@ -30,7 +30,6 @@ const FILE_TREE_CONTEXT_MENU_PRIORITY = 200; | |
* > limitString('foobar', 4) | |
* 'fo…ar' | |
*/ | |
- | |
function limitString(str: string, length?: number = 20): string { | |
const strLength = str.length; | |
return strLength > length | |
@@ -152,8 +151,7 @@ class Activation { | |
} | |
this._testRunners.add( | |
testRunner, | |
- ); // Tell the controller to re-render only if it exists so test runner services won't force // construction if the panel is still invisible. | |
- // // TODO(rossallen): The control should be inverted here. The controller should listen for // changes rather than be told about them. | |
+ ); // Tell the controller to re-render only if it exists so test runner services won't force // construction if the panel is still invisible. // // TODO(rossallen): The control should be inverted here. The controller should listen for // changes rather than be told about them. | |
if (this._controller != null) { | |
this.getController().didUpdateTestRunners(); | |
} | |
@@ -233,8 +231,12 @@ class Activation { | |
// If the event did not happen on the `name` span, search for it in the descendants. | |
target = target.querySelector('.name'); | |
} // If no descendant has the necessary dataset to create this menu item, don't create // it. | |
- return target != null && target.dataset.name != null && | |
- target.dataset.path != null; | |
+ return target != | |
+ null && | |
+ target.dataset.name != | |
+ null && | |
+ target.dataset.path != | |
+ null; | |
}, | |
}; | |
} | |
diff --git a/pkg/nuclide-test-runner/lib/ui/TestRunnerPanel.js b/pkg/nuclide-test-runner/lib/ui/TestRunnerPanel.js | |
index c037087..5041dcf 100644 | |
--- a/pkg/nuclide-test-runner/lib/ui/TestRunnerPanel.js | |
+++ b/pkg/nuclide-test-runner/lib/ui/TestRunnerPanel.js | |
@@ -161,7 +161,7 @@ export default class TestRunnerPanel extends React.Component { | |
} else if (this.props.runDuration) { | |
runMsg = ( | |
<span className="inline-block"> | |
- Done (in {this.props.runDuration / 1000}s) | |
+ Done (in {this.props.runDuration / 1000}s) | |
</span> | |
); | |
} | |
@@ -230,7 +230,7 @@ export default class TestRunnerPanel extends React.Component { | |
disabled={ | |
this.isDisabled() || | |
this.props.executionState === | |
- TestRunnerPanel.ExecutionState.RUNNING | |
+ TestRunnerPanel.ExecutionState.RUNNING | |
} | |
onClick={this.props.onClickClear} | |
title="Clear Output" | |
diff --git a/pkg/nuclide-type-coverage/lib/StatusBarTileComponent.js b/pkg/nuclide-type-coverage/lib/StatusBarTileComponent.js | |
index e01fb18..cc9aefb 100644 | |
--- a/pkg/nuclide-type-coverage/lib/StatusBarTileComponent.js | |
+++ b/pkg/nuclide-type-coverage/lib/StatusBarTileComponent.js | |
@@ -41,8 +41,10 @@ export class StatusBarTileComponent extends React.Component { | |
if (featureConfig.get(COLOR_DISPLAY_SETTING)) { | |
colorClasses = { | |
'text-error': percentage <= REALLY_BAD_THRESHOLD, | |
- 'text-warning': percentage > REALLY_BAD_THRESHOLD && | |
- percentage <= NOT_GREAT_THRESHOLD, | |
+ 'text-warning': percentage > | |
+ REALLY_BAD_THRESHOLD && | |
+ percentage <= | |
+ NOT_GREAT_THRESHOLD, | |
// Nothing applied if percentage > NOT_GREAT_THRESHOLD, | |
'nuclide-type-coverage-status-bar-active': this.props.isActive, | |
}; | |
diff --git a/pkg/nuclide-type-hint/lib/TypeHintComponent.js b/pkg/nuclide-type-hint/lib/TypeHintComponent.js | |
index bec646d..6af0d15 100644 | |
--- a/pkg/nuclide-type-hint/lib/TypeHintComponent.js | |
+++ b/pkg/nuclide-type-hint/lib/TypeHintComponent.js | |
@@ -45,7 +45,8 @@ class TypeHintComponent extends React.Component { | |
} | |
renderPrimitive(value: string): React.Element<any> { | |
- const shouldTruncate = value.length > MAX_LENGTH && | |
+ const shouldTruncate = value.length > | |
+ MAX_LENGTH && | |
!this.state.isPrimitiveExpanded; | |
const buffer = new TextBuffer( | |
(shouldTruncate ? value.substr(0, MAX_LENGTH) + '...' : value), | |
diff --git a/pkg/nuclide-type-hint/lib/TypeHintManager.js b/pkg/nuclide-type-hint/lib/TypeHintManager.js | |
index 85043c9..a1cbd3f 100644 | |
--- a/pkg/nuclide-type-hint/lib/TypeHintManager.js | |
+++ b/pkg/nuclide-type-hint/lib/TypeHintManager.js | |
@@ -67,8 +67,10 @@ export default class TypeHintManager { | |
return this._typeHintProviders | |
.filter((provider: TypeHintProvider) => { | |
const providerGrammars = provider.selector.split(/, ?/); | |
- return provider.inclusionPriority > 0 && | |
- providerGrammars.indexOf(scopeName) !== -1; | |
+ return provider.inclusionPriority > | |
+ 0 && | |
+ providerGrammars.indexOf(scopeName) !== | |
+ -1; | |
}) | |
.sort((providerA: TypeHintProvider, providerB: TypeHintProvider) => { | |
return providerA.inclusionPriority - providerB.inclusionPriority; | |
diff --git a/pkg/nuclide-ui/AtomInput.js b/pkg/nuclide-ui/AtomInput.js | |
index f08012e..1376b15 100644 | |
--- a/pkg/nuclide-ui/AtomInput.js | |
+++ b/pkg/nuclide-ui/AtomInput.js | |
@@ -194,19 +194,18 @@ export class AtomInput extends React.Component { | |
null, | |
}); | |
- return /* Because the contents of `<atom-text-editor>` elements are managed by its custom web*/ | |
+ return; | |
+ /* Because the contents of `<atom-text-editor>` elements are managed by its custom web*/ | |
/* component class when "Use Shadow DOM" is disabled, this element should never have children.*/ | |
/* If an element has no children, React guarantees it will never re-render the element (which*/ | |
/* would wipe out the web component's work in this case).*/ | |
- ( | |
- <atom-text-editor | |
- class={className} | |
- mini | |
- onClick={this.props.onClick} | |
- onFocus={this.props.onFocus} | |
- onBlur={this.props.onBlur} | |
- /> | |
- ); | |
+ <atom-text-editor | |
+ class={className} | |
+ mini | |
+ onClick={this.props.onClick} | |
+ onFocus={this.props.onFocus} | |
+ onBlur={this.props.onBlur} | |
+ />; | |
} | |
getText(): string { | |
diff --git a/pkg/nuclide-ui/AtomTextEditor.js b/pkg/nuclide-ui/AtomTextEditor.js | |
index 2f55487..4a33979 100644 | |
--- a/pkg/nuclide-ui/AtomTextEditor.js | |
+++ b/pkg/nuclide-ui/AtomTextEditor.js | |
@@ -166,8 +166,10 @@ export class AtomTextEditor extends React.Component { | |
componentWillReceiveProps(nextProps: Props): void { | |
if ( | |
- nextProps.textBuffer !== this.props.textBuffer || | |
- nextProps.readOnly !== this.props.readOnly | |
+ nextProps.textBuffer !== | |
+ this.props.textBuffer || | |
+ nextProps.readOnly !== | |
+ this.props.readOnly | |
) { | |
const previousTextContents = this.getTextBuffer().getText(); | |
const nextTextContents = nextProps.textBuffer == null | |
diff --git a/pkg/nuclide-ui/ChangedFilesList.js b/pkg/nuclide-ui/ChangedFilesList.js | |
index cc4c2a4..c4d72a1 100644 | |
--- a/pkg/nuclide-ui/ChangedFilesList.js | |
+++ b/pkg/nuclide-ui/ChangedFilesList.js | |
@@ -79,8 +79,10 @@ export default class ChangedFilesList extends React.Component { | |
'icon-file-text', | |
'nuclide-file-changes-file-entry', | |
{ | |
- [`${commandPrefix}-file-entry`]: repository != null && | |
- repository.getType() === 'hg', | |
+ [`${commandPrefix}-file-entry`]: repository != | |
+ null && | |
+ repository.getType() === | |
+ 'hg', | |
}, | |
); | |
diff --git a/pkg/nuclide-ui/Combobox.js b/pkg/nuclide-ui/Combobox.js | |
index e5934b4..b89ebec 100644 | |
--- a/pkg/nuclide-ui/Combobox.js | |
+++ b/pkg/nuclide-ui/Combobox.js | |
@@ -225,8 +225,10 @@ export class Combobox extends React.Component { | |
// If there aren't any options, don't select anything. | |
return -1; | |
} else if ( | |
- this.state.selectedIndex === -1 || | |
- this.state.selectedIndex >= filteredOptions.length | |
+ this.state.selectedIndex === | |
+ -1 || | |
+ this.state.selectedIndex >= | |
+ filteredOptions.length | |
) { | |
// If there are options and the selected index is out of bounds, | |
// default to the first item. | |
@@ -270,13 +272,13 @@ export class Combobox extends React.Component { | |
_handleInputBlur(event: Object): void { | |
const {relatedTarget} = event; | |
if ( | |
- relatedTarget == null || | |
- // TODO(hansonw): Move this check inside AtomInput. | |
- // See https://github.com/atom/atom/blob/master/src/text-editor-element.coffee#L145 | |
- relatedTarget.tagName === 'INPUT' && | |
- relatedTarget.classList.contains('hidden-input') || | |
- // Selecting a menu item registers on the document body. | |
- relatedTarget === document.body | |
+ relatedTarget == | |
+ null || | |
+ relatedTarget.tagName === | |
+ 'INPUT' && | |
+ relatedTarget.classList.contains('hidden-input') || | |
+ relatedTarget === | |
+ document.body | |
) { | |
return; | |
} | |
@@ -357,8 +359,10 @@ export class Combobox extends React.Component { | |
} | |
if ( | |
- this.state.error != null && | |
- this.props.formatRequestOptionsErrorMessage != null | |
+ this.state.error != | |
+ null && | |
+ this.props.formatRequestOptionsErrorMessage != | |
+ null | |
) { | |
const message = this.props.formatRequestOptionsErrorMessage( | |
this.state.error, | |
diff --git a/pkg/nuclide-ui/Dropdown.js b/pkg/nuclide-ui/Dropdown.js | |
index 60fbc8b..39b76ac 100644 | |
--- a/pkg/nuclide-ui/Dropdown.js | |
+++ b/pkg/nuclide-ui/Dropdown.js | |
@@ -217,9 +217,7 @@ export function DropdownButton(props: DropdownButtonProps): React.Element<any> { | |
'nuclide-ui-dropdown-flat': props.isFlat === true, | |
}); | |
- const label = props.children == null | |
- ? null | |
- : ( | |
+ const label = props.children == null ? null : ( | |
<span className="nuclide-dropdown-label-text-wrapper"> | |
{props.children} | |
</span> | |
diff --git a/pkg/nuclide-ui/LazyNestedValueComponent.js b/pkg/nuclide-ui/LazyNestedValueComponent.js | |
index a4eb2d7..f255de9 100644 | |
--- a/pkg/nuclide-ui/LazyNestedValueComponent.js | |
+++ b/pkg/nuclide-ui/LazyNestedValueComponent.js | |
@@ -165,11 +165,17 @@ class ValueComponent extends React.Component { | |
} = this.props; | |
const nodeData = expandedValuePaths.get(path); | |
if ( | |
- !this.state.isExpanded && nodeData != null && nodeData.isExpanded && | |
+ !this.state.isExpanded && | |
+ nodeData != | |
+ null && | |
+ nodeData.isExpanded && | |
this._shouldFetch() && | |
- evaluationResult != null && | |
- evaluationResult.objectId != null && | |
- fetchChildren != null | |
+ evaluationResult != | |
+ null && | |
+ evaluationResult.objectId != | |
+ null && | |
+ fetchChildren != | |
+ null | |
) { | |
invariant(evaluationResult.objectId != null); | |
this.setState({ | |
@@ -181,9 +187,12 @@ class ValueComponent extends React.Component { | |
componentWillReceiveProps(nextProps: LazyNestedValueComponentProps): void { | |
if ( | |
- this._shouldFetch() && this.state.isExpanded && | |
- nextProps.evaluationResult != null && | |
- nextProps.fetchChildren != null | |
+ this._shouldFetch() && | |
+ this.state.isExpanded && | |
+ nextProps.evaluationResult != | |
+ null && | |
+ nextProps.fetchChildren != | |
+ null | |
) { | |
const {objectId} = nextProps.evaluationResult; | |
if (objectId == null) { | |
@@ -212,9 +221,13 @@ class ValueComponent extends React.Component { | |
}; | |
if (!this.state.isExpanded) { | |
if ( | |
- this._shouldFetch() && typeof fetchChildren === 'function' && | |
- evaluationResult != null && | |
- evaluationResult.objectId != null | |
+ this._shouldFetch() && | |
+ typeof fetchChildren === | |
+ 'function' && | |
+ evaluationResult != | |
+ null && | |
+ evaluationResult.objectId != | |
+ null | |
) { | |
newState.children = fetchChildren(evaluationResult.objectId); | |
} | |
@@ -431,9 +444,12 @@ function arePropsEqual( | |
if (evaluationResult1 == null || evaluationResult2 == null) { | |
return false; | |
} | |
- return evaluationResult1.value === evaluationResult2.value && | |
- evaluationResult1.type === evaluationResult2.type && | |
- evaluationResult1.description === evaluationResult2.description; | |
+ return evaluationResult1.value === | |
+ evaluationResult2.value && | |
+ evaluationResult1.type === | |
+ evaluationResult2.type && | |
+ evaluationResult1.description === | |
+ evaluationResult2.description; | |
} | |
export const LazyNestedValueComponent = highlightOnUpdate( | |
TopLevelLazyNestedValueComponent, | |
diff --git a/pkg/nuclide-ui/Portal.js b/pkg/nuclide-ui/Portal.js | |
index de277db..ec7f8fc 100644 | |
--- a/pkg/nuclide-ui/Portal.js | |
+++ b/pkg/nuclide-ui/Portal.js | |
@@ -41,7 +41,8 @@ export class Portal extends React.Component { | |
_render(element: ?React.Element<any>, container: HTMLElement): void { | |
if ( | |
- this._container != null && | |
+ this._container != | |
+ null && | |
(container !== this._container || element == null) | |
) { | |
ReactDOM.unmountComponentAtNode(this._container); | |
diff --git a/pkg/nuclide-ui/RelativeDate.example.js b/pkg/nuclide-ui/RelativeDate.example.js | |
index 26c3c38..c7dabae 100644 | |
--- a/pkg/nuclide-ui/RelativeDate.example.js | |
+++ b/pkg/nuclide-ui/RelativeDate.example.js | |
@@ -16,10 +16,12 @@ const RelativeDateExample = (): React.Element<any> => ( | |
<div> | |
<Block> | |
<div> | |
- Updated every 10 seconds (default): "<RelativeDate date={new Date()} />" | |
+ Updated every 10 seconds (default): "<RelativeDate | |
+ date={new Date()} | |
+ />" | |
</div> | |
<div> | |
- Updated every 1 second: "<RelativeDate | |
+ Updated every 1 second: "<RelativeDate | |
date={new Date()} | |
delay={1000} | |
/>" | |
diff --git a/pkg/nuclide-ui/Section.js b/pkg/nuclide-ui/Section.js | |
index f0017a7..94f0698 100644 | |
--- a/pkg/nuclide-ui/Section.js | |
+++ b/pkg/nuclide-ui/Section.js | |
@@ -39,9 +39,11 @@ export class Section extends React.Component { | |
constructor(props: Props) { | |
super(props); | |
- const initialIsCollapsed: boolean = this.props.collapsable != null && | |
+ const initialIsCollapsed: boolean = this.props.collapsable != | |
+ null && | |
this.props.collapsable && | |
- this.props.collapsedByDefault != null && | |
+ this.props.collapsedByDefault != | |
+ null && | |
this.props.collapsedByDefault; | |
this.state = {isCollapsed: initialIsCollapsed}; | |
(this: any)._toggleCollapsed = this._toggleCollapsed.bind(this); | |
diff --git a/pkg/nuclide-ui/ShowMoreComponent.js b/pkg/nuclide-ui/ShowMoreComponent.js | |
index d230167..2101a38 100644 | |
--- a/pkg/nuclide-ui/ShowMoreComponent.js | |
+++ b/pkg/nuclide-ui/ShowMoreComponent.js | |
@@ -35,7 +35,8 @@ export class ShowMoreComponent extends React.Component { | |
super(props); | |
this.state = { | |
// Defaults to false if showMoreByDefault not specified | |
- showingMore: this.props.showMoreByDefault != null && | |
+ showingMore: this.props.showMoreByDefault != | |
+ null && | |
this.props.showMoreByDefault, | |
currentHeight: 0, | |
}; | |
diff --git a/pkg/nuclide-ui/Table.js b/pkg/nuclide-ui/Table.js | |
index a11413e..bc3842d 100644 | |
--- a/pkg/nuclide-ui/Table.js | |
+++ b/pkg/nuclide-ui/Table.js | |
@@ -119,7 +119,7 @@ export class Table extends React.Component { | |
unresolvedColumns.push(column); | |
} | |
}); | |
- const residualColumnWidth = (1 - assignedWidth) / unresolvedColumns.length; | |
+ const residualColumnWidth = 1 - assignedWidth / unresolvedColumns.length; | |
unresolvedColumns.forEach(column => { | |
columnWidthRatios[column.key] = residualColumnWidth; | |
}); | |
@@ -150,7 +150,8 @@ export class Table extends React.Component { | |
if (column.key === resizedColumn) { | |
width = constrainedNewColumnSize; | |
} else if (column.key === columnAfterResizedColumn) { | |
- width = columnWidthRatios[resizedColumn] - constrainedNewColumnSize + | |
+ width = columnWidthRatios[resizedColumn] - | |
+ constrainedNewColumnSize + | |
columnWidthRatios[key]; | |
} else { | |
width = columnWidthRatios[key]; | |
@@ -203,8 +204,12 @@ export class Table extends React.Component { | |
_handleResizerGlobalMouseMove(event: MouseEvent): void { | |
if ( | |
- this._resizeStartX == null || this._tableWidth == null || | |
- this._columnBeingResized == null | |
+ this._resizeStartX == | |
+ null || | |
+ this._tableWidth == | |
+ null || | |
+ this._columnBeingResized == | |
+ null | |
) { | |
return; | |
} | |
@@ -213,7 +218,7 @@ export class Table extends React.Component { | |
const currentColumnSize = this.state.columnWidthRatios[this._columnBeingResized]; | |
const didUpdate = this._updateWidths( | |
this._columnBeingResized, | |
- (this._tableWidth * currentColumnSize + deltaX) / this._tableWidth, | |
+ this._tableWidth * currentColumnSize + deltaX / this._tableWidth, | |
); | |
if (didUpdate) { | |
this._resizeStartX = pageX; | |
@@ -352,8 +357,11 @@ export class Table extends React.Component { | |
classnames(rowClassName, { | |
'nuclide-ui-table-row-selectable': selectable, | |
'nuclide-ui-table-row-selected': isSelectedRow, | |
- 'nuclide-ui-table-row-alternate': alternateBackground !== false && | |
- i % 2 === 1, | |
+ 'nuclide-ui-table-row-alternate': alternateBackground !== | |
+ false && | |
+ i % | |
+ 2 === | |
+ 1, | |
'nuclide-ui-table-collapsed-row': this.props.collapsable && | |
!isSelectedRow, | |
}) | |
diff --git a/pkg/nuclide-ui/TreeRootComponent.js b/pkg/nuclide-ui/TreeRootComponent.js | |
index 85c2b32..b2c0200 100644 | |
--- a/pkg/nuclide-ui/TreeRootComponent.js | |
+++ b/pkg/nuclide-ui/TreeRootComponent.js | |
@@ -251,7 +251,8 @@ export class TreeRootComponent extends React.Component { | |
items = items.map(definition => { | |
definition.shouldDisplay = () => { | |
if ( | |
- this.state.roots.length === 0 && | |
+ this.state.roots.length === | |
+ 0 && | |
!definition.shouldDisplayIfTreeIsEmpty | |
) { | |
return false; | |
@@ -585,7 +586,8 @@ export class TreeRootComponent extends React.Component { | |
() => { | |
const isExpanded = this.state.expandedKeys.has(nodeKey); | |
const nodeNow = this.getNodeForKey(nodeKey); | |
- const isDoneFetching = nodeNow && nodeNow.isContainer() && | |
+ const isDoneFetching = nodeNow && | |
+ nodeNow.isContainer() && | |
nodeNow.isCacheValid(); | |
return Boolean(isExpanded && isDoneFetching); | |
}); | |
diff --git a/pkg/nuclide-ui/VendorLib/atom-tabs/lib/layout.js b/pkg/nuclide-ui/VendorLib/atom-tabs/lib/layout.js | |
index fd7b853..d84d49f 100644 | |
--- a/pkg/nuclide-ui/VendorLib/atom-tabs/lib/layout.js | |
+++ b/pkg/nuclide-ui/VendorLib/atom-tabs/lib/layout.js | |
@@ -20,7 +20,8 @@ | |
itemView = this.getItemViewAt(e); | |
if (pane != null && itemView != null) { | |
coords = !(this.isOnlyTabInPane(pane, e.target) || | |
- pane.getItems().length === 0) | |
+ pane.getItems().length === | |
+ 0) | |
? [e.clientX, e.clientY] | |
: void 0; | |
return this.lastSplit = this.updateView(itemView, coords); | |
@@ -88,7 +89,7 @@ | |
var height, left, top, width, x, y; | |
left = arg.left, top = arg.top, width = arg.width, height = arg.height; | |
x = arg1[0], y = arg1[1]; | |
- return [(x - left) / width, (y - top) / height]; | |
+ return [x - left / width, y - top / height]; | |
}, | |
splitType: function(arg) { | |
var x, y; | |
diff --git a/pkg/nuclide-ui/VendorLib/atom-tabs/lib/mru-item-view.js b/pkg/nuclide-ui/VendorLib/atom-tabs/lib/mru-item-view.js | |
index 2cfd110..3c770ca 100755 | |
--- a/pkg/nuclide-ui/VendorLib/atom-tabs/lib/mru-item-view.js | |
+++ b/pkg/nuclide-ui/VendorLib/atom-tabs/lib/mru-item-view.js | |
@@ -73,7 +73,8 @@ export default class MRUItemView { | |
const projectPaths = atom.project.getPaths(); | |
for (let i = 0; i < projectPaths.length; i++) { | |
if ( | |
- filePath === projectPaths[i] || | |
+ filePath === | |
+ projectPaths[i] || | |
filePath.startsWith(projectPaths[i] + path.sep) | |
) { | |
return atom.project.getRepositories()[i]; | |
diff --git a/pkg/nuclide-ui/VendorLib/atom-tabs/lib/tab-bar-view.js b/pkg/nuclide-ui/VendorLib/atom-tabs/lib/tab-bar-view.js | |
index bc63fc9..7fe7d3c 100644 | |
--- a/pkg/nuclide-ui/VendorLib/atom-tabs/lib/tab-bar-view.js | |
+++ b/pkg/nuclide-ui/VendorLib/atom-tabs/lib/tab-bar-view.js | |
@@ -520,8 +520,10 @@ | |
}; | |
TabBarView.prototype.shouldAllowDrag = function() { | |
- return this.paneContainer.getPanes().length > 1 || | |
- this.pane.getItems().length > 1; | |
+ return this.paneContainer.getPanes().length > | |
+ 1 || | |
+ this.pane.getItems().length > | |
+ 1; | |
}; | |
TabBarView.prototype.onDragStart = function(event) { | |
@@ -562,7 +564,8 @@ | |
(typeof item.isModified === 'function' | |
? item.isModified() | |
: void 0) && | |
- item.getText != null | |
+ item.getText != | |
+ null | |
) { | |
event.dataTransfer.setData('has-unsaved-changes', 'true'); | |
return event.dataTransfer.setData('modified-text', item.getText()); | |
diff --git a/pkg/nuclide-ui/VendorLib/atom-tabs/lib/tab-view.js b/pkg/nuclide-ui/VendorLib/atom-tabs/lib/tab-view.js | |
index 32b2a6a..c49c35c 100644 | |
--- a/pkg/nuclide-ui/VendorLib/atom-tabs/lib/tab-view.js | |
+++ b/pkg/nuclide-ui/VendorLib/atom-tabs/lib/tab-view.js | |
@@ -442,7 +442,8 @@ | |
) { | |
return this.itemTitle.classList.add('icon', 'icon-' + this.iconName); | |
} else if ( | |
- this.path != null && | |
+ this.path != | |
+ null && | |
(this.iconName = FileIcons | |
.getService() | |
.iconClassForPath(this.path, 'tabs')) | |
diff --git a/pkg/nuclide-unicode-datatip/lib/Unicode.js b/pkg/nuclide-unicode-datatip/lib/Unicode.js | |
index 30b370e..6236a1d 100644 | |
--- a/pkg/nuclide-unicode-datatip/lib/Unicode.js | |
+++ b/pkg/nuclide-unicode-datatip/lib/Unicode.js | |
@@ -8,10 +8,10 @@ | |
* @flow | |
*/ | |
-const HIGH_SURROGATE_START = 0xD800; | |
-const HIGH_SURROGATE_END = 0xDBFF; | |
-const LOW_SURROGATE_START = 0xDC00; | |
-const LOW_SURROGATE_END = 0xDFFF; | |
+const HIGH_SURROGATE_START = 55296; | |
+const HIGH_SURROGATE_END = 56319; | |
+const LOW_SURROGATE_START = 56320; | |
+const LOW_SURROGATE_END = 57343; | |
export function zeroPaddedHex(codePoint: number, len: number): string { | |
const codePointHex = codePoint.toString(16).toUpperCase(); | |
@@ -37,10 +37,17 @@ export function decodeSurrogateCodePoints( | |
} | |
highSurrogate = codePoint; | |
} else if ( | |
- codePoint >= LOW_SURROGATE_START && codePoint <= LOW_SURROGATE_END && | |
- highSurrogate !== -1 | |
+ codePoint >= | |
+ LOW_SURROGATE_START && | |
+ codePoint <= | |
+ LOW_SURROGATE_END && | |
+ highSurrogate !== | |
+ -1 | |
) { | |
- const decoded = 0x10000 + (highSurrogate - HIGH_SURROGATE_START) * 0x400 + | |
+ const decoded = 65536 + | |
+ highSurrogate - | |
+ HIGH_SURROGATE_START * | |
+ 1024 + | |
(codePoint - LOW_SURROGATE_START); | |
result.push(decoded); | |
highSurrogate = -1; | |
diff --git a/pkg/nuclide-unicode-datatip/spec/unicode-spec.js b/pkg/nuclide-unicode-datatip/spec/unicode-spec.js | |
index b48144a..7e43491 100644 | |
--- a/pkg/nuclide-unicode-datatip/spec/unicode-spec.js | |
+++ b/pkg/nuclide-unicode-datatip/spec/unicode-spec.js | |
@@ -16,76 +16,70 @@ import { | |
describe('Unicode', () => { | |
it('not zero-padding values does not add zeroes', () => { | |
- expect(zeroPaddedHex(0x6, 0)).toEqual('6'); | |
+ expect(zeroPaddedHex(6, 0)).toEqual('6'); | |
}); | |
it('zero-padding small values adds zeroes', () => { | |
- expect(zeroPaddedHex(0xF, 2)).toEqual('0F'); | |
+ expect(zeroPaddedHex(15, 2)).toEqual('0F'); | |
}); | |
it('zero-padding small values adds many zeroes', () => { | |
- expect(zeroPaddedHex(0xF, 6)).toEqual('00000F'); | |
+ expect(zeroPaddedHex(15, 6)).toEqual('00000F'); | |
}); | |
it('zero-padding equal values does not add zeroes', () => { | |
- expect(zeroPaddedHex(0x42, 2)).toEqual('42'); | |
+ expect(zeroPaddedHex(66, 2)).toEqual('42'); | |
}); | |
it('zero-padding large values does not add zeroes', () => { | |
- expect(zeroPaddedHex(0x64738, 2)).toEqual('64738'); | |
+ expect(zeroPaddedHex(411448, 2)).toEqual('64738'); | |
}); | |
it('decoding empty array does nothing', () => { | |
expect(decodeSurrogateCodePoints([])).toEqual([]); | |
}); | |
it('decoding non-surrogate returns as-is', () => { | |
- expect(decodeSurrogateCodePoints([0x1234])).toEqual([0x1234]); | |
+ expect(decodeSurrogateCodePoints([4660])).toEqual([4660]); | |
}); | |
it('decoding SMP non-surrogate returns as-is', () => { | |
- expect(decodeSurrogateCodePoints([0x12345])).toEqual([0x12345]); | |
+ expect(decodeSurrogateCodePoints([74565])).toEqual([74565]); | |
}); | |
it('decoding surrogate pair returns code point', () => { | |
- expect(decodeSurrogateCodePoints([0xD83D, 0xDCA9])).toEqual([0x1F4A9]); | |
+ expect(decodeSurrogateCodePoints([55357, 56489])).toEqual([128169]); | |
}); | |
it('decoding dangling high surrogate returns as-is', () => { | |
- expect( | |
- decodeSurrogateCodePoints([0xD83D, 0x1234]), | |
- ).toEqual([0xD83D, 0x1234]); | |
+ expect(decodeSurrogateCodePoints([55357, 4660])).toEqual([55357, 4660]); | |
}); | |
it('decoding dangling low surrogate returns as-is', () => { | |
- expect( | |
- decodeSurrogateCodePoints([0xDCA9, 0x1234]), | |
- ).toEqual([0xDCA9, 0x1234]); | |
+ expect(decodeSurrogateCodePoints([56489, 4660])).toEqual([56489, 4660]); | |
}); | |
it('decoding trailing high surrogate surrogate returns as-is', () => { | |
- expect( | |
- decodeSurrogateCodePoints([0x1234, 0xD83D]), | |
- ).toEqual([0x1234, 0xD83D]); | |
+ expect(decodeSurrogateCodePoints([4660, 55357])).toEqual([4660, 55357]); | |
}); | |
it('extracting from empty string does nothing', () => { | |
expect(extractCodePoints('')).toEqual([]); | |
}); | |
it('extracting non-escaped returns code points', () => { | |
- expect(extractCodePoints('abc')).toEqual([0x61, 0x62, 0x63]); | |
+ expect(extractCodePoints('abc')).toEqual([97, 98, 99]); | |
}); | |
it('extracting single escaped code point returns unescaped value', () => { | |
- expect(extractCodePoints('\\uABCD')).toEqual([0xABCD]); | |
+ expect(extractCodePoints('\\uABCD')).toEqual([43981]); | |
}); | |
it('extracting multiple escaped code points returns unescaped values', () => { | |
- expect(extractCodePoints('\\uAB12\\uCD34')).toEqual([0xAB12, 0xCD34]); | |
+ expect(extractCodePoints('\\uAB12\\uCD34')).toEqual([43794, 52532]); | |
}); | |
it('extracting SMP code points returns unescaped values', () => { | |
- expect(extractCodePoints('\\U0001F4A9')).toEqual([0x1F4A9]); | |
+ expect(extractCodePoints('\\U0001F4A9')).toEqual([128169]); | |
}); | |
it('extracting SMP code points with curlies returns unescaped values', () => { | |
- expect(extractCodePoints('\\u{1F4A9}')).toEqual([0x1F4A9]); | |
+ expect(extractCodePoints('\\u{1F4A9}')).toEqual([128169]); | |
}); | |
it('extracting multiple escapes returns unescaped values', () => { | |
expect( | |
extractCodePoints('\\uABCD\\u{1F4A9}\\U0001F4A0'), | |
- ).toEqual([0xABCD, 0x1F4A9, 0x1F4A0]); | |
+ ).toEqual([43981, 128169, 128160]); | |
}); | |
it( | |
'extracting mixed escaped and non-escaped returns unescaped values', | |
() => { | |
expect( | |
extractCodePoints('abc\\uABCDabc'), | |
- ).toEqual([0x61, 0x62, 0x63, 0xABCD, 0x61, 0x62, 0x63]); | |
+ ).toEqual([97, 98, 99, 43981, 97, 98, 99]); | |
}, | |
); | |
}); | |
diff --git a/pkg/nuclide-vcs-log/lib/VcsLog.js b/pkg/nuclide-vcs-log/lib/VcsLog.js | |
index e79f216..6807faa 100644 | |
--- a/pkg/nuclide-vcs-log/lib/VcsLog.js | |
+++ b/pkg/nuclide-vcs-log/lib/VcsLog.js | |
@@ -116,15 +116,11 @@ export default class VcsLog extends React.Component { | |
<tr> | |
<th className="nuclide-vcs-log-header-cell">Date</th> | |
<th className="nuclide-vcs-log-header-cell">ID</th> | |
- { | |
- showDifferentialRevision | |
- ? ( | |
+ {showDifferentialRevision ? ( | |
<th className="nuclide-vcs-log-header-cell"> | |
Revision | |
</th> | |
- ) | |
- : null | |
- } | |
+ ) : null} | |
<th className="nuclide-vcs-log-header-cell">Author</th> | |
<th className="nuclide-vcs-log-header-cell">Summary</th> | |
</tr> | |
diff --git a/pkg/nuclide-vcs-log/lib/main.js b/pkg/nuclide-vcs-log/lib/main.js | |
index 5645080..00187f1 100644 | |
--- a/pkg/nuclide-vcs-log/lib/main.js | |
+++ b/pkg/nuclide-vcs-log/lib/main.js | |
@@ -176,7 +176,8 @@ function getActiveTextEditorURI(): ?string { | |
function openLogPaneForURI(uri: string) { | |
track('nuclide-vcs-log:open'); | |
- const openerURI = VCS_LOG_URI_PREFIX + '?' + | |
+ const openerURI = VCS_LOG_URI_PREFIX + | |
+ '?' + | |
querystring.stringify({[VCS_LOG_URI_PATHS_QUERY_PARAM]: uri}); | |
// Not a file URI | |
// eslint-disable-next-line nuclide-internal/atom-apis | |
diff --git a/pkg/nuclide-watchman-helpers/lib/WatchmanClient.js b/pkg/nuclide-watchman-helpers/lib/WatchmanClient.js | |
index d01a5c8..1d43c9f 100644 | |
--- a/pkg/nuclide-watchman-helpers/lib/WatchmanClient.js | |
+++ b/pkg/nuclide-watchman-helpers/lib/WatchmanClient.js | |
@@ -241,7 +241,8 @@ export default class WatchmanClient { | |
const watchmanVersion = await this._watchmanVersionPromise; | |
if (!watchmanVersion || watchmanVersion < '3.1.0') { | |
throw new Error( | |
- 'Watchman version: ' + watchmanVersion + | |
+ 'Watchman version: ' + | |
+ watchmanVersion + | |
' does not support watch-project', | |
); | |
} | |
diff --git a/pkg/nuclide-working-sets-common/lib/WorkingSet.js b/pkg/nuclide-working-sets-common/lib/WorkingSet.js | |
index 4d9a686..62ee97b 100644 | |
--- a/pkg/nuclide-working-sets-common/lib/WorkingSet.js | |
+++ b/pkg/nuclide-working-sets-common/lib/WorkingSet.js | |
@@ -56,7 +56,9 @@ export class WorkingSet { | |
this._root = this._buildDirTree(this._uris); | |
} catch (e) { | |
logger.error( | |
- 'Failed to initialize a WorkingSet with URIs ' + uris.join(',') + '. ' + | |
+ 'Failed to initialize a WorkingSet with URIs ' + | |
+ uris.join(',') + | |
+ '. ' + | |
e.message, | |
); | |
this._uris = []; | |
diff --git a/pkg/sample-quickopen-provider-example/lib/ExampleProvider.js b/pkg/sample-quickopen-provider-example/lib/ExampleProvider.js | |
index e9f6c2c..5c52e60 100644 | |
--- a/pkg/sample-quickopen-provider-example/lib/ExampleProvider.js | |
+++ b/pkg/sample-quickopen-provider-example/lib/ExampleProvider.js | |
@@ -113,12 +113,6 @@ const ExampleProvider: Provider = { | |
priority: 20 /** | |
* Only required if providerType === 'DIRECTORY'. | |
*/, | |
- isEligibleForDirectory(directory: atom$Directory): Promise<boolean> { | |
- return Promise.resolve(true); | |
- } /** | |
- * Return the actual search results. | |
- * Only providerType === 'DIRECTORY' has `directory`. | |
- */, | |
// import {React} from 'react-for-atom'; | |
// getComponentForItem(item: FileResult): React.Element { | |
// var { | |
@@ -131,6 +125,12 @@ const ExampleProvider: Provider = { | |
// </div> | |
// ); | |
// }; | |
+ isEligibleForDirectory(directory: atom$Directory): Promise<boolean> { | |
+ return Promise.resolve(true); | |
+ } /** | |
+ * Return the actual search results. | |
+ * Only providerType === 'DIRECTORY' has `directory`. | |
+ */, | |
executeQuery( | |
query: string, | |
directory: atom$Directory, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment