File tree Expand file tree Collapse file tree 5 files changed +23
-3
lines changed Expand file tree Collapse file tree 5 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- extends: "airbnb-base",
2
+ extends: [
3
+ "airbnb-base",
4
+ "plugin:flowtype/recommended"
5
+ ],
3
6
parser: "babel-eslint",
7
+ plugins: [
8
+ "flowtype"
9
+ ],
4
10
rules: {
5
11
'no-template-curly-in-string': 'off'
6
12
}
Original file line number Diff line number Diff line change 2
2
<PROJECT_ROOT>/lib/.*
3
3
<PROJECT_ROOT>/docs/.*
4
4
<PROJECT_ROOT>/reports/.*
5
+
6
+ [libs]
7
+ flow
Original file line number Diff line number Diff line change
1
+ type ESLintReport = {
2
+ node : any ,
3
+ message : string ,
4
+ } ;
5
+
6
+ type ESLintContext = {
7
+ report : ( ESLintReport ) => void ,
8
+ } ;
Original file line number Diff line number Diff line change 39
39
"coveralls" : " ^2.11.8" ,
40
40
"eslint" : " ^3.12.2" ,
41
41
"eslint-config-airbnb-base" : " ^11.0.0" ,
42
+ "eslint-plugin-flowtype" : " ^2.29.2" ,
42
43
"eslint-plugin-import" : " ^2.2.0" ,
43
44
"expect" : " ^1.20.2" ,
44
45
"flow-bin" : " ^0.38.0" ,
Original file line number Diff line number Diff line change 1
1
const ruleBoilerplate = ( author , description ) => `/**
2
2
* @fileoverview ${ description }
3
3
* @author ${ author }
4
+ * @flow
4
5
*/
5
6
6
7
// ----------------------------------------------------------------------------
7
8
// Rule Definition
8
9
// ----------------------------------------------------------------------------
9
10
11
+ import { JSXOpeningElement } from 'ast-types-flow';
10
12
import { generateObjSchema } from '../util/schemas';
11
13
12
14
const errorMessage = '';
@@ -19,8 +21,8 @@ module.exports = {
19
21
schema: [schema],
20
22
},
21
23
22
- create: context => ({
23
- JSXOpeningElement: (node) => {
24
+ create: ( context: ESLintContext) => ({
25
+ JSXOpeningElement: (node: JSXOpeningElement ) => {
24
26
context.report({
25
27
node,
26
28
message: errorMessage,
You can’t perform that action at this time.
0 commit comments