Skip to content

Commit afb717c

Browse files
committed
Implement linkComponent settings in rule
1 parent 65512d6 commit afb717c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/rules/jsx-no-target-blank.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ module.exports = {
8686
create: function(context) {
8787
const configuration = context.options[0] || {};
8888
const enforceDynamicLinks = configuration.enforceDynamicLinks || 'always';
89+
const linkComponents = DEFAULTS.concat(context.settings.linkComponents || []);
8990

90-
const elements = new Map((DEFAULTS.concat(configuration.components || [])).map(value => {
91+
const elements = new Map((linkComponents.concat(configuration.components || [])).map(value => {
9192
const name = typeof value === 'string' ? value : value.name;
9293
const linkAttribute = typeof value === 'string' ? 'href' : value.linkAttribute;
9394
return [name, linkAttribute];

0 commit comments

Comments
 (0)