Enable eslint-plugin-eslint-comments in RN

Reviewed By: sahrens

Differential Revision: D6677677

fbshipit-source-id: d1bf9191a405f05dfb3a5c1e50b0d013cf1fe26d
This commit is contained in:
Eli White 2018-01-08 16:54:54 -08:00 committed by Facebook Github Bot
parent b826596700
commit a1a0a69546
2 changed files with 14 additions and 5 deletions

View File

@ -13,6 +13,7 @@
},
"plugins": [
"eslint-comments",
"flowtype",
"prettier",
"react",
@ -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
@ -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"],

View File

@ -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",