Skip to content

Commit a1a0a69

Browse files
elicwhitefacebook-github-bot
authored andcommitted
Enable eslint-plugin-eslint-comments in RN
Reviewed By: sahrens Differential Revision: D6677677 fbshipit-source-id: d1bf9191a405f05dfb3a5c1e50b0d013cf1fe26d
1 parent b826596 commit a1a0a69

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.eslintrc

+13-5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
},
1414

1515
"plugins": [
16+
"eslint-comments",
1617
"flowtype",
1718
"prettier",
1819
"react",
@@ -58,11 +59,6 @@
5859
},
5960

6061
"rules": {
61-
// Flow Plugin
62-
// The following rules are made available via `eslint-plugin-flowtype`
63-
"flowtype/define-flow-type": 1,
64-
"flowtype/use-flow-type": 1,
65-
6662
// General
6763

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

174+
// ESLint Comments Plugin
175+
// The following rules are made available via `eslint-plugin-eslint-comments`
176+
'eslint-comments/no-aggregating-enable': 1, // disallows eslint-enable comments for multiple eslint-disable comments
177+
'eslint-comments/no-unlimited-disable': 1, // disallows eslint-disable comments without rule names
178+
'eslint-comments/no-unused-disable': 1, // disallow disables that don't cover any errors
179+
'eslint-comments/no-unused-enable': 1, // // disallow enables that don't enable anything or enable rules that weren't disabled
180+
181+
// Flow Plugin
182+
// The following rules are made available via `eslint-plugin-flowtype`
183+
"flowtype/define-flow-type": 1,
184+
"flowtype/use-flow-type": 1,
185+
178186
// Prettier Plugin
179187
// https://github.com/prettier/eslint-plugin-prettier
180188
"prettier/prettier": [2, "fb", "@format"],

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@
204204
"eslint": "^3.19.0",
205205
"eslint-config-fb-strict": "^20.0.3",
206206
"eslint-config-fbjs": "^1.1.1",
207+
"eslint-plugin-eslint-comments": "^2.0.1",
207208
"eslint-plugin-flowtype": "^2.33.0",
208209
"eslint-plugin-jest": "^21.5.0",
209210
"eslint-plugin-prettier": "2.1.1",

0 commit comments

Comments
 (0)