Skip to content

Commit

Permalink
pipboard: fix the lint crash by eslint-plugin-react (#375)
Browse files Browse the repository at this point in the history
The eslint-plugin-react@7.20.4 introduced a crash bug when linting a source with anonymous function
with es module.

This PR removes all related anonymous functions to hotfix the problem.

See jsx-eslint/eslint-plugin-react#2728
  • Loading branch information
yorkie committed Jul 27, 2020
1 parent 48ee828 commit 3ced0bb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/pipboard/src/components/Card/index.jsx
Expand Up @@ -5,7 +5,7 @@ const onClickItem = (url) => {
location.href = url;
};

export default function({ items }) {
export default function card({ items }) {
return (
<div className="card-wrapper">
{items.map((item) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/pipboard/src/pages/Home/index.jsx
Expand Up @@ -16,7 +16,7 @@ const items = [{
}];


export default function() {
export default function home() {
return (
<div className="home">
<Card items = {items} />
Expand Down
@@ -1,7 +1,7 @@
import React from 'react';
import { Dialog, Tab } from '@alifd/next';

export default function({ visible, setVisible, stdout, stderr }) {
export default function logview({ visible, setVisible, stdout, stderr }) {
return (
<Dialog
title="Log View"
Expand Down
2 changes: 1 addition & 1 deletion packages/pipboard/src/pages/Tutorial/index.jsx
Expand Up @@ -16,7 +16,7 @@ const items = [{
}];


export default function() {
export default function tutorial() {
return (
<div className="tutorial">
<Card items = {items} />
Expand Down

0 comments on commit 3ced0bb

Please sign in to comment.