From 4d03e07b5976795b191420a8e82a2644446f6f8e Mon Sep 17 00:00:00 2001 From: Megan Lyle Date: Thu, 23 May 2019 09:24:21 -0500 Subject: [PATCH 1/2] fix link linting for react router Link elements (to instead of href) --- js/react/rules/react-a11y.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/react/rules/react-a11y.js b/js/react/rules/react-a11y.js index e0c9419..19e49f6 100644 --- a/js/react/rules/react-a11y.js +++ b/js/react/rules/react-a11y.js @@ -43,10 +43,11 @@ module.exports = { components: [''] }], - // disallow href "#" + // disallow href "#" and enforce link best practices // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md 'jsx-a11y/anchor-is-valid': [2, { - components: ['Link', 'Anchor', 'a'] + components: ['Link', 'Anchor', 'a'], + specialLink: ['to'] }], // require HTML elements to have a "lang" prop From 1a27909909adaa203bbafc1cd1f3e5aa92e4ff36 Mon Sep 17 00:00:00 2001 From: Megan Lyle Date: Thu, 23 May 2019 09:25:12 -0500 Subject: [PATCH 2/2] increase version number --- js/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/package.json b/js/package.json index 7f77a8d..4484491 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-neighborhoods", - "version": "2.0.0", + "version": "2.0.1", "description": "Neighborhoods.com Javascript Style Guide & Linting Rules", "keywords": [ "nhds",