Skip to content

Instantly share code, notes, and snippets.

View vjeux's full-sized avatar

Christopher Chedeau vjeux

View GitHub Profile
This file has been truncated, but you can view the full file.
prettier vjeux$ find ../TypeScript/tests/ -name '*.ts' | grep -v "'" | xargs ./bin/prettier.js --parser typescript --debug-check
../TypeScript/tests/baselines/reference/project/declarationDir/amd/declarations/a.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir/amd/declarations/subfolder/b.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir/amd/declarations/subfolder/c.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir/node/declarations/a.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir/node/declarations/subfolder/b.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir/node/declarations/subfolder/c.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir2/amd/declarations/a.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir2/amd/declarations/subfolder/b.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir2/amd/declarations/subfolder/c.d.ts
Summary of all failing tests
FAIL tests/jsx-stateless-arrow-fn/jsfmt.spec.js
● flow - undefined-verify
expect(value).toMatchSnapshot()
Received value does not match stored snapshot 1.
- Snapshot
+ Received
a(
  SomethingVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong,
  [
    {
      SomethingVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLong: 1
    }
  ]
);
(541) >> yarn build:dist
Using globally installed version of Yarn
yarn build:dist v0.18.1
$ rollup -c dist/rollup.config.js
⚠️ 'default' is imported from external module 'rollup-plugin-node-builtins' but never used
⚠️ 'default' is imported from external module 'rollup-plugin-node-globals' but never used
⚠️ 'default' is imported from external module 'rollup-plugin-real-babili' but never used
../nuclide/pkg/commons-atom/ActiveEditorRegistry.js
../nuclide/pkg/commons-atom/arcanist.js
../nuclide/pkg/commons-atom/AutocompleteCacher.js
Index:
===================================================================
---
+++
@@ -15,7 +15,6 @@
shouldFilter?: (
lastRequest: atom$AutocompleteRequest,
../nuclide/pkg/commons-atom/ActiveEditorRegistry.js
../nuclide/pkg/commons-atom/arcanist.js
../nuclide/pkg/commons-atom/AutocompleteCacher.js
Index:
===================================================================
---
+++
@@ -15,7 +15,6 @@
shouldFilter?: (
lastRequest: atom$AutocompleteRequest,
find ../nuclide/pkg -name '*.js' | xargs ./bin/prettier.js --parser flow --trailing-comma --bracket-spacing false --single-quote --debug-check
Index:
===================================================================
---
+++
@@ -15,7 +15,6 @@
shouldFilter?: (
lastRequest: atom$AutocompleteRequest,
- currentRequest: atom$AutocompleteRequest,
- ) => /* TODO pass originalResult here if any client requires it*/
diff --git a/pkg/commons-atom/AutocompleteCacher.js b/pkg/commons-atom/AutocompleteCacher.js
index 8c64580..c040e56 100644
--- a/pkg/commons-atom/AutocompleteCacher.js
+++ b/pkg/commons-atom/AutocompleteCacher.js
@@ -14,9 +14,8 @@ export type AutocompleteCacherConfig<T> = {|
// verifying that the cursor has only moved by one column since the last request.
shouldFilter?: (
lastRequest: atom$AutocompleteRequest,
- currentRequest: atom$AutocompleteRequest,
- ) => /* TODO pass originalResult here if any client requires it*/
diff --git a/pkg/commons-atom/AutocompleteCacher.js b/pkg/commons-atom/AutocompleteCacher.js
index 8c64580..c040e56 100644
--- a/pkg/commons-atom/AutocompleteCacher.js
+++ b/pkg/commons-atom/AutocompleteCacher.js
@@ -14,9 +14,8 @@ export type AutocompleteCacherConfig<T> = {|
// verifying that the cursor has only moved by one column since the last request.
shouldFilter?: (
lastRequest: atom$AutocompleteRequest,
- currentRequest: atom$AutocompleteRequest,
- ) => /* TODO pass originalResult here if any client requires it*/
During the past few weeks, I've been working on <a href="https://github.com/jlongster/prettier">prettier</a>, which is a JavaScript pretty printer. We are approaching the phase where we can actually use it so this is a good time to explain how it works.
We're going to go through an example
<pre lang="javascript">
if (!pretty) { makePretty() }
</pre>
<h3>String -> AST</h3>