-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
flow
plugin from babel
parser
- Loading branch information
Showing
33 changed files
with
753 additions
and
573 deletions.
There are no files selected for viewing
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
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
115 changes: 115 additions & 0 deletions
115
tests/format/flow/decorator/__snapshots__/jsfmt.spec.js.snap
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`comments.js format 1`] = ` | ||
====================================options===================================== | ||
parsers: ["flow"] | ||
printWidth: 80 | ||
| printWidth | ||
=====================================input====================================== | ||
class Something { | ||
@Annotateme() | ||
// comment | ||
static property: Array<string>; | ||
} | ||
=====================================output===================================== | ||
class Something { | ||
static // comment | ||
property: Array<string>; | ||
} | ||
================================================================================ | ||
`; | ||
exports[`mobx.js format 1`] = ` | ||
====================================options===================================== | ||
parsers: ["flow"] | ||
printWidth: 80 | ||
| printWidth | ||
=====================================input====================================== | ||
import {observable} from "mobx"; | ||
@observer class OrderLine { | ||
@observable price:number = 0; | ||
@observable amount:number = 1; | ||
constructor(price) { | ||
this.price = price; | ||
} | ||
@computed get total() { | ||
return this.price * this.amount; | ||
} | ||
@action.bound setPrice(price) { | ||
this.price = price; | ||
} | ||
@computed | ||
get total() { | ||
return this.price * this.amount; | ||
} | ||
@action.bound | ||
setPrice(price) { | ||
this.price = price; | ||
} | ||
@computed @computed @computed @computed @computed @computed @computed get total() { | ||
return this.price * this.amount; | ||
} | ||
@action handleDecrease = (event: React.ChangeEvent<HTMLInputElement>) => this.count--; | ||
@action handleSomething = (event: React.ChangeEvent<HTMLInputElement>) => doSomething(); | ||
} | ||
=====================================output===================================== | ||
import { observable } from "mobx"; | ||
@observer | ||
class OrderLine { | ||
price: number = 0; | ||
amount: number = 1; | ||
constructor(price) { | ||
this.price = price; | ||
} | ||
@computed get total() { | ||
return this.price * this.amount; | ||
} | ||
@action.bound setPrice(price) { | ||
this.price = price; | ||
} | ||
@computed | ||
get total() { | ||
return this.price * this.amount; | ||
} | ||
@action.bound | ||
setPrice(price) { | ||
this.price = price; | ||
} | ||
@computed | ||
@computed | ||
@computed | ||
@computed | ||
@computed | ||
@computed | ||
@computed | ||
get total() { | ||
return this.price * this.amount; | ||
} | ||
handleDecrease = (event: React.ChangeEvent<HTMLInputElement>) => this.count--; | ||
handleSomething = (event: React.ChangeEvent<HTMLInputElement>) => | ||
doSomething(); | ||
} | ||
================================================================================ | ||
`; |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
run_spec(import.meta, ["flow",]); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import {observable} from "mobx"; | ||
|
||
@observer class OrderLine { | ||
@observable price:number = 0; | ||
@observable amount:number = 1; | ||
|
||
constructor(price) { | ||
this.price = price; | ||
} | ||
|
||
@computed get total() { | ||
return this.price * this.amount; | ||
} | ||
|
||
@action.bound setPrice(price) { | ||
this.price = price; | ||
} | ||
|
||
@computed | ||
get total() { | ||
return this.price * this.amount; | ||
} | ||
|
||
@action.bound | ||
setPrice(price) { | ||
this.price = price; | ||
} | ||
|
||
@computed @computed @computed @computed @computed @computed @computed get total() { | ||
return this.price * this.amount; | ||
} | ||
|
||
@action handleDecrease = (event: React.ChangeEvent<HTMLInputElement>) => this.count--; | ||
|
||
@action handleSomething = (event: React.ChangeEvent<HTMLInputElement>) => doSomething(); | ||
} |
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
Oops, something went wrong.