diff --git a/.eslintrc b/.eslintrc index 2e07c99e8..f840c3abc 100644 --- a/.eslintrc +++ b/.eslintrc @@ -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 diff --git a/Libraries/.eslintrc b/Libraries/.eslintrc new file mode 100644 index 000000000..ddcf4e272 --- /dev/null +++ b/Libraries/.eslintrc @@ -0,0 +1,7 @@ +{ + "rules": { + // This folder currently runs through babel and doesn't need to be + // compatible with node 4 + "comma-dangle": 0 + } +} diff --git a/RNTester/.eslintrc b/RNTester/.eslintrc new file mode 100644 index 000000000..ddcf4e272 --- /dev/null +++ b/RNTester/.eslintrc @@ -0,0 +1,7 @@ +{ + "rules": { + // This folder currently runs through babel and doesn't need to be + // compatible with node 4 + "comma-dangle": 0 + } +} diff --git a/jest/.eslintrc b/jest/.eslintrc new file mode 100644 index 000000000..ddcf4e272 --- /dev/null +++ b/jest/.eslintrc @@ -0,0 +1,7 @@ +{ + "rules": { + // This folder currently runs through babel and doesn't need to be + // compatible with node 4 + "comma-dangle": 0 + } +} diff --git a/local-cli/.eslintrc b/local-cli/.eslintrc index 6f2bcc4db..dcb7e7947 100644 --- a/local-cli/.eslintrc +++ b/local-cli/.eslintrc @@ -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