Skip to content

Commit

Permalink
Disallow trailing commas in react-native-github
Browse files Browse the repository at this point in the history
Reviewed By: cpojer

Differential Revision: D5645043

fbshipit-source-id: 7378cc96ce39d3d18da7fba51d48db84cfdfa08f
  • Loading branch information
elicwhite authored and facebook-github-bot committed Aug 17, 2017
1 parent f95153e commit 36f2d18
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions Libraries/.eslintrc
Original file line number Diff line number Diff line change
@@ -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 changes: 7 additions & 0 deletions RNTester/.eslintrc
Original file line number Diff line number Diff line change
@@ -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 changes: 7 additions & 0 deletions jest/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"rules": {
// This folder currently runs through babel and doesn't need to be
// compatible with node 4
"comma-dangle": 0
}
}
4 changes: 4 additions & 0 deletions local-cli/.eslintrc
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 36f2d18

Please sign in to comment.