Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Commit

Permalink
fix: @typescript-eslint/explicit-member-accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
griffithtp committed Jun 24, 2019
1 parent e33570b commit 55f50e9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
12 changes: 6 additions & 6 deletions src/components/Developers/Developers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ interface Props {
}

class Developers extends Component<Props, any> {
state = {
public state = {
visibleDevs: 6,
};

render() {
public render() {
return (
<DetailContextConsumer>
{({ packageMeta }: any) => {
Expand All @@ -30,11 +30,11 @@ class Developers extends Component<Props, any> {
);
}

handleLoadMore = () => {
public handleLoadMore = () => {
this.setState(prev => ({ visibleDevs: prev.visibleDevs + 6 }));
};

renderDevelopers = (developers, packageMeta) => {
private renderDevelopers = (developers, packageMeta) => {
const { type } = this.props;
const { visibleDevs } = this.state;
return (
Expand All @@ -54,7 +54,7 @@ class Developers extends Component<Props, any> {
);
};

renderLinkForMail(email, avatarComponent, packageName, version) {
private renderLinkForMail(email, avatarComponent, packageName, version) {
if (!email || isEmail(email) === false) {
return avatarComponent;
}
Expand All @@ -65,7 +65,7 @@ class Developers extends Component<Props, any> {
);
}

renderDeveloperDetails = ({ name, avatar, email }, packageMeta) => {
private renderDeveloperDetails = ({ name, avatar, email }, packageMeta) => {
const { name: packageName, version } = packageMeta.latest;

const avatarComponent = <Avatar aria-label={name} src={avatar} />;
Expand Down
6 changes: 3 additions & 3 deletions src/components/Dist/Dist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Heading, DistListItem, DistChips } from './styles';
import fileSizeSI from '../../utils/file-size';

class Dist extends Component<any, any> {
render() {
public render() {
return (
<DetailContextConsumer>
{(context: any) => {
Expand All @@ -17,7 +17,7 @@ class Dist extends Component<any, any> {
);
}

renderChips(dist: any, license: string) {
private renderChips(dist: any, license: string) {
const distDict = {
'file-count': dist.fileCount,
size: dist.unpackedSize && fileSizeSI(dist.unpackedSize),
Expand All @@ -43,7 +43,7 @@ class Dist extends Component<any, any> {
return chipsList;
}

renderDist = ({ packageMeta }: any) => {
private renderDist = ({ packageMeta }: any) => {
const { dist = {}, license } = packageMeta.latest;

return (
Expand Down
14 changes: 7 additions & 7 deletions src/components/RegistryInfoContent/RegistryInfoContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ function TabContainer({ children }) {
}

class RegistryInfoContent extends Component<Props, State> {
state = {
public state = {
tabPosition: 0,
};

render() {
public render() {
return <div>{this.renderTabs()}</div>;
}

renderTabs() {
private renderTabs() {
const { scope, registryUrl } = this.props;
const { tabPosition } = this.state;

Expand All @@ -48,7 +48,7 @@ class RegistryInfoContent extends Component<Props, State> {
);
}

renderNpmTab(scope: string, registryUrl: string) {
private renderNpmTab(scope: string, registryUrl: string) {
return (
<React.Fragment>
<CopyToClipBoard text={getCLISetConfigRegistry(`${NODE_MANAGER.npm} set`, scope, registryUrl)} />
Expand All @@ -58,7 +58,7 @@ class RegistryInfoContent extends Component<Props, State> {
);
}

renderPNpmTab(scope: string, registryUrl: string) {
private renderPNpmTab(scope: string, registryUrl: string) {
return (
<React.Fragment>
<CopyToClipBoard text={getCLISetConfigRegistry(`${NODE_MANAGER.pnpm} set`, scope, registryUrl)} />
Expand All @@ -68,15 +68,15 @@ class RegistryInfoContent extends Component<Props, State> {
);
}

renderYarnTab(scope: string, registryUrl: string) {
private renderYarnTab(scope: string, registryUrl: string) {
return (
<React.Fragment>
<CopyToClipBoard text={getCLISetConfigRegistry(`${NODE_MANAGER.yarn} config set`, scope, registryUrl)} />
</React.Fragment>
);
}

handleChange = (event: any, tabPosition: number) => {
private handleChange = (event: any, tabPosition: number) => {
event.preventDefault();
this.setState({ tabPosition });
};
Expand Down
9 changes: 5 additions & 4 deletions src/utils/asyncComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from 'react';

export function asyncComponent(getComponent) {
return class AsyncComponent extends React.Component {
static Component = null;
state = { Component: AsyncComponent.Component };
public static Component = null;
public state = { Component: AsyncComponent.Component };

componentDidMount() {
public componentDidMount() {
const { Component } = this.state;
if (!Component) {
getComponent()
Expand All @@ -19,7 +19,8 @@ export function asyncComponent(getComponent) {
});
}
}
render() {

public render() {
const { Component } = this.state;
if (Component) {
// eslint-disable-next-line verdaccio/jsx-spread
Expand Down

0 comments on commit 55f50e9

Please sign in to comment.