Skip to content

Commit

Permalink
Relax href-or-on-click rule to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
zinckiwi committed Jan 4, 2024
1 parent e310d71 commit e3e7d5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/eslint-plugin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
recommended: {
plugins: ['@elastic/eslint-plugin-eui'],
rules: {
'@elastic/eui/href-or-on-click': 'error',
'@elastic/eui/href-or-on-click': 'warn',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/rules/href_or_on_click.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
if (hasHref && hasOnClick) {
context.report(
node,
`<${node.name.name}> accepts either \`href\` or \`onClick\`, not both.`
`<${node.name.name}> supplied with both \`href\` and \`onClick\`; is this intentional? (Valid use cases include programmatic navigation via \`onClick\` while preserving "Open in new tab" style functionality via \`href\`.)`
);
}
},
Expand Down

0 comments on commit e3e7d5e

Please sign in to comment.