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
This commit is contained in:
parent
cd7c91f35d
commit
1e2de71290
29
.eslintrc
29
.eslintrc
|
@ -57,18 +57,7 @@
|
||||||
|
|
||||||
"rules": {
|
"rules": {
|
||||||
// General
|
// General
|
||||||
|
"comma-dangle": [1, "always-multiline"], // allow or disallow trailing commas
|
||||||
// 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"
|
|
||||||
}],
|
|
||||||
|
|
||||||
"no-cond-assign": 1, // disallow assignment in conditional expressions
|
"no-cond-assign": 1, // disallow assignment in conditional expressions
|
||||||
"no-console": 0, // disallow use of console (off by default in the node environment)
|
"no-console": 0, // disallow use of console (off by default in the node environment)
|
||||||
"no-const-assign": 2, // disallow assignment to const-declared variables
|
"no-const-assign": 2, // disallow assignment to const-declared variables
|
||||||
|
@ -267,27 +256,11 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
"overrides": [
|
"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": [
|
"files": [
|
||||||
"local-cli/**/*.js",
|
"local-cli/**/*.js",
|
||||||
],
|
],
|
||||||
"rules": {
|
"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,
|
"lint/extra-arrow-initializer": 0,
|
||||||
"no-alert": 0,
|
"no-alert": 0,
|
||||||
"no-console-disallow": 0,
|
"no-console-disallow": 0,
|
||||||
|
|
Loading…
Reference in New Issue