Skip to content

Commit 1e2de71

Browse files
elicwhitefacebook-github-bot
authored andcommitted
Allow trailing commas
Summary: This was previously set to disallow trailing commas on function arguments which prettier would add. Since we are dropping support for node < 8, we can now change this setting to require trailing commas everywhere and be consistent with the prettier config at Facebook. Reviewed By: hramos Differential Revision: D7961098 fbshipit-source-id: fbe49513183a8c8e027bb05467a767235dbfb15b
1 parent cd7c91f commit 1e2de71

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

.eslintrc

+1-28
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,7 @@
5757

5858
"rules": {
5959
// General
60-
61-
// This must be disallowed in this repo because the minimum supported
62-
// version of node is 4 which doesn't support trailing commas.
63-
// Once the minimum supported version is 8 or greater this can be changed
64-
"comma-dangle": [2, { // disallow trailing commas in object literals
65-
"arrays": "ignore",
66-
"objects": "ignore",
67-
"imports": "ignore",
68-
"exports": "ignore",
69-
"functions": "never"
70-
}],
71-
60+
"comma-dangle": [1, "always-multiline"], // allow or disallow trailing commas
7261
"no-cond-assign": 1, // disallow assignment in conditional expressions
7362
"no-console": 0, // disallow use of console (off by default in the node environment)
7463
"no-const-assign": 2, // disallow assignment to const-declared variables
@@ -267,27 +256,11 @@
267256
},
268257

269258
"overrides": [
270-
{
271-
"files": [
272-
"Libraries/**/*.js",
273-
"RNTester/**/*.js",
274-
"jest/**/*.js",
275-
],
276-
"rules": {
277-
// These folders currently run through babel and don't need to be
278-
// compatible with node 4
279-
"comma-dangle": 0,
280-
},
281-
},
282259
{
283260
"files": [
284261
"local-cli/**/*.js",
285262
],
286263
"rules": {
287-
// This folder currently runs through babel and doesn't need to be
288-
// compatible with node 4
289-
"comma-dangle": 0,
290-
291264
"lint/extra-arrow-initializer": 0,
292265
"no-alert": 0,
293266
"no-console-disallow": 0,

0 commit comments

Comments
 (0)