Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically include plugin when extending preset, fixes #313 #314

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .README/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ To enable this configuration use the extends property in your `.eslintrc` config
{
"extends": [
"plugin:flowtype/recommended"
],
"plugins": [
"flowtype"
]
}
```
Expand Down
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2436,7 +2436,7 @@ type FooType = { a: number, c: number, b: string }
c: number,
b: string,
}

// Message: Expected type annotations to be in ascending order. "b" should be before "c".


Expand All @@ -2445,7 +2445,7 @@ type FooType = { a: number, c: number, b: string }
c: number,
b: string,
}

// Message: Expected type annotations to be in ascending order. "b" should be before "c".


Expand All @@ -2454,7 +2454,7 @@ type FooType = { a: number, c: number, b: string }
c: number,
b: string,
}

// Message: Expected type annotations to be in ascending order. "b" should be before "c".


Expand All @@ -2463,7 +2463,7 @@ type FooType = { a: number, c: number, b: string }
c: ?number,
b: string,
}

// Message: Expected type annotations to be in ascending order. "b" should be before "c".


Expand All @@ -2472,7 +2472,7 @@ type FooType = { a: number, c: number, b: string }
c: number,
b: (param: string) => number,
}

// Message: Expected type annotations to be in ascending order. "b" should be before "c".


Expand All @@ -2481,7 +2481,7 @@ type FooType = { a: number, c: number, b: string }
c: number,
b: (param: string) => number,
}

// Message: Expected type annotations to be in ascending order. "b" should be before "c".


Expand All @@ -2490,7 +2490,7 @@ type FooType = { a: number, c: number, b: string }
a: number | string | boolean,
b: (param: string) => number,
}

// Message: Expected type annotations to be in ascending order. "a" should be before "c".


Expand All @@ -2503,7 +2503,7 @@ type FooType = { a: number, c: number, b: string }
a: number | string | boolean,
b: (param: string) => number,
}

// Message: Expected type annotations to be in ascending order. "x" should be before "z".
// Message: Expected type annotations to be in ascending order. "a" should be before "c".

Expand All @@ -2521,7 +2521,7 @@ type FooType = { a: number, c: number, b: string }
a: number | string | boolean,
b: (param: string) => number,
}

// Message: Expected type annotations to be in ascending order. "k" should be before "l".
// Message: Expected type annotations to be in ascending order. "x" should be before "z".
// Message: Expected type annotations to be in ascending order. "a" should be before "c".
Expand Down Expand Up @@ -2647,7 +2647,7 @@ The following patterns are considered problems:
{ a: string, b: number }) => {}
// Message: There must not be a line break after "foo" parameter type annotation colon.

(foo:
(foo:
{ a: string, b: number }) => {}
// Message: There must not be a line break after "foo" parameter type annotation colon.

Expand Down Expand Up @@ -3023,7 +3023,7 @@ The following patterns are not considered problems:
{ a: string, b: number }) => {}

// Options: ["always",{"allowLineBreak":true}]
(foo:
(foo:
{ a: string, b: number }) => {}

// Options: ["never"]
Expand Down Expand Up @@ -4128,4 +4128,3 @@ function x<Y: A.B.C>(i: Y) { i }; type A = {}; x()
**Deprecated** Babylon (the Babel parser) v6.10.0 fixes parsing of the invalid syntax this plugin warned against.

Checks for simple Flow syntax errors.

3 changes: 3 additions & 0 deletions src/configs/recommended.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"parser": "babel-eslint",
"plugins": [
"flowtype"
],
"rules": {
"flowtype/boolean-style": [
2,
Expand Down