From 41759d25f05875c10292d36b748246be3eea746d Mon Sep 17 00:00:00 2001 From: Sally Young Date: Sat, 2 Nov 2019 15:35:04 +0000 Subject: [PATCH 1/2] [#13] Run eslint on yarn test and add the settings for React --- package.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 6696921..9eec479 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "repository": "https://github.com/jsdrupal/admin_ui", "scripts": { "build": "parcel build --public-url=MODULE_LOCATION/dist vfancy/index.html", - "test": "prettier --check vfancy/**/*.js component/**/*.js", + "test": "eslint --max-warnings=0 vfancy/**/*.js component/**/*.js", "prettier": "prettier --write vfancy/**/*.js component/**/*.js" }, "devDependencies": { @@ -41,6 +41,11 @@ "react-hooks", "jsx-a11y" ], + "settings": { + "react": { + "version": "detect" + } + }, "rules": { "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "warn", From 84813562489cd5143206712fcbb05a12d6379dd9 Mon Sep 17 00:00:00 2001 From: Matthew Grill Date: Sat, 2 Nov 2019 17:35:39 +0100 Subject: [PATCH 2/2] Update test command with correct paths --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9eec479..fe539f2 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "repository": "https://github.com/jsdrupal/admin_ui", "scripts": { "build": "parcel build --public-url=MODULE_LOCATION/dist vfancy/index.html", - "test": "eslint --max-warnings=0 vfancy/**/*.js component/**/*.js", + "test": "eslint --max-warnings=0 vfancy/**/* component/**/*", "prettier": "prettier --write vfancy/**/*.js component/**/*.js" }, "devDependencies": {