From 97903dae48a61144d55a81f91140bc08d188181d Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Mon, 28 Oct 2019 16:58:55 -0700 Subject: [PATCH 1/2] fix(lint): disable nesting checks for jsx-a11y/label-has-for --- lib/eslintrc.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/eslintrc.json b/lib/eslintrc.json index 1a63517..c967958 100644 --- a/lib/eslintrc.json +++ b/lib/eslintrc.json @@ -23,6 +23,16 @@ "import/order": ["warn", { "newlines-between": "always" }], + "jsx-a11y/label-has-for": [ + 2, + { + "components": [ "Label" ], + "required": { + "every": [ "id" ] + }, + "allowChildren": false + } + ], "object-curly-spacing": 0, "prefer-const": ["warn", { "destructuring": "all", From bb4fba9e734af620d145752df52b5b5179b2cbae Mon Sep 17 00:00:00 2001 From: Evan Siroky Date: Wed, 30 Oct 2019 17:03:53 -0700 Subject: [PATCH 2/2] refactor(lint): Add comment to eslint file about jsx nesting --- lib/eslintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/eslintrc.json b/lib/eslintrc.json index c967958..c1316ad 100644 --- a/lib/eslintrc.json +++ b/lib/eslintrc.json @@ -23,6 +23,7 @@ "import/order": ["warn", { "newlines-between": "always" }], + // turn off nesting requirement. See https://github.com/conveyal/mastarm/pull/296 "jsx-a11y/label-has-for": [ 2, {