Skip to content
Permalink
Browse files

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
  • Loading branch information...
TheSavior authored and facebook-github-bot committed May 11, 2018
1 parent cd7c91f commit 1e2de712907e5fe0d17648f0ff5c81d4384ca85b
Showing with 1 addition and 28 deletions.
  1. +1 −28 .eslintrc
@@ -57,18 +57,7 @@

"rules": {
// General

// This must be disallowed in this repo because the minimum supported
// version of node is 4 which doesn't support trailing commas.
// Once the minimum supported version is 8 or greater this can be changed
"comma-dangle": [2, { // disallow trailing commas in object literals
"arrays": "ignore",
"objects": "ignore",
"imports": "ignore",
"exports": "ignore",
"functions": "never"
}],

"comma-dangle": [1, "always-multiline"], // allow or disallow trailing commas
"no-cond-assign": 1, // disallow assignment in conditional expressions
"no-console": 0, // disallow use of console (off by default in the node environment)
"no-const-assign": 2, // disallow assignment to const-declared variables
@@ -267,27 +256,11 @@
},

"overrides": [
{
"files": [
"Libraries/**/*.js",
"RNTester/**/*.js",
"jest/**/*.js",
],
"rules": {
// These folders currently run through babel and don't need to be
// compatible with node 4
"comma-dangle": 0,
},
},
{
"files": [
"local-cli/**/*.js",
],
"rules": {
// This folder currently runs through babel and doesn't need to be
// compatible with node 4
"comma-dangle": 0,

"lint/extra-arrow-initializer": 0,
"no-alert": 0,
"no-console-disallow": 0,

0 comments on commit 1e2de71

Please sign in to comment.
You can’t perform that action at this time.