Skip to content

Commit

Permalink
Enable eslint on circle ci
Browse files Browse the repository at this point in the history
Reviewed By: zertosh

Differential Revision: D5374369

fbshipit-source-id: 5ffd246bc6fa735d781ed71cd293b7883184b786
  • Loading branch information
elicwhite authored and facebook-github-bot committed Jul 10, 2017
1 parent 5da0a99 commit 40fdd6d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 25 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
**/staticBundle.js
**/main.js
Libraries/vendor/**/*
Libraries/Renderer/*
37 changes: 12 additions & 25 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"root": true,

"parser": "babel-eslint",

"ecmaFeatures": {
Expand All @@ -11,6 +13,7 @@
},

"plugins": [
"flowtype",
"react"
],

Expand Down Expand Up @@ -49,33 +52,17 @@
"setTimeout": false,
"window": false,
"XMLHttpRequest": false,
"pit": false,

// Flow global types.
"ReactComponent": false,
"ReactClass": false,
"ReactElement": false,
"ReactPropsCheckType": false,
"ReactPropsChainableTypeChecker": false,
"ReactPropTypes": false,
"SyntheticEvent": false,
"$Either": false,
"$All": false,
"$ArrayBufferView": false,
"$Tuple": false,
"$Supertype": false,
"$Subtype": false,
"$Shape": false,
"$Diff": false,
"$Keys": false,
"$Enum": false,
"$Exports": false,
"$FlowIssue": false,
"$FlowFixMe": false,
"$FixMe": false
"pit": false
},

"rules": {
// Flow Plugin
// The following rules are made available via `eslint-plugin-flowtype`
"flowtype/define-flow-type": 1,
"flowtype/use-flow-type": 1,

// General

"comma-dangle": 0, // disallow trailing commas in object literals
"no-cond-assign": 1, // disallow assignment in conditional expressions
"no-console": 0, // disallow use of console (off by default in the node environment)
Expand Down Expand Up @@ -241,6 +228,6 @@
"react/prop-types": 0,
"react/react-in-jsx-scope": 1,
"react/self-closing-comp": 1,
"react/wrap-multilines": 0,
"react/wrap-multilines": 0
}
}
3 changes: 3 additions & 0 deletions Libraries/Network/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* @nolint
*
*/

/* eslint-disable */

'use strict';

import 'whatwg-fetch';
Expand Down
1 change: 1 addition & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ test:
override:
# eslint bot. This GitHub token grants public_repo access scope.
- 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
- npm run lint
# JS tests for dependencies installed with npm3
- npm run flow -- check
- npm test -- --maxWorkers=1
Expand Down

0 comments on commit 40fdd6d

Please sign in to comment.