From 9e035879a70e3abe7c7091fc6d71cb3ba37aad58 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Wed, 6 Feb 2019 09:54:32 -0600 Subject: [PATCH] build: cleanup eslint configuration Move `packages/embark`'s eslint config into the monorepo root. Remove `"plugin:react/recommended"` since it's not commonly needed. Put a `"eslintConfig"` config key/object in `packages/embark`'s `package.json` that directs eslint to extend the root config; other `packages/*` can do likewise. --- .../embark/.eslintrc.json => .eslintrc.json | 28 ++++++++++--------- packages/embark/package.json | 4 ++- 2 files changed, 18 insertions(+), 14 deletions(-) rename packages/embark/.eslintrc.json => .eslintrc.json (97%) diff --git a/packages/embark/.eslintrc.json b/.eslintrc.json similarity index 97% rename from packages/embark/.eslintrc.json rename to .eslintrc.json index d500c1e75..623986644 100644 --- a/packages/embark/.eslintrc.json +++ b/.eslintrc.json @@ -5,19 +5,18 @@ "node": true }, "extends": [ - "eslint:recommended", - "plugin:react/recommended" + "eslint:recommended" ], - "parserOptions": { - "sourceType": "module", - "ecmaVersion": 2018, - "ecmaFeatures": { - "jsx": true - } - }, "globals": { "__": true }, + "parserOptions": { + "ecmaFeatures": { + "jsx": true + }, + "ecmaVersion": 2018, + "sourceType": "module" + }, "plugins": [ "react" ], @@ -200,10 +199,13 @@ "no-unmodified-loop-condition": "error", "no-unneeded-ternary": "error", "no-unused-expressions": "error", - "no-unused-vars": ["error", { - "argsIgnorePattern": "^_", - "varsIgnorePattern": "^_" - }], + "no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_" + } + ], "no-use-before-define": "off", "no-useless-call": "off", "no-useless-computed-key": "error", diff --git a/packages/embark/package.json b/packages/embark/package.json index 4298f209d..73e7a7c0b 100644 --- a/packages/embark/package.json +++ b/packages/embark/package.json @@ -38,6 +38,9 @@ "watch:build": "npm run build -- --verbose --watch", "watch:typecheck": "npm run typecheck -- --preserveWatchOutput --watch" }, + "eslintConfig": { + "extends": "../../.eslintrc.json" + }, "dependencies": { "@babel/core": "7.2.2", "@babel/plugin-proposal-class-properties": "7.3.0", @@ -187,7 +190,6 @@ "embark-test-contract-0": "0.0.2", "embark-test-contract-1": "0.0.1", "eslint": "5.7.0", - "eslint-plugin-react": "7.11.1", "mocha-sinon": "1.2.0", "npm-run-all": "4.1.5", "nyc": "13.1.0",