Skip to content

Commit

Permalink
Enable eslint-plugin-eslint-comments in RN
Browse files Browse the repository at this point in the history
Reviewed By: sahrens

Differential Revision: D6677677

fbshipit-source-id: d1bf9191a405f05dfb3a5c1e50b0d013cf1fe26d
  • Loading branch information
elicwhite authored and facebook-github-bot committed Jan 9, 2018
1 parent b826596 commit a1a0a69
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},

"plugins": [
"eslint-comments",
"flowtype",
"prettier",
"react",
Expand Down Expand Up @@ -58,11 +59,6 @@
},

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

// General

// This must be disallowed in this repo because the minimum supported
Expand Down Expand Up @@ -175,6 +171,18 @@
"no-restricted-modules": 1, // restrict usage of specified node modules (off by default)
"no-sync": 0, // disallow use of synchronous methods (off by default)

// ESLint Comments Plugin
// The following rules are made available via `eslint-plugin-eslint-comments`
'eslint-comments/no-aggregating-enable': 1, // disallows eslint-enable comments for multiple eslint-disable comments
'eslint-comments/no-unlimited-disable': 1, // disallows eslint-disable comments without rule names
'eslint-comments/no-unused-disable': 1, // disallow disables that don't cover any errors
'eslint-comments/no-unused-enable': 1, // // disallow enables that don't enable anything or enable rules that weren't disabled

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

// Prettier Plugin
// https://github.com/prettier/eslint-plugin-prettier
"prettier/prettier": [2, "fb", "@format"],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
"eslint": "^3.19.0",
"eslint-config-fb-strict": "^20.0.3",
"eslint-config-fbjs": "^1.1.1",
"eslint-plugin-eslint-comments": "^2.0.1",
"eslint-plugin-flowtype": "^2.33.0",
"eslint-plugin-jest": "^21.5.0",
"eslint-plugin-prettier": "2.1.1",
Expand Down

0 comments on commit a1a0a69

Please sign in to comment.