diff --git a/.eslintrc.js b/.eslintrc.js index caf8ba9e..d953f2d2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -28,6 +28,13 @@ module.exports = { } ], 'arrow-parens': 'off', + 'jsx-a11y/label-has-associated-control': ['error', { + labelComponents: [], + labelAttributes: [], + controlComponents: [], + assert: 'htmlFor', + depth: 25 + }], 'react/jsx-props-no-spreading': 'off', 'react/jsx-one-expression-per-line': 'off', 'react/destructuring-assignment': 'off', diff --git a/package-lock.json b/package-lock.json index 5ee85623..8cff9819 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1342,9 +1342,9 @@ "dev": true }, "react-is": { - "version": "16.12.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz", - "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==", + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "dev": true }, "read-pkg": { diff --git a/package.json b/package.json index 82a4fee7..bd156074 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "lint": "./node_modules/.bin/eslint .", - "test": "./node_modules/.bin/eslint test.js" + "test": "./node_modules/.bin/eslint test.jsx" }, "publishConfig": { "access": "public" diff --git a/test.js b/test.jsx similarity index 52% rename from test.js rename to test.jsx index a5f676d3..9d191032 100644 --- a/test.js +++ b/test.jsx @@ -1,3 +1,4 @@ +import React from 'react'; // eslint-disable-line import/no-unresolved /* eslint-disable no-unused-vars */ // Tests for custom rules in .eslintrc.js @@ -10,6 +11,15 @@ class MethodDoesNotUseThis { foo() { const bar = 'hah'; } + + render() { + return ( + <> + + + + ); + } } // disable no-plusplus