Skip to content

Commit 40fdd6d

Browse files
elicwhitefacebook-github-bot
authored andcommitted
Enable eslint on circle ci
Reviewed By: zertosh Differential Revision: D5374369 fbshipit-source-id: 5ffd246bc6fa735d781ed71cd293b7883184b786
1 parent 5da0a99 commit 40fdd6d

File tree

4 files changed

+17
-25
lines changed

4 files changed

+17
-25
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
**/staticBundle.js
44
**/main.js
55
Libraries/vendor/**/*
6+
Libraries/Renderer/*

.eslintrc

+12-25
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"root": true,
3+
24
"parser": "babel-eslint",
35

46
"ecmaFeatures": {
@@ -11,6 +13,7 @@
1113
},
1214

1315
"plugins": [
16+
"flowtype",
1417
"react"
1518
],
1619

@@ -49,33 +52,17 @@
4952
"setTimeout": false,
5053
"window": false,
5154
"XMLHttpRequest": false,
52-
"pit": false,
53-
54-
// Flow global types.
55-
"ReactComponent": false,
56-
"ReactClass": false,
57-
"ReactElement": false,
58-
"ReactPropsCheckType": false,
59-
"ReactPropsChainableTypeChecker": false,
60-
"ReactPropTypes": false,
61-
"SyntheticEvent": false,
62-
"$Either": false,
63-
"$All": false,
64-
"$ArrayBufferView": false,
65-
"$Tuple": false,
66-
"$Supertype": false,
67-
"$Subtype": false,
68-
"$Shape": false,
69-
"$Diff": false,
70-
"$Keys": false,
71-
"$Enum": false,
72-
"$Exports": false,
73-
"$FlowIssue": false,
74-
"$FlowFixMe": false,
75-
"$FixMe": false
55+
"pit": false
7656
},
7757

7858
"rules": {
59+
// Flow Plugin
60+
// The following rules are made available via `eslint-plugin-flowtype`
61+
"flowtype/define-flow-type": 1,
62+
"flowtype/use-flow-type": 1,
63+
64+
// General
65+
7966
"comma-dangle": 0, // disallow trailing commas in object literals
8067
"no-cond-assign": 1, // disallow assignment in conditional expressions
8168
"no-console": 0, // disallow use of console (off by default in the node environment)
@@ -241,6 +228,6 @@
241228
"react/prop-types": 0,
242229
"react/react-in-jsx-scope": 1,
243230
"react/self-closing-comp": 1,
244-
"react/wrap-multilines": 0,
231+
"react/wrap-multilines": 0
245232
}
246233
}

Libraries/Network/fetch.js

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
* @nolint
1111
*
1212
*/
13+
14+
/* eslint-disable */
15+
1316
'use strict';
1417

1518
import 'whatwg-fetch';

circle.yml

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ test:
5151
override:
5252
# eslint bot. This GitHub token grants public_repo access scope.
5353
- cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow --silent -- check --json) | GITHUB_TOKEN="af6ef0d15709bc91d""06a6217a5a826a226fb57b7" CI_USER=$CIRCLE_PROJECT_USERNAME CI_REPO=$CIRCLE_PROJECT_REPONAME PULL_REQUEST_NUMBER=$CIRCLE_PR_NUMBER node bots/code-analysis-bot.js
54+
- npm run lint
5455
# JS tests for dependencies installed with npm3
5556
- npm run flow -- check
5657
- npm test -- --maxWorkers=1

0 commit comments

Comments
 (0)