
committed by
GitHub

131 changed files with 2061 additions and 2484 deletions
@ -1,4 +1 @@ |
|||
# Make sure baseline files have consistent line endings |
|||
*.txt text eol=lf |
|||
*.snap text eol=lf |
|||
*.debug-check text eol=lf |
|||
* text=auto eol=lf |
|||
|
@ -1,28 +1,28 @@ |
|||
<div |
|||
// comment
|
|||
> |
|||
{foo} |
|||
</div>; |
|||
|
|||
<div |
|||
// comment
|
|||
attr="foo" |
|||
> |
|||
{foo} |
|||
</div>; |
|||
|
|||
<div |
|||
attr="foo" // comment
|
|||
> |
|||
{foo} |
|||
</div>; |
|||
|
|||
<div |
|||
attr="foo" |
|||
// comment
|
|||
> |
|||
{foo} |
|||
</div>; |
|||
|
|||
<br // comment
|
|||
/>; |
|||
<div |
|||
// comment
|
|||
> |
|||
{foo} |
|||
</div>; |
|||
|
|||
<div |
|||
// comment
|
|||
attr="foo" |
|||
> |
|||
{foo} |
|||
</div>; |
|||
|
|||
<div |
|||
attr="foo" // comment
|
|||
> |
|||
{foo} |
|||
</div>; |
|||
|
|||
<div |
|||
attr="foo" |
|||
// comment
|
|||
> |
|||
{foo} |
|||
</div>; |
|||
|
|||
<br // comment
|
|||
/>; |
|||
|
@ -1,36 +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(); |
|||
} |
|||
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(); |
|||
} |
|||
|
@ -1,145 +1,58 @@ |
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP |
|||
|
|||
exports[`usingCrlf.js 1`] = ` |
|||
====================================options===================================== |
|||
parsers: ["babylon"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
function f() { |
|||
console.log("testing line endings"); |
|||
} |
|||
|
|||
=====================================output===================================== |
|||
function f() { |
|||
console.log("testing line endings"); |
|||
} |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingCrlf.js 2`] = ` |
|||
exports[`example.js 1`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "cr" |
|||
parsers: ["babylon"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
function f() { |
|||
console.log("testing line endings"); |
|||
} |
|||
|
|||
=====================================output===================================== |
|||
function f() {/*CR*/ console.log("testing line endings");/*CR*/}/*CR*/ |
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingCrlf.js 3`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "crlf" |
|||
parsers: ["babylon"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
function f() { |
|||
console.log("testing line endings"); |
|||
} |
|||
|
|||
=====================================output===================================== |
|||
function f() {/*CR*/ |
|||
console.log("testing line endings");/*CR*/ |
|||
}/*CR*/ |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingCrlf.js 4`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "lf" |
|||
parsers: ["babylon"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
function f() { |
|||
console.log("testing line endings"); |
|||
} |
|||
|
|||
=====================================output===================================== |
|||
function f() { |
|||
console.log("testing line endings"); |
|||
} |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingLf.js 1`] = ` |
|||
====================================options===================================== |
|||
parsers: ["babylon"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
function f() { |
|||
console.log("testing line endings"); |
|||
} |
|||
function f() {<LF> |
|||
console.log("testing line endings");<LF> |
|||
}<LF> |
|||
|
|||
=====================================output===================================== |
|||
function f() { |
|||
console.log("testing line endings"); |
|||
} |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingLf.js 2`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "cr" |
|||
parsers: ["babylon"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
function f() { |
|||
console.log("testing line endings"); |
|||
} |
|||
function f() {<CR> |
|||
console.log("testing line endings");<CR> |
|||
}<CR> |
|||
|
|||
=====================================output===================================== |
|||
function f() {/*CR*/ console.log("testing line endings");/*CR*/}/*CR*/ |
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingLf.js 3`] = ` |
|||
exports[`example.js 2`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "crlf" |
|||
parsers: ["babylon"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
function f() { |
|||
console.log("testing line endings"); |
|||
} |
|||
function f() {<LF> |
|||
console.log("testing line endings");<LF> |
|||
}<LF> |
|||
|
|||
=====================================output===================================== |
|||
function f() {/*CR*/ |
|||
console.log("testing line endings");/*CR*/ |
|||
}/*CR*/ |
|||
function f() {<CRLF> |
|||
console.log("testing line endings");<CRLF> |
|||
}<CRLF> |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingLf.js 4`] = ` |
|||
exports[`example.js 3`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "lf" |
|||
parsers: ["babylon"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
function f() { |
|||
console.log("testing line endings"); |
|||
} |
|||
function f() {<LF> |
|||
console.log("testing line endings");<LF> |
|||
}<LF> |
|||
|
|||
=====================================output===================================== |
|||
function f() { |
|||
console.log("testing line endings"); |
|||
} |
|||
function f() {<LF> |
|||
console.log("testing line endings");<LF> |
|||
}<LF> |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
@ -1,4 +1,3 @@ |
|||
run_spec(__dirname, ["babylon"]); |
|||
run_spec(__dirname, ["babylon"], { endOfLine: "cr" }); |
|||
run_spec(__dirname, ["babylon"], { endOfLine: "crlf" }); |
|||
run_spec(__dirname, ["babylon"], { endOfLine: "lf" }); |
|||
|
@ -1,3 +0,0 @@ |
|||
function f() { |
|||
console.log("testing line endings"); |
|||
} |
@ -1,137 +0,0 @@ |
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP |
|||
|
|||
exports[`usingCrlf.css 1`] = ` |
|||
====================================options===================================== |
|||
parsers: ["css"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
.foo { |
|||
margin: 42px; |
|||
} |
|||
=====================================output===================================== |
|||
.foo { |
|||
margin: 42px; |
|||
} |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingCrlf.css 2`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "cr" |
|||
parsers: ["css"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
.foo { |
|||
margin: 42px; |
|||
} |
|||
=====================================output===================================== |
|||
.foo {/*CR*/ margin: 42px;/*CR*/}/*CR*/ |
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingCrlf.css 3`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "crlf" |
|||
parsers: ["css"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
.foo { |
|||
margin: 42px; |
|||
} |
|||
=====================================output===================================== |
|||
.foo {/*CR*/ |
|||
margin: 42px;/*CR*/ |
|||
}/*CR*/ |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingCrlf.css 4`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "lf" |
|||
parsers: ["css"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
.foo { |
|||
margin: 42px; |
|||
} |
|||
=====================================output===================================== |
|||
.foo { |
|||
margin: 42px; |
|||
} |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingLf.css 1`] = ` |
|||
====================================options===================================== |
|||
parsers: ["css"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
.foo { |
|||
margin: 42px; |
|||
} |
|||
=====================================output===================================== |
|||
.foo { |
|||
margin: 42px; |
|||
} |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingLf.css 2`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "cr" |
|||
parsers: ["css"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
.foo { |
|||
margin: 42px; |
|||
} |
|||
=====================================output===================================== |
|||
.foo {/*CR*/ margin: 42px;/*CR*/}/*CR*/ |
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingLf.css 3`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "crlf" |
|||
parsers: ["css"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
.foo { |
|||
margin: 42px; |
|||
} |
|||
=====================================output===================================== |
|||
.foo {/*CR*/ |
|||
margin: 42px;/*CR*/ |
|||
}/*CR*/ |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingLf.css 4`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "lf" |
|||
parsers: ["css"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
.foo { |
|||
margin: 42px; |
|||
} |
|||
=====================================output===================================== |
|||
.foo { |
|||
margin: 42px; |
|||
} |
|||
|
|||
================================================================================ |
|||
`; |
@ -1,4 +0,0 @@ |
|||
run_spec(__dirname, ["css"]); |
|||
run_spec(__dirname, ["css"], { endOfLine: "cr" }); |
|||
run_spec(__dirname, ["css"], { endOfLine: "crlf" }); |
|||
run_spec(__dirname, ["css"], { endOfLine: "lf" }); |
@ -1,3 +0,0 @@ |
|||
.foo { |
|||
margin: 42px; |
|||
} |
@ -1,3 +0,0 @@ |
|||
.foo { |
|||
margin: 42px; |
|||
} |
@ -1,137 +0,0 @@ |
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP |
|||
|
|||
exports[`usingCrlf.md 1`] = ` |
|||
====================================options===================================== |
|||
parsers: ["markdown"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
# Markdown file |
|||
|
|||
testing line endings |
|||
=====================================output===================================== |
|||
# Markdown file |
|||
|
|||
testing line endings |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingCrlf.md 2`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "cr" |
|||
parsers: ["markdown"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
# Markdown file |
|||
|
|||
testing line endings |
|||
=====================================output===================================== |
|||
# Markdown file/*CR*//*CR*/testing line endings/*CR*/ |
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingCrlf.md 3`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "crlf" |
|||
parsers: ["markdown"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
# Markdown file |
|||
|
|||
testing line endings |
|||
=====================================output===================================== |
|||
# Markdown file/*CR*/ |
|||
/*CR*/ |
|||
testing line endings/*CR*/ |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingCrlf.md 4`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "lf" |
|||
parsers: ["markdown"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
# Markdown file |
|||
|
|||
testing line endings |
|||
=====================================output===================================== |
|||
# Markdown file |
|||
|
|||
testing line endings |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingLf.md 1`] = ` |
|||
====================================options===================================== |
|||
parsers: ["markdown"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
# Markdown file |
|||
|
|||
testing line endings |
|||
=====================================output===================================== |
|||
# Markdown file |
|||
|
|||
testing line endings |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingLf.md 2`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "cr" |
|||
parsers: ["markdown"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
# Markdown file |
|||
|
|||
testing line endings |
|||
=====================================output===================================== |
|||
# Markdown file/*CR*//*CR*/testing line endings/*CR*/ |
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingLf.md 3`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "crlf" |
|||
parsers: ["markdown"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
# Markdown file |
|||
|
|||
testing line endings |
|||
=====================================output===================================== |
|||
# Markdown file/*CR*/ |
|||
/*CR*/ |
|||
testing line endings/*CR*/ |
|||
|
|||
================================================================================ |
|||
`; |
|||
|
|||
exports[`usingLf.md 4`] = ` |
|||
====================================options===================================== |
|||
endOfLine: "lf" |
|||
parsers: ["markdown"] |
|||
printWidth: 80 |
|||
| printWidth |
|||
=====================================input====================================== |
|||
# Markdown file |
|||
|
|||
testing line endings |
|||
=====================================output===================================== |
|||
# Markdown file |
|||
|
|||
testing line endings |
|||
|
|||
================================================================================ |
|||
`; |
@ -1,4 +0,0 @@ |
|||
run_spec(__dirname, ["markdown"]); |
|||
run_spec(__dirname, ["markdown"], { endOfLine: "cr" }); |
|||
run_spec(__dirname, ["markdown"], { endOfLine: "crlf" }); |
|||
run_spec(__dirname, ["markdown"], { endOfLine: "lf" }); |
@ -1,3 +0,0 @@ |
|||
# Markdown file |
|||
|
|||
testing line endings |
@ -1,3 +0,0 @@ |
|||
# Markdown file |
|||
|
|||
testing line endings |
@ -1,6 +1,6 @@ |
|||
// @flow
|
|||
// Example found at
|
|||
// https://github.com/sebmarkbage/art/blob/51ffce8164a555d652843241c2fdda52e186cbbd/parsers/svg/text.js#L137
|
|||
const evil_regex_as_a_string = "/[\s�]*$/"; |
|||
|
|||
const error: string = 123; // Should be an error, but can't lex this file
|
|||
// @flow
|
|||
// Example found at
|
|||
// https://github.com/sebmarkbage/art/blob/51ffce8164a555d652843241c2fdda52e186cbbd/parsers/svg/text.js#L137
|
|||
const evil_regex_as_a_string = "/[\s�]*$/"; |
|||
|
|||
const error: string = 123; // Should be an error, but can't lex this file
|
|||
|
@ -1,66 +1,66 @@ |
|||
export interface Environment1 extends GenericEnvironment< |
|||
SomeType, |
|||
AnotherType, |
|||
YetAnotherType, |
|||
> { |
|||
m(): void; |
|||
}; |
|||
export class Environment2 extends GenericEnvironment< |
|||
SomeType, |
|||
AnotherType, |
|||
YetAnotherType, |
|||
DifferentType1, |
|||
DifferentType2, |
|||
DifferentType3, |
|||
DifferentType4, |
|||
> { |
|||
m() {}; |
|||
}; |
|||
|
|||
// Declare Interface Break
|
|||
declare interface ExtendsOne extends ASingleInterface { |
|||
x: string; |
|||
} |
|||
|
|||
declare interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { |
|||
x: string; |
|||
} |
|||
|
|||
declare interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { |
|||
x: string; |
|||
} |
|||
|
|||
// Interface declaration break
|
|||
interface ExtendsOne extends ASingleInterface { |
|||
x: string; |
|||
} |
|||
|
|||
interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { |
|||
x: string; |
|||
} |
|||
|
|||
interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { |
|||
s: string; |
|||
} |
|||
|
|||
// Generic Types
|
|||
interface ExtendsOne extends ASingleInterface<string> { |
|||
x: string; |
|||
} |
|||
|
|||
interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName<string> { |
|||
x: string; |
|||
} |
|||
|
|||
interface ExtendsMany |
|||
extends ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7> { |
|||
x: string; |
|||
} |
|||
|
|||
interface ExtendsManyWithGenerics |
|||
extends InterfaceOne, InterfaceTwo, ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7>, InterfaceThree { |
|||
|
|||
x: string; |
|||
} |
|||
|
|||
export interface ExtendsLongOneWithGenerics extends Bar< SomeLongTypeSomeLongTypeSomeLongTypeSomeLongType, ToBreakLineToBreakLineToBreakLine> {} |
|||
export interface Environment1 extends GenericEnvironment< |
|||
SomeType, |
|||
AnotherType, |
|||
YetAnotherType, |
|||
> { |
|||
m(): void; |
|||
}; |
|||
export class Environment2 extends GenericEnvironment< |
|||
SomeType, |
|||
AnotherType, |
|||
YetAnotherType, |
|||
DifferentType1, |
|||
DifferentType2, |
|||
DifferentType3, |
|||
DifferentType4, |
|||
> { |
|||
m() {}; |
|||
}; |
|||
|
|||
// Declare Interface Break
|
|||
declare interface ExtendsOne extends ASingleInterface { |
|||
x: string; |
|||
} |
|||
|
|||
declare interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { |
|||
x: string; |
|||
} |
|||
|
|||
declare interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { |
|||
x: string; |
|||
} |
|||
|
|||
// Interface declaration break
|
|||
interface ExtendsOne extends ASingleInterface { |
|||
x: string; |
|||
} |
|||
|
|||
interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName { |
|||
x: string; |
|||
} |
|||
|
|||
interface ExtendsMany extends Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7 { |
|||
s: string; |
|||
} |
|||
|
|||
// Generic Types
|
|||
interface ExtendsOne extends ASingleInterface<string> { |
|||
x: string; |
|||
} |
|||
|
|||
interface ExtendsLarge extends ASingleInterfaceWithAReallyReallyReallyReallyLongName<string> { |
|||
x: string; |
|||
} |
|||
|
|||
interface ExtendsMany |
|||
extends ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7> { |
|||
x: string; |
|||
} |
|||
|
|||
interface ExtendsManyWithGenerics |
|||
extends InterfaceOne, InterfaceTwo, ASingleGenericInterface<Interface1, Interface2, Interface3, Interface4, Interface5, Interface6, Interface7>, InterfaceThree { |
|||
|
|||
x: string; |
|||
} |
|||
|
|||
export interface ExtendsLongOneWithGenerics extends Bar< SomeLongTypeSomeLongTypeSomeLongTypeSomeLongType, ToBreakLineToBreakLineToBreakLine> {} |
|||
|
@ -1,3 +1,3 @@ |
|||
<div> |
|||
Text |
|||
<div> |
|||
Text |
|||
</div> |
|||
|
@ -1,131 +1,131 @@ |
|||
<View |
|||
style={ |
|||
{ |
|||
someVeryLongStyle1: "true", |
|||
someVeryLongStyle2: "true", |
|||
someVeryLongStyle3: "true", |
|||
|