[eslint config] [patch] Add 'to' as a specialLink to the 'anchor-is-valid' a11y rule

Support React Router's `<Link to="...">` attribute out of the box.
This commit is contained in:
Kristóf Poduszló
2017-11-28 19:47:00 +01:00
committed by Jordan Harband
parent b709023494
commit 4817a6b75c

View File

@@ -187,7 +187,7 @@ module.exports = {
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/0745af376cdc8686d85a361ce36952b1fb1ccf6e/docs/rules/anchor-is-valid.md
'jsx-a11y/anchor-is-valid': ['error', {
components: ['Link'],
specialLink: [],
specialLink: ['to'],
aspects: ['noHref', 'invalidHref', 'preferButton'],
}],
},