ESlint: React fixes part 1 (#29062)

* Eslint: allign with latest grafana-eslint-config

* fix ts

* Fix react/jsx-key

* Fix react/no-children-prop

* Fix react/jsx-no-target-blank
This commit is contained in:
Dominik Prokop
2020-11-18 15:36:35 +01:00
committed by GitHub
parent 4b711372c5
commit 0cfb967404
29 changed files with 70 additions and 50 deletions

View File

@@ -58,7 +58,7 @@ export default class CloudWatchLink extends Component<Props, State> {
render() {
const { href } = this.state;
return (
<a href={href} target="_blank" rel="noopener">
<a href={href} target="_blank" rel="noopener noreferrer">
<Icon name="share-alt" /> CloudWatch Logs Insights
</a>
);

View File

@@ -237,13 +237,13 @@ export default class LogsCheatSheet extends PureComponent<ExploreStartPageProps,
return (
<div>
<h2>CloudWatch Logs Cheat Sheet</h2>
{CLIQ_EXAMPLES.map(cat => (
<div>
{CLIQ_EXAMPLES.map((cat, i) => (
<div key={`${cat.category}-${i}`}>
<div className={`cheat-sheet-item__title ${cx(exampleCategory)}`}>{cat.category}</div>
{cat.examples.map((item, i) => (
<div className="cheat-sheet-item" key={`item-${i}`}>
{cat.examples.map((item, j) => (
<div className="cheat-sheet-item" key={`item-${j}`}>
<h4>{item.title}</h4>
{this.renderExpression(item.expr, `item-${i}`)}
{this.renderExpression(item.expr, `item-${j}`)}
</div>
))}
</div>

View File

@@ -9,6 +9,7 @@ export const ThrottlingErrorMessage: FunctionComponent<Props> = ({ region }) =>
Please visit the&nbsp;
<a
target="_blank"
rel="noreferrer"
className="text-link"
href={`https://${region}.console.aws.amazon.com/servicequotas/home?region=${region}#!/services/monitoring/quotas/L-5E141212`}
>
@@ -17,6 +18,7 @@ export const ThrottlingErrorMessage: FunctionComponent<Props> = ({ region }) =>
&nbsp;to request a quota increase or see our&nbsp;
<a
target="_blank"
rel="noreferrer"
className="text-link"
href={`https://grafana.com/docs/features/datasources/cloudwatch/#service-quotas`}
>