Disallow trailing commas in react-native-github

Reviewed By: cpojer

Differential Revision: D5645043

fbshipit-source-id: 7378cc96ce39d3d18da7fba51d48db84cfdfa08f
This commit is contained in:
Eli White 2017-08-17 16:14:16 -07:00 committed by Facebook Github Bot
parent f95153ed52
commit 36f2d18b10
5 changed files with 36 additions and 1 deletions

View File

@ -64,7 +64,17 @@
// General
"comma-dangle": 0, // disallow trailing commas in object literals
// 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-console": 0, // disallow use of console (off by default in the node environment)
"no-const-assign": 2, // disallow assignment to const-declared variables

7
Libraries/.eslintrc Normal file
View File

@ -0,0 +1,7 @@
{
"rules": {
// This folder currently runs through babel and doesn't need to be
// compatible with node 4
"comma-dangle": 0
}
}

7
RNTester/.eslintrc Normal file
View File

@ -0,0 +1,7 @@
{
"rules": {
// This folder currently runs through babel and doesn't need to be
// compatible with node 4
"comma-dangle": 0
}
}

7
jest/.eslintrc Normal file
View File

@ -0,0 +1,7 @@
{
"rules": {
// This folder currently runs through babel and doesn't need to be
// compatible with node 4
"comma-dangle": 0
}
}

View File

@ -1,5 +1,9 @@
{
"rules": {
// This folder currently runs through babel and doesn't need to be
// compatible with node 4
"comma-dangle": 0,
"extra-arrow-initializer": 0,
"no-alert": 0,
"no-console-disallow": 0